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.
ESP8266-12E module (can be bought for £3 from eBay)
Ring Wall Clock 60 WS2812 (can be bought for £9 from eBay)
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)
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
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.