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.
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.
Arduino MP3 alarm clock
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.

An Arduino does not have enough memory to store an MP3 file so I used a SD card reader and a small SD card to store the MP3 file. The SD card is connected to the SPI pins of the Arduino.

  Read More: Arduino MP3 alarm clock

Leave a Comment

Your email address will not be published. Required fields are marked *