Introduction: Wol Clock ESP8266-12E + 60 LED WS2812B Analogue Digital Clock

Picture of Wol Clock ESP8266-12E + 60 LED WS2812B Analogue Digital Clock

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:


Soldering iron

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

Picture of 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

Picture of 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.

Picture of 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)


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...

Picture of 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.


michalsok (author)2017-11-02
Here is the DST code for USA for those interested.

I had to create a spreadsheet with multiple years to visualize the math.
Silly me.

// For USA (2nd Sunday in March and 1st Sunday in November)


if (month() < 3 || month() > 11) return false;

if (month() > 3 && month() < 11) return true;

int previousSunday = day() - weekday();

if (month() == 3) return previousSunday >= 7;

if (month() == 11) return previousSunday < 0;

return false; // this line never gonna happen


donc146 (author)2017-10-07

Is there any hope to get a fastLED code of it?

I've played around a bit, but it seems to be beyound my skills (by now).

I want to integrate this clock into this code:

But it is fastLED based. And as far i could find out, neopixel and fastLED in one code doesn't seem to work.

HowardLJTaylor (author)2017-09-26

Dude, this is awesome!

GiovanniP41 (author)2017-08-26


Congratulations beautiful project and design, I also built it, but I have the problem that the connecting cables are in the base of the support and the time is offset by 180 °.

How do I edit the software for correct time display?

BrianV66 (author)2017-07-09

Hi Jon_Fuge

How to stop blinking on minute hand?

wlcd (author)2017-02-02

Is the code still working ?

BrianV66 (author)wlcd2017-06-14

The code still good working.

ziga1 made it! (author)2017-03-09

My little clock

taeraeyttaejae (author)2017-01-29

Any idea what could have happened as some times when usb is disconnected the clock doesn't boot up properly anymore? Today the clock "bricked", and i tried to reset, reflash the nodemcu unit and nothing works - has anyone came across something like that?

it seems i had some bad connection in usb cable or wires - everything works now. still a great instructable!

mihaim47 made it! (author)2017-01-22

Very nice, exatly what I wanted

dr_arduino (author)2017-01-08

Hi Jon !

where can i find the ?

only things you need are the .ino file and library files from github/lib. manager in arduino if you don't have them installed.

i can´t find the .ino file !

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.


gmg (author)2017-01-11

Very nice, especially like the base.

Makers would be advised to use a 500 ohm resistor on the data line and a 1000uF capacitor across the power. See

I made something similar a few years ago. For a simple enclosure, consider a 12x12" shadow box picture frame.

taeraeyttaejae made it! (author)2017-01-11

Really, really good instructable. From parts to working product in about an hour.

Has anyone came up with a wall mount or something that makes the leds into bars, like in this video:

AlanGP made it! (author)2017-01-02

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.

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.

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?

Once again a big shout out to the author for making my IoT debut an easy one.


s-neuber (author)2016-12-24

Great Job.

It is possible ti Control the hours with 3 leds and the minutes with 2 leds?

Merry chrístmas

shoe007 made it! (author)2016-12-02

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.

Just in case it helps anyone as I did just a little digging:

1) 3.3V regulator (LD1117S33CTR is .8A)

2) 6.0x4.3MM tact switches (mouser 612-TL1107)

1) DC Power Jack (490-PJ-002A)

2) 47uF electrolytic capacitors (667-ECE-A1CN470U)

I had the header and a 5V wall wart laying around

SmittyHalibut made it! (author)2016-09-18

Hey Jon, great job putting all this together.

I switched it to use an ESP8266-01, the tiny cheap ones, and put it together on a proto-board last night. (

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.

Thanks again for the design and code work. This is awesome. :-)

shoe007 (author)SmittyHalibut2016-11-23

Great job on the video and the boards, mine just shipped. Thank you!

SmittyHalibut (author)shoe0072016-11-23

:-) glad you're enjoying it! Post a picture when you've got it working.

Also, if you're on Twitter, what's your handle there? I'd love to give you a shout-out by name.

shoe007 (author)2016-11-23

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?

nebloid made it! (author)2016-08-16

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.

The code is very clear and I like playing with the colour settings. Great job and thanks for sharing your creation.

Jon_Fuge (author)nebloid2016-08-16

You're welcome, and thanks for the kind comments.

rexxar (author)2016-08-11

Hi, nice instructable!

Dont you need a level shifter to drive the ws2812b with a 3v output?

Jon_Fuge (author)rexxar2016-08-11

For WS2812B: Vih is 0.7Vdd (~3.5V); Vil is 0.3Vdd (~1.5V)

NodeMCU board runs at 3.3V

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.

trekprint (author)2016-05-25

Very good idea.

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.

Thanks for the fantastic instructable

Jon_Fuge (author)trekprint2016-07-31

Hi trekprint,

Yes, you can do this by changing line 162 of the latest version of code from:

pixels.setPixelColor(ClockCorrect(((hour(t) % 12) * 5) + minute(t) / 12), pixels.Color(Hour.r, Hour.g, Hour.b)); // draw the hour hand last


pixels.setPixelColor(ClockCorrect(((hour(t) % 12) * 5)), pixels.Color(Hour.r, Hour.g, Hour.b)); // draw the hour hand last

Hope this does the trick for you.


abdulatifBABLI (author)2016-06-21


abdulatifBABLI (author)2016-06-21

soo amaizing ;-)

nacbooth made it! (author)2016-04-23

Nice idea - works well. Now to find a good place to mount it.

Jon_Fuge (author)nacbooth2016-05-11

Nice to see it built by another instructabler; great work!

Jon_Fuge (author)2016-04-20

I was pm'd by one user asking how much current does this consume; in "day mode" with lights at maximum brightness, it uses 200mA.

oliverkellow (author)2016-04-19

This is a recent instructable, as of posting is working for anyone? Im getting 0000 from the time test sketch, however responds fine.
Any idea how to point the Time lib at a new server?

I paste out with in Time.h,

josefn1 (author)2016-04-09

Watch me go backwards, what I am wrong?

Jon_Fuge (author)josefn12016-04-10

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.

josefn1 (author)Jon_Fuge2016-04-11

Thank you very much, the new code is ok:-)

wenkofeng (author)2016-03-25

can you help me?

C:\Documents and Settings\tom\My Documents\Arduino\libraries\NTPClient.h\ntpclient.cpp:13:22: error: no 'int NTPClient::begin()' member function declared in class 'NTPClient'

int NTPClient::begin()

i need the right ntpclien.cpp file.

my email:


DIY Hacks and How Tos (author)2016-03-06

Nice clock design. And it works in the dark too.

About This Instructable




Add instructable to: