Tuesday, December 31, 2013

Bird Alarm Clock

Who likes waking up to the sound of alarm bells?

From my experiences with different alarm clocks, I found that something that gradually gets louder wakes you up more patiently, comfortably, and fully than a sudden burst of obnoxious noise.

For example, for years I have used an alarm clock with the bells and hammer: every morning I would wake up still half asleep and extremely pissed.

I'm sure many people have this Ikea alarm clock...

Today, I use my cell phone to gradually play "Wake Up Everybody" louder. I usually wake up more invigorated and inspired... because of the song.

If you haven't caught on these are not my pictures... but this is my phone. I recommend it.

Usually when I do not wake up, my parents have to (thanks mom and dad).
So as a Holiday/ Anniversary gift, I decided to make an alarm clock, using my Ikea alarm clock and an old toy.

How I went about doing this is almost the same way I went about with my 555 mouse or my Phaser

Basically, you take some pre-built hardware and you use it's trigger for something else. I love this sort of work: it requires little programming, and its often cheaper and less time consuming because it involves cheap mass manufactured hardware that can be bought for pocket change, instead of expensive microcontrollers and raw parts.

I will proceed in talking about this project. Sorry, I did not take pictures.

1) open up the alarm clock. There should be a gearbox and three tabs on the PCB sticking out of the gearbox.
These three pads are Vcc (From battery pack, usually red wire is connected to it), GND (from battery pack, usually black wire), and some other pad with another color wire connected to it.

The third pad is connected to the motor of the alarm clock, if you trace it.
What happens is that when the alarm clock hits the time when it must activate, it grounds that third pad to connect the motor to ground and let electricity flow from cathode (-) to anode (+).

So, instead of grounding the motor, I would ground a robotic bird

2) open up whatever toy you want to activate when the alarm clock is grounded. Connect two wires to the battery pack: Vcc and GND.

Connect Vcc to whatever Vcc needs to be powered by, and the GND of the toy to the third pad on the alarm clock.

This is the basic concept of what's going on.
I had a voltage regulator in there to handle some Vcc issues... that was not the main circuit.
In essence, this circuit requires no components, just some rewiring.

okay where is the arduino stuff

For you arduino folks out there playing with multiplexing and H-Bridges, this might teach you an important concept.
Look at this instructables for example.

Also, read this for some understanding: Constants
You will further understand how microcontroller pins work.

Keso, the author of this instructables, connects the end of LEDs to other I/O pins.
He turns on one I/O pin and turns off the other I/O pin to turn on one LED. What he is actually doing when he turns of an I/O pin is grounding it, letting current flow.

Using this method, Keso was able to implement 6 LEDs when he only had 5 I/O pins.

Using this method, you could also make a low voltage motor turn both directions without an H-bridge. Simply connect one lead of each motor to an I/O pin, and write one pin 1, the other 0, and depending on whether the pins are 1,0 or 0,1, the motor will turn different directions.

I don't often see this method implemented, but to get the word out, it can do amazing things.

I hope that nugget of information helps.