Binary Clock Using Neopixels

7,971

81

17

Introduction: Binary Clock Using Neopixels

Hi folks, I love all things LED related and also like making use of them in different interesting ways Yes, I know the Binary Clock has been done on here a number of times, and each are excellent example of how to create your own clock.

I really fancied a Binary Clock to say "I made that", and had a look at what parts I had available, LEDs, Resistors, RTC, Arduino.. then I found an Neopixel Strip (WS2812). That got me thinking, nearly all the Binary Clocks I have seen use LED Matrix which involves a lot of soldering, don't get me wrong, I have no issues soldering, but why can't I use the strip... A plan formed, challenge accepted..

So first, I sat down to figure out what I wanted in a Binary Clock, simple, Hours, Mins Seconds, maximum of 4 rows so I could read it with relative ease, and if you are wondering how to read a Binary Clock, I can recommend have a browse and rad of this page : How to read a Binary Clock Also what do I house it in, luckily I had been in Ikea and have used a few of their Ribba picture frames in other projects, so thought bingo, that will do nicely (and at £2.99 is a good price).

Without further ado, a Part List :

  • Arduino Uno
  • RTC Module (ds1302) Ebay (UK)
  • (Now changed to a 10k Pot) 220k Potentiometer Ebay (UK)
  • 470r Resistor Ebay (UK)
  • Ribba Picture Frame Ikea Ribba
  • Acetate - for the Mask
  • Use of a Laser Printer

Other hookup wires, breadboard and 5v power source will be required, I will assume you have those :)

Now lets get building...

Step 1: LED Strip, Lets Start With That

So first, get the LED Strip, the one I had has LED's (pixels) every 16.5mm, which seemed fine for the frame I had, so I cut them off at 6 pixel intervals using a sharp pair of scissors (usual safety applies).

Please note in the close up of the strip there are arrows, this is the direction of data and power, and the copper pads have a line through, cut along that line to ensure you have copper pads left on the end of each cut part.

You should now have 4 LED strips with 6 pixels on each, if you have, well done, if not, well, try again, or solder them back together (ensure the arrows are inline) and try to count properly next time..

Moving swiftly along, lets get the LED strips in some semblance or order, how I did this was to measure the frame, and divide this up into equal sections. I wanted mine inside the picture mount, so did my calculations using that rather than the whole frame. The mount is the cardboard item which would normally frame the photo, there is a picture in this step with the mount laid on top of the frame.

Step 2: Mount the LED Strips, and Solder...

As can be seen in the photos for this step, I printed lines onto paper and laid the strips on them, then, rebuilt the frame each time and "eyeballed" it to ensure that I had the look I wanted. Once I was happy, I permanently attached the strip to the backing with glue, the sticky back on mine wasn't too good.

For the design of this I used LibreCAD, which is Open Source and more than adequate for the task, remember when printing to center the image and change the print ratio to 1:1. I have attached the Layout I used in this step.

Next on the ToDo list was to wire the Strips up. In my box of bits I had some male PCB edge connectors so I used them rather than soldering the first connect on. If you have these and want to go that route please feel free to do so.

Anyway, starting at the bottom strip, arrows going RIGHT to LEFT, solder your edge connector onto the strip, or your primary connection wires, I'd suggest using Red, Black and another colour for the data. Most strips are labels +. -, D... + is your Positive, - is Negative, D is Data, not all are the same and can have different voltage, mine are 5v. please ensure when powering up you use an appropriate power supply.

Thats the first strip started, now what we need to do is connect all the strips in series, so that should be the left of the bottom strip, to the right of the next strip up, so on and so forth, the last strip should have no connection on the left side and the arrows for all strips should be RIGHT to LEFT as mentioned previously.

Step 3: Some Don't Like It Bare !

Personally I preferred the plain bare looks so you could see how it sort of worked, however, "She Who Must Be Obeyed" said that if was going on that wall it needed to "look tidier" so I had to think fast and realised I could use the Layout and modify it slightly, print it onto acetate and it would look good. As much as I would love to say I broke out photoshop and did this in a trice, I cannot, a friend of mine did this part for me, as my photoshop skills are not as good as my brain would like to think.

The end rendering was printed onto acetate, trimmed and laid behind the glass, the photo mount next, then the LED strips, finally that backing board with the wires coming out for power and data.

As can be seen in the picture, I have Red, Black and Green wires coming out, and the interconnect wires are looped round the back.

The end product I must grudgingly admit doesn't look too bad at all..

The Binary at the bottom says "Binary Clock"

I will get round to one modification when I can lay my hands on some more acetate, and that is to move the numbers for the rows to the right a bit more, they are barley visible.

Step 4: Start With the Wiring... Let the Fun Commence

As am sure you can see in the pictures I couldn't find the correct module in Fritzing so I imported an image and lined it up as best as I could.

The bottom power rail should have it's own 5v power supply, the size of the power supply is depandant on the consumption of your LED's. I would suggest to er on the side of caution and use one that could handle all LED's being lit at maximum brightness.

I have not yet committed this to a PCB (will use stripboard) as I may add an LCD screen in the none to distant future with a Temperature sensor and display the Date/Time and Temperature in standard format, which is why there is no other schematic currently..

WARNING.. note the error in the diagram, the Ground from the RTC (Black wire) needs to goto ground not the Positive rail as shown, will update the diagram and upload it again, thanks istoos for noticing.

Step 5: Finally, the Beast Is Alive !!!

Final step... huzzah !

Check, double check, and check again your connections...

Now get the sketch uploaded into your Arduino, am not going to explain how to do that, as there are more than enough guides on doing this and will not add any worth to this 'ible ...

In the comments of the code, line 119, this need uncommenting, this line of code sets the clock time and date :

