loading
Picture of Solid Wood Digital Clock
DSCN1024.JPG
DSCN0980.JPG
How to build a wooden digital clock powered by an atmega168 (arduino) with a built-in alarm and games.

I first thought about making this when I saw an LED clock covered by a wood veneer . I liked it when I saw it, until I saw the price. This is when I decided to build my own, I wanted it to build it for much less, from solid wood and play games!
 
Remove these adsRemove these ads by Signing Up

Step 1: What You Need

Picture of What You Need
Materials:
- 4, 18" x 4" x 1" wood planks (I went with Maple)
- 85 Red LEDs
- 85 Green LEDs (Optional)
- 1 4 to 16 pin Demiltiplexer
- 15 NPN transistors (such a 2N3904)
- 1 ATMEGA168 Microcontroller (or Arduino)
- 1 20 MHz Crystal
- 1 5 Volt Regulator
- 2 220uF Capacitors (for power spike leveling)
- 1 Old Pocket Radio
- 2 1/8" Audio Jacks
- 1 5-9V DC wall adapter
- 1 (or more) Old Game Controller(s)
- 4 3-1/2" Wood Screws
- Solid Core Wire (easier to work with)
- Solder
- Hot Glue Sticks
- White Glue
- Sand paper

For the game controller I use an Atari 2600 joystick (or even paddle if you re-program), but it is also compatible with with a Sega Master System Controllers, Atari 7800 joysticks (theoretically) or even Sega Genesis Controllers.

Tools:
- Drill press
- Flat End Hobby Tool Bit
- Soldering Iron
- Hot Glue Gun
- Miter Saw

Step 2: Prepare the Front Board

Picture of Prepare the Front Board
DSCN0851.JPG
Take the best piece of the 1"x4"x1-1/2' board and choose the best side to be the front of the clock.
Try to avoid any knots or visible defects in the wood because they will make it infinitely harder to drill the LED holes.

Start by printing out the template attached to this step at a 1:1 scale.
Tape it to the back side of the front board, so the good side is facing down when the print-out is facing up.

Take the front board and place it template side up on top of the worst looking board. Then put that on the drill press.

Take a drill bit slightly larger than the flat-ended hobby bit and adjust the depth gauge so that the tip is just 0.8-1mm above the lower board, this is so it doesn't go all of the way through the front board. I strongly suggest using a test board first to see if it works. Drill at least 10 test holes (they will be used later!). A strong light should be able to shine through where the tip of the drill ended.

Drill one hole in each of the circles on the template as in the picture below.

Step 3: Finish the Front Board

Picture of Finish the Front Board
DSCN0889.JPG
DSCN0853.JPG
DSCN0858.JPG
DSCN0851.JPG
DSCN0864.JPG
This step is very challenging, the point of it is to use the hobby tool bit to make the hole ends flat so the light shines through evenly.

