Alarm clock - lots of features

My first Arduino project is an alarm clock with dawn simulation, to which I have added every feature I can think of. Here is an outline of the what the project contains:

Maxim DS32B35 RTC. Keeps the time, has battery backup, alarm interrupt, and provides a 1kHz signal used to sound the buzzer. It has 2048 bytes of non-volatile memory I'm not putting to use yet (any ideas....), as well as a temperature measurement that I read out. On the I2C bus.

ADXL345 Accelerometer. Pick up and tilt the clock to adjust the time and alarm (rate of time change is proportional to tilt angle). I also use the tap detection function as a snooze button (10 more minutes of sleep by tapping the table the alarm rests on). One the I2C bus.

Sparkfun Level Converter. Converts the 5V I2C signals to 3.3V for the the accelerometer and RTC.

3W Cree LEDS. I am using a TIP120 darlington transistor to switch on the LED driver (a unit I purchased for ~$3 from DealExtreme). I connected an Arduino PWM output to the Enable pin of the LED driver chip so I can adjust the brightness (dawn simulation).

Photocell. If there is too much ambient light, the alarm will turn on a buzzer instead of the LEDs (not yet implemented in the software).

2x16 Character LCD. This is the only part I'm not too happy with, as I don't like light leakage associated with the backlight. Displays time, alarm setting, and the temperature.

DS18B20 Temperature Sensor. I added this sensor before I realized I had a temperature sensor inside the RTC chip. This one is nice because it has a resolution down to 0.1F.

A Button. Hold down 3 seconds and release to allow changing of alarm time. Then, press and hold to allow changing of the time (or release to end set mode).

As this project is mostly about learning for me, the interaction with the I2C devices (RTC, accelerometer) is done using the Wire library, as opposed to any libraries created specifically for these devices. Similarly, I am communicating the the DS18B20 using the OneWire library, as opposed to library specifically created for this chip. I still need to case it up, and put the finishing touches on the software. Any other ideas of things to add? I think it would be neat if I could somehow project the time onto the wall. Just thought of one more idea: A downward-facing proximity sensor to detect when it has been lifted (and then go right to the alarm setting mode).


Good job. A couple of ideas for things that could be added:

  1. The alarm clock activates a 'powerswitchtail' to turn on any appliance, like a lamp or a radio.
  2. You have to shake the clock to make it stop- morning stretches

nice project.
Just like my first try with the arduino.

Have build a Clock with an Speakjet so it can say the time. (that was not so easy even with the phrase o matic tool because this is only giving english words and my clock should speak German)

an external temperature sensor that sends the temperature to the clock over a cheap rf module every 5 minutes and goes into sleep mode for the next 5 minutes.
(made with an arduino pro mini) just testing the time it can survive with one battery charge.

only bad thing i burned my RTC and they are not cheap enough that i want to burn some more ;), so i dont have any battery backup of the clock at the moment.
i was in need to make the full clockwork with arduino code. (not so heavy with the help of the nice working time and alarm library)

but i am happy that it works now, even with some of its flaws.
i know i have done it mostly myself (of course with a lot of help from some tutorials and forum posts etc.)

thank you for all this nice developement tools and help.

Very neat. Any plans to release the design to the community?

oh. it looks like the design from picteks looks more advanced. my does have the problem that the screen starts to show scrambled stuff after some days. I really dont know why. And the speaker connected to the speakjet is making noise when the display brightness is high and it is even louder when the power is below 7V.

here is a list of the stuff currently connected to it:

for the clock:
1 Arduino of course.
mp3 trigger v1
speakjet shield
a touchshield as screen and input (wanted to replace with cheaper lcd screen)
2 loudspeaker
1 rf receiver

for the sensor:
1 arduino mini pro 5v
a rf sender
a sht15 temperatur & humidity sensor.
1000 mAh battery
<5v to 5v converter
1 sparkfun li,io battery charger

i never really planned anything of this but i can release some source code if wished. :wink:

Here is a picture of it all boxed up. I added a couple features since the last update:

  • I added a pot so that it can be used as a lamp. I had initially used the double-tap detection of the accelerometer to turn on the LEDs, but a pot is more intuitive and works better (the pot is read by an analog pin, and the brightness is controlled by PWM).

  • I also added the downward-facing optical sensor (RPR220). When the clock is lifted, it goes right into the alarm setting mode. I like how this works, but it wastes a lot of power: it went from ~30ma to 50ma current. Perhaps different resistor choices would improve this.

I think it is pretty much done as far as hardware is concerned (I think I have used all of the pins...). I too have a few issues to fix, though. The buzzer is 'clicking' occasionally for some reason, and I still have to finish writing all of the code. I also want to upgrade from one 3w LED to three 3w LEDs.

I'm currently building an alarm clock myself :slight_smile:

I have quite a different feature set though, hehe.
I have a 4x20 LCD display, buzzer&LED, IR receiver and wifi shield.

My thoughts were:

  • I want to be able to set on a calender when it has to wake me, so I can set a week of different wake-up times without having to fear it isn't turned on or forgot to set it to the correct time for the day (say, each day your classes start at a different time).
  • I don't want to reach all the way to to turn off the alarm.. A remote will fix this.
  • I want to see if I have new e-mails (hey, why not??).. hence the bigger display, aswell as an extra excuse to add wifi capabilities =)

Why wifi? I don't have an ethernet cable going all the way to my bedroom.
Ok, I don't have an RTC.. instead I'll make it sync with the internet, so in effect I have that one covered.

You have me beat with the accelerometer and temperature sensor though =P