Welcome
I hope you enjoy this repository of my various projects and ideas. Thanks for looking, Joe.



Search


Projects


Photography

« Core i7 Sandybridge PC Build | Main | Arduino - Parallax RFID Reader »
Saturday
Jan082011

Arduino Word Clock

I first saw a clock with this type of design on the Make Blog over a year ago. It is an incredibly clever idea, but the $1000 price tag is a bit much for my taste. I had seen a few attempts at a DIY version but most of them were still too complex or expensive to build. Needless to say when I saw this Instuctable I got really excited. It is based off of another Instructable, however, it simplifies the design and construction to the point where I felt confident that I could build it.

I followed the Instructable pretty closely, with the following exceptions:

LEDS:  I got my LEDs from Evil Mad Science, which sells packs of superbright 5mm LEDs in various colors. This project requires a pack of 100 white LEDs. For current limiting resistors I used 470 Ohm instead of 1K Ohm. This allowed me more flexibility since I can dim the LEDs as much as I want, but I can never make them brighter. The LEDs I used are very efficient and only draw 4.8mA with a 470 Ohm resistor, so the maximum power draw for the clock will be about 150mA. Consequently power usage is not an issue since I used a repurposed cell phone charger as the power supply and it can provide 700mA at 5V. 

Letter Mask:  I had to use 4 transparencies stacked in order to get the mask dark enough. I also used a wider border for the letter mask to cover up some imperfections around the edges of my transparencies. For LED diffusion I used some translucent plastic folders that I found at an office supply store. I got a multicolor pack so that I could try different configurations and decided that a combination of one gray and one white folder cut to fit in the frame was the best looking and most functional choice.

LED Holder:  Instead of a cardboard LED holder I used foam poster board. This is a much stiffer material and makes the holder much sturdier, however, it is also thicker so I had to make the light baffles 1" high rather than 1-1/8".

Circuit Board:  Since the wiring on this project is fairly complex I decided early on that I wanted to keep the circuit board as simple as possible. In order to accomplish this I used two Radioshack breadboard matching printed circuit boards. These are great boards since they have power buses running down the sides of each board and they have plenty of room for the 7 chips necessary for this project. This made it very straightforward to scratchbuild an Arduino on one of the boards and then wire it to the other chips. Note: when building an Arduino in this way you need an FTDI cable which plugs into the 6-Pin header on the board in order to program the Arduino.

