Using an arduino and a commonly available bubble machine toy, you too can wake up to the joy of bubbles.
Take a look at the alarm in action:
Step 1: Tools & Materials
Bubble generating toy: Super Miracle® Bubbles Bubble Factory (purchased at Michaels for 12 bucks)
Microcontroller: Arduino (old Seeduino in my case)
LCD display: Sparkfun Basic 16x2 Character LCD
Snooze button: Staples Easy Button
LED: ThingM BlinkM
Transistor: TIP-120 (Radio Shack 276-2068)
Relay: 5V SF COM-00100
Assorted buttons/switches to adjust time: SF COM-09190 & SF COM-00102
Potentiometer: SF COM-09806
Power adapter for arduino
Step 2: Break Open the Bubble Machine
Once inside, disconnect the battery and motor from the switch and solder wires for both the motor and the battery pack long enough to feed outside of the machine.
Next, use a Dremel tool to make an opening in the plastic to feed the wires out.
If you like colorful bubbles, attach the LED or ThingM BlinkM on the top of the machine.
Finally, I opted to place a mini-breadboard on the back of the bubble machine to collect all the wires. This made it easier to adjust the distance between the controller and the unit.
Step 4: Prototype the Circut
Depending on the LCD you choose, there may be different wiring requirements.
For the Sparkfun Basic 16x2 Character LCD & using the LiquidCrystal.h library Using the LCD library and following the data sheet (http://www.sparkfun.com/datasheets/LCD/GDM1602K.pdf)
Here is a wiring diagram:
Originally I was planning to run the motor directly from the transistor. It seems that the motor produces a significant amount of noise in the ground, causing the LCD to print garbage. I switched to a relay to keep the motor and Arduino circuits separate.
I wasn't familiar with making this type of circuit. These resources were helpful, you might want to check them out.
Bildr.org: High-Power Control: Arduino + TIP120 Transistor
ITP Physical Computing Tutorial: Using a transistor to control high current loads with an Arduino
Step 5: Write the Code
The current version of the alarm clock uses the Time.h Arduino library to provide the basic time keeping.
Improvements to be made in the future:
- Incorporate an external time keeping device or even a GPS based time clock, avoiding the loss of the time & alarm if the Arduino looses power
- Allow time to be set remotely, or different alarms for different days of the week
- Method for activating bubbles for fun (secret snooze button tap sequence?)
Step 6: Build the Circuit on Perfboard
Because no holes are connected on this type of board, I wired a ground and +5V wire down the side.
I originally soldered the LCD directly to the perfboard. Bad idea! It made troubleshooting difficult. The second time around I soldered female pin headers to the perfboard so the LCD can be removable.