Big, Auto Dim, Room Clock (using Arduino and WS2811)

163,293

822

218

First Hello instructables.

This is my first contact with :

  • Instructables
  • Arduino
  • Programmable LED's

So please don't trow rocks at me for noobish mistakes.

Keeping that in mind I'm waiting to read your comments with grate interest and I'm open to any suggestion

Features :

  • big digits ( each digit is approximately the size of a A4 paper).
  • slim in order to fit in a photo frame (a big one).
  • auto dim the light depending on the light in the room.
  • dedicated DST button.

Step 1: Prerequisites

Things I used for this project :

Electronics :

  1. Arduino nano V3.0 (sadly since I can't afford an original arduino I used a chinese clone, for showing my support I donated 2.9 $ to arduino) - 2.9$ on ebay
  2. Digital Light Intensity Sensor Module Photo Resistor for Arduino - 0.99$ on ebay

  3. DS3231 AT24C32 IIC Module Precision Real Time Clock Quare Memory for Arduino - 0.99$ on ebay

  4. DC-DC Buck Converter Step Down Module LM2596 Power Output 1.23V-30V - 0.90$ on ebay

  5. 4m WS2811 led strip 30 leds/m - 12 $ on aliexpress (1 WS2811 IC control 3 LED Chip)

Total cost of electronics : 17.78 $ (without arduino donation)

Miscellaneous :

  1. Heat Shrink Tubing - 7.99$ ebay (assortment, it total 33m)

  2. 20 pcs 5 x 7 cm prototype pcb - 3$ ebay

  3. 3 pcs Micro Switch - 1$ locally bought

  4. Solder - 1$ locally bought

  5. Flux - 1$ locally bought
  6. UTP cable (individual wires used for various connections)
  7. LCD font (http://www.dafont.com/lcd-lcd-mono.font) - free
  8. Cardboard - free loacal supermarket
  9. Polystyrene board - 1.50$ locally bought

Various tools.

Step 2: Preparing - Digit Template

  1. download and install LCD font (http://www.dafont.com/lcd-lcd-mono.font
  2. open word or similar editor and make a template similar to the image (first img)
    • font size ~800,
    • white font color black outline,
    • gray boxes where led strip fits
  3. Print and cut the gray strips with a exacto knife (second img)

Step 3: Preparing - Cut Cardboard and Led Strip

Using the digit template cut the cardboard to size (don't forget to leave space for the dots between hours and minutes)

If your LED strips came with connectors at each end (like mine did) desolder the connector and cut them in sets of 3.

Step 4: Stick the LED Strips

Using the template stick the LED strip on the cardboard.

It's not mandatory but I used a pencil to mark where the LED strips should be placed, this way I got to see the final form before attaching the LED's. It was a good thing since this is how I noticed I left two much space for those dots in the middle, as a result I had stuck the LED strips a little closer.

Step 5: Solder LED Strips

Now starts a long soldering session.

Solder the LED strips in order to form a continues strip.

Notice the order in which to solder the strips in the picture.

For the middle dots I used a single LED strip and covered the middle LED with duct tape.

I used the following color code

  • Blue for ground
  • Green for data
  • Red for Vcc (12v)

Step 6: Wire Arduino on Breadbord

I tried doing a sketch in fritzing but I can't find all the parts :( , Sorry

So here is a list with all the connections and another picture with the setup on a breadboard

Step 7: Test LED's

Before loading this sketch (for which I assume no credit) don't forget to add FastLED library.

If everything went OK the LED's should cycle trough colors. If you have any problems first check your soldered points.

Step 8: Program the Clock

After struggling a little I managed to get a working clock that covers all my needs. I'm sure there is room for improvement.

The code is very commented, if you have any questions please feel free to ask. Also if you have any suggestions, please do tell.

All debugging messages are commented as well.

In order to change the color used you must modify the variable at line 22 ( int ledColor = 0x0000FF; // Color used (in hex)). You can find a list of colors at the bottom of this page: https://github.com/FastLED/FastLED/wiki/Pixel-refe...

If you have problems downloading the code file from instructables here is a mirror : http://bit.ly/1Qjtgg0

Step 9: Make Digits Form Using Polystyrene

Cut each segment in the template printed at the beginning.
Form each digit in the polystyrene using a exacto knife (very hard) or a Hot Wire Cutter.

You can see how I made mine in the pictures.

If you don't have a guitar string you can use just about any thin STEEL wire.

In order to power the Hot Wire Cutter I used the 12v LED power supply.

Also there is a picture with a cut digit. (sorry I forgot to take pictures in the process).

Step 10: Glue Digits and Adding Diffuser

After cutting all 4 digits and the dots glue all of them on the cardboard with the LED strips. (for this process I used
double sided adhesive tape).

In order to diffuse the LED light I used 2 paper sheets on top of the polystyrene. For convenience and aesthetics I used a single A2 size paper folded in two.

Also for finishing touches I've put the entire assembly in a large picture frame.

Time Contest

Second Prize in the
Time Contest

18 People Made This Project!

Recommendations

  • Woodworking Contest

    Woodworking Contest
  • Colors of the Rainbow Contest

    Colors of the Rainbow Contest
  • Classroom Science Contest

    Classroom Science Contest

218 Discussions

0
None
RaimisS

1 year ago

Hi everyone,

I have replicated this project with some additions. Here you will find my code: https://github.com/Barcors/WS2812B_TemperatureCloc...

I have added Dallas sensor for measuring outside temperatures. Positive temperature are working good but I am not success with negative temperatures. Might be someone can help me with this. I do not know how to light up minus and corectly diplay negative temperatures. Thanks

18 replies
0
None
Velikov71RaimisS

Reply 2 months ago

Hello!
I implemented the project with three pixels per segment. I use your code. Would you help me how to change the code so it works with 87 pixels (21x4) +3.
Thank you in advance!!!

0
None
RaimisSVelikov71

Reply 20 days ago

I am pretty sure that you have booth: hardware and code problems. You replicating the initiate project not mine. You mixed things up. Which type of strip you are using? WS2811 and WS2812 are bit different so pay attention on digits constructing. Your code is tried to adjust for WS2811 and mine is for WS2812. You are not using minus temperature so my code is not for your project. Try use initiate code.
You can not connect two things to one input. Arduino pins are different 3 and D3 - read manual and check that again.

0
None
maeseunoRaimisS

Reply 20 days ago

Hi, thanks for your answer, I am using WS2812 and I corrected the connection, light sensor connected to the A3 temperature sensor to the D3, I really would like to use your code since it is for WS2812, I have searched and modified other codes but without positive results, I have reading eh tried to solve this for a week or more, I mean I'm not a lazy guy, I'm just stuck and it's my second arduino project, I hope you can help me please, or any suggestions, apart from formally studying arduino code, which will in the future ;)

clock sketch fritzing.jpg
0
None
RaimisSmaeseuno

Reply 20 days ago

OK no problem then correct digits. As you using WS2812 strip and it have three led's controlled by one microcontroller so you must use my code example. Pay attention to digit construction. For example digit 0
WS2811 : {0,1,1,1,1,1,1}
WS2812 : {0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
So try it again and you and your child will be very happy. Also if you are not using this clock for outside temperature you must disable three led's in front of the strip. Remember that those led's on such a strip WS**** are activated one after one in a sequence. So you must construct or imagine in your head or draw it on a paper each segment of the digit to find out which led is for which segment. Look carefully to example i gave and i am sure you understand. And formula will be not 7x4+2 but 21x4+3. I think it is possible to use your formula but then it needs to think and count...

0
None
RaimisSRaimisS

Reply 20 days ago

Really it should be ok and might be you need disable three led's in front.

0
None
RaimisSRaimisS

Reply 18 days ago

I am glad you have made it.

0
None
maeseunoRaimisS

Reply 18 days ago

Thank you very much for your advice and the time you dedicated me, finally I get it to work correctly (thanks to you) we are very happy my childrens and myself !!!

neoclock4.jpgneoclock5.jpg
0
None
RaimisSVelikov71

Reply 2 months ago

Which one strip you have used? As i remember correctly you must correctly define digitising of digits.
For example digit 0
WS2811 : {0,1,1,1,1,1,1}
WS2812 : {0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
Try it again.

0
None
Velikov71RaimisS

Reply 2 months ago

Thank you for your answer, sir !!! I will try again !!!

0
None
RaimisSRaimisS

Reply 1 year ago

Already made working code. You can use it from github.

0
None
СергейР28RaimisS

Reply 1 year ago

RaimisS tell me please, how are the LEDs in this project arranged for your sketch?

0
None
RaimisSСергейР28

Reply 1 year ago

I am not quite sure that I understood what you mean by that - leds are not anyhow arranged - they are on the strip and goes one after another.

0
None
СергейР28RaimisS

Reply 1 year ago

I thank . I already collected the project. I meant connecting to Arduino, but everything is clear. Thanks for the sketch.

0
None
TomaszK52RaimisS

Reply 3 months ago

Hello, can someone add a few lines, so that the temperature is displayed in a different color depending on the temperature?

0
None
RaimisS

22 days ago

What you mean: "doesn't work" - to say something i need more details. Doesn't work what? Might be you not powered you project or did not connected wires....!? To understand if you have an phisical or code related failure we need to have much more details than "doesn't work"!