Introduction: Arduino Matrix Clock With 3D Enclosure

About: I'm technician on Electronic (Data Acquisition System) with a Technological University Diploma in Electrical Engineering and Industrial Computing. Arduino and 3D Print are my hobbies.

This project is a Clock based on Arduino with a Black and White 3D enclosure.

This project uses an Arduino Mega todisplay the date and time on a RGB Panel Matrix 64 x 32 pixels.

Clock is saved by a DS1307 module.

The total dimension of the project is 20.5cm x 10.5cm x 9.5cm.

Some other ESP based project exists and works with matrix panel like this, so you can use the 3d box with it if you have an ESP card under your hand.

I'm not going to spend too much time on installing the arduino IDE or installing the arduino board on PC, because there are a lot of things on this.

Without enclosure or version whithout scaterring you could see each pixel on matrix. Print enclosure whith light scattering for apeaceful atmosphere.

I spent a lot of time to obtain a functional and pleasant result, so I can share it with all of you.

Many projects exist but none of them have been fully completed. You could look the work of the others they also deserve a big thank you. Thank for community.

There is two versions of display and two versions of enclosure:

Display version:

- Big clock date and time swaping

- Little clock with date and time on same display time

Enclosure Version:

- Light scattering, more peaceful in the dark environment, recommend big clock for it

- Without scattering for looking each pixel, recommend little clock version


Everything could be change in the code, you're free to make your own style.

I hope you will like it. Don't forget to add to favorite.

Supplies

Step 1: Parts Order List

To carry out this project you will absolutely need some elements.

You can do it without a 3D printer but the rendering will be less interesting and the project also.

You will absolutly need an Arduino Mega with Dupont wires, a DS1307 clock with CR2032, a P3 RGB 64 x 32 panel and a power supply (5V, 5A or 10A) with outlet cord.

For Arduino Mega: https://store.arduino.cc/arduino-mega-2560-rev3 https://www.amazon.fr/dp/B06XZYPNMG/ref=cm_sw_em_r_mt_dp_U_.4IFEb7P0JVSE

(6.26€ on Aliexpress)

For DS1307: https://www.amazon.fr/dp/B06XZYPNMG/ref=cm_sw_em_r_mt_dp_U_.4IFEb7P0JVSE

(1€ on Aliexpress)

DS1307 required CR2032 battery: https://www.amazon.fr/Energizer-2032-Piles-Lithiu...

(1€ on Aliexpress)

For Panel: https://fr.aliexpress.com/item/32728985432.html

(11,19€ on Aliexpress) (1/16 SCAN)

For Power Supply: https://www.amazon.fr/LED-Alimentation-50W-MeanWell-RS-50-5/dp/B00MWQDH00https://www.amazon.fr/dp/B07177GJ3P/ref=cm_sw_em_r_mt_dp_U_ebJFEbJ7VVRW5

(10,08€ on Aliexpress)

For Dupont Wire: https://www.amazon.fr/dp/B076ZM34TM/ref=cm_sw_em_r_mt_dp_U_78IFEb2FKN6BQ

(2.92€ on Aliexpress)

Total cost : < 40€


For make full project you need inserts and some screws.

https://www.amazon.fr/Inserts-Filetage-traversant-... (3.20€ on Aliexpress)

https://www.amazon.fr/General-M2-M2-5-M3-M4-M5-Kit... (3.06€ on Aliexpress)

It's depend on what you have at home, for me it's M2.5 M2 or M3 screw and inserts.

All print are made by my Anet A6 printer and PLA filament, need a printer with printable dimension 22cm x 22cm x 25cm. May you could do this with wood and CNC. (20€ / kg x 2 colors)

https://www.amazon.fr/dp/B07KGPBH9D/ref=cm_sw_em_r...

https://www.amazon.fr/dp/B07MGKYFFP/ref=cm_sw_em_r...

Equipment that I used: Screwdriver, Iron Solder for put inserts and others, Dremel for make hole for additionnal screw.

Step 2: Wiring Electronics

For electronics, connect the Arduino Mega to the matrix panel and the DS1307 clock using Dupont wires.

You must scrupulously respect the wiring diagram to avoid any risk of breakage or damage.

The wiring table and the diagram are in pictures. Some pictures are available for helping you.


Try to respect color wires for red blue and green wires. It's more simple for connecting on arduino.

Double check before energizing.

All connections are made without power.


Time for this is around 2 hours.

Step 3: Wiring Power Supply

Connect power outlet to the power supply like the picture.

L is BROWN, N is Blue and GND is YELLOW and GREEN.

Connect panel power cable to power supply, respect polarity. Red is (+) and Black is (-).

Don't forget to put your Power supply on your voltage country mode.