Start by putting the hobby tool bit in the drill press (make sure to leave over 1" out of the chuck).
On a safety note, this is not how the bit is designed to be used, and is a hazard, so be extra careful. Adjust the depth gauge so the bit is barely above the lower board as in the 3rd picture.

Line the bit up with a test hole and gently hold down for 1 second and let up. Hold it down for 1 second again then let up and turn the drill off. The drill is turned off so you can scrape any build-up off of the bottom of the bit. If you don't, it will burn the hole making the face discoloured. Repeat this until you are happy with how much light shines through (see pictures below for a reference).

Once you are comfortable with drilling the holes, move on to the final piece of wood and drill out each hole. Be warned that this takes patience, don't rush it or you may burn out a hole and have to restart.

Step 4: Prepare the Middle Boards

Picture of Prepare the Middle Boards
DSCN0883.JPG
DSCN0884.JPG
This step prepares the middle boards to accommodate the electronics.

If you messed up in the last step, the wood isn't lost, use it here!

For this step, all you need to do is cut a hole in each of the middle boards slightly larger than the size of the LED matrix, so all of the wires and electronics fit inside.

I did this by drilling out the remaining supports of a failed front board and using a chisel to clean it up. Repeat this for as many boards as you wish, I used 2.

Step 5: Prepare the Back Board

Picture of Prepare the Back Board
DSCN0951.JPG
DSCN0952.JPG
DSCN0955.JPG
DSCN0971.JPG
For this step use the attached template to drill and carve out the holes for the DB9 connector used for the controller, and the 2 1/8" audio jacks used for power and the radio.

To carve the controller port, drill out the inner line on the template. Next, carve the outer part of the template 10 mm deep using a chisel (be careful for this step, it's sharp).

To drill out the holes for the 1/8" jacks, start by drilling a hole just large enough for the end of the audio jack to fit into. Next drill a larger hole from the inside of the board to within 3mm of the outer surface(this depends on your jack). This allows the end of the jack to sit snugly in the smaller hole with the rest hidden behind the wood.

At this point you will want to attach the wires to the power, audio and controller ports. On the controller port, connect the wire from pin 5 to the wire from pin 6 as seen in the last picture.

Finally, fasten all of the ports to the back board using hot glue on the inside.

Step 6: Solder the Matrix

For this step, place one of each type of the LEDs in each hole so they wedge in place. If you used 2 5mm LEDs like me, then you will need to widen the the holes for the LEDs. Be careful when doing this, the drill bit can catch much easier and pull the board up, poking out the hole.

If you used 2 LEDs, then when you insert the LEDs into the holes, place the cathodes in the middle of the hole, so the 2 flat sides meet.

To start soldering, first bend all of the cathodes (shorter leads) down so they form 17 columns very close to the board, then solder them together.

To solder the anodes together first bend all of one colour's anode up and then bend them horizontally, so there are 5 anode rows for that colour. Bend the other anode colour's leads down and then horizontal, so they form another 5 anode rows.

Now solder all of the rows together so there are a total of 10.

The final part of this step is to solder wires to the rows and columns for the electronics to hook up to. When choosing the length of wire, run the wire from the row/column to where you want the electronics to be placed and add 5-10cm extra to work with.

Step 7: Start Assembling the Boards

Picture of Start Assembling the Boards
DSCN0946.JPG
DSCN0942.JPG
DSCN0944.JPG
For this step you will need one middle board, the front board and 2 'sacrificial' pieces of wood (they will be noticeably dented).

To start, take the white glue and apply it to the front side of the middle board, don't be afraid to apply too much, it its better than too little.
Using a finger, wipe the glue evenly across the whole side and stick it on the back side of the front board (see the pictures for more clarification).

To make a strong bond, place one piece of 'sacrificial' wood on either side of the now glued pieces and clamp it together (be sure to align it quickly, because it dries fast). To make the best seal, clamp it with everything you have (see second picture below), but be careful not to break the wood or poke out the LED holes.

Step 8: Program the Microcontroller

Picture of Program the Microcontroller
This step may sound simple, but it can be vary confusing is not done properly.

I loaded the program onto the atmega168 by using an avrisp mk II to circumvent the bootloader on most chips used with Arduino. This is because I wanted an instant startup, and it also allows for more program space(although, not much).

To do this, there are good resources here, here and here to burn a bootloader. In place of the bootloader just use the .hex file found in the applet folder of the arduino sketch folder (which is the one I have attached to this step and the introduction).

To change any aspects of the file, I have also included all of the commented code, just click 'upload to board' (you will get an error unless you have an arduino plugged in) to re-compile and the .hex file will change to the new code.

Odds are that your crystal won't be exactly 20.0Mhz, so it will need to be calibrated to keep accurate time. To do this, just change the oneMin variable in the code, mine is 60116.

The clock speed is currently compiled to run at 20 MHz. To change it you will need to change some numbers in the arduino preferences and board definition files, as found here.

Step 9: Build the Electronics

To build the electronics, follow the attached schematic. I have attached the schematic as a bmp, two different sizes of PDF, and the original .ms10 file created in national instruments' multisim software, for those who so desire to use it.

The cathodes of the LEDs hook up to the outputs of the multiplexer, with the left column of LEDs being column 0. The demultiplexer needs to sink the LEDs one at a time, such as the one in the attached data sheet.

The anodes of the LEDs are attached to a cluster of 3 transistors. This is so the 1st transistor has the power directly from the adapter attached to its collector pin, the corresponding anode pin(from the microcontroller) is attached to the gate. It also has the emitter going directly to the gate of the 2nd transistor, and using a 1kOhm resistor it is connected to the gate of the 3rd transistor. The 2nd transistor has its collector attached to the green pin (pin 1 on the arduino) and its emitter attached to the green(or your highest draw LED) row. The 3rd transistor then has its collector attached to the red pin (pin 0 on arduino) and its emitter attached to the corresponding LED row. It should be noted that I ordered the LED rows from 0 at the top to 4 at the bottom.

The radio power is attached to the speaker pin (pin 9 on arduino), so that when the alarm is sounded it turns on and automagically tunes the strongest station.

The controller pins (analog pins 0-5) all have a 200kOhm pull-up resistor. the pins from 0-5 (followed by the corresponding DB9 number) attach to the controller in the following order: up(1), down(2), left(3), right(4), button1(5 and 6), button2(9, also optional). pin 7 on the DB9 connector is +5V and pin 8 is ground.

See the pictures for some comments and pointers, but if something is unclear let me know in the comments and I will do my best to help.

For the ports and LED rows and columns, I suggest installing sockets so the parts can be easily removed or swapped.

Now attach the wire to the LEDs, power and controller and test. Before you insert any chips make sure the power they are receiving is the correct 5V, so they aren't destroyed.

Step 10: Finish the Clock

Picture of Finish the Clock
DSCN0959.JPG
DSCN0977.JPG
DSCN0964.JPG
For this step, clamp all of the boards together, then using the template attached to this step, drill pilot holes for the 4 wood screws (only up to the start of the front board, which is why the one behind is glued). If you want you can counter-sink the holes so the screws sit flush.

Now insert the screws into the holes.

The last thing to do is clean up the edges. Take the miter saw and cut the ends an equal distance from the screws on either side as in the template (be very careful at this point as not to poke out a hole on the saw!).

Now just sand any uneven or rough edges (not the front) and you are done!.

Step 11: How To Use The Clock

To set the time, push and hold the button for 3 seconds, the screen should go black. To change the flashing number, push up and down. To switch between numbers push left and right. While switching between numbers, you will come to the colon, when on the colon switch between AM and PM by pushing up and down, the colour will change between red and green (AM and PM are whatever you want them to be). Push the button again to set the time.

To switch between the various other functions push button 1. It is also possible to push button 2 (not in atari 2600 controllers) to turn the radio on and off. To return to the clock, push and hold button 1 any time.

The order of the functions of the software are as follows:

Alarm - set the same way as the clock.

1-D Pong - It's all about timing, Played by pushing up/down to choose the number of players and bushing button 1 to confirm. To play push button1(for player 1) or button 2 (for player 2) when the ball is coming at you, but not too early or late or else you will miss.

Labyrinth - Find your way out, It is a maze, but all of the keys need to be collected to open the exit.

"Jump" - A platform game, avoid the red dots and don't fall to get as far as possible.

If you have any questions don't hesitate to leave a comment! Let me know what you think.
1-40 of 94Next »
wb8nbs4 months ago

Drilling holes in the front panel... I had a similar problem making magnetic blocks for the granddaughter http://www.flickr.com/photos/wb8nbs/7376982060/ these magnets have to be less than 1/16" from the surface to be effective. My technique was to drill halfway with a 3/8" brad point bit, then chuck up a 3/8" keyhole router bit like http://www.rockler.com/hanging-slot-router-bits-router-bits in the drill press to finish. The keyhole bit makes a perfectly flat bottomed hole.

bailey4021 year ago
Great Project!
What was the total cost?
yaly4 years ago
This laptop is IBM thinkpad R50 right?
Mine is IBM thinkpad R50E. Yay I always thought I'm the only one in the world that owns that laptop.
jwilliamsen4 years ago
I think a great way to do this would be to drill the holes all the way through, and then glue veneer over the face - that way you don't have to stress so much about drilling to an exact depth. Call me lazy :) Cool idea, though! - I'm thinking about making one
rick62134 years ago
why you drill out if you can saw it out it takes less time i think
but it is i nice idea to use less tools for a project
i really gonna build this clock
this looks so nice I gonna make a "mini" version of it for my desk :)
I think I'll use 3mm RGB leds...
oh noz 3mm RGB LEDs doesn't exist :o
mattccc5 years ago
vxir5 years ago
Very cool project!  BTW, If you don't want to deal with all the electronics you could perhaps use the Lightuino (makersmarket.com/products/67-lightuino-led-driver), which controls 70 channels of LEDs.  Each channel could be 3 LEDs.  Since it is not doing a LED "matrix" the LEDs are on all the time instead of being flashed rapidly.  This means that they will be a lot brighter which might be pretty important for a project where the LEDs are hidden behind wood.
estebu6 years ago
Hi!

First of all congratulations for that cool project! I just have one basic question. Attached here there is an example of two LEDs that I might want to switch on. They are inside a green oval.
From what I understand, for switching on those two leds, I might have to activate the Pin1 to select green, and Pin11, Pin12 to select those two rows. In order to make the current flow, I guess I might activate the 00 and 01 inputs of the demux by choosing the corresponding pin2to5.

But the problem is, how do I avoid that the leds in red ovals do switch on?

Thanks!
junniver7 years ago
I was just wondering,what if you don't have an atari controller?How do you set the time?
J_Hodgie (author)  junniver7 years ago
It is possible to install a few buttons if you wanted, but I like the controller.
can that alternative be done with a joystick such as this tactile one from lambind switches?

http://www.insidetech.com/nfs/insidetech/attachment_images/0005/5950/american-flag-2a.jpg
Can you upload some schematics?and btw I live in Philippines do you think that this part will be available here:ATMEGA168 Microcontroller?
Sorry for the double post,but the idea of using a PS1 controller came to me moments after posting.Would it be possible?
its ok this is not a fourm and its not considered double post
you can post behind of an other of yor comments because there is no edit!
J_Hodgie (author)  junniver7 years ago
IT isn't too hard to find a schematic of the controller on-line (like here). The PlayStation controller is very different. The Atari controller just uses buttons to connect pins together, while the PlayStation controller uses a form of serial communication.

The ATMEGA168 should be available there. If not, you could probably order it online from overseas.
Thanks J_Hodgie.
cyberspyder6 years ago
What if I just wan the clock---no alarm and games? What components can I edit out?
J_Hodgie (author)  cyberspyder6 years ago
There isn't much, just a few LEDs. but even then the titles "Clock" and "Alarm" would have holes when switching modes. Apart from that there isn't anything I can think of.
I got TinyCad. I got it working pretty good with an external HD. I find that when I do a lot of deleting and I don't save file enough, the program tends to crash. It has not done this for a long time now. Very nicely done project you got there. Dr. Bill KB1LZL
Dr.Bill6 years ago
Very professional looking. What are you using for a CAD program?
J_Hodgie (author)  Dr.Bill6 years ago
The software I used was Solidworks, but I am currently using unigraphics NX 5. I don't really have a preference between the two.
GnomeMaster6 years ago
ooohhhh I so want to make this...but sadly....I'm no good with electronics.....*crys*
Kactapuss7 years ago
agent Kactapuss6 years ago
lol 100 euros and not a SINGLE game!
sotsirh1947 years ago
I am looking into getting a Arduino and I don't want to have to bring the board in every robot. Is it possible to change out the chips and put them into other things without much extra components like a basic stamp? I have a basic stamp but to get a new chip is fifty dollars way too much to put in smaller projects.
J_Hodgie (author)  sotsirh1947 years ago
It is possible with minimal components. All you need shouldn't be too hard to find on the arduino website. And as a bonus each chip is only $5.
If you are going to switch out chips I also suggest you get an AVR ISP mk II to burn a bootloader to the new chips.
Is this a seperate device or just a program. I didn't understand what the wabsite was saying?
J_Hodgie (author)  sotsirh1947 years ago
The AVR ISP mkII is a separate device that can attach to the arduino to burn a bootloader (a piece of software that allows programs to be quickly loaded over USB)
OK, I see now thanks for all your help. I really appreciate it.
lego1877 years ago
It would have been cool to use one solid block of would instead of 4 layers. Or possibly made it look like a solid block by making the face layer over lap the other 3 layers, cut 45 degree angles on the edges of the face and boxing the other 5 sides in with 5 pieces of wood, also with 45 degree angled edges. So you end up with a box around the whole thing with no visible joining edges. I just wish i had some electronic knowledge because i would be making one of these right now. really nice end product!! it looks pro
guyzyl7 years ago
That looks so cool! But I think it's too hard for me to make (I wish I had one of those)
cr0ybot7 years ago
Added to Arduino Group! ;D
jephrandall7 years ago
What a wonderful instructable! I'm fairly new to electronics, but for the most part I can follow it. (that's a feat in itself!)

On the page discussing electronics setup.. why is it that when you show the solderless breadboard, I don't see any transistors, but they're on the soldered board? If I understand correctly, the set of 15 transistors are only necessary if I want to have two different color LED's on the clock. So this means that the pictured breadboard config will run the clock with just one color?

It'd be soo helpful to get a more detailed shot of the breadboard + Arduino setup.. pretty much because I only 50% understand all of the electronics lingo at this point. :-)

Again - amazing job on this thing!
Agree and I would be pleased to get a schematic.
J_Hodgie (author)  Ssly7 years ago
The schematic for the clock is now up in step 9, Let me know if it is unclear.
J_Hodgie (author)  jephrandall7 years ago
Thanks for the comment! There are no transistors on the solderless breadboard because I took the photo mid-process of designing the electronics. You are also correct that the transistors are not needed with just one colour of LEDs. However, I would recommend adding one transistor to each anode row to boost the signal from the microcontroller, which makes the LEDs brighter. I'll see what I can do about getting a better shot of the soldered breadboard, but at this point it is difficult to do. I am also currently making the schematic.
1-40 of 94Next »