ESP8266 LED Matrix Clock

27,483

131

53

Introduction: ESP8266 LED Matrix Clock

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.

NEW ! ESP32 version also available

Step 1: Parts and Tools

First let's see what we need.

Parts:

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

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!

Clocks Contest

Participated in the
Clocks Contest

6 People Made This Project!

Recommendations

  • Toys & Games Contest

    Toys & Games Contest
  • Big vs Small Challenge

    Big vs Small Challenge
  • Fix It Challenge

    Fix It Challenge

53 Comments

0
AdamR13
AdamR13

Question 2 years 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.

0
ZaNgAbY
ZaNgAbY

Answer 2 years 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;
0
antoarunj
antoarunj

Reply 8 months ago

How can change 12 hours Format

0
dancopy
dancopy

2 years 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
madata25
madata25

Reply 1 year ago

Maybe because you live in Acre state in Brazil.

Brasilia Standard Time
Time zone in Brasilia - Federal District, Brazil (GMT-3)
Saturday, February 8, 2020, 7:05 p.m.
8:05 p.m.Fernando de Noronha Standard Time
Ilha de Fernando de Noronha (GMT-2)7:05 p.m.Brasilia Standard Time
Belém (GMT-3)6:05 p.m.Amazon Standard Time
Manaus - State of Amazonas, Brazil (GMT-4)5:05 p.m.Acre Standard Time
Rio Branco (GMT-5)

0
dancopy
dancopy

Reply 1 year ago

Thanks for the reply but, now, in Brazil there is no more Summer Time and I would like to disable it in the sketch; How can I do it? Which lines of the sketch should I change?

0
madata25
madata25

Reply 1 year ago

Sorry for the late answer, I just got my MAX7219 that I ordered over two months ago.
I believe if you comment all the logic that include ZDiff variable you will be able to stay in normal time on all time. Good luck!

0
dancopy
dancopy

Reply 1 year ago

Thank you friend, I will test!

0
dancopy
dancopy

1 year ago

Very cool project but, I would like to add OTA support; could someone give the tip? Thanks

0
景军
景军

1 year ago

4块LED和6块LED需要改代码的什么位置?谢谢您的教学

0
景军
景军

1 year ago

我的LED是这样的,我应该如何修改代码?感谢您的教学。

微信图片_20200309153809.jpg
2
RuudM2
RuudM2

1 year ago

Yes, i have made it.
It works fine with the original software but i have added the temperature measurement with the DS3231 clock, with some T corrections it works fine. And also brightness-control with an LDR.
Because i don't have everywhere WiFi i have made a switch time from RTC or time from a internet NTP server.
And also made some additive display-text during the startup.
I have made it in a custom case made from epoxy print-board.
The RTC is "far" from the ESP8266 because of the temperature measurement.
It works NICE.
I have made the day and months in my own language, Dutch. But you can change this easy.
SEE the other makers, for all the pictures.
The source is with it. Success.........
Greeting from the Netherlands, Ruud.

IMG_8388.JPG
0
dancopy
dancopy

Reply 1 year ago

Hi Ruud!
I bought these Mini Display from Aliexpress that you mentioned but, I didn't like it very much (not because of their beauty, because, they are very cute because the LEDs are small and look nice), but they are not well aligned. At least, the two I bought are like this (a module with 3 + a module with 2).
Could you share your modified sketch here? Thanks

0
ZaNgAbY
ZaNgAbY

Reply 1 year ago

Glad to see that you found this project inspiring! Would you consider providing more details on the updates that you did? Wiring schematic and updated code?

0
RuudM2
RuudM2

Reply 1 year ago

See all the details in the “ I made it “ box.
schematic and source.
greetings, Ruud.

0
ZaNgAbY
ZaNgAbY

Reply 1 year ago

Many thanks !

0
pks4510
pks4510

Reply 1 year ago

Sir, how to change time zone to India ? Also wi fi connection can not be established? Your suggestions please

0
RuudM2
RuudM2

Reply 1 year ago

I shall look at it in the source. But you can look at your self, the source is free.
but the NTP server delivers no info for summer or wintertime, it is done in these software, I don’t know how it works by you in India.

0
PRS950.
PRS950.

Question 1 year ago

We got new tv service provider and their terminals don't have a clock display. This project is exactly what we need to have the right time again 😊. I wonder though if someone could explain the role of the RTC module in this project since it reads the time from the internet... Right?