Introduction: ESP32 LED Matrix Clock
Step 1: Parts and Tools
- 6 x 8x8 MAX7219 LED Matrix
- 1 x ESP32 Board
- 1 x KY-018 Photoresistor Module
- 1 x DHT11 Sensor
- 1 x Micro USB plug
- 1 x pasta jar
- 1 x 5.5mm X 2.1mm DC Power Supply Metal Jack Panel Mount
- 1 x USB to 5.5mm X 2.1mm barrel jack 5v dc power cable
- 1 x Window tint film
- 11 x female to female dupont wires
- soldering iron
- spray bottle
- hobby knife
- double sided tape
All the parts can easily be sourced from ebay/aliexpress and/or local stores.
Step 2: Preparing the LED Matrix
I found it easier to buy 2 x 4pcs modules, cut one of them in half and solder it to the other one while maintaining the orientation printed on the PCB.
Step 3: Connect the LED Matrix Display, LDR and DHT11 to the ESP32
Solder the pin headers on the modules then use the dupont cables to connect them as follows.
- VCC - VIN
- GND - GND
- DIN - D23
- CS - D15
- CLK - D18
- S - D4
- + - 3V3
- - - GND
- S - D34
- + - 3V3
- - - GND
Step 4: Apply the Solar Film on the Pasta Jar
I've decided to only cover one part of the jar with film to keep the rest of components visible.
After some trial and error I've noticed that the 'secret' is to have both the jar and the film as wet as possible with soapy water to be able to make adjustments as you apply it. Use the spray bottle to keep everything nice and wet and the hobby knife to cut the excess film. Once it completely dries the film should be pretty well stretched on the jar.
Step 5: Prepare the DC Power Supply Metal Jack
Solder 2 dupont wires to the DC jack and then solder the micro USB plug.
I used the pinout which was described here.
Drill a whole in the middle of the jar lid and mount the DC jack.
Also drill some wholes in the lid for the DHT11 sensor.
Step 6: Flash the ESP32 Module
Next step would be to upload the code to the ESP32.
While the original code can be found here(many thanks to the author !) you can find attached the my version of it that includes the update for the DHT11 and LDR sensors. The upload process is pretty straight forward, just don't forget to update the code with your WiFi credentials.
// Credentials ----------------------------------------<br>#define SSID "#####"; // Your WiFi credentials here #define PW "#####";
Step 7: Putting Everything Together
Make sure that the modules are not touching any of the LED modules contacts, and if they do, use some electrical tape to cover the contacts in order to avoid any shorts.
Also, in order to make sure the display does not move once I screw back the lid of the jar, I added some tape on the bottom end of it so that is stays in place on the bottom of the jar. All that remains is to plug the USB cable and that's it !
Step 8: Further Ideas
Add a backup battery charged thru a TP4056;
Design a 3d printed case
Hope you enjoyed this project and if you have any questions feel free to ask.
Thank you for reading!
Participated in the