Go Down

Topic: Arduino Sunrise Clock Radio (Read 5775 times) previous topic - next topic

TopTube

Hi everyone,

I'm just getting into the Arduino world (I've been playing around with the adafruit uno starter kit), and I was wondering if it's feasible to make an arduino powered clock radio, with sunrise alarm capabilities.

Ideally, the clock would have:

-Led matrix display (specifically the Sure 3208)
-Sunrise Alarm capability: slowly turning on a light over the course of about 20 minutes before audio alarm sounds. Possiby using this Velleman DC dimmer.
-Am (fm too if possible) audio alarm
-At least two alarm settings
-A light sensor to automatically dim the led display when the room is dark

I'm planning on using a Real Time Clock to keep accurate time, but I'm not quite sure how to pull off the other features.

Is this too much for an arduino to control? Would it be more cost effective (or possible) to modify an existing clock radio?

Thanks for your advice!

florinc

Quote
Is this too much for an arduino to control?

Perfectly within the capabilities of an Arduino.

Quote
Would it be more cost effective (or possible) to modify an existing clock radio?

Probably. I don't know about the "at least two alarm settings" part. Also, I did not see a commercial alarm clock with the 3208 LED display yet.

DVDdoug

#2
Aug 08, 2012, 09:27 pm Last Edit: Aug 08, 2012, 09:37 pm by DVDdoug Reason: 1
Quote
-Sunrise Alarm capability: slowly turning on a light over the course of about 20 minutes before audio alarm sounds.
I built something like that about a million years ago with another microcontroler.   It still works great!     I built my own dimmer with a TRIAC and a TRIAC-driver opto-isolator.    But I took a shortcut, and did not include a real-time clock.   It plugs-into an external AC timer-switch (X-10* controlled).   My dim-up time is 10 minutes.

Prior to this, I had built an alarm clock with a switched AC outlet (from an all-in-one) clock/display module.    But as best I remember, the sunrise simulator has always run off an X-10 module.

And, since I hate waking-up...  I built another little box that plugs-into the same AC timer.   It turns-on and does nothing for 10 minutes.  After the lamp is at full-brightness, it makes a little-gentle "beep".  30 seconds, it makes another "beep".    It beeps every 30 seconds and it counts the minutes, so after 3 minutes I get a "beep-beep-beep" (3 beeps again at 3:30).   I think it counts up to 15 minutes and then shuts off.

Of course I could have built both of these functions into one box with one microcontroller, but I had never made a digitally controlled dimmer before and I wanted to keep the projects as simple as possible, even if I had to buy twice as much hardware.

If I were starting-over today, I'd do both functions with one microcontroller, but I'd probably still avoid the real-time clock and I wouldn't build my own radio.    To me, it's not worth putting hours-and-hours into building stuff that I can buy rather cheaply.


* With some of the newer X1-10 or X1-10 compatible modules, I believe you can program them to dim-up slowely, or dim-up in steps over a period of time.    In that case, you wouldn't need to build anything!   The older modules would always turn-on to 100% and then dim-down to the command setting. 

PaulS

Quote
Is this too much for an arduino to control?

The alarm clock part, no. The radio part? Could be challenging. I haven't seen much on the forum about radio shields.

Far-seeker


Quote
Is this too much for an arduino to control?

The alarm clock part, no. The radio part? Could be challenging. I haven't seen much on the forum about radio shields.


Provided the shield in question has on-board ICs specifically handling the radio tuning and audio generation that can communicate serially with the Arduino, it shouldn't be any more challenging than controlling a serial LCD board.

CrossRoads

FM/AM Radio shield
https://www.sparkfun.com/products/10342?

"Basically it's an entire AM/FM, LW/SW radio in a single chip.

Now that we've mounted it on a shield, you can harness all of that sweet radio-playing power right from your Arduino. Simply stack the shield onto your Arduino board, plug in some speakers (headphones don't seem to work as well without a preamp) and use the library below to control the volume, channel selection, etc. The library also allows you to send a variety of other commands constructed by consulting the Si4735 Programmers Guide."
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

TopTube

Thanks for all the replies!

To clarify, by "at least two alarm settings" I meant that I would prefer to have two different alarms, a weekend and a weekday alarm for example, that I could leave set to different times and then be able to switch back and forth without manually changing the alarm time.

@DVDdoug, your clock sounds cool! I agree, I would like to try to integrate everything with one microcontroller. The x-10 modules are interesting, but I'm afraid I know very little about them. Do you know of a specific unit that can slowly dim-up? I tried my luck googling, but I couldn't find the right thing.

@Crossroads: Thanks for the tip on the FM/AM shield. It looks like it's the right tool for the job, if a little pricey.

Does anyone know of any pre-existing code to get some of the pieces working together? For example, how to interface the radio shield with the arduino, some pushbuttons, and to display the frequency on the LED matrix? I'm afraid I'm very new to programing.

Also, I'm not sure what the right approach is to get this project going. Is it a good idea to go step-by-step as I integrate each feature? For example, should I start with the RTC and the matrix, and work on getting the time displayed correctly before adding the sunshine alarm and the radio, or is better to integrate everything all at once? I guess I'm looking for a place to start.

Thanks!

MichaelMeissner

It occurs to me, that rather than trying to do AM/FM radio in the Arduino, that another solution is to use an X-10 controller or an A/C relay switch, and just enabled power to a radio at the appropriate time.  You could have various buttons to control the power to the radio in the Arduino.

florinc

Quote
should I start with the RTC and the matrix, and work on getting the time displayed correctly

This should be a good start:
http://timewitharduino.blogspot.ca/2012/04/bookclock-software-update-set-time-from.html

MichaelMeissner

BTW, an alternative to the RTC if you have the Arduino on your network (either with an ethernet shield or wifi) is to use the Network Time Protocol: http://arduino.cc/en/Tutorial/UdpNtpClient.

florinc

Quote
an alternative to the RTC if you have the Arduino on your network (either with an ethernet shield or wifi) is to use the Network Time Protocol

That would also make the project at least $30 more expensive :)

MichaelMeissner


Quote
an alternative to the RTC if you have the Arduino on your network (either with an ethernet shield or wifi) is to use the Network Time Protocol

That would also make the project at least $30 more expensive :)

Yes, but if the OP has his music collection stored in a format that can be easily delivered to other PCs in the house, you could eliminate the AM/FM radio, and just play random tunes.  Or you can stream the broadcast from various radio stations.

CrossRoads

"Is it a good idea to go step-by-step as I integrate each feature?"

Yes indeed. Be easier to learn as you go that way also. May end up backing up & re-doing stuff, all part of the learning process.
The AMFM radio shield had links to software to go with it.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

TopTube

Okay, thanks for all the tips guys. I've ordered the RTC and the LED matrix, so I'll get started on putting those together once they've arrived.

At this point I'm leaning more towards the radio shield, as I often prefer to wake up to the news, and I don't want to have to rely on an internet connection. Also, while the x-10 idea is tempting (and I'm not ruling it out), ideally I want to keep the system fairly self-contained.

Again, thanks for the info/links.

I'm sure I'll be back with more questions.

florinc

Quote
I want to keep the system fairly self-contained.

Even with X10, you can use this wireless X10 transmitter:
http://www.arduino.cc/playground/X10/CM17A

Go Up