Please respect the power supply wiring to avoid personal injury, double check the connections. Connect the matrix to the power supply but do not yet power on the matrix.

You could add a dc connector male for arduino power without usb.

https://www.cdiscount.com/informatique/r-5+5x2+5mm...

https://www.conrad.fr/p/connecteur-basse-tension-m...

All connections are made without power.


The Unit need to look likes the global picture.


Time for this is around 30 minutes.

Step 4: Arduino Mega Code and Upload

You need to use Arduino IDE. https://www.arduino.cc/en/main/software

You need to use some libraries for use your project.

Download and install them on arduino IDE before uploading code on the Mega:

https://github.com/adafruit/Adafruit-GFX-Library

https://github.com/adafruit/RGB-matrix-Panel

http://www.rinkydinkelectronics.com/library.php?id...

All right reserved to their creators. Thank them for their work.


Connect the arduino to the PC and connect the power the matrix with power supply.

After installing libraries, you could uploading code, maybe create a folder project with both files on it. Bitmap file is for displaying image on matrice, it work well.

After this you could powered the panel with outlet on power.

Normaly everything works, if you look on the code, you could see the attemps i've made, and some works perfectly like feuartifice() function (firework generate) with great animation, some others are working but they are not mines.

Display show time and date in light blue. Three bar show in real time, hour in blue minute in white and second in red with one pixel incrementation for each. All colors and disposition could be changed on code, it's pretty simple. (Matrice_v1.0.ino)

If you use with scattering light enclosure take the file Matrice_v2.0 for better look. It simple display time and after delay show the date. (Matrice_v2.0.ino)


For changing date and time, remove slashes, change the date and time, upload, add slashes in front of date and time, upload again.

Tip: It could work with button for adding some mode like picture or animation. I try with infrared and it's work too. You could customize it. Look Rinky Dink website for pictures.

For use it with same power supply, add arduino DC connector to the PSU. Respect polarity Red is + and Black is -.

Warning with short circuit.


NB: If you already have a 1/32 scan with E pin on matrix, you need to replace RGB_matrix_panel matrix constructor by another https://github.com/DFRobot/DFRobot_RGBMatrix and look here for adapt https://wiki.dfrobot.com/64x64_RGB_LED_Matrix_-_3...

Time for this less than 1 hour.

Step 5: Printing Enclosure

Format of the files are STL. It's created with Autocad: https://www.autodesk.fr/products/autocad/overview

I have used CURA for slicer, it is good free slicer. https://ultimaker.com/fr/software/ultimaker-cura

Put G-CODE or other printer format for print them on the printer, files on SD card or with an USB connection.

There is some parts to print for this project. It's made up of 5 parts:

- The base 4h15 Matrix and main board are screwed here later.

- The left side 1h25

- The right side 1h25

- The cover 5h15

- The screen 4h50 for scattering version or 2h for without scattering version

Approximately 18 hours of total impressions. I print it with PLA filament with following settings 0.3mm layer,210°C nozzle, 70°C bed and 20% infill. I didn't make timelapse of my prints only pictures of screen print part.

Tip:You may need sanding screen part for scattering version, it's delete imperfections and smooth the renderer.

Prepare Threaded Insert if you want:

After this, prepare printed parts with inserts like this:


Use M2.5 inserts on base print and sides prints. Make holes on cover part for 2.5 screw. You could add M3 inserts for others but not needed for me, it's work well without.

Tip: For screen print use white or transparent filament not a dark filament for scattering, for version whithout it doesn't matter.

Step 6: Assembly Project

Try to let a little offset between matrix panel and printed parts, leave a gap corresponding to a cutter blade.


Following the assembly of the five parts with the panel and arduino:

1 - Screw the panel matrix with two screws M3 and the arduino to the base with two or four M2.5

2 - Screw two sides with one M3

3 - Screw screen part with one M3

4 - Don't forget to connect power supply to matrix and arduino. The square hole is for the passage of the power wires. Also, screw the cover with 4 screws M2.5 to the two sides.

Tip: If you have offsets between parts, do not hesitate to add inserts on the pieces and holes on others pieces to fix them straight. Heat cover piece on corner if needed.

Assembly time is less than 5 minutes now.

Step 7: For Finish

Thank for read this.

Choose your own style, with or whitout 3D enclosure. Change colors, add controls and display pixel pictures.

For questions, do not hesitate to ask them in comment, I answer if you need help with something.

Reminder it's a personnal project not a professionnal one, it could be better, the code could be simplify but I share it to you.

Design it by myself. I made it the most simple as possible with classic style, use your own color filament and your own color for displaying the clock.


Please stay creative.

Clocks Contest

Participated in the
Clocks Contest