// myRTC.setDS1302Time(00, 28, 17, 7, 27, 3, 2016);

To uncomment change this to :

myRTC.setDS1302Time(00, 28, 17, 7, 27, 3, 2016);

And put in the current date/time in format as documented in teh sketch on line 115 :

// seconds, minutes, hours, day of the week, day of the month, month, year

Ok, so now upload that sketch... done ? ok

Now, when you restart the Adruino it will set the date/time to that specified, and you don't want it doing that, so comment out line 119 and upload the sketch again. Now on restart it will read the time form the RTC (Real Time Clock) and should be accurate.

Any problems, check you connections, that will be the main issue, and if the battery you are using in your RTC is weak, then you get spurious time readings (I know, it happened to me, defaulted to 48:45:45)

Any questions or issues please put in the comments and will help out all I can..

Have fun, and enjoy..

Step 6: Now a Little Something Extra !!!!

This morning I was thinking how could I improve the Binary Clock, so while mulling this over and having a coffee I reached to switch on the central heating as was feeling cold, but how cold, what was the temperature !!!

A cunning plan...

Why not add the temperature to the clock ?

Good question, no reason why not to, so lets do it ..

20mins with Fritzing and I had the next stage in my masterpiece ready to go, just needed to trim off one more 6 pixel length of LED Strip, a couple of wires, a 4k7ohm resistor and an hour wielding my trusty soldering iron and a few lines of code... Done!

Do I make it sound easy, well, surprisingly it is...

So with a bit of strip board I put on the DHT11 and the required resistor, exactly as in the diagram.

I updated the previously used sketch, uploaded it and hey, worked first time.. Ok it didn't, when I soldered the male edge connector pins onto the strip, I managed to get a bad joint on the Data line, so had to resolder it..

The temperature is mounted vertically and read as shown in the photo, so the temperature when that picture was taken, was 19 deg C.

Interestingly the DHT11 also measures Humidity, keep watching as there may be another strip arriving soon with humidity..

4 People Made This Project!

Recommendations

  • Pi Day Speed Challenge

    Pi Day Speed Challenge
  • Trash to Treasure Contest

    Trash to Treasure Contest
  • Microcontroller Contest

    Microcontroller Contest

17 Comments

0
khitengoku
khitengoku

Question 9 months ago

So, uhm, this doesn't seem to work anymore. I keep getting an error regarding the virtuabotixRTC. I've added that to the Arduino library... but it just doesn't work. Any suggestions?

0
sparks_vfr
sparks_vfr

Answer 8 months ago

Hi, being as this was created 4 years ago, I would assume there are changes to libraries, it's a great opportunity for you to revisit and remix this 'ible :)

Thanks for taking the time to comment, I do appreciate it :)

0
sparks_vfr
sparks_vfr

Answer 9 months ago

It's need over 4 years since I did this ible, could be that the RTC module code has changed. If I ever get the change to go back over and re-make this, I'll ensure it's using the lastest libraries..

0
istoos
istoos

4 years ago

Awesome ! Great idea ! (Warning there is a mistake in your fritzing wirering with RTC ground ;) ) Have a nice day !

0
gaborzbusko
gaborzbusko

Reply 8 months ago

Hello. All my appreciation to the creator of the project. I wish many similar imaginative solutions and good health.
I also made the watch, the thermometer version. I have the same problem with the potentiometer - plus it doesn't affect the brightness of the thermometer.
DHT 11 shows very bad values, it would be better to use a more serious sensor-- eg BME 280-M.
(There is also ws2812 at home air pressure and moisture content would fit a lot in the display)
I cut a small house with a laser and the LEDs in its windows are lit. I'll try to upload pictures if I'm interested.
More good work for all builders.
Pittyu

0
sparks_vfr
sparks_vfr

Reply 4 years ago

Will have a look and resolve it, thanks

0
istoos
istoos

Reply 4 years ago

wiring*

0
Soumojit
Soumojit

Question 11 months ago

Is it possible to use a esp8266 to get time from internet and display, without using the arduino and rtc?

0
sparks_vfr
sparks_vfr

Answer 9 months ago

Most probably, but I'll let you have the fun of figuring it out and it's a great opportunity for an awesome Instructable :)

0
jdlasprillae
jdlasprillae

1 year ago

I love this project, but I do not know if I can use an RTC DS3231 instead of a DS1302?
I see that 1302 uses RST pin and I do not know if it influences the code and I have to use a different library or modify the code.

0
JogeirL
JogeirL

2 years ago

Like this one
Add a srtip for the BMP180/280
Temp and barometric pressure
That will be coooool :-)
plz?

0
shayloco342
shayloco342

3 years ago

Can you share the "She Who Must Be Obeyed" photoshop file? I really like the look of it and was thinking of trying an edge lit acrylic sheet behind the acetate to light up the wording and line numbers. and my other question. How are you printing on to the acetate sheet, laser or inkjet printer?

0
AntB
AntB

4 years ago

Hi sparks, this clock looks amazing, so I made one with an Arduino uno and it turned out rather nice. However, when I upload the code to set the rtc1302 the clock displays the time that I set. Then I comment out line 119 and upload again but nothing changes. The seconds and minutes are not moving at all. Could this be a problem with the RTC ? Any suggestions would be welcome, I really want this clock to work.

Thanks in advance

0
IevgenS
IevgenS

4 years ago

Very nice project, I will definitely make this!

0
sparks_vfr
sparks_vfr

Reply 4 years ago

Thank you, enjoy and if you need help just shout :)

0
IevgenS
IevgenS

Reply 4 years ago

I have ordered some components i was missing, still waiting for delivery!

0
sparks_vfr
sparks_vfr

Reply 4 years ago

Excellent, as I said, if you get stuck, please give me a message and will try and help.