You Are Here: Home » Blog » Electronics News Updates » Arduino MP3 alarm clock

Arduino MP3 alarm clock




After finishing my hexapod I needed another project :)
Over the last year I have bought numerous small break out boards on Ebay. So I came up with the idea to make an Arduino MP3 alarm clock. The idea is simple, an LCD that shows the date and time. A couple of buttons to set an alarm, and an MP3 module and small speaker to play an MP3 when the alarm goes of.

Arduino MP3 alarm clock

I decided to use my 6€ 12864ZW graphical LCD, with 128×64 pixels it has enough room to display all the things I want. I used the Arduino u8glib and software SPI to make it work with my Arduino Mega2560. I decided to use software SPI because I already had 2 other devices on the SPI bus. It should be possible to use the hardware SPI bus but that would need more coding. You can connect multiple devices to an SPI bus but you can only talk to one at a time.

Next thing I needed was an RTC, a real time clock. I have a DS1307 RTC but it’s not very accurate, it “loses” about 1-2 seconds a day. So that’s not very good. Luckily there some more accurate RTC’s, like the DS3231. It’s very similar to the DS1307 and you can even use the same code. I bought a couple of DS3231 modules on Ebay and they work very well. The DS3231 uses the I2C bus to communicate with a micro controller. So you need to connect 2 wires (SDA and SCL) to the Arduino and 5V and GND. I did not use a special library to get the data from the DS3231, just the Arduino Wire library.

 

For more detail: Arduino MP3 alarm clock

 

Leave a Comment

You must be logged in to post a comment.

Read previous post:
The invasive Turkestan cockroach is displacing the oriental cockroach in the southwestern US

The Turkestan cockroach, Blatta lateralis (Walker), has become an important invasive species throughout the southwestern United States and has been...

Close
Scroll to top