loading

This instructable will guide you through the process of connecting the following parts to create an interesting and accurate analogue / digital clock which will automatically set the time from the internet.

Parts needed:

ESP8266-12E module (can be bought for £3 from eBay)

Ring Wall Clock 60 WS2812 (can be bought for £9 from eBay)

Connecting wires

Tools needed:

Pliers

Soldering iron

Step 1: Connecting the Ring Wall Clock 60 WS2812 Boards Terminals Together

Separate into 4 quarter circle boards and remove any rough edges or tabs from the boards.

First connect the GND terminals

Arrange two boards on a flat surface, and solder a piece of wire (I used one of the pins from the supplied connecting strip) between the GND terminals on the boards; add another board to the free end and again solder a pin between the GND terminals; repeat this until all GND terminals are joined.

At this stage, all 4 PCBs should form a ring; correct any alignment errors by heating the GND terminals with the soldering iron and adjusting to make perfect.

Next connect the 5V terminals

This time, using the soldering iron; connect wire between each of the 4 pairs of 5V terminals.

Finally, sorting the ins and outs of data

You now have power connected to all the boards, not for you to be able to control the LEDs, you will need to supply data to each LED.

Each LED has a data in pin and a data out pin. Each LED requires 24 bits (3 bytes) of data to work. The data is sent as 8 bits of green intensity, 8 bits of red intensity and finally 8 bits of blue intensity. Once the LED has received 24 bits total of data on its data pin; it refuses any more and sends any further data to the data out pin. The data out pin should be connected to the next LED's data in pin.

Take a look at the WS2812B datasheet.

Hopefully, you have worked out that for all the 4 boards to work, you need to connect three links between data in and data out. The 4th and final data in and data out pair should not be connected as these will connect to the ESP8266-12E controller board.

Step 2: Connecting the Ring Wall Clock 60 WS2812 Boards Power and Data Terminal Wires

Using 4 pins of the supplied terminal connector, solder these at an angle so you can bring the 5V, Data in, Data out and GND terminals out to the connector without creating a short circuit.

I have shown them in the picture with my connecting wires fitted (actually you do not need data out).

I have connected the wires as below:

Red -> 5V

Blue -> Data In

Black -> GND

Step 3: Connect the LED Ring to Your ESP8266-12E Board.

Now we connect the wires from the LED ring to the ESP8266-12E board.

At the end nearest to the USB connector; you should find 5V and GND pins; connect your red and black wires here.

On the opposite side of the module, roughly half way, you should find a pin called D5; this is the data out pin from the ESP8266-12E module, and will provide data to the Data In pin on the LED ring; connect the blue wire here.

Step 4: Programming Your ESP8266-12E

I am not going to tell you how to install the Arduino software, or how to program the ESP8266-12E processor module, there are plenty of good instructables already written by very talented people; here is one which I quickly located: Programming the ESP8266-12E using Arduino software/IDE

Once you have followed the above instructable; download the Wol_Clock zip file which contains the software required to program your ESP8266-12E module. Unzip this to a location of your choice, navigate to this and open up the Wol_Clock.ino file.

Configure to connect to your WiFi

Initially, to get this working; you will need to set your network SSID and network password in the code; zoom down to lines 55 & 56 and enter the correct information within the quotes " ".

//Set your wifi details so the board can connect and get the time from the internet
const char *ssid = "WiFiSSID"; // your network SSID (name)

const char *password = "WiFiPassword!"; // your network password

Set your timezone

Configure line 52

//Set your timezone in hours difference from GMT
const int hours_Offset_From_GMT = 1;

edit the line hours_Offset_From_GMT to have your time zone offset from GMT.

Working for DST (Daylight Savings)

I have added code which now provides the correct Daylight Savings time (for Europe); this should be easy to edit to correct DST for North America.

Clock goes backwards?

Depending on which LED boards you purchase, some address clockwise, some address anti-clockwise; if your clock is going in the wrong direction; one option is to look at the time in a mirror (which admittedly is not very practical); a better solution exists on line 40. Change the line:

const char ClockGoBackwards = 1; (default)

to

const char ClockGoBackwards = 0;

One last test

Check that everything is working by clicking the "Verify" tick box in the Arduino IDE.

Hopefully the arduino IDE has done the clever work for you; but just in case it has not installed the required libraries to get this working, you will need to do this manually.

