Introduction: Rainbow Word Clock

About: I build therefore I am.

At long last I have managed to finish the Rainbow Word Clock!

Once again, this one was inspired by Doug and his creations https://www.instructables.com/id/The-Wordclock-Grew-Up/

I have a fixation with RGB LED's at the moment and I wanted to do something a little different.
So, while it is still here (before my girlfriend nicks it!) I thought I would share the proccess with you.

This is based on the Arduino ATmega328 with a slight redesign of the PCB to change the outputs from negative to positive and to add a ULN 2003 to handle the switching of the grounds.

Step 1: The Design

I had a local company who do screen printing to make me two Word clock faces, one regular 300mm x 300mm and one custom 185mm x 205mm.
The smaller one is designed to be fitted into my cabinet just above the shelf, it has been sat in there for a number of months now happily telling me that I am late!

This one was also used as a test to do the first PCB, which turned out quite nice in the end.
















Step 2: Building the Body

The main part of the clock has not changed much from all of the others on this site.
I did make a few tweeks to try and improve the light spread without causing glare.

Key changes to the normal design are:

I used some plastic strips that I found at work and ripped them down to two sizes, a larger one for the outer frame and one smaller one for the internal shutters.

Once the grid is made I then covered it with reflective ducting tape, basically silver foil with a sticky back.

Placed the LED strips on the top and bottom of the cells so they are not glaring right at the word.


The LED strips were bought from eBay, 5M strips of RGB, but be careful though, some of the ones on sale say RGB but are actually three seporate LED's, they don't work half as good as the combined ones.

Step 3: Rainbow Electronics

For the rainbow version I am switching the positive side of the LED strips instead of the negative, at first I thought I would need a HEF 4049 hex inverter to change the output but I managed to swap the ULN 2003 for the UDN2981 and bob is not only your uncle but you also end up with some empty parking spaces on your PCB. Then move one of the ULN2003 chips along to drive the 3 PWM outputs that generate random colours.

There are a few pin changes from the original layout but the rest has not changed much from Doug's original design.
I have also added a PDF of the wiring diagram in the ZIP file.

There are 4 wires from each LED strip, a switched positive, Blue Negative, Red negative and Green Nagative.
I connected all of the Red wires into a bunch with one more so I could connect it to the ribbon cable, the same with Green and Blue. I simply soldered the bunch together and then covered with heat shrink.
There is a small strip of breadboard to connect the ribbon cable to the white switched positve for each cell.

It is worth mapping the ribon cable out at this point with a 12V supply, make sure all of the LED's work and note which wire does which cell.

Step 4: Rainbow Time

Once it is all put together sit back and watch the colours change.
You can adjust the colour patterns by changing the variables at -

  redNew = random(255);
  blueNew = random(255);
  greenNew = random(255);

and

  redNow = random(255);
  blueNow = random(255);
  greenNow = random(255);

If you change the variable to a lower number on both of the the redNew and redNow it will mean that red will less intense so in theory th eblue and green should be more dominant.

Anyway, best to simply have a play and see what you can do with it.
Enjoy!

The photo's don't do it justice :-(

Step 5:

This is the modified code that includes the Rainbow section, this is also based on Doug's latest code that allows you to adjust the day / night brightness.


**** UPDATE 27/10/2013****
To try and eliminate the delay caused by the Rainbow I have simply added a comparator just before the Rainbow which seems to have calmed it down.
The Rainbow code now changes the colour only if the seconds = 30.
It seems to run smooth but I would have to watch it for 24 hours to see if the bug is fixed. Please replace the end of the code with:
********************************************************
// Void Rainbow
if (second==30) {


analogWrite(blue, blueNow);
analogWrite(red, redNow);
analogWrite(green, greenNow);
redNew = random(255);
blueNew = random(255);
greenNew = random(255);
// fade to new colors
while ((redNow != redNew) ||
(blueNow != blueNew) ||
(greenNow != greenNew))
{
fade(redNow,redNew)
fade(blueNow,blueNew)
fade(greenNow,greenNew)
analogWrite(blue, blueNow);
analogWrite(red, redNow);
analogWrite(green, greenNow);
delay(100);
}
********************************************************
The important bit is the IF statement and don't change the delay lower than 100 because it will flash through a range of colours in the one second when second = 30.

If anyone with more knowledge of the coding can throw an opinion I would be very grateful.
We are all here to learn! (including me :-) )

One important note is that because the colour is not set until the end of the code you will not see the self check, it is happening but you just cant see it :-)
So once you have powered up the unit there will be a delay of a couple of minutes before anything exciting happens. Its worth the wait.

Make It Real Challenge

Participated in the
Make It Real Challenge