Inspired by drj113's great instructable on making a word clock, I wanted to make my own. After seeing the (extremely overpriced) commercial "qlocktwo" word clock, I decided to borrow its smooth glossy black design while basing the innards of my clock on drj113's design.
In the end, I managed to stuff the arduino and LED's inside an IKEA shadow box, and used printed transparencies to create the black letter mask.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: The Materials
This is what you need:
1 Ikea RIBBA shadow box - $10
98 white LEDs - $7-10 (buy in bulk on ebay)
98 1KOhm resistors - $3
1 Arduino (or an ATMega168/ATMega328 and extra hardware - 5V regulator, crystal, etc) - $7 (for standalone chip and extra hardware) or $30 for arduino USB board
3 ULN2003A Driver ICs - $1.89 at Digikey
3 HCF4094 shift registers - $1.44 at Digikey
1 Barrel-plug connector - $0.38 at Digikey
2 Buttons - scavenged from old electronics
1 6V or 7V DC wall wart - scavenged from old electronics, or ~$4 online
1 sheet colored paper (used for a hint of color around the border)
1 9" square piece of cardboard (used to hold LEDs in place)
1 cereal box (cut up to make light baffles - see step 3)
1 black garbage bag
2 printed transparencies (see attached pdf on step 2) - $1
1 protoboard for microcontroller, driver ICs, etc. - $5
Total cost: around $44 (using standalone ATMega168) or $67 (if you buy a full Arduino)
optionally a breadboard is useful for prototyping the circuit
Step 2: The Black Letter Mask
The key to making the clock look nice was making the glossy black letter mask. I thought of several different ways to make the letters, such as silk-screening on the back of the glass, or having a custom black sticker made, but eventually I settled on printing black onto transparencies - see the attached PDF file.
Since there's a lot of black ink, I had my transparencies printed at Staples for something like 50 cents a piece. The ink wasn't quite black enough to completely block out light, so I printed 2 of them and stacked them. Depending on how dark your ink is you may need more or fewer layers to get an opaque black.
Cut off the clear parts of the transparency so only the black square is left. Align the letters of the two layers and tape the layers together with double-sided tape on the top and bottom black regions - see photos 2 and 3.
Note: the viewable area of the Ikea frame is 8.5" square, but unfortunately you can't print all the way to the edge of the transparency. Therefore you need to cut a piece of construction paper to form a border and fill the gap - it also adds a nice touch of color. Cut a piece of construction paper to be 9"x9". Mark lines 0.5" in from each side forming an 8"x8" square (photo 4). Use a utility knife to cut out the inner square leaving a 0.5" paper border (photo 5). Tape the transparencies to the back of the border (photo 6).
Now, cut out a square piece of the black garbage bag big enough to cover all of the letters. Tape this on the inside (back) of the letter mask to help diffuse the LED light and make the letters a dim gray when not illuminated. Also, put a piece of black electrical tape behind each of the non-used spacer letters to make sure no stray light gets through.
(Edit 8/1/10: Added a better description of the construction paper border and more pictures)
Step 3: Soldering LEDs
Now comes the repetitive task of soldering all 98 LEDs and resistors.
We need to attach a resistor to each LED to limit the current that flows through it. I chose to use 1Kohm resistors and drive the LEDs at 10mA (half their rated current), but you might want to use 470ohm or smaller depending on your power supply and LEDs. Keep in mind that up to 31 LEDs will be lit at once ("IT IS TWENTY FIVE MINUTES PAST ELEVEN"), so if you drive each LED at 20mA you will need a 620mA power supply - this is part of the reason why I planned for 10mA a piece.
First, trim one lead of each resistor leaving about 3-5mm (see photo 1).
Next, prepare the LEDs:
- bend the leads opposite directions
- we're going to attach a resistor to the anode (+) of each LED. The anode is the longer lead, and is opposite the flat edge of the LED - photo 2
- trim the anode so that a small stub ~3-5mm is left (it shouldn't even extend past the base of the LED) - photo 3
Now, solder a resistor to each LED:
- place the LED into some kind of jig to hold it steady - a piece of cardboard with a hole punched in it works well
- hold the short lead of the resistor next to the trimmed lead of the LED and tack them together with a bit of solder (photo 5)
- test the LED-resistor combo on a 5v supply to make sure the solder joint is good and polarity is correct (photo 6)
Step 4: The LED Holder
Next we need a way to hold the 98 LEDs in place behind each letter. In drj113's instructable, he made a pcb for the LEDs - this works well, but it also requires a lot of work to etch and drill the board.
I decided to take a 9"x9" piece of cardboard and punch out holes for each LED. I printed out a pattern with the letters (you can use the same file as the transparency, or invert the colors to save ink) and taped it centered on the cardboard. Then I took an awl and punched a hole through the center of each letter that would be lit (photo 3).
Once all the holes are punched, you can remove the paper template.
Step 5: Installing the LEDs
Take each of the LEDs and bend one lead 90 degrees, and the other 90 degrees the other way (see photos 1/2). Make sure you make the bend close to the resistor/LED otherwise the leads might touch another row once installed.
If you did this consistently, the leads of the resistors should overlap when placed into the cardboard backing.
Tip: mark the division between words on the back of the cardboard - this will help when connecting LEDs.
Solder together all of the positive leads (the resistor side) in each row and solder together all of the negative leads leaving a gap (discontinuity) between words (photos 3/4/5). Finally, bend the positive lead (resistor) on the end of each row down and solder it to the lower row to connect all of the resistors together (photo 6).
You can then attach a single wire to any positive lead (since they're all connected), and attach a wire to a negative lead for each of the words. Make sure you test each of the words at this point - I had a few loose solder joints which caused only parts of words to light up.
Solder groups of 7 of the cathode wires to male pin headers (photo 8) - this will make it easy to connect and disconnect the LED board from the controller board. However, don't include the "IT IS" cathode in one of the groups of 7 - it will be connected separately.
Step 6: Light Baffles
Once all the LEDs are in place, we need to add some baffles to prevent the light from bleeding between words. I made the baffles out of cardboard from a cereal box, and hot-melt glued these to the cardboard LED holder.
Start by cutting strips of cardboard that are 6"x1-1/8" (photo 1). Then using a couple dots of hot-melt glue (photo 2), attach four of these strips to form a square perimeter around the LEDs (photo 3). Then add strips between each row of LEDs (photos 4/5). Finally, cut the remaining strips into small pieces that can fit within a row and block light between words.
Step 7: Wiring Up the Arduino
The clock needs some brains, so it's time to hook up the microcontroller.
First, you'll want to program the Arduino before placing it in the circuit. The code I used (WordClockModified.pde) is a slightly modified version of drj113's original code, updated so that the pinouts match my version and I changed the buttons to be hour-advance and minute-advance rather than minute forward/backward.
Space-wise, you probably won't be able to fit the whole arduino USB board inside the frame, and there's no reason to anyway, so I chose to set up a standalone ATMega168. If you do this make sure you use a crystal, not a resonator - resonators are simple since you don't need separate capacitors, but crystals tend to be more accurate which is important in a clock.
For the most part I followed drj113's schematic with a few changes:
- I hooked up the output-enable pin of the shift registers to a PWM pin on the ATMega168 (instead of just tying them high) so that I could dim the LEDs programmatically
- I added a potentiometer to an analog input pin for setting the brightness (you might substitute a photoresistor so the lights dim when it's dark)
I've uploaded a mini-schematic I drew to help wire the components (Note: the pinouts on my version are different than those used by drj113)
To start building the controller, you may want to use a breadboard to prototype some of the design (photo 1). Once you are convinced that things are working as expected, it's time to move to a more permanent layout.
Start by cutting down a piece of protoboard and laying the components out to make sure everything fits OK (photo 2). Then start wiring up the components. I started with the voltage regulator and ATMega168 and made sure that the microcontroller was hooked up correctly before continuing (photo 3 - note: the top of the board was pretty cramped, so I wired up some things on the bottom side). Then I wired up the shift-registers and drivers, checking to make sure that each set worked correctly before continuing (photo 4 shows the board after two sets of shift-register/drivers have been wired). The completed controller board can be seen in photos 5 and 6.
Step 8: Mount the Power Connector and Buttons
A clock is pretty useless if you can't set the time, so we need to mount some buttons on the enclosure. We'll also mount the power connector now too.
Take the back panel from the Ikea frame and drill three holes - the first two should have a diameter equal to the width of the buttons, and the third should have a diameter equal to the smaller width of the barrel-plug jack.
Once you've drilled these holes, use a square-edged file to expand the holes into squares big enough for the buttons and connector to fit (photo 1). Press the components into place and glue them from the back side (photos 2/3).
You can also mount the potentiometer at this point (these pictures are from my second word clock, which I opted to skip the potentiometer).
Step 9: Enjoy Your Creation!
Finally, stuff all the electronics and LEDs into the frame, turn it on and enjoy your hard work!
Let me know if you have any questions.