Instructables
Picture of Arduino Binary Alarm Clock (pocket sized)
Ever wanted a binary alarm clock? Me too. So I looked around on Instructables, because there are many good ones around.
What's even better: they're based on the Arduino, one of my favourite toys.

My favourite is this one: http://www.instructables.com/id/Arduino-Binary-Alarm-Clock/. It inspired me a lot and yes I took the code as a base for my project. But this one is far too big for me. I wanted something I can take with me when I visit Hacking Conventions and don't want to miss the early lectures. Nothing is more annoying, if you finally got some tickets for the con, go there and don't wake up after a long (really long.....) hacking and builing night and miss a workshop you'd really want to join.

So what's small enough to fit in a pocket and is also a really great case for projects like this? Yes, an ALTOIDS tin :)

Actually this instructable isn't complete at the moment. First I thought, I'd just share some pictures, but some friends asked for an instructable, so I'll add a detailed how-to the next days.

The pictures on this side are from the first version. You will find newer (but not really better pictures, because my camera died and so I shot a lot of pictures with a crappy web cam or used some for the parts I found on Google) pictures in the following steps.

As said, the pictures are sometimes blurry and crappy. That's why I've entered this to the pocket-sized contest. I really need a new camera.... ;) Please vote 4 me :)
 
Remove these adsRemove these ads by Signing Up

Step 1: Things you need

300px-RBG-LED.jpg
arduino.jpg
Ok, lt's see what we need. If you're a geek like me, you'll have most of the parts lying around...

For my pocket binary alarm clock I used:

An Arduino. I used a Duemilanove, which fits really good in an Altoids tin. Wonder if there's a deal between the people behind the Arduino project and ALTOIDS ?!?! There must be one, because they're made for each other ;)

Display:
- 11 LEDs, I used different colors for minutes and hours. For my first version (as seen in the introduction pictures) I used yellow and green ones. The final version has now ultra bright red and blue ones. Looks far better :)
- 11 1kΩ resistors

