ESP8266 LED Matrix Clock

8,302

98

25

About: DIY enthusiast.

ESP8266 LED Matrix Clock

Simple LED matrix Clock based on the popular ESP8266 with Real Time Clock module and time synchronization over WiFi from an NTP server.

Step 1: Parts and Tools

First let's see what we need.

Parts:

  • 6 x 8x8 MAX7219 LED Matrix
  • 1 x RTC DS3231
  • 1 x ESP12 Board
  • 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

Tools:

  • 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 and the RTC to the ESP8266

Solder the pin headers on the modules then use the dupont cables to connect them as follows.

MAX7219 to ESP8266

  • VCC - 3.3V
  • GND - GND
  • CS - D8
  • DIN - D7
  • CLK - D5

DS3231 to ESP8266

  • GND - GND
  • VCC - 3.3V
  • SDA - D1
  • SCL - D2

One note on the RTC module, apparently it also has the ability to charge the battery, however that's not a good idea when using a CR2032. One possible solution would be to cut the trace marked on the image in order to disable the charging part of the circuit. Further information on this can be found here.

Step 4: Flash the ESP8266 Module

Nest step would be to upload the code to the ESP8266.

While the original code can be found here (many thanks to the author !) you can find attached the English version of it.

The upload process is pretty straight forward, just don't forget to update the code with your WiFi credentials.

char ssid[] = "xxxxx";         				// your network SSID (name)
char pass[] = "xxxxx"; // your network password

Step 5: 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 6: Prepare the DC Power Supply Metal Jack

Solder 2 dupont wires to the DC jack. They will be connected to the ESP8266 as follows.

  • + - VIN
  • - - GNG

Drill a whole in the middle of the jar lid and mount the DC jack.

Step 7: Putting Everything Together

To make things a bit more tidy I sticked the RTC and the ESP8266 to the back of the LED display using some double sided tape. 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;
  • Add a temperature and humidity sensor;
  • Design a 3d printed case;
  • Add a light sensor to dim the display at night.

Hope you enjoyed this project and if you have any questions feel free to ask.

Thank you for reading!

Share

Recommendations

  • Make it Glow Contest 2018

    Make it Glow Contest 2018
  • First Time Author

    First Time Author
  • Toys Contest

    Toys Contest

25 Discussions

0
None
marik2500

1 day ago on Introduction

Nice project but do not forget to put the link from where to download the library a thing that is very important! Thanks!

0
None
pl4y3r2nd

14 days ago

hi dont know why but the clock dont show the proper hour i can also connect to wifi called FaryLink_4bc624 can i cofigure it thru brower ?

0
None
dancopy

6 weeks ago

Greetings ZaNgAbY!
I defined in the following line: t = epoch -5*3600; (for Brazilian time zone). Although I did not understand why -5 but it was working properly; when it arrived today, 28 Oct 2018 the clock returned 1 Hour. In your code, Daylight Savings Time should be set for Germany and my region is Brazil; How can I do it? Thank you

0
None
EdN35

Question 2 months ago on Step 8

Great project. Have it working but since I know very little programming how can I set it to US Mountain time zone and how to adjust brightness (less bright)?

Update: solved the time zone issue through a brute force approach. Will gladly share the updated code if requested. Not 100% happy with the result but functional for now. Also adjusted the method for determining Daylight savings time to US calendar - but have no way to verify functionality until the we get to those dates! Still need a way to change the brightness.

Update: Fixed the brightness. The routine that sets the brightness was never called so added call to setup routines.

Still need a good way to set to display 12hr time instead of 24hr.

Thanks!

0
None
MyTechRock

2 months ago

Wow Really Very Nice Project Do You Added DHt11

0
None
artmez

2 months ago

Still a lot of German in the text (but Google Translate fixes that). Also, the DST calculation is for the EU and not the USA. I'm still unraveling the code, so I may be back with more.

0
None
dougmakedougmake

Reply 2 months ago

Hi ZaNgAbY, What program would I use to flash the 8266 module? I am using Windows OS. Do I do this using a USB to microUSB data cable? Also, at the end it says "all that remains is to plug the USB cable and that's it." What USB cable gets plugged? I have the USB to 5.5v plug cable you specify but if I plug that into the jack on the lid, there's nowhere to plug the other end. Unless I buy a 120V transformer that has a USB plug on it as for charging phones. Thanks for the help.

