29-01-2010, 07:40 PM
[attachment=1544]
Abstract
Overview
Alarm clocks. Everyone has one, from the simple to the elaborate, to help them get a start on the day, but they all have one thing in common - you have to be there to set it. Also, you're usually limited to a beep, the local radio stations, or a CD, to wake up to. My old mechanical alarm clock is on the verge of failing, so I decided to build a modern replacement. Unlike most alarm clocks, this one is connected to the Internet. This is provides three primary features: automatic time setting on power-up, streaming MP3 music, and remote management. In other words, I can set my alarm time from my office as well as select the music I want to wake up to, without waking up my wife :-) It has a built-in GUI as well, and a photocell lets it adjust display brightness to match ambient light. At the core of this new alarm clock is the PIC24FJ64, which is connected to a wide range of support circuits: an ENC28J60 ethernet chip to connect to a local network, an mp3 decoder chip to play music streaming off the Internet, an organic LED graphical display, and a 24LC512 EEPROM for storing alarm data, fonts, and images. A photocell and seven buttons are monitored via ADC inputs, and the music volume is both monitored and overridden via a single pin used as both an ADC input and a GPIO output. Various power supplies and an ICP port complete the circuitry. The PIC24FJ64 provides sufficient power and memory to implement a TCP/IP stack, manage the clock and GUI functions, and stream data off the Internet to an MP3 decoder chip without falling behind. This project takes advantage of the built-in dual SPI busses and an I2C bus to move data between the net, display, mp3, and eeprom circuits, and uses three ADC inputs to monitor a photocell, volume control, and the seven buttons. The ADC runs in automati