I had some beef with my (very) old alarm
clock. It had a radio which was nice to
wake up to, but two problems:
1) I would be in bed and think "Wait, did I
set the alarm?" I would have to get up,
turn on the light and look at the position
of the tiny black sliding switch.
2) When I wake up in the morning and
turn off the alarm, it's still set to go off
the next morning. When I started this
project I had a roommate. I would wake
up 5AM on Monday and take off on a
business trip. 5AM Tuesday it would go
off again. Too bad for him!
Here's the board with the original chip and some switches removed.
|
I decided to retrofit it, ripping out the chip that runs the
show, replacing it with a microcontroller I could program
as I liked. All in all, it was an awful lot of work, but it feels
good to have it work my way.
There's a second 4-digit display on top that shows the
alarm time. If this is lit, the alarm is set. You can tell at a
glance whether it's set.
Turning it off in the morning turns it off for tomorrow as
well. I find it a lot easier to think of what time I want to get
up tomorrow as I go to bed, rather than when I wake up.
Fitting in the new board in below the main board. The microcontroller is a PIC 16F877.
|
I added a new 3-way toggle switch on top. Pulling
it to the right turns on the radio to listen right now.
Clicking it to the left once makes the alarm active
(and the top display goes on), pushing it left again
turns it off. Two of the switches that I salvaged
from inside I reattached to the left of the display to
set the hours and the minutes. If the alarm is set,
these buttons change the alarm time, if not, they
set the clock time.
The alarm time increments in steps of 5 minutes,
since I never need to wake up at 6:03. Another
somewhat unique feature is that there's no AM or
PM. This saves me from setting it wrong and it
would only be a problem if I wanted to sleep for
more than 12 hours!
The hardest part of this project was cramming
the new board into a space that was never
designed for it. Another was tying into the
existing components reliably. Some of the
connections I had to re-solder several times. I
thought I blew out one of the LED segments of
the original display, but right at the end it had a
miraculous recovery.
The original controller chip I pulled out was the
LN8560, a dedicated alarm clock chip. It got me
thinking that this is why pretty much every alarm
clock on the market functions the same way.
It's a bit of a shame. Having the same display
sued to show the time and the alarm time
seems so stingy.
Here's the code for the project. Not much new
here. A lot of the code is dedicated just to
running the two different displays (with
different interfaces).
It was a simple project, but one I have the
satisfaction of using every day.