Introduction: ROY G. BIV Clock

About: retired from electronics and now enjoy inspiring others.

The color code for marking electronic parts is DEAD. So here I will revive it some. This is a color coded 12 hour clock. I spent a lot of time finding the best display shape so the colors look like a sheet of paper instead of led dots that glow. I also made good fitting cases that is why there are so many in the photos. It took many more prototypes to get things to fit just right. You can expect a sleek display case with 4 easy buttons to set the time and a solid paper like color display.


part list is:

any pro-mini, nano

rtc zs-042

4 switches

pc board or hand wire on 1.5 x 2.5 paper board


metal foil tape

5volt led string colored lights

Step 1: SUPPLIES Photos

The pdf for the pc board is regular view. Change to MIRROR for laser printer (toner transfer) pc board

Step 2: Colors.....Time Is 7:36

The real color code is: sorta ROY G BVG. Not the ROY G BIV from the rainbow.

0 black

1 brown

2 Red

3 Orange

4 Yellow

5 Green

6 Blue

7 Violet (Indigo) or (purple)

8 Gray

9 white

The led strip lights use the 5050 which are brighter than the 3535. My first mistake was using the 12v version and the circuit needed drivers. The 5v leds run direct from the uno. This makes the whole project VERY easy. Before you build the case make sure you order the leds first. The spacing per inch is critical. To fit into the lens the leds must be close to 33mm apart. (center to center) That fits 2 leds into the small lens and 3 leds into the tall lens. If you have some leftover led strips and you use them adjust the height of the lens to fit.

Step 3: STL Files to Print Case

Print the case and parts. I like black for the case and just change to white for the lens.

this will be a bottom, case, buttons, and lens sleeve, top all black

and 4 white lenses.

The case will need just a slight sanding to fit inside the bottom.

The lens sleeve is angled to the back so mark the rear facing side. I tried to show this but no photos worked well. There is a slight angle that tilts the lenses backward. If you look at the sleeve sideways one corner is 90 and the other is 78 a slight tilt to the back. The other way to tell the rear is to see the bottom of the lens sleeve and the wide overlay goes to the rear of the case. This will make the case and sleeve flush on the backside.

The switches have the wider inlay that goes to the front of the case.

The lenses all need to be light proof. To paint them flat black is the best but paint RUNS on 3d prints. I tried my best painters tape and covered the front of the lens and sprayed the lens. Got black streaks all in the lens front cover.

The light from the next lens interferes with the other lenses so they need to be blacked out. I used aluminum tape used in duct work. DO NOT use DUCT TAPE or electric BLACK tape. These tapes sag and get sticky and make the lenses too wide to fit inside the case and top. You will have to resize the stl prints if you do. Cover 3 sides.

The tape is from duct work and is very sticky and STAYS put. See photos. The bright silver tape is the best but it has a logo which you may not want to show in the final product.


The leds work best if you got the SINGLE cut section 5v strip. Some strips connect 2 or more leds in a cut section or they share resistors. I also like the silicon covered outdoor type as it helps defuse the light.

If you use the pc board put female headers on the led strips with + to the right, like B-R-G-+.

I included a sketch to adjust the colors that gives a pwm setting. The colors are close but I found that every strip has some variation and you may like to change the pwm settings. Rather than constant uploading the changes you can use the sketch to adjust pots to find a color you like. Then change the color pwm in the real sketch. If you adjust the pwm make sure the leds are inside the lens with tape and away from bright light.

Step 5: WIRE UP THE UNO and Keypad and Sketch

Each output of the uno goes to the leds. Start at 2 to the G of the 10 minutes led. This will get you to pin 9 of the hour R. Pin 12 is the hour B and pin 11 = 10 hour G and 10 = 10 hour R.

The rtc goes to A5, A4 and the pro minis have these in different locations sometimes on the inside of the pin headers.

The switches are 9mm contact switches (plain jane). Tie the bottom ALL to ground and one switch each to the A0-A3 pins. A0 is the 10 hour switch, ...... A3 is the minutes switch.

The code is easy and works with the rtc DS3231 chip. I wanted this to be as EASY as posable so the time is ONLY 12 hours. This updates the time to AM and resets the seconds to 00. If you modify the sketch and pole the rtc for a date or PM time you may get wrong data (but this clock and sketch don't care).


The build is better seen than described. The photos show the pc build in order of sections. I use a female header to hold the male header straight. I solder the promini to the board but there is room for female connectors if you like. The photos show the mistake that I missed the ground pin from the pc to the promini next to the Vcc pin. I corrected that and have another photo with the ground pin. I pull the dead pins in the led header just to make the plug in easy. More photos are in the build 002 and 003. The rtc will need to modify the connector and make a 90 in the pins so it will clear the case. Plug in all the leds and the rtc clock and upload the sketch. If you use the serial monitor the reading will be 00:00 and when one minute passes the display will be 00:01 and the right lens will be brown. If you connected the switches you can set the time and see the colors change.

I use a mini usb jack (standard android phone connector). I got some poor ones that have a small pad to hold the jack in place. One push from the cord and they break off. I solder an extra amount of solder to reinforce them and some glue. Connect the dc jack to the pc and test. This is the last time you can make any changes or repairs. Once started on the case everything MUST work correctly.

If all is ok, start the assembly with 2 sided foam tap (20x10 mm) place as shown on the 'bottom'. Center the pc over the tape and close to the bottom back. Next slide the 'case' over the led lenses and down to the 'bottom' and bring the switches through the hole.

Test with power again...then add the sleeve over the lenses. You should have marked the back of the sleeve by fitting it to the case and the bask should be flush. This may take a little squeezing to get the sleeve over the lenses. If you used a fat tape to block out the light on the lenses the sleeve and top will never fit. You will have to resize them.

Ok top on and it lights!

Step 7: BUILD 002

Step 8: BUILD 003

Step 9: BUILD 004 the Case

Here you see the switches. One switch to A0 - 10 hour ....A1 - hour ....A2 - 10 minute ... A3 - minute

The switch connects the A pins to ground.

Step 10: BUILD 005 Total Assy

Step 11: 12:56

Step 12: MISTAKES and Comments

This project took MANY MANY lenses and cases to get right. The leds in many of my lenses just looked BAD. The case itself took 12 prototypes to get a good fit. My big mistake was getting 12v leds and changing to 5v was a BIG help to simplify the project. Trying to connect the leds to the pc is a challenge. You may want to direct wire but this is no fun either.

My biggest complain is the led strips. I got some that promised 33mm spacing and were 66mm. The brightness from string to string changes too. The feed resistors are all too high in values. All leds have 20ma as full bright. So a 5050 with 3 leds will draw 60ma each. If you have a string of 50 leds that is 3amps. Most strings have 150 leds and that is almost 10 amps! Most 5v supplies are 1 to 2 amps tops. So to reduce the current they increase the resistor values. This gives the leds a dimmer color and takes away the true color intensity. None of the strings I tried had a good white...always bluish.

I changes some resistors and got much truer colors but I don't expect you to do this. The intention was for a VERY EASY project.

My other mistake was an open top. This gave a better look with the colors coming from the front and top. But any competing light above the display drowned out the colors so the new top covers all.

THANKS for viewing. oldmaninSC ..... for easy hook up wire see my 'poor man's solder pot'