Remote controlled alarm clock

remote alarm

Not everyone can have a cute alarm clock that runs away from you like Clocky. Most just resolve to place the clock on the other end of the room so they have to get out of bed to switch it off. That’s what [ryan] had to do to get up in the morning. He wasn’t able to set the time or confirm that the alarm was on from bed anymore so he decided to hack in an IR remote for his alarm. Ryan has written a thorough article on how he decoded the remote codes and implemented the clock control using an ATMEGA8. Now he can just key in the time he wants and the microcontroller takes care of setting it.

Comments

  1. ANON says:

    nICE HACK

  2. That is a freaking great idea =). Talk about really fun technology. It would be interesting if clocky was able to calculate the furthest distance that it could travel before running into an object, and then use that information to try to hide as far away as possible.

  3. error404 says:

    I’m wondering how he maintains sync with the clock over a period of time. It doesn’t look like he’s getting a clock source from the alarm clock itself – surely they will drift apart over a few days/months/years?

  4. Earl says:

    Now, to just reprogram the remote to turn OFF the alarm clock thats on the other side of the room, while still laying in bed.

  5. grayskies says:

    Aww, already stolen and posted on digg. At least they didn’t take the text too.

    http://www.digg.com/mods/HOW_TO:_Remote_Control_Hack_for_Your_Alarm_Clock

  6. pretorious says:

    how about just wiring in a remote to your bedside clock that activated a stereo or another box across the room that has your own custon super-annoying noismaker :). that would be the best idea for people like me with contacts, I would not be able to see the display from across the room

  7. morcheeba says:

    Cool hack! I like how he went beyond just adding remote-control functionality and made it better!

    error404- it looks like only the alarm is set this way… since that doesn’t advance by itself -> no drift.

    I would have put the alarm next to my bed and replaced the alarm-off switch with a remote-controlled-relay. And then put the remote on the other side of the room. But that would have been far less cool.

  8. jc says:

    I’m still curious how he gets initial synchronization for the alarm between the processor and the clock. If the controller loses power, does he have to manually set the alarm to 12:00 on the clock so the processor is in sync with it?

    alarm_hours and alarm_minutes are globals, so they’ll be initialized to 0. I’d hope that either the processor is on the clocks backup battery, or he doesn’t use one, so the alarm comes up at a fixed time when power comes back.

    Of course, there’s always the $40 UPS option.

  9. Ben says:

    **If the controller loses power, does he have to manually set the alarm to 12:00 on the clock so the processor is in sync with it?**

    Yes.

    but after all debugging, you could just embed the uC and run it off the alarm clock’s power with a voltage regulating circuit.

  10. jc says:

    Certainly he could run it off the clock’s main supply, but I doubt the clock battery would hold it up through more than a minor hiccup.

    If you look at the code, he’s not using any of the low power modes of the Mega8. And the Sharp IR receiver is not exactly a low power device either.

    Also, a lot of clocks with integrated high power devices (like the CD player) use a SuperCap or large capacitor for backing up the time. The clock chips themselve usually pull well less than 1 milliamp. If you bolt on some kit that pulls 10-20ma, the backup time is going to be *very* short.

  11. Ben says:

    so you’re worried about clock alarm time and uc alarm time losing sync, right? You’re saying the clock might lose power but not reset the alarm time while the reset hits the uc and sets it’s alarm to 12:00. about how long would this brown out last? could a backup button cell help?

  12. jc says:

    basically, this: unless they both reset at the same time, or the mega8 “knows” that the clock has lost power, they’re going to be out of sync. because there’s no feedback from the clock, you never truly know if you’re in sync or not.

    Using the clock battery or cap to backup the mega8 is going to seriously shorten it’s life, because the mega8 and ir receiver aren’t running in low power mode.

    There is one way, but it adds hardware. you would need a battery backed up real-time clock (RTC) on the mega8 board. a FET is used to control power to the clock chip in the clock. When the mega8 thinks it’s out of sync, it removes power from the clock, waits, reasserts power, and prays like hell it resets to a known value for the time and alarm. The mega8 then drives the time set and alarm set lines to bring the clock into sync with the RTC.

    The downside of this method is that if the clock chip is also used to store things like radio presets or modes, you’d lose those. The little Sony clock radio I had used a single chip controller, and the time, alarm, and station presets. If the power went out and the backup battery died, it forgot everything (some radios use EEPROM to store presets).

  13. justin says:

    cool hack and the nerf gun his kicks ass

  14. ryan says:

    Hey all!

    The clock has a backup battery, which I don’t use. There’s no supercap in the clock to store the state, so when the clock goes, the mega8 goes as well. That way, at power-up, the alarm time is 12:00 in both the clock and the uc.

    You guys are great! Such scrutiny! Maybe I’ll get lucky end up with more stuff on hackaday. :) This is fun.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s