ProtoShield (no, we don't want to spend 16 bucks or more for a ready to use one, we do it on our own):
- Perfboard with separate solderpads for each hole, we will build a super cheap shield in this project
2 x 8pin male header
2 x 6pin male header

Sound:
- 1 Piezo Speaker, you could use other speakers too, but it'll be hard to fit it in the tin. If you've got a unused computer case check, if there's something you can use. My one is out of one. Pretty small and all you've got to do is to cut of the connector to the mainboard.

Setting time and alarm
- 2 Buttons for setting hour and minutes
- 1 Switch to change between time and alarm time

Other stuff
- Hookup wire (solid core wire!!!)
- Electrical tape (for insulation)
- Solder (if you don't like the smell of melting solder use a fume extractor. You don't have one? Look around here on instructables.com, you'll find a lot of DIY versions here
- and of course an ALTOIDS tin (the best case for all pocket stuff things)

Tools:
- A soldering iron
- helping hands (at least if you're not a multi handed mutant member of the X-Men)
- Wirecutter and wirestripper
- Drill, or something else to make holes in the case for buttons.
- Dremel or tin snip scissor to cut the openings for the USB port and power connector
- Saw to get the perf board to the right size (I once tried to do this with scissors but the only thing I got was a lot of mess....)
- A multimeter for testing connections is great, but you can do this nice little project without it

For your security:
- Safety glasses (ok they don't look cool, but if you snip off some LED legs and they hit your eye, you don't look cool either...)

For your convenience:
- your favourite drink (my fav is Club Mate)
- good music
- maybe some sweets for the breaks

Step 2: The ProtoShield

My first atempt was to just connect the wires to the Arduino. But this wasn't a good idea. they slipped out quite often and it was really a pain to get them back in position.

So I decided to make a Proto shield. Of course you can buy one, but hey, we are "makers" not simple consumers. so we can do it quite easy.

Take the perf board, mark the size of the Arduino on it and cut this piece out with a saw.

Next, insert the the male connectors on the board so that they fit in the Arduino. Don't worry if this doesn't work at your first try. The spacing on the Arduino board differs a bit from that of the perf board. but you can bend the pins if you heaten them up with your solder iron a bit.

If everything fits nice, solder it together. Well done!

Step 3: Building the display

2011-10-31-170636.jpg
2011-10-31-171241.jpg
2011-10-31-173028.jpg
We want a binary display, so we need 11 LEDs

O O O O O
16 8 4 2 1 the layout of the hour display (e.g. if LEDs 4, 2 and 1 light up it's 4+2+1= 7 o'clock

O O O O O O
32 16 8 4 2 1 the layout of the minute display (same here, just add up the values and you get the actual minutes)

Make sure that all LEDs are ok, I missed that step in my first attempt and had to desolder a lot to change on broken LED....

Place the LEDs like mentioned above on the perf board. It sholud look like picture 1

Turn over the board and bend all the short legs of the LEDs to the middle (picture 2)

Solder the short legs to the solder pads

Now strip off the coat of a solid core wire and lay it over the short legs (picture 5)

Solder all short legs to the wire (picture 6)

Clip off the lose ends, so it looks nicer

Now bend the long legs to the outer side and solder them to the pads.

Add a resistor to every LED (picture 7)

Solder the resistors to the long legs and clip off lose ends (picture 8)

Step 4: Connecting the LEDs to the shield

Picture of Connecting the LEDs to the shield
Ok, let's connect the LEDs to the pins of the protoshield.

Use coated wire to connect the long legs of the LEDs to the pins! If you look on the backside of your Proto shield, you start on the upper side from RIGHT(!!!) to left. LED ground (the wire in the middle), minute LED 1, minute LED 2, and so on....

Same on the lower side. Start again from right and go on to the left side.

Step 5: The Altoids tin aka pocket project case

Grab your ALTOIDS tin, eat the reminding mints (if there are more than you want to eat, put them somewhere else or give them to your friends or family) and clean the box. Wash it, let it dry (water + electronics = not much fun...). Now mark the opening for the USB connector and the power connector on the small side of the tin. Cut it with whatever you feel comfortable with. Don't use too much pressure when you cut or drill holes otherwhise the tin will lose it's shape and looks disgusting (or even worse: doesn't close right anymore).

The tricky part: Drill holes for the display and the speaker. This is the part where you should really measure and measure again (maybe a third time) to make sure that every thing will fit nice. After spending really a lot of time (I think the soldering part wasn't as long as this....)
You're almost done.

It should look like the pictures below

Step 6: Buttons and speaker


Now it's time to add the buttons for setting hours and minutes, the switch to change time/alarm time setting and the Piezo speaker.

Place it wherever you find free space in your tin. Maybe on the lid of the tin, maybe on the side. Look at step 4 to find out the right pins.

Step 7: The touch sensor aka snooze button


I'll add this step as soon as I've got a working touch sensor switch.

Step 8: The code


First you need the CapSense Library and the Tone Library

http://www.arduino.cc/playground/uploads/Main/CapacitiveSense003.zip

http://arduino-tone.googlecode.com/files/Tone-V0004.zip

Unzip and place the folders in the folder libraries in your sketchbook folder.

Now download the binary clock source code attached to this step, unzip it, and place the folder in your sketchbook folder too.

Credits go to njakol! (http://www.instructables.com/member/njakol/)

Plug in your arduino, open the binary_clock_v1 sketch and press the upload button.

If you did it right, you reached your goal and your binary alarm clock should be ready! If it doesn't work first check all connectons, maybe you made an unwanted solder bridge somewhere? Maybe you connected something to a wrong pin.
staber3 years ago
Hey i did mine with Arduino Mini Pro ,
now i'm working on the buttons
IMAG0134.jpg
holidayv staber5 months ago

That's awesome. I love the pro mini's. I'm currently building one inside an alarm clock housing, making use of the existing switches, buttons, and alarm speaker.

fNX (author)  staber3 years ago
Great! Hope you'll post an instructible on it or at least some more pictures. Would be a nice wrist watch :)
staber fNX3 years ago
Here some pictures, I've added buttons
The only thing left is a battery and fix on few code glitches.

As for a guide how to make it is pretty much the same you only have to solder carefully and re-arrange some pins assignment.

ps (used 1mm 3v leds, 330 ohm resistors but i would suggest 400ohm)
IMAG0139.jpgIMAG0140.jpgIMAG0141.jpg
Hi! Great Project. I was wondering how you were planning on making the touch sensor.

fNX (author)  Michael_Bell2 years ago
Hi, thx :) The touch sensor will be integrated in the next version. I think it'll be mounted somewhere on the top of the tin. At the moment I'm working on a nicer sound output. I want to add a Commodore SID chip to play some music files instead of the annoying Piezo beeps.
I am having a hard time soldering the headers in with out having a pad to solder to and also did you have to drill out the holes because the holes in my perfboard are not lining up with the holes on my arduino?
fNX (author) 3 years ago
Awesome!