From the arduino main menu, Select Sketch -> Include Library -> Manage Libraries to bring up the library manager

In the search box, type NTP and look for an entry in the list called NTPClient; if this is not installed, install it; you should also see an entry called Time, ensure that this is installed as well.

Now change the search box to search for Neopixel, check that the entry called Adafruit NeoPixel is installed.

Hopefully, you should all be set and ready to compile and upload.

Verify that the code is in good shape to compile, and if all is good

Program the ESP8266-12E with your code

click "Upload"

You should have a good working Wol_Clock; I look forward to some of the many customisations.

Christina has already given me her input and requested the dim mode for night time, and the blinking minute hand for easy identification.

Step 5: To Finish This Off...

Having got my 3D printer built and working; I have generated some stl files to provide you with a base for the Wol Clock; also.

Please note that I have had to modify the software to make the time 180 degrees out of phase to allow the wires to be hidden in the base; and there seems to be some new changes to the time library which has made the old code no longer compatible.

OK, I won't win any photography awards, but I will hope you appreciate the base mount which hides the wires.

<p>My little clock</p>
<p>Any idea what could have happened as some times when usb is disconnected the clock doesn't boot up properly anymore? Today the clock &quot;bricked&quot;, and i tried to reset, reflash the nodemcu unit and nothing works - has anyone came across something like that?</p>
<p>it seems i had some bad connection in usb cable or wires - everything works now. still a great instructable!</p>
<p>Is the code still working ?</p>
<p>Very nice, exatly what I wanted</p>
<p>Hi Jon !</p><p>where can i find the WOL_Clock.zip ?</p>
<p>only things you need are the .ino file and library files from github/lib. manager in arduino if you don't have them installed.</p>
<p>i can&acute;t find the .ino file ! </p>
<p>if you are on chrome, press CTRL + F to look for .ino, it is right there on the instructable. over the image of 3d-printed base -mounted clock.</p>
<p>thx</p>
<p>Very nice, especially like the base.</p><p>Makers would be advised to use a 500 ohm resistor on the data line and a 1000uF capacitor across the power. See <a href="https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices" rel="nofollow">https://learn.adafruit.com/adafruit-neopixel-uberg...</a></p><p>I made something similar a few years ago. For a simple enclosure, consider a 12x12&quot; shadow box picture frame. http://chronology.weebly.com/neopixel-ring-clock.html</p>
<p>Really, really good instructable. From parts to working product in about an hour.</p><p>Has anyone came up with a wall mount or something that makes the leds into bars, like in this video: https://www.youtube.com/watch?v=j17TiwMkh-k</p>
<p>Still needs a housing. Took about 40 minutes from turning on the soldering iron to first life. This is the first IoT project I have made and its great. Many thanks, Jon_Fuge, for the work you have put into this project. </p><p>I've used a NodeMCU1.0 (12E) module because I got a few cheap from eBay - it has a 0.9 form factor but has the 12E daughter board - I suspect it was an end of run thing - hence cheap. Used the Arduino IDE (1.6.13) on a PC, bizarrely my iMac couldn't see the module on the USB, perhaps I need a driver.</p><p>No matter, its working and currently hanging off a cupboard draw knob in my living room. The connection appears to be at the 12 o'clock position but I understood that the code had been changed 180 degrees to facilitate the nice little printed hold in this Instructable. Is that code available?</p><p>Once again a big shout out to the author for making my IoT debut an easy one.</p><p>AlanGP</p>
<p>Great Job.</p><p>It is possible ti Control the hours with 3 leds and the minutes with 2 leds?</p><p>Merry chr&iacute;stmas </p>
<p>got the boards Smitty did from OSHpark days ago and the rest of the components from Mouser. Went together in no time! Great job guys. On the backs of giants.</p><p>Just in case it helps anyone as I did just a little digging:</p><p>1) 3.3V regulator (LD1117S33CTR is .8A)</p><p>2) 6.0x4.3MM tact switches (mouser 612-TL1107)</p><p>1) DC Power Jack (490-PJ-002A)</p><p>2) 47uF electrolytic capacitors (<a href="http://www.mouser.com/ProductDetail/Panasonic/ECE-A1CN470U/?qs=sGAEpiMZZMsh%252b1woXyUXjwZRX3FJcpeVqbOlbQFlYRw%3d" rel="nofollow">667-ECE-A1CN470U)<br></a></p><p>I had the header and a 5V wall wart laying around<br></p>
<p>Hey Jon, great job putting all this together.</p><p>I switched it to use an ESP8266-01, the tiny cheap ones, and put it together on a proto-board last night. (https://twitter.com/smittyhalibut/status/777364813861294081)</p><p>Then I spent another couple hours today laying out a proper board to take the ESP8266-01, the power management (WS2812s take 5v, the ESP8266 needs 3.3v), an FTDI programming header, and a connector for the WS2812s. I also added some trimmer pots and headers for analog outputs to drive analog panel meters as a clock as well. It's got a key-hole in the middle to hang the whole thing from a nail in the wall.</p><p>Thanks again for the design and code work. This is awesome. :-)</p><p><br><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/3o8EZLghdRY" width="500"></iframe></p>
<p>Great job on the video and the boards, mine just shipped. Thank you!</p>
:-) glad you're enjoying it! Post a picture when you've got it working.
<p>Also, if you're on Twitter, what's your handle there? I'd love to give you a shout-out by name.</p>
<p>Thank you so much for the fanstastic ible! Got mine up and running with little fuss on the ESP-01. already ordered Smitty's boards for a more permanent set up. This is part of a project I have been working with off and on for 3yrs. Thank you so much for the code, this is what I needed. Any idea if this could be adapted to have a small web interface for updates and special features?</p>
<p>Hi Jon. This is a fantastic instructable and it works really well. I was unsure about the pulsing minute hand, but found the code for it within your program and played around with it.</p><p>The code is very clear and I like playing with the colour settings. Great job and thanks for sharing your creation.</p>
<p>You're welcome, and thanks for the kind comments.</p>
<p>Hi, nice instructable!</p><p>Dont you need a level shifter to drive the ws2812b with a 3v output?</p>
<p>For WS2812B: Vih is 0.7Vdd (~3.5V); Vil is 0.3Vdd (~1.5V)</p><p>NodeMCU board runs at 3.3V</p><p><br>If you wanted guaranteed operation over -25C to +80C then a level shifter would be advised; I am running quite a few of these at room temperature and have had no issues running the input at the lower voltage.</p>
<p>Very good idea.</p><p>I have made this now myself. I do have 1 question though, is there a way to have the hour display only move when the time actually reaches on the hour, so the display will go from say 4 to 5 instead of increments as it does.</p><p>Thanks for the fantastic instructable</p>
<p>Hi trekprint,</p><p>Yes, you can do this by changing line 162 of the latest version of code from:</p><p>pixels.setPixelColor(ClockCorrect(((hour(t) % 12) * 5) + minute(t) / 12), pixels.Color(Hour.r, Hour.g, Hour.b)); // draw the hour hand last</p><p>to:</p><p>pixels.setPixelColor(ClockCorrect(((hour(t) % 12) * 5)), pixels.Color(Hour.r, Hour.g, Hour.b)); // draw the hour hand last</p><p>Hope this does the trick for you.</p><p>Jon</p>
<p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-)</p>
<p>soo amaizing ;-)</p>
<p>Nice idea - works well. Now to find a good place to mount it.</p>
<p>Nice to see it built by another instructabler; great work!</p>
<p>I was pm'd by one user asking how much current does this consume; in &quot;day mode&quot; with lights at maximum brightness, it uses 200mA.</p>
<p>This is a recent instructable, as of posting is time.nist.gov working for anyone? Im getting 0000 from the time test sketch, however us.pool.ntp.org responds fine. <br>Any idea how to point the Time lib at a new server?</p>
<p><a href="http://time.apple.com.ipaddress.com/" rel="nofollow">http://time.apple.com.ipaddress.com/</a><br><br>I paste out time.apple.com with time.nist.org in Time.h,</p>
<p>Watch me go backwards, what I am wrong?</p>
<p>Hi Josefn1; thanks for building and giving some feedback. I think the problem might be that some boards are wired clockwise, some are wired anti-clockwise. In addition to adding some lines of code for DST correction; I have also added a line which you can edit (line 40) which should get your clock running in the right direction.</p>
<p>Thank you very much, the new code is ok:-)</p>
<p>Nice clock design. And it works in the dark too. </p>

About This Instructable

14,304views

182favorites

License:

More by Jon_Fuge:Slovenian Model Kozolec Wol Clock ESP8266-12E + 60 LED WS2812B analogue digital clock 
Add instructable to: