Budget Arduino RGB Word Clock!

by JackSoldano in Circuits > Clocks

4387 Views, 53 Favorites, 0 Comments

Budget Arduino RGB Word Clock!

P1010008_Guide.jpg

Hello everyone, here is my guide on how to make your own simple & cheap word clock!

Tools you will need for this project

  1. Soldering Iron & Solder
  2. Wires (Ideally at least 3 different colours)
  3. 3D Printer (Or access to one, you could also send the .stl files to a print house if you don't have a your own printer)
  4. Basic Tools (Screw drivers, wire cutter, file, ect...)

All the part you will need to order are covered in the BOM section of this guide!

Hope you enjoy, now lets get started!

Project Proposal

led_matrix_Word_Clock_iso_lit_ORIG_01_(1).jpg

For a long time I've wanted to make a RBG desk word clock along the lines of the Adafruit project here LINK

The key things stopping me were the cost of the parts & the need for laser cut parts!

So the goal of this project was to make a cheap and simple version using a budget RBG Matrix & an Arduino Nano, then to 3D print a custom enclosure bypassing the need for the laser cut parts.

BOM - Electronics & Mechanical

BOM_JS.png
BOM_PLA_Calculation.png
BOM_Adafruit.png

The Bill of Materials (BOM) for this project should come to £13.21 for 1 complete word clocks.

The total order cost (Including Postage for the UK) should come to £51.34 assuming you need to buy every part including full 1KG spools of PLA for the enclosure.

(Order cost - BOM Cost)

  1. £6.42 - £6.42- 8x8 WS2812B Matrix - https://www.ebay.co.uk/itm/8x8-64-LED-Matrix-WS28...
  2. £1.83 - £1.83- Arduino Nano V3 - https://www.aliexpress.com/item/NANO-3-0-controla...
  3. £1.75 - £1.75- RTC Module DS1307 - https://www.ebay.co.uk/itm/262460670847?_sp=p2488...
  4. £1.25 - £0.13 - Power Micro USB - https://www.aliexpress.com/item/50pcs-lot-TP4056-...
  5. £4.31 - £1.44 - Protoboard - https://www.aliexpress.com/item/NEW-3pcs-Electric...
  6. £1.05 - £0.11 - M3 35mm Screw x20 - https://www.aliexpress.com/item/M3-x-35mm-Alloy-S...
  7. £4.13 - £0.82 - 4mm Rubber Feet x4 - https://www.ebay.co.uk/itm/CIRCULAR-ADHESIVE-RUBB...
  8. £12.99 - £1.20 - BQ 1.75mm PLA - Coal Black - https://www.amazon.co.uk/gp/product/B077K4QWMT/ref...
  9. £19.99 - £0.28 - AMZ3D 1.75mm PLA - Natural - https://www.amazon.co.uk/gp/product/B01CXAUOEQ/ref...

The PLA calculations can be shown above in the PLA Calc table. I have assumed that the volume of PLA is roughly 800 cm^3/kg, meaning that a 1kg spool should have approx 330 meters of plastic. I then used the predicted amount of PLA required to print each part to calculate the cost.

3D Printed Parts

CAD_Render_1.png
CAD_Render_2.png
CAD_Render_4.png
CAD_Render_5.png
CAD_Render_6.png
CAD_Render_7.png
CAD_Render_3.png
BlackPLA_Print.png
NaturalPLA_Print.png

The 3D print models can all be found on Thingiverse here - https://www.thingiverse.com/thing:4307868

Printing instructions can be found on the Thingiverse page linked above

I designed this model in Fusion 360 using the Adafruit Laser Cut enclosure design as a template (Link).

I kept the front panel letters the same as we will be using the same code that the Adafruit project uses.

The enclosure angled the clock at 10° to give it a better viewing angle. The letter layout has to be slightly larger than the Adafruit version as the 8x8 RGB LED matrix I chose to use is roughly 64 mm x 64 mm instead of the 60 mm x 60 mm of the Adafruit NeoMatrix.

The enclosure has 6 parts,

  1. Front Panel - This has the letters positioned in-front of the LED Matrix.
  2. Mid Panel (Angled) - This hold the matrix in place as well as connecting to the Front Panel & Back Panel. This section is at a 10°.
  3. Back Panel (Angled) - This panel houses the power adaptor and connects to the middle panel.
  4. Power Adaptor Lock - This is a small part that holds the adaptor in place.
  5. Divider Grid - This is used to help isolate the light from each LED, reducing the light bleed into adjacent letters.
  6. LED Diffuser - This is a clear PLA part that helps blend the RGB leds light, this also helps the intelligibility of the letters (Note that you will need to print 64 of this part, one for each LED of the matrix).

The whole enclosure is mounted together using the M3 35mm & M3 15mm screws.

Code

Getting Arduino IDE

For this project you will first need the Arduino IDE which can be download here - Link

Getting the Code Base

This projects the code has been put made by Adafruit and can be found on GIT Hub here - Link

For anyone who has not used GIT Hub before, its really simple! To get the code downloaded and into the Arduino IDE follow these steps.

  1. Click the Link to the GIT Repo
  2. Click on the 'Clone or download' button (Green) then select Download ZIP
  3. Extract the downloaded ZIP somewhere
  4. Open the Arduino IDE
  5. In the Arduino IDE go to File Open
  6. Then navigate to the WordClock_NeoMatrix8x8.ino found in the unzipped folder (Example Directory - C:\Users\xxxxxx\WordClock-NeoMatrix8x8-master\WordClock-NeoMatrix8x8-master\WordClock_NeoMatrix8x8.ino)

Now you have opened the code!

Making the Modification to the Code

We then need to make a very minor modification to the code Adafruit provided as we are using a different micro controller to the original project.

In the WordClock_NeoMatrix8x8.ino we want to modify some of the //define pins,

We need to change RTCGND to A4 & RTCPWR to A5 this tells the code where the SDA & SCL connections are on the Arduino Nano.

We will also need to change NEOPIN to D3 so that it knows where the 8x8 RBG Matrix Din is connected.

If you are not certain you did this correctly, you can download the attached Modified WordClock_NeoMatrix8x8.ino and replace the one in your directory.

Getting the Required Library's

Finally before programming you will need to download all the required Library's,

Adafruit has included links to all of these in the comments of the

Or you can click them here,

  1. RTClib https://github.com/adafruit/RTClib
  2. DST_RTC https://github.com/andydoro/DST_RTC
  3. Adafruit_GFX https://github.com/andydoro/DST_RTC
  4. Adafruit_NeoPixel https://github.com/andydoro/DST_RTC
  5. Adafruit_NeoMatrix https://github.com/andydoro/DST_RTC

For anyone who has not installed Arduino IDE Library's before follow these steps,

  1. All of the links above are to GIT Hub repositories, you will need to click the 'Clone or download' button
  2. Select download ZIP
  3. Now open up the Arduino IDE
  4. Click on the 'Sketch' tab on the top menu
  5. Hover over Include Library, then select 'Add.ZIP Library...'
  6. Navigate to the location you download the .ZIP library to and select it
  7. Now the Library has been installed, you will need to repeat these steps for each of the 5 Library's linked above.

Programming the Arduino Nano

Now the IDE environment is ready and its time for you to program the Arduino Nano!

Ensure that the Arduino IDE has been setup to compile for the Arduino Nano board, to verify this,

  1. Click on the 'Tools' tab
  2. Hover over the 'Boards: ' option and select the "Arduino Nano"
  3. Plug the Arduino Nano into your PC & select the correct COM Port

Once the above steps have been followed you can press the upload button to program the Arduno Nano!

Electronics

WordClock-Schematic.jpg
Arduino-Nano-Pinout.png
IMAG1521.jpg
IMAG1517.jpg

Now you have a programmed Arduino Nano its time to setup the electronics!

Before wiring everything up disconnect the Arduino Nano from the USB connector.

The electronics in the project are extremely simple, so its a really easy to assemble even for beginners,

Connections

  1. TP4056 - Solder red wire to the + connect next to the micro USB connector (Shown above) this is 5V (Verify with a multi meter if not certain). Then connect black wire to the - connector (again shown above).
  2. 8x8 RGB Matrix - Connect Din to the Arduino Nano Pin D3, then Vcc to 5V & GND to GND.
  3. DS1307 - Connect SDA to the Arduino Nano Pin A4 (This is the Nano's SDA connection), then connect SCL to the Arduino Nano Pin A5 (This is the Nano's SCL connection see the Nano Pin out above). Then Vcc to 5V & GND to GND.
  4. Arduino Nano - All that's left is powering the Arduino Nano, to do this connect 5V to Vin & GND to the GND next to the Vin pin.

Once all of the above has been followed the circuit is complete! and its time to program it to check its all working!

Before soldering all the above connections its probably a good idea to verify everything is working by using a breadboard and some connectors. I've shown some photos of my electronics verification above!

Clocks time not correct?

If you word clock is not displaying the correct time try reprogramming the Arduino Nano while connected to the RTC module. If this still does not work remove the cell battery from the RTC module and then add it back, after doing this attempt to reprogram the Arduino again.

Assembly

Guide1.PNG
Step1.PNG
Step2.PNG
Step3.PNG
Step4.PNG
Step5.PNG
Step6.PNG
Step7.PNG
Step8.PNG
Step9.PNG
Step10.PNG
Step11.PNG
Step12.PNG

Now that you have the 3D parts, Code & Electronics ready its time to assemble the word clock.

  1. Place the Standard Front flat on a desk and insert the 64 LED Diffusers.
  2. Ensure that all the diffusers have been inserted flat.
  3. Place the Divider Grid into the Standard Front Assembly.
  4. Prepare the electronics discussed on the previous step.
  5. Place the Angled Back Flat on the desk
  6. Insert the USB charger Module into the slot in Angled Back part
  7. Ensure that the USB Port is aligned through the rear cut-out on Angled Back
  8. Place Angled Mid over the electronics and align with Angled Back, then insert the electronics
  9. Place the LED matrix over the electronics, the panel should align on the Angled Mids slots.
  10. Place the Angled assembly onto the Standard Front and insert the M3 35mm screws
  11. Tighten the screws and place the 4 rubber feet on the base
  12. Congratulations you have completed the assembly, time to power it up see the time!

Lessons Learned & Conclusion

Overall I'm happy with the outcome of this project but ofcourse there are a few things that could have been done to improve it.

Issue 1

The RTC DS1307 modules are quite frustrating to setup and drift noticably out of sync quickly meaning you have to reprogram the device to re-sync it.

Issue 2

CAD, I would probably design the enclosure a little differently to improve the assembly process and actually have somewhere to mount the Arduino.

Issue 3

Why not have Wi-Fi? This would be a great solution to Issue 1!

When I started this project I had no experience with the ESP8266 / ESP32 but if I were to start this project again or do a Rev2 I would strongly consider adapting the code to use Wifi to get the current time instead of the DS1307.

This could also enable lots of other features like adjusting the display colour based on weather forecast or cool things like this.

Thanks everyone for getting to the end of my guide, if you have any questions please feel free to comment or direct message me!