Introduction: Color Clock Revamp
As noted by the project this is mostly a revamp on the clock I did approximately a year ago. I ended up coming back to this as the previous version only worked by the hour and did largely nothing else of note.
Now to give a little explanation of this little project. The concept is to allow you to assume the approximate time of the day by identifying the colors visible. Cooler colors at night with warmer during the day. You will be needing a small variety of components for the construction of this.
RTCDS3231 - $5 for a pack of two on ebay
Arduino Nano - About $5 you will need two of these. 5 packs on amazon have better prices if you have a use for more.
SK6812 LEDS - I used these. You can use neopixels as well if you get RGBW leds. (You can use RGB but slight modification will need to be made.
1000uf capacitor x2 - These are for the leds themselves
470ohm resistor x2 - Also for the leds
Battery - I used a rechargeable battery
Micro usb cable - $3 on amazon
Electrical wires 18 - 22 gauge
Hot Glue - This will be for protecting some connections.
Electrical Tape - Not need, but is used for some extra security.
If you would like to build the same kind of housing I used for the leds you will need the following materials.
Wood - I used poplar due to cost and needing some spare for another project. About $10 should cover what you would need at Lowe's or Home Depot.
Glue - I suggest wood glue, but I didn't have any so I used super glue and hot glue.
Acrylic - Cost will be variable depending on your location.
Step 1: Programming
For programming of the boards you will be using two separate sketches. One will run the minute and the other will run the hour. I will strongly suggest marking the boards with something to know which is which, I made this mistake and kept confusing the two.
There are two libraries you will be needing. Neopixel Library and the RTCDS3231 Library. I cannot recall which RTC library I used as some of them out there do not seem to work, I will just include a download here.
Sketch for the Hour
Sketch for the Minute
Step 2: Wiring
Wiring is "relatively" simple for testing purposes I ran the boards separately, but for the final product the will be wired together. I will explain how each component will be wired. Due note that some of these will be split off between the two boards as we will only be running main power to one arduino. The end of the step will give a more detailed explanation to the wiring.
Ground - Ground
VCC - 5v
SCL - A4
SQW - A5
(The A4 and A5 pins will also need to connect to the second arduino)
Ground - Ground
5v - 5v
Data - pin 10
(This is only for the board you programmed for the hours)
Ground - Ground
5v - 5v
Data - pin 9
(This is only for the board you programmed for the minutes)
5v - Vin
Ground - Ground
(This will be explained in the second paragraph)
Before you get to soldering your parts keep note that the leds need a couple things added on before connecting to the board. You will need your 470 ohm resistor connected to the data line of each led strip. You will also need to connect one capacitor linking the ground and 5v of the led (make sure the negative leg is on ground), do this for both sets of leds. For the RTC as mention you will only connect ground and VCC to one board (I suggest the hour board). The A4 and A5 pins will need wires splitting to both the arduinos, this is so that both are synced up with the same time and to avoid using a second RTC.
Since we are only using one battery through the micro usb of the nano, we are going to need to jump the power from one to the other. To do this you will need to connect 5v from the hour board to Vin on the minute board and then ground to ground (This assumes the hour board is your main power, just reverse the steps otherwise). This will allow both your arduinos to receive power from the one power source.
To help reduce clutter of the cables we will be splicing any possible wires with each other. On the hour board you can connect the ground of the hour led, RTC, plus an extra wire for taking ground to the minute board. For the 5v pin you can connect the hour led, RTC, and another extra wire for the minute board. On the minute board you will connect the extra 5v wire to Vin and the extra ground to ground. On the RTC you will run two wires from the SCL and SQW pins to their respective places on the boards.
Step 3: Housing
For construction of the housing I cut some poplar on a CNC machine and then just filed down the edges. The acrylic was also cut the same way. There are several layers to the housing. The largest portion houses all the electronics (note make sure the usb cable fits in with the battery, it was a tight fit for me). The middle section has a ring of acrylic, I used 5mm since that is what I had laying around, this also happened to provide just enough room for the leds (this is where the minute leds are located). Finally the top section uses another piece of acrylic to top it off. I lined my hour leds along the inner ring of the top section. I recommend that if you want none of the actual components to be visible you will need to do something to diffuse the acrylic. At the time I just used some Vellum paper that was readily available to at least hide the electronics. I used super glue (wood glue recommended) for attaching all the wood pieces and hot glue for attaching the acrylic.
Step 4: Conclusion
Functionally it is not the most useful clock, but that was not the main goal. The idea is that you can get a general idea by seeing the color. This also serves a more aesthetic purpose as I think it it visually appealing, although I will go back and darken the wood as I feel it is too light of a color. It was nice to go back to my first arduino based project and update it to be more like it was originally intended in functionality. I hope you all enjoy!
We have a be nice policy.
Please be positive and constructive.