0
None
ZaNgAbYdougmake

Reply 2 months ago

Hi,
You can flash the ESP module using the Arduino IDE using a USB to micro USB cable.

Tha USB power cable can be plugged into any phone charger(maybe you already have an old spare one) or USB power bank.

0
None
dougmakeZaNgAbY

Reply 2 months ago

I have the Arduino program downloaded and installed. I edited the ino file to include my wireless network. When I load the .ino file and click "verify", it complains that it can't find ticker.h. I deleted the line that includes ticker.h and tried to "verify" it again. It complained that the next file couldn't be found. I read that these are libraries that "are included on the ESP8266 board". Is it possible that the Arduino program can't see my board connected to the computer?

0
None
dougmakedougmake

Reply 2 months ago

I think there is way too much I don't know about Arduino etc. Thanks anyway.

0
None
ZaNgAbYdougmake

Reply 3 months ago

Hi,

Please let me know what's missing so I can update the step.

Thanks!

0
None
MeirMark_1

2 months ago

Hi.

I like your project very much and start to build one for me.

I see that you connected the MAX7219 to 3.3v but in the datasheet it can work on 4 to 5.5v

so it's out of spec.

Is it correct ?

2 replies
0
None
ZaNgAbYMeirMark_1

Reply 2 months ago

Hi,

Since you are only writing TO the MAX7129 and not reading from it, what matters is that it sees your inputs correctly. On the datasheet the minimum input voltage for a high is spec'd at 3.5V. In reality it is probably less than that, and typically in the 1.5V range, but this is not guaranteed. However, for non-critical applications, it should work.

You can test what the actual threshold is. Put a potentiometer from +5V to GND with the wiper on the DIN input instead of a connection from the ESP8266 and write to the display. Vary the potentiometer setting to find the voltage that the MAX7129 clocks in as 1s instead of 0s. As long as the threshold is sufficiently below 3.3V (~2.3V or less is good, ~3.0V or higher is marginal), it should work fine.

0
None
MeirMark_1ZaNgAbY

Reply 2 months ago

I understand but you connect the vcc of the MAX to 3.3v and the minimum is 4v

0
None
AdamR13

Question 4 months ago on Step 7

I'm a fairly new maker and love your simple yet elegant design for this clock! Nicely done!

I do have one, fairly stupid question about the 12 or 24 hour clock design. Is it possible to easily recode to display 12 hour am / pm time? Or will I require an Arduino or something else?

In other words:
Instead of the 24hr military style display as seen in your photo? I am planning this to be a gift for some young people and I just want it to be a simple clock. No explaining, etc. lol!

Please be gentle with me guys and gals, I'm just learning lol.

I don't want to spend a lot of time and money on this project if I can not make the clock use AM/PM time instead of military (0-24 hr clock).

Appreciate any constructive, positive based answers to my newbie coding question.

Thank you to anybody who can help answer this question. It has now just occurred to me, I should probably go take a look at the code for this thing... There may already be notations about 12/24 hour comments in the programming code... Duh Sorry If I wasted anybodys time. I'm posting this because its taken a long while for me to type.

I am partially paralyzed and suffer from a significant brain injury to boot. We can only try our best and ask questions... Again, I appreciate any helpful comments.

1 more answer
0
None
ZaNgAbYAdamR13

Answer 4 months ago

Glad you like this project! Haven't tried this yet, but you might want to play around with these variables:

const unsigned char _24_hour_format = 0;const unsigned char _12_hour_format = 1;
1
None
ghorbani48

4 months ago

It's very nice, but I have a small problem, I found LED Matrix with IC on one side, IE I can't attach matrix together unless I turn them 90 degrees . is there any way that I can rotate numbers which enables me to attach them together?

IMG_0101.jpg
2 replies
0
None
AdamR13ghorbani48

Reply 4 months ago

Also if anybody else has answered, could I get their answer posted here please? I also have several of your type of display I would like to use in a similar fashion! Appreciate any suggestions or answers. Thanks!

0
None
AdamR13ghorbani48

Reply 4 months ago

I had the same problem with the displays I already had. But I went to AliExpress.com and found the same ones in this tutorial for less than two or three bucks a piece I believe? But, they are shipped from China so it will take a good three weeks or so to get them. Assuming you live in USA. They are for sale on Ebay and Amazon but for considerably more money per unit, if you don't want to wait.

Hope this helps!