![]() |
eRaj MP3 Alarm
Clock
|
|
|
Project Proposal Final Report Schematics / Artwork Power Budget Cost Future Work Code Datasheets Files |
Hardware In designing the hardware, the system was broken down into several subsystems including: memory, audio playback, timekeeping, display, control and power. The sections below describe the hardware design choices in further detail. Control One requirement of the eRaj design is that it connects to a host PC for MP3 audio downloads. To fulfill this, the Cypress EZ-USB™ AN2131QC chip was selected as the system's microcontroller for its Intel 8051 enhanced core, intelligent USB engine core, and high-performance I/O ports. This 80-pin part contains 8K of on-chip RAM such that the microcontroller firmware can be updated with ease. The EZ-USB has a built-in I2C compatible controller and supports USB isochronous, bulk, control and interrupt data transfer. This part is easily programmable with commercial 8051 tools by Keil Software. To minimize energy use, the EZ-USB supports two clock frequencies and a power-down mode. The eRaj Alarm Clock has several subsystems requiring direct connections to the microcontroller, so all 24 I/O pins are used for audio, memory, timekeeping, and display. The 8-bit data bus of the EZ-USB is used to communicate with an 8MB SmartMedia card (main memory). The I2C bus of the controller is connected to an EEPROM for microcontroller firmware storage, a Philips I/O Expander for pushbutton interaction and the MP3 data decoder. Ultimately, the microcontroller serves as the heart of the eRaj Alarm Clock in controlling the following system events: download MP3s and system settings, memory interaction, MP3 playback, LCD update, set alarm and clock times, and serial debugging communication. Clock Naturally, an alarm clock needs some method of keeping time. The DS1305 serial real time clock and accompanying oscillator served as the perfect solution for the eRaj MP3 Alarm Clock. It has a simple 3-wire interface that can be used to communicate with a microcontroller without occupying too many I/O pins, and its power consumption is low. It also has an interrupt pin that goes high when the alarm matches the time, so this can be used to flag the microprocessor and cause an action to occur. The low cost along with these capabilities led to an easy decision. Display Ultimately, a Hantronix HDM16116L-7 liquid crystal display unit was chosen to display time information and alarm status. This LCD allows for the display of 16 alphanumeric characters in a 16 characters by one line (16x1) configuration. Illumination of the display is provided by a built-in LED backlight. The unit draws 5V power for both the liquid crystal display and the LED backlight and utilizes a maximum of 2.2mA of current. The external hardware used with the display includes a 3.9 Ohm resistor and a pushbutton for the backlight and a 500 Ohm potentiometer for the contrast adjustment. The LCD display contains the industry-standard Hitachi 44780 (or equivalent) LCD controller, which can be configured for either a 4-bit or an 8-bit data interface. To minimize pin requirements on the USB chip, the design uses the 4-bit interface. Control is achieved via 4 data bits and three control bits: RS (data input/instruction input), R/W (data read/write), and E (enable). A number of display options were explored before the Hantronix LCD display was chosen. Initial work focused on 7-segment displays, either of the LCD or LED varieties. LED displays were ruled out in general due to the relatively large amount of power required to constantly illuminate the bank of LEDs required for every character. 7-segment displays were eliminated because they require a significant number of control pins, even when the characters in the display are multiplexed and the control signals for each character are encoded in the most efficient manner. Backlit, alphanumeric LCD displays offer maximum display flexibility with minimum power and control pin requirements. Memory SmartMedia technology was chosen at the memory format for the eRaj MP3 Alarm Clock for several reasons. The implementation required a minimal pin budget of 6 control pins and 8 data I/O pins. The control algorithm for reading and writing is relatively easy. The form factor of the technology made SmartMedia particularly attractive since the card is as thin as a credit card. Finally, this technology appears to be one of the front runners in future memory development. The hardware design was relatively straightforward using the Yamaichi SmartMedia Card socket. This surface-mountable part allows multiple memory cards to be swapped in and out. This design decision builds in certain redundancies that are not found in board-mounted designs. The socket is connected to the microcontroller directly, setting the microcontroller as the memory manager. This design is simple and elegant, but after a semester of work, alternative memory designs, such as MultiMedia (MMC), may have better served the eRaj Alarm Clock's needs. Audio There are three main components of the audio subsystem: the MP3 decoder, a digital-to-audio converter (DAC), and an audio amplifier. The MP3 decoder is the chip that takes an MP3 file as input and produces digitally encoded audio as output. The options for components here included two popular chips: Micronas' MAS3507D and ST Microelectronic's STA013. Both had advantages and disadvantages. The Micronas chip had more features, and a great deal of information about appropriate DACs was available. On the down side, the cost was almost twice as much as that of the ST part. Nonetheless, we initially opted for this IC. However, a tremendously long lead-time prohibited this option, and the STA013 was chosen instead. This chip was still an adequate solution because it has everything needed for the project. In hindsight, choosing a chip with fewer features and less complexity helped complete the hardware portion of the project. After the MP3 has been converted from raw data to digital audio by the decoder, it is necessary to pass the data stream through a DAC. One of the first DACs considered was a Micronas part (DAC3550A); it had been listed as an especially good choice to work in tandem with the Micronas decoder. However, when the MAS3507D dropped out of the realm of decoder options, more thought was given to Crystal Logic DACs that had been advertised as working well with the STA013. The first two considered were the CS4334 and the CS4331. These devices were very similar except that the former requires 5V operating voltage, while the latter needs 3.3V. Because the other chosen components on the eRaj circuit board run at 3.3V, the CS4331 became an initial favorite. The decision was sealed when information about the STA013 evaluation board from ST Microelectronics was acquired. The communication between the decoder and the DAC is straightforward; in fact, it requires no intervention on our part. The two communicate with each other by what is known as the I2S format. The STA013 automatically clocks out serial data for the left and right channels into the DAC. It also drives a line telling the DAC which channel it is currently transmitting. After an analog signal has been produced, it must be amplified before being sent to the speaker. The main bottleneck in choosing an appropriate audio amplifier was finding one that accepted stereo input, which the CS4331 provides, and delivered monaural output to drive the alarm clock speaker. Finding such an amplifier took such a long time that a two-speaker solution was considered. Fortunately, a better solution from Texas Instruments was found. The TI TPA0253 audio amplifier takes stereo input and can be configured either to produce a stereo output or to sum the two channels and produce a monaural output. It can drive an 8 Ohm speaker at a power of approximately 300mW, which should be adequate for the system's needs. From the output of the amplifier, a simple connection to the speaker is made via a female/male header mating. Power Because one of the objectives of this project was to build a portable alarm clock, the system required the capability to use batteries as a power source. However, the ability to power from a wall source was also desirable. Furthermore, the board requires both 3.3V and 5V to drive the chips, so a dual output voltage regulator is necessary. Circuit requirements show that the power subsystem also have the ability to handle approximately 500mA of load current. These strenuous needs would usually require complicated circuitry involving logic chips in most implementations, but the MAX1774 dual step-down converter from Maxim provides a one-chip solution to the problem. However, it also adds a bit of complexity because external MOSFETs and discrete elements are needed to control the dual input and dual outputs. Because it met the needs of the project, however, the added complexity was considered tolerable and the chip was chosen. |
|
|
©
2001 Seth Eatinger, JP Slavinsky, Aamir Virani, Ray Wagner
|