Bar Graph Clock IOT (ESP8266 + 3D Printed Case)
2777 Views, 25 Favorites, 0 Comments
Bar Graph Clock IOT (ESP8266 + 3D Printed Case)
Hi,
On this Instructables I will explain you how to build an IOT 256 LED Bar Graph Clock.
This clock is not very difficult to make, not very expensive yet you'll need be patient to tell the time ^^ but it's pleasant to make and full of teaching.
To make this clock, the main steps will be to :
- Make a Clip-on Box
- Find the exact time with WiFi and NTP protocole
- Program a 8x32 LED Matrix witch represent 256 LED
Supplies
- Led Matrix WS2812B 8x32 11€ on Aliexpress
- The 8x32 WS2812B LED Matrix is also called NeoMatrix by Adafruit company.
- A Nodemcu ESP8266 board 3 to 4€ on Aliexpress (Nodemcu is finer than Wemos)
- Some 3D-printer filament (≈ 120g)
- 2 screws or nails
- A USB cable (USB Type A to Micro USB Type B)
- A USB wall adapter
Required tools
- A 3D printer, mine is a Creality CR-10
- A pliers
- A solder iron
Optional tools
- Some hot glue
- A USB DC voltage tester (pretty useful in lot of project)
How to Tell the Time ?
Picture 1 and the "Explanation_Clock.pdf" file will explain you how to read this clock. Basically, you need to count the dots in each RGB column (red = hours / green = minutes / blue = seconds).
For example, the clock displays 17h50m44s on picture 2.
Downloads
Designing the 3D Printed Clipsable Enclosure Using Fusion 360
I wanted this box to be a fully clip-on box so I designed it in a way that I would not need to use glue.
Clip-on are inspired by this two tutorials (side clip)(mid clip)
Matrix dimensions :
300mm height x 80mm length x 2mm width
Box dimensions :
323mm height x 85mm length x 9.2mm width
Printing key figures :
- 180g of filament
- 16h30 (printing time)
Below, there are 4 files :
- Box_Bottom_ws (with support)
- Box_Top_ws (with support)
- Cover_Bottom_Matrix
- Cover Top_Matrix
You will need these 4 pieces to make the complete case.
Files are also available on Thingiverse, here is the link : https://www.thingiverse.com/thing:4292876
Assemble 3D Printed Case + ESP8266
After printing the 4 pieces, follow these steps :
- Desolder all wires from the Matrix except the 5V, GND, and DIN
- Solder the 3 remaining wires to the ESP8266 board (See schematic)
- Assemble "Box_Bottom_ws" and "Box_Top_ws"
- Insert the USB cable through "Box_Bottom_ws"
- Fix the ESP8266 with double-sided tape or hot glue
- Plug the USB cable to the ESP8266
- Slide the LED matrix through "Cover_Bottom_Matrix"
- Clip "Cover_Bottom_Matrix" on "Box_Bottom_ws"
- Redo step 7 and 8 with "Cover_Top_Matrix"
- Start programing
Programming Using Arduino IDE
This program has three main functions :
- WiFi
- NTP (Network Time Protocol) (wikipedia)
- Matrix made with 256 WS2812B LED (see how it working)
Prerequisites :
For the Board Manager :
- Add the ESP8266 board on Arduino IDE (new method)
For the Library :
To drive the matrix, use:
- "Adafruit GFX Library" made by Adafuit
- "Adafuit NeoMatrix" made by Adafruit
- "Adafuit NeoPixel" made by Adafruit
To connect to Wifi, use :
- Build-In "WiFi" made by Arduino
- Build-In "ESP8266WiFi" available by adding the board
Download the code, change the WiFi ssid and password (lines 54 and 55) and upload it on your ESP8266 board.
Optional:
- Change the colors (line 52) (You can use this tool : Color to RGB code)
- Change the time zone (line 59)
- Change the brightness for every LED (line 92)
- Change the way to display the second (line 101 to 104)(I let you try)
- Code your own way to display ^^.
/!\ The matrix is powered by the USB interface board, so the power consumption has to be limited to 500mA (sources). To stay below 500mA, keep the luminosity variable between 0 and 10 (Check with your USB tester if you have one).
If you want more details about :
Downloads
Hang It, Look at It and Start Counting - Be Patient
I'm happy with the result, the clip-on box is cool and easy to assemble and the clock works like a charm.
I admit that it is not the fastest way to tell the time but it's a pretty funny way.
Have a nice day !