Introduction: Hack a Cheap Usb Toy Into a Color-Changing Crystal Clock!
I saw this cool “Dream Cheeky Webmail Notifier” gadget online and knew I had to hack it . Most places sell it for $15, but I happened to find this one on ebay for $6. It's powered by usb; a clever bit of circuitry lights up a smart-led in the device when you get an email. It even has a wide range of colors to choose from.
I didn't need a webmail notifier though, so I decided to turn it into a really unique clock. I also wanted to improve the aesthetics, so I bought a hollowed out quartz crystal (the kind used to make novelty lamps) on clearance at my local mall for $6. I’ve used these kind of crystals before to make led lamps, so I know how cool they look when they're lit up. You could use something else though, like say an antique lantern, if you can't find a crystal. The sky's the limit really.
I've made two of these clocks now, one for home and on for my desk at work. I used a bandsaw to make a base for one of the clocks out of a piece of purpleheart, but that's not necessary. It looks great just on it's own.
Step 1: Materials
You don't need much for this project. Just the Webmail Notifier, a hollow crystal (or bottle, or lantern, or mason jar, ect.), and a small piece of heavy gauge wire.
Step 2: Building the Clock
First, unscrew the back of the Webmail Notifier.
Then unscrew the circuit board from the plastic back. The usb cable runs through the back, so you will either have to break the back or cut the wire and re-solder it.
Finally, bend the wire into a friction holder for the circuit board. This will hold the circuit in the crystal. Just run the wire through one of the screw holes in the circuit board and shove it into the crystal. Be careful though, the circuit board is delicate and will break if you're not careful.
Step 3: Programming the Clock
Great! Saved me a bunch of time. Now my script would just need to reference the driver and determine what command line argument to run. (The programmer was even gracious enough to give me permission to add a link to his driver in this instructable.)
So below is my script (it’s very editable if you wanted to display the minutes or seconds or month ect. instead). Every few seconds the script checks the time on the local system and changes the led’s color depending on the hour; slowly working it’s way up ROYGBIV. So the later in the day it is, the further up on the color spectrum it’s glowing, cycling every 12 hours. I also set it to blink the hour. So if it were 3:00, it would slowly fade in and out once, and then blink rapidly three times.
You will need to download the drivers from the link above, then copy & paste the code below into notepad and save it as "crystalclock.pl". Place the file in the same folder on your computer as the drivers. Then just plug the clock into any usb port on your computer and click on the script to turn on the clock.
while ($lamprun != 1) # loop keeps clock running
($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime(); # finds computer’s time
if ($hour == 1 or $hour == 13)
elsif ($hour == 2 or $hour == 14)
elsif ($hour == 3 or $hour == 15)
elsif ($hour == 4 or $hour == 16)
elsif ($hour == 5 or $hour == 17)
elsif ($hour == 6 or $hour == 18)
elsif ($hour == 7 or $hour == 19)
elsif ($hour == 8 or $hour == 20)
elsif ($hour == 9 or $hour == 21)
elsif ($hour == 10 or $hour == 22)
elsif ($hour == 11 or $hour == 23)
elsif ($hour == 12 or $hour == 24)
system(“DreamCheekyLED.exe nopause fade=4000 blink=$blink color=$color”);
Step 4: Final Result
Participated in the