Step 7Wiring up the Arduino
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.
| « Previous Step | Download PDFView All Steps | Next Step » |



















































I've decided to copy this project but I'm new to arduino and electronics in general. I started gathering all the materials needed for this and before making any purchases I would like to know if it's possible to get a full schematics for this! Your drawing seems to be missing some parts - Is it possible to get the whole schematics ? Thank you in advance!
Great tutorial and because of your tutorial I am just finishing up a clock which is my first electronics project. Everything is working correctly except my photo resister dimmer. I adjusted the Arduino code and the lights will dim when it gets dark but after about 7-10seconds the whole clock goes dark. Turn room lights back on and the clock lights up again. Any tips or ideas on what I need to do? I tried a couple different photo resisters but same results.
Thank you
lightLevel = analogRead(**your analog pin IN here**);
mappedlevel = map(lightLevel,0,1000,0,255);
if(mappedlevel<40) mappedlevel =40 ;
analogWrite(**your analog OUT pin here** , mappedlevel);
Thanks again.
1) If i get the Arduino board, i wouldn't be able to fit it inside the frame? Does this mean i have to get the ATMega and all the addons?
2) How does one go about programming the Arduino board?
I'm really confused and don't know what's going on haha, i'll appreciate all the help i can get!
To program the Arduino board you use Arduino software which is very easy to use. You write some code that you want your micro-controller to do and you upload it to the board using a USB.
You should check out the arduino website.. www.arduino.cc! There are also some great tutorials on programming the arduino on youtube!
I'm not sure if what I've asked makes sense, I just want to make sure that I get the correct point to point on the Arduino and I'm having a little problem determining how I'd hook it up w/o the ATMega.
Remember how I mentioned that I'm an electronics newb? Yeah, get ready for some more stupid questions!
In the "Materials" step, you mention that one can get an Arduino board or the ATMega. So am I right in assuming that it takes the place of the ATMega, and therefore almost all of this step? Do I still need shift registers, IC's, etc? How about the barrel-plug power connector?
It seems to me that the Arduino already has all of these, though I may just be misunderstanding. Thank you for any guidance you might be able to provide, and for being patient with somebody who's in way over their head here!
And never be afraid to ask questions, it is after all how you learn!