I mounted the boards side-by-side on a piece of acrylic to make it easier to work with. I also wired the board such that I could add a photoresistor in the future to allow for dynamic LED dimming (its wiring is bundled separately for later use as shown in the photos). Instead of wiring headers I just wired directly from the circuit board to the LEDs using multicolor wire to differentiate which word group I was wiring to (you can see each ULN2003A's bundle grouped together in the photos). 

The size of these boards prevented me from trying to mount them inside the picture frame, however, mounting the boards on the back wasn't a problem. As shown in the photos I had use some stacked foam board as spacers between the back of the picture frame and the wall to keep the board from rubbing agains the wall. I also changed the power socket mounting from the back of the frame to the bottom by cutting a notch in the wood and gluing it in place.

Conclusion:  The biggest problem I had with this project was dealing with a slightly imprecise LED layout. This resulted in some of light baffles partially blocking the wrong letters. After removing the problem baffles, however, I found that my diffusion layers worked well at making up for any discrepancies due to LED placement as well as reducing cross-letter light bleed to an acceptable level. As far as the code goes the only changes I made were done to make use of external pull-down resistors instead of internal and to clean up the code a little bit since some of the comments no longer made sense. I really like this project. It is not only cool looking, but it is useful as well. 

Reader Comments (16)

Hi Joe,

Just wanted to ask you a question or two about the clock. I am in the process of building my own and started getting the components from the Instructible. One of the main issues that I'm having is that I'm a beginner when it comes to electrical. And let's just say that it's frustrating to not have a complete grocery list of everything I need when I have to fish through the instructions to find out things I didn't order.

The issue that I am having is on the power. I have an arduino UNO board that has a 5V plug on it. From the comments, I'm under the impression that I can use the board as a whole. However, I had the idea that if building this was a success and someone wanted me to build another, I'd hate to have to order a new one. So here are my questions. 1. If I stick with the UNO board, do I run male headers into the female sockets on the board or solder from the bottom? 2. If I go with making my own power, can you provide a list of the specific components needed? One of the most frustrating things that made me almost quit this idea was the need for 1k ohm resistors. When I went to a website to order them, there were at least 8 different kinds.

Thanks,

Rob
July 6, 2011 | Unregistered CommenterRob
Rob,

It sounds like you want to be able to power the entire project via the 5V output of the Arduino. This should work as long as the current draw of your LED array is not too high. The Arduino documentation doesn't explicitly state the maximum current that it can provide, however, if powered via USB it is limited to 500mA. My clock was well below this but it is something to keep in mind. Since my clock doesn't use a standalone Arduino I used an external 5V source (old cell phone charger) which is a regulated 5V supply which can provide up to 700mA. You could go a similar route on your build if you wired an external 5V supply to both the USB input and the remaining circuitry, thereby bypassing the Arduino power supply circuit and avoiding any possible power issues.

As far as wiring goes, if you would like to be able to reuse your Uno in the future I would stick to using to plug-in headers and not solder to the board. Other options would be to build an Arduino circuit from scratch (like I did), or use one of the other Arduino boards available that has through-hole wiring instead of headers, like the Diavolino (http://evilmadscience.com/productsmenu/tinykitlist/180). That would make it much easier to hardwire the entire project together as a standalone device, if that's what you are looking for.

Hope this helps,

Joe
July 6, 2011 | Registered CommenterJoe
Joe,

Thanks for the quick response. Unfortuneately, due to my low IQ in electrical, I probably understood about a tenth of that. I've spent probably the last two weeks trying to understand how to do this and everyday this last week feels like I'm regressing. I'm going to take a huge step back and work on understanding this better. Well, either that or toss everything in the garbage. Thanks again for the help.
July 6, 2011 | Unregistered CommenterRob
Hi Joe,

this is a great project, i would like to make it.
Could you explain me what exactly IT IS stands for in the schematics?
I'm unexperienced in electronics, but i want to give this a try.
Thanks,

Tom
October 27, 2011 | Unregistered CommenterTom
Tom,

The "IT IS" is referring to the LEDs that are let for those words on the clock. The reason those are separated from the rest of the words is because they have to be lit at all times. Don't worry about the inexperience. I'm the one in the notes above you and after some time, I was able to build my clock. I do have an issue where it seems the clock is running slow (I haven't looked for a more updated program file). Also, my only other quandry is trying to figure out a thinner (but still as strong) product to use for light baffles, as I don't like having the components on the outside.

Have fun and good luck,

Rob
October 27, 2011 | Unregistered CommenterRob
Thanks Rob, it's clear now.
Maybe i will try to use an RTC, as i saw it in Doug's instructable. I hope it could help to keep the real time.
I'll be back if i have some results to share.

Tom
November 3, 2011 | Unregistered CommenterTom
Hi,

I have a question about programming the microcontroller.
Is it possible to stick my mircontroller into an Arduino UNO, program it, then take the chip out and place it in my circuit?

Thanks!
November 18, 2011 | Unregistered CommenterAndrew
Andrew,

You should be able swap a new ATMega chip into an Arduino, load the bootloader, load the word clock program, and then put that chip in the circuit I have shown. I see no reason why that wouldn't work since you will be using the Arduino's USB-Serial converter instead of the FTDI cable's like I did. Since I like to scratch build a lot of things, I find it very useful to have an FTDI cable since I can build my own Arduinos as part of the circuit on the cheap and still be able to change the program without pulling the chip.

Good Luck,

Joe
November 18, 2011 | Registered CommenterJoe
Hi,

I'm sooo close to finishing up this project, but I have a question regarding the schematic.
The photoresistor is shown to be optional on the diagram.. I'm just wondering how putting a photoresistor would change anything in the circuit. I'm assuming the photoresistor is there to have the clock dim when it's dark?
My concern is that pin 22 is always grounded regardless of whether or not the photoresistor is there. This would mean pin 23 is also unaffected.
Is this the proper place to put the photoresistor?
November 27, 2011 | Unregistered CommenterAndrew
Andrew,

Pin 22 of the ATMega should be grounded regardless of whether you use the photoresistor or not. The 10K resistor is used on Pin 23 to keep the voltage range within the capability of the ATMega's analog inputs.

If you DO NOT want to use a photoresistor, just follow the schematic, but leave out anything attached to Pin 23.

If you DO want to use a photoresistor, then follow the schematic, but you will have to modify the code slightly to enable the section that allows the photoresistor to control the brightness of the LEDs.

I showed the photoresistor as optional since I planned to come back and try it out at a later date. Unfortunately I haven't had the time to work on this aspect of the project and make any code modifications/corrections to get it working the way I'd like.

If you're in doubt, just wire everything up except the photoresistor itself (leave the connection wires unconnected) and then you can always add it later if you wanted, but if you don't it won't affect the clock's operation.
November 28, 2011 | Registered CommenterJoe
Thanks for the quick reply!
That's exactly my concern.. Pin 22 is always grounded so the absence OR the existance of the photoresistor won't effect anything in the circuit, because pin 23 always has a 10k ohm resistor to ground and pin 22 is always grounded.
But i do like the idea of using a photoresistor.
Wouldn't it work if i placed the photoresistor between the 5V supply and the node that connects all the LED's anodes?
This way, i don't think any altering of the code is needed.
November 28, 2011 | Unregistered CommenterAndrew
Andrew,

In theory putting the photoresistor between the 5V supply and the LED array would work, however, in practice it probably would not turn out as you would hope. The first reason is that most photoresistors couldn't handle the current needed to run that many LEDs. Second, photoresistors generally have a very wide resistance range for when they are exposed to darkness vs bright light, consequently getting the right resistance level and as a result LED brightness for a given ambient light source would be pure luck. This is why feeding an analog input with a photoresistor and then manipulating the data it provides is a better way to get the results that you would want.

Lately I have been thinking more about getting a photoresistor working with my clock because it is much too bright at night. Hopefully I'll have enough time to work on it in the coming weeks.
November 28, 2011 | Registered CommenterJoe
I see the complication...hmm...
If I were to use the photoresistor connected the way you drew it on the schematic,
would the altering of the code be a difficult task?
I'm comfortable with C programming, but I haven't had any luck figuring out this arduino code that you uploaded.
Where and how would the code change if I introduce the photoresistor into the circuit? And would it matter what range of photoresistor I use? The one I have is ranged from 1.5kohms to 20Mohms.. I couldn't find a smaller one.
November 29, 2011 | Unregistered CommenterAndrew
Andrew,

The code shouldn't be too hard to modify. There's actually a line of code that is commented out at the beginning of the void loop that uses the analog input 0 (Pin 23) to drive the PWM output that controls the brightness of the LEDs. If you activated that line of code and then removed the line of code that sets the LEDs to maximum brightness that should work, however, you may have to play with the scaling to get it to work how you want it to.

I think any range of photoresistor should work, however, different ranges may require different scaling in the program or maybe even a different bias resistor instead of the 10K I have in the schematic.
November 30, 2011 | Registered CommenterJoe
Hi Joe,

I finally finished the project! Thanks for all your help!
I even implemented the photoresistor and it's working perfectly fine, except for the dimming of the "IT IS" light (the brightness never changes for this one), but other than that it looks awesome!

Thanks!
December 22, 2011 | Unregistered CommenterAndrew
Andrew,

Glad to hear that you finished it and it is working well for you. It's good to know someone got something of value from one of my posts.

Joe
December 23, 2011 | Registered CommenterJoe

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.