Morphing Digital Clock

165,392

761

728

Introduction: Morphing Digital Clock

A quick video about this project. I have since implemented a way to set timezone.

Thanks to the work of the Arduino and ESP8266 community, this cool clock is a surprisingly easy to build!

  1. Just two main components: Display (obviously) and a WiFi MicroController
  2. No soldering required
  3. No programming skill required, code is provided!

Let's get started!

Step 1: Parts List

Although I've included links to where I bought my parts, these parts can be easily purchased from other vendors all around the world.

  • P3 64x32 RGB LED Matrix $20
  • NodeMCU ESP8266 WiFi Microcontroller module $4.95
  • Female to Female 20cm Dupont jumper wires $0.85
  • Micro USB Data/Sync cable and 5V phone charger wall adapter (I had these and didn't have to buy it)
  • 5V 2A MINIMUM Power Supply (I had this and didn't have to buy it) $7.95
  • Solderless Female barrel connector to connect the Power Supply to the display power cable.

IMPORTANT:

  • Some USB cables are designed just for power delivery (charging) -- these are ok to power the finished clock, but to upload code to the ESP we will need a data/sync USB cable.
  • The P3 RGB Matrix has over 6000 LEDs. For this clock, we will never turn all of them at once, so 2 Amp is more than sufficient. However, if you plan on doing more with the display and have all LEDs set to white, the recommended power supply is 8 Amp minimum.

Step 2: Wiring Summary

There are a lot of wires, but don't worry. All we're doing is connecting one pin to another.

Just take your time. Double check each connection before and after you plug it in.

Make sure the wires are fully inserted so they would not accidentally come undone. They are quite snug when fully inserted.

Step 3: ESP Wiring

First, let's put jumper wires on the ESP. Don't worry if your wire colors are different than mine. Which pair of pins are connected by each wire is what is important.

Do NOT connect the ESP to your PC YET. We need to complete all wiring before we power anything up.

We are using pins D0 through D8 and two GND.

We can skip the 3V pin because the ESP will be powered via the USB port.

We also skip the Transmit and Receive pins because we will communicate to the ESP via USB or WiFi.

Step 4: Matrix Wiring Part 1

Next, take the other end of the jumper wires we've just hooked up to the ESP and plug them into the matrix.

Again, the chart includes the colors of the wires that I used, but of course your colors might be different.

What is important is that you connect the ESP pins to the matrix as shown in the table.

The matrix is NOT symmetrical, there is a left/right, up/down. Please note the white arrows.

Connectors on my matrix are not labeled, so I've added a photo with labels. Your matrix might be slightly different. These resources discuss other board versions in great detail:

Step 5: Matrix Wiring Part 2

Second set of jumper wires connect the left connector to the right connector of the matrix.

Third photo shows the right side of the matrix.

Step 6: Power Wiring

The display power cable were designed for screw terminals.

You could cut off the solder lug and strip the wire, but I opted to bend the prongs and use additional heat shrink tubing to ensure that there are no exposed metal. Whatever you do, make sure the wires make good contact, securely attached and insulated.

Obviously Red wire should be connected to (+) and Black wire to (-)

Plug the other end to the display, again noting polarity: Red goes to VCC and Black goes to GND.

If your cable is designed to simultaneously power two displays, it does not matter which one you connect to your one display. It is however VERY IMPORTANT that you do not reverse the red(+) and black(-)

If you haven't already, now is a good time to double check to make sure all the jumper wires are are connected to the correct pins (before we apply power).

Check polarity of the power cable AGAIN, make sure that PLUS and MINUS are NOT REVERSED!

Hey, we're done with wiring! But don't plug it in YET!

Step 7: Install Arduino IDE

To upload the code to the ESP, you will need the Arduino software and a few libraries:

Follow installation instructions on the Arduino website.

Arduino has done so much for the maker community, so you should contribute to Arduino, but it is optional.

Click "Just download" to download without contributing.

Step 8: Install Libraries

Once installed, launch the Arduino IDE then:

  • Click the Sketch menu > Include Library > Manage Libraries...
  • Search and install the latest version of the following libraries:
    • AdaFruit Gfx library
    • PxMatrix by Dominic Buchstaller
    • ArduinoJSON version 5.13.2 by Benoit Blanchon
    • WiFiManager by Tzapu
    • DoubleResetDetector by Stephen Denne aka Datacute

IMPORTANT:
Notice that at the time of this writing, ArduinoJSON version 6.x beta does not work with Morph Clock. Doing so causes compile errors. Make sure you specify version 5.13.2 when you install/update ArduinoJSON.
Thanks to user lmirel for noticing this.

Step 9: Install ESP8266 Support

We also need ESP8266 support

  • Close Manage Libraries, but stay in Arduino IDE
  • Go to File > Preferences
  • Click the icon to the right of Additional Board Manager URLs
  • Paste this URL on a separate line (sequence does not matter).
    • http://arduino.esp8266.com/stable/package_esp8266com_index.json
  • Click Ok to get out of Preferences
  • Navigate to: Tools > Board xyz > Board Manager...
  • Search for 8266
  • Install esp8266 by ESP8266 Community.

Step 10: Install CH340 Driver

The last thing to install is the device driver so our PC can talk to the ESP.

Download and install the driver for your computer from the bottom of the manufacturer's driver page.

If you need help, there is a nice tutorial on how to install Arduino Nano CH340 by samuel123abc. The same CH340/CH341 that is on the NodeMCU ESP is on the Arduino Nano clone.

Step 11: Upload the Code

We're almost there...

  1. Download and unzip the latest Morphing Clock code.
    • (see picture above if you're unfamiliar with github)
    • Unzip the downloaded zip file then double-click MorphingClock.ino
  2. Compile and Upload
    • Before we plug in the NodeMCU to your PC via the Micro USB cable, have you double-checked your wiring? :-)
    • Make sure that the pins of the NodeMCU are not being shorted by any metal objects on your desk while the NodeMCU is on.
    • When you plug in USB, you should hear the usual "ding" as Windows recognize a USB device being plugged in.
    • Setup the options in Arduino IDE > Tools as pictured
      • Your COM port might be different.
      • I had to change Flash Size to 4M(1M SPIFFS) your ESP might be different.
    • Click the Upload button as pictured. This will take some time (about a 30 seconds), and there will be warnings, but it will eventually upload to the NodeMCU.

Troubleshooting:

  • If the upload fails because it could not connect, make sure you choose the port where the ESP is plugged into under Tools > Port.
  • If there is no enabled option under Tools > Port
    • Make sure you've installed CH340 driver (see previous step)
    • Make sure you are using a data/sync cable. Test it by connecting your phone and PC with that cable. If you could see files on the phone from the PC, then you have a good data cable.
  • If the compile fails before it tries to upload, scroll up in the black background window and then slowly scroll down and note the first error it reports. If you cannot figure out what it's saying, post that first error and I will try to help. There will be some warnings - those are OK, they do not stop the compile.
  • if you get a JSON-related error when compiling, use JSON library version 5.13.2 instead of the latest version (6-beta) -- Thanks lmirel !

  • If the compile succeeded, upload succeeded but the clock does not work, open serial monitor in Arduino IDE, press reset on the ESP. If the errors are a bunch of hex numbers, try changing the Flash Size to 4M(1M SPIFFS) and reupload.
  • If the error is in English, it should tell you what it's having trouble with. Post what it says if you need help deciphering what it's trying to say :-)
  • Matrix works, but the ESP never shows up as an access point. I've seen this happen on the smaller NodeMCU that is based ESP-12E and 1M SPIFF and use this ESP-12E version of MorphClk.
    Unfortunately, I've only been able to work around the problem by decreasing the refresh rate of the display, so the display is not as bright compared to the original version.

Step 12: Configuration

Once the upload is completed, you should see the word: "Connecting" on the display.

The ESP is trying to connect to your WiFi to fetch the current time. However, it doesn't know the password to your WiFi Access Point (AP) yet.

  • Press the reset (RST) button on the ESP twice in a row about one second apart.
  • The display will show you AP: MorphClk,Pwd: HariFun, and 192.168.4.1.
  • At this time, the ESP is acting as WiFi access point named MorphClk with password HariFun.
  • Go to your computer/phone to change your WiFi connection from your normal WiFi to MorphClk.
  • To switch WiFi, on Windows, the icon is on bottom right corner, on a Mac it's on top right.
  • You might see a warning saying that your phone cannot find the Internet. It's OK. Your phone is now connected JUST to the ESP and the ESP is not connected to the Internet (yet).
  • Using a web browser on your computer/phone, visit 192.168.4.1, this is a website being served by the ESP.
  • Tap "Configure WiFi" and select YOUR WiFi access point and enter your WiFi password. It will then save that information in permanent storage so you will never to enter it again.
  • This is also where you choose timezone
    Use this website to find the TimeZone offset for your location. Don't forget to enter the minus sign.
  • Enter Y in the 24Hr field to show hours in military format, or enter N if you prefer to 12 hour format. I do not yet have an AM/PM indicator. Maybe you could add that feature and share how you did it?
  • Don't forget to switch your computer/phone back to your normal WiFi access point or you will not have internet access.

Step 13: All Done!

Well, that's it!

All that's left is to make a pretty case for it.

You no longer need the computer/phone. You can use any phone charger to power the ESP.

Please let me know if you see anything that I could improve on this instructable. I will do my best to answer questions too.

If you build this, please click the "I Made It" button and show off your version. Have fun making!

Step 14: Contributed Code

The wonderful people of the Internet have improved this project! Let me know if you've made improvements you'd like to share here. Thank you everyone!

Morphing Clock Remix by lmirel

https://github.com/lmirel/MorphingClockRemix

Date, Temperature, Relative Humidify by VincentD6714

https://drive.google.com/file/d/1TG8Y1IjAQaV7qGPWL...

Clocks Contest

Runner Up in the
Clocks Contest

65 People Made This Project!

Recommendations

  • Big and Small Contest

    Big and Small Contest
  • Make It Bridge

    Make It Bridge
  • Game Design: Student Design Challenge

    Game Design: Student Design Challenge

728 Comments

0
hecker8980
hecker8980

Question 1 day ago

Dear Mates, I made the clock . Made it as instruction. But, there`s an error "Connecting" then Connected! Zone: +5 24 Hr: Y
In my router I can see the attached ESP. I don`t know what`s the problem, Can you help me, please.
Thanks In advance

photo_2023-03-21_22-34-32.jpgphoto_2023-03-21_22-34-45.jpg
1
dougmake
dougmake

Question 9 months ago

Good day all, I finally got a display on the P3 but it only displays
"Connecting
then
Connected! Zone: -5 24 Hr: Y
Flashes the 2 colons"
Then repeats these 3 items over and over. In my router I can see the attached ESP and I was able to configure it since the default isn't 24 H format, I think.
Thanks for any input.

0
hecker8980
hecker8980

Answer 1 day ago

Dear dougmake, I have same error. Did you solve the problem?

photo_2023-03-21_22-34-32.jpgphoto_2023-03-21_22-34-45.jpg
0
galvizo
galvizo

7 days ago

Hola a todo mundo. tengo una duda. ¿por que no funciona con display P4? si me funciono con display P3, pero en el display P4 tengo que retirar la tarjeta para que pueda funcionar. ¿donde tengo que modificar el codigo para que funcione en otro tipo de display?

20230315_173125.jpg20230315_173140.jpg
0
Alexvanhe
Alexvanhe

2 years ago

Hallo für alle,
if someone is interested, just write an email, small pcb for p3 module, red pcb is for p4 module. wiel fun . the board works 5-12Volt as well as only 5V external power supply.

and an adapter D1 Mini to Nodemcu

----AKTUALISIEREN-----

KEINE PLATINE MEHR VERFÜGBAR. ALLE WURDEN VERKAUFT.

JETZT SIND NUR NOCH WENIGE KOMPLETTE LEITERPLATTEN MIT ALLEN GELÖTETEN BAUTEILEN VERFÜGBAR. MUSS NUR PROGRAMMIERT WERDEN.

Der Preis des Kits (ohne Panel) beträgt 30€.

IMG_0942.JPGIMG_2516.jpgIMG_2517.jpgIMG_2518.jpgIMG_2519.jpg22C64955-2AA6-4EE5-8A19-5E2FE556C0A6.jpegB026C717-BC49-4118-9DD9-4FEFA8AE854D.jpeg56C29D43-181B-461A-97EA-235DF53C82F4.jpegB3D5230E-041B-4025-B90A-07C3AE3E2D9F.jpeg1855EE78-140E-4B44-856A-C6F67ADF3808.jpegCB93EB90-3665-4234-B4FC-8B4D33DB589D.jpeg
0
Alexvanhe
Alexvanhe

Reply 6 weeks ago

Zusätzlich NODE MCU und D1 Test Schild… Siehe unten

DBCEC79B-84D1-4905-A37C-98280578784C.jpeg77F7F3E2-2619-4480-8CA5-15B95E6B616F.jpeg8D73067C-616E-4969-8D5A-66AA1880E2A9.jpeg2FB975EA-8ADF-4686-9E34-3F6B3CB6FE9A.jpeg5AEE1FA1-8121-4AAB-968F-15C1463030D9.jpeg521A790D-272B-4069-84A0-B3FDEC28495D.jpeg
0
noeltoms
noeltoms

Reply 2 years ago

Hi Alexvanhe, nice pcb's. Just wondering how much are you selling it for ?

0
Alexvanhe
Alexvanhe

Reply 2 years ago

Hello Noeltoms,
with finished or just printed circuit board?
Your board isn't bad either.😜

The brightness setting is 25.

43C8171A-593B-404E-BCE4-FCA119079D09.jpegA2366BAB-89F2-40F0-A579-8FF3C8F887F3.jpegF1838D09-D2E2-43FE-92C4-B275387AE4DE.jpeg51FC89B4-5DF4-47A8-B400-8337C9B4FB3A.jpeg
0
1Adler1
1Adler1

Reply 2 years ago

Hi Alexvanhe,
how much do you sell it for
with finished board. Can you send it to Germany?

0
Alexvanhe
Alexvanhe

Reply 2 years ago

Hallo 1Adler1,
was brauchst du für P3 oder P4, Schwarze Platte für P3 und P4 bitte private email

Grüß

7B335393-BD9F-4C27-AC62-8100FB8EF647.jpegD1AC8443-4C8F-47C3-AA70-27B54978B840.jpeg6C2FEF80-6D6D-4E55-8553-614B587EA89C.jpeg4CCD8A28-7596-41B8-A3B9-EF616408FD52.jpeg8B80EB2B-E70A-4751-B484-408BF7BB5C95.jpeg14099907-386E-4947-A422-17E5481BFDD4.jpegE8311634-6B1C-456F-976F-7304AA99CB1D.jpeg947D9287-1BB1-47B0-822D-C7A7668F6958.jpeg5A613354-7C39-412C-B388-184722C55BC0.jpeg85D1E1CF-D89E-4DCA-8D0D-80793D9E05D5.jpeg
0
coffee3in1
coffee3in1

Reply 2 years ago

The fonts are nice! great work. How do they morph as well?

0
Alexvanhe
Alexvanhe

Reply 2 years ago

Hello thank you coffee3in1, you need to create a new label file in Microsoft Office font.

0
Alexvanhe
Alexvanhe

Reply 2 years ago

Hallo,

Ja

0
betegie1
betegie1

3 years ago

Hi Hari,
After a long break from my projects, I re-made my morphing clock and it works again!
When I remove the USB data cable, the display matrix powers off. My question is, how do I power the NodeMCU using 5V DC powe supply? What pins do I use if I want to remove the USB cable?

I look forward to your reply.
Regards,
Alberto Francisco

IMG_1778.jpgIMG_1774.jpg
0
Jimmy6847
Jimmy6847

Reply 2 months ago

Bonjour, personnellement j'ai utilisé une alimentation extérieure de 5V/2A reliée au VCC et GND de la matrice. Pour l’alimentation de l'ESP8266 j'ai utilisé ce même 5V et GND, cela fonctionne très bien
Bon courage

2
HưngN105
HưngN105

Reply 2 years ago

To Vin + G from 5v Supply

0
leroy04
leroy04

Reply 1 year ago

Thank you!!!
Anyone confused its the VIN and G pin next to each other on the ESP board. Then those pins into the Display VCC and Ground power cable.

0
FKR-Au
FKR-Au

2 months ago

I realise this project is a few years old now, but I still love it. I've made a couple already.
But wondering if anybody can share their code of an ESP32 version complete with with web server, offering colour choice, and brightness adjustment. Thanks!

0
fichtelhaus
fichtelhaus

Question 5 months ago on Step 6

ewer kann mir helfen möchte gerne ein größeres Display ( P5(2121)-16S-6432-B0 für die Morphing Digital Clock zum Einsatz bringen. Wie erfolgt der Anschluß NodeMCU zur Matrix.

te um Info

100_2963.JPG
0
Nuno JoséA
Nuno JoséA

Question 6 months ago

Hi. I have very little electronic skills. How easy do you think is to had a 5 seconds beep counter? To better explain: Lower pitch beep on the seconds 55 56 57 58 59 and higher pitch beep on the 00.