Introduction: Budget Arduino RGB Word Clock!
Hello everyone, here is my guide on how to make your own simple & cheap word clock!
Tools you will need for this project
- Soldering Iron & Solder
- Wires (Ideally at least 3 different colours)
- 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)
- 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!
Step 1: Project Proposal
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.
Step 2: BOM - Electronics & Mechanical
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)
- £6.42 - £6.42- 8x8 WS2812B Matrix - https://www.ebay.co.uk/itm/8x8-64-LED-Matrix-WS28...
- £1.83 - £1.83- Arduino Nano V3 - https://www.aliexpress.com/item/NANO-3-0-controla...
- £1.75 - £1.75- RTC Module DS1307 - https://www.ebay.co.uk/itm/262460670847?_sp=p2488...
- £1.25 - £0.13 - Power Micro USB - https://www.aliexpress.com/item/50pcs-lot-TP4056-...
- £4.31 - £1.44 - Protoboard - https://www.aliexpress.com/item/NEW-3pcs-Electric...
- £1.05 - £0.11 - M3 35mm Screw x20 - https://www.aliexpress.com/item/M3-x-35mm-Alloy-S...
- £4.13 - £0.82 - 4mm Rubber Feet x4 - https://www.ebay.co.uk/itm/CIRCULAR-ADHESIVE-RUBB...
- £12.99 - £1.20 - BQ 1.75mm PLA - Coal Black - https://www.amazon.co.uk/gp/product/B077K4QWMT/ref...
- £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.
Step 3: 3D Printed Parts
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,
- Front Panel - This has the letters positioned in-front of the LED Matrix.
- 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°.
- Back Panel (Angled) - This panel houses the power adaptor and connects to the middle panel.
- Power Adaptor Lock - This is a small part that holds the adaptor in place.
- Divider Grid - This is used to help isolate the light from each LED, reducing the light bleed into adjacent letters.
- 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.
Step 4: 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.
- Click the Link to the GIT Repo
- Click on the 'Clone or download' button (Green) then select Download ZIP
- Extract the downloaded ZIP somewhere
- Open the Arduino IDE
- In the Arduino IDE go to File Open
- 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,
- RTClib https://github.com/adafruit/RTClib
- DST_RTC https://github.com/andydoro/DST_RTC
- Adafruit_GFX https://github.com/andydoro/DST_RTC
- Adafruit_NeoPixel https://github.com/andydoro/DST_RTC
- Adafruit_NeoMatrix https://github.com/andydoro/DST_RTC
For anyone who has not installed Arduino IDE Library's before follow these steps,
- All of the links above are to GIT Hub repositories, you will need to click the 'Clone or download' button
- Select download ZIP
- Now open up the Arduino IDE
- Click on the 'Sketch' tab on the top menu
- Hover over Include Library, then select 'Add.ZIP Library...'
- Navigate to the location you download the .ZIP library to and select it
- 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,
- Click on the 'Tools' tab
- Hover over the 'Boards: ' option and select the "Arduino Nano"
- 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!
Step 5: Electronics
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,
- 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).
- 8x8 RGB Matrix - Connect Din to the Arduino Nano Pin D3, then Vcc to 5V & GND to GND.
- 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.
- 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.
Step 6: Assembly
Now that you have the 3D parts, Code & Electronics ready its time to assemble the word clock.
- Place the Standard Front flat on a desk and insert the 64 LED Diffusers.
- Ensure that all the diffusers have been inserted flat.
- Place the Divider Grid into the Standard Front Assembly.
- Prepare the electronics discussed on the previous step.
- Place the Angled Back Flat on the desk
- Insert the USB charger Module into the slot in Angled Back part
- Ensure that the USB Port is aligned through the rear cut-out on Angled Back
- Place Angled Mid over the electronics and align with Angled Back, then insert the electronics
- Place the LED matrix over the electronics, the panel should align on the Angled Mids slots.
- Place the Angled assembly onto the Standard Front and insert the M3 35mm screws
- Tighten the screws and place the 4 rubber feet on the base
- Congratulations you have completed the assembly, time to power it up see the time!
Step 7: 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.
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.
CAD, I would probably design the enclosure a little differently to improve the assembly process and actually have somewhere to mount the Arduino.
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!
Participated in the