Hello, we are high school engineering students, and for our project we are wondering the steps and supplies needed for an arduino powered alarm clock with the capability to play a sound and turning on the ceiling light when it is time to wake up. So far we have purchased an arduino uno, a LCD, a speaker and amplifier, buttons, a breadboard, and various wires. We have no prior experience with arduino and any help would be appreciated.
You'll need a RTC (Real Time Clock) module/shield since the Arduino in itself doesn't have a way of accurately measuring time. All I know on the topic. Check Ebay for "RTC Arduino" and you'll get some alternatives.
Here's some on the topic in the examples. Arduino Playground - DS1302 There are answers to a lot of these kind of questions there under the learning section.
It would be really helpful to have an [u]RTC module[/u] (Real Time Clock). The Arduino itself can keep time, but an RTC module will be more accurate, and it has it's own "back-up" battery so you don't loose track of time when you loose power. (There is a similar RTC in your computer.)
To turn-on the ceiling* light, you'll need a relay. A regular electro-mechanical relay will need a transistor or MOSFET driver circuit. Or, you can get a "relay board" that has the driver built-in. Or, you can get solid-state relays that work directly off the 5V/low-current Arduino output, but solid state relays are more expensive.
If you want to dim-up an AC light, that's more complicated. It requires a [u]phase-controlled[/u] TRIAC. Of course the TRIAC and zero-crossing detector must be electrically isolated from the Arduino. (I built something like this a long time ago with a different microcontroller... The light starts fading-up 10 minutes before the alarm goes off.**)
- If you need to tap-into the house wiring, the best solution is a home-automation system (such as [u]X-10[/u] or one of the other home automation protocols). You'd have to figure-out how to communicate with the X10 system, but these switches/dimmers are electrically isolated and they can be operated manually or remotely/automatically, and they've "solved" all of the engineering issues involved in building the thing into something that fits into an outlet box.
** I didn't build the clock/timer for my system. The thing I built runs off my home automation system, so the home-automation system turns-on the power every morning 10 minutes before wake-up-time to start the sequence.
Thank you all for the replies, we have decided to purchase the RTC
Now we were just wondering how to get started on the coding for the alarm clock, we necessarily do not need to use the ceiling light yet, we just want to test out the rest of the components. Like we said before we own a speaker, LCD, and amplifier. We were wondering how we should connect them to the arduino uno. This is the amplifier
and this is the LCD
The connection to the arduino for the LCD is different than that of this tutorial as ours uses 4 pins on the side compared to the multiple pins on the back on the tutorial.
The connection to the arduino for the LCD is different than that of this tutorial as ours uses 4 pins on the side compared to the multiple pins on the back on the tutorial.
This is an i2c lcd with the standard hd44780 controller. There are may posts on how to use this type of lcd display. Forum search and Google will be your friends.
This is an i2c lcd with the standard hd44780 controller.
You need THIS PAGE..
We have successfully tested out the buttons and the LCD using this code
Now we were wondering how to start coding with the speaker and amplifier. We are using these
To connect these we would have to solder yes?