Echo MP3 player using PIC18LF452

Summary of Echo MP3 player using PIC18LF452


The EchoMp3 is a compact DIY MP3 player built around a PIC18LF452/458 microcontroller and a VS1002D MP3 codec. It supports MMC/SD/SDHC cards (FAT16/FAT32), ID3 v2.3 tags, real-time display, joystick controls, low-power operation from one AAA battery via a MAX1674 step-up converter, and upgradeable firmware via RS232. Features include stereo DAC, recording capability, directory browsing, shuffle, adjustable LCD contrast, and available kit/PCBs with full schematics and software.

Parts used in the EchoMp3:

  • PIC18LF452 or PIC18LF458 microcontroller (PLCC)
  • VS1002D MP3 decoder chip
  • MMC/SD/SDHC memory card (64MB up to 4GB, FAT16/FAT32)
  • Nokia 3310 LPH7779 LCD
  • 5-way micro joystick
  • MAX1674 DC-DC step-up converter
  • On/Off pushbutton
  • AAA (HR03) 1.2V Ni-MH battery (or 1.5V alkaline)
  • RS232 bootloader connector (serial interface)
  • PCB (double sided, plated-through-hole, 82 x 45 mm)
  • EEPROM for storing settings
  • SMD passive components and vias as per PCB (resistors, capacitors)
  • Earphone output components (audio output pads, minimal output caps thanks to GBUF)
  • MMC/SD card socket

The EchoMp3 is a small DIY* MP3 player. It’s cheap and of excellent quality.

  • 64, 128, 256, 512MB and 1, 2, 4 GB MMC and SD(HC) cards used as storage.
  • FAT (FAT16) and FAT32 supported.
  • Low power operation with a single AAA (HR03) 1V2 Ni-Mh battery.
  • Runs on a 18LF452 or 18LF458 at 20 MhZ.
  • Up to 256 kBps bitrate at 44,1 kHz supported. VBR may peak at 320 kBps.
  • ID3 v2.3 tags supported.
  • Full user control (volume, track, pause, skip, directory) with a 5-way micro joystick.
  • Real time display of bitrate, sampling rate, elapsed time, songnumber, …
  • LCD contrast adjustable by user.
  • Directory scrolling and file fragmentation support. Directory depth up to 10 accepted.
  • Shuffle (random play) and extended character set enabled.
  • SDHC (High Capacity) Cards now supported. Here are some compatible cards.
  • New: Serial interface control.
  • High quality stereo DAC with a S/N ratio of typ. 87dB.
  • THD of only 0.1% typ.
  • On/Off pushbutton.
  • Software is 100% upgradeable through an RS232 bootloader connector.
  • Voice Recording in PCM-format with same hardware is now possible! Look here for the source code.

* Do It Yourself.

 Schematic & pcb (Eagle 4.11e), hex file available. Player Software Updated on November 24, 2009.

Discontinued as of Feb.2011. Check out our new EchoMp3 v3.1 instead.

Circuit explanation / Getting started:

 MP3 player

PIC18LF45x PLCC The 18LF452 or 18LF458 has to run at 20 MhZ due to the serial interface with the MMC. PLL cannot be used, cause it only works from 4V2. There’s a quarter of ROM-space left for additional applications.
VS1002D: MP3 decoder chip. Enhanced performance compared to the VS1001K. Sounds great! Future enhancements (equalizer and so on) are possible. Thanks to GBUF, no need for large capacitors at the earphone outputs. The chip also has a recording mode!
MMC/SD Royalty-free and open source protocol makes this a great memory to work with. Finding a socket was more difficult. Format the card as FAT (FAT16) or FAT32, then copy them (all at once) to the card (with a cardreader.) Directories may be used. Tagging of your MP3 files can be done with Mp3 tag tools (freeware) and Audio Tags Editor (evaluation period.)
LCD The LPH7779 (Nokia 3310 LCD) does the job. First four lines are for Artist and Song Title. Fifth line is for songnumber and elapsed time. Sixth line shows sample rate, bitrate and total songtime. Contrast of the LCD can adjusted during boot: hold the vol+ or vol- pressed at power up and the contrast will change accordingly; Settings are stored into the onboard EEPROM. Note that the player will also work without any LCD attached.
Controls With the micro joystick, there are 8 user controls available. Two for volume (up & down) , track (left & right) , pause/play (short enter), skip (long enter) and directory scrolling (short enter, then up/down to scroll,  enter to go to the selected directory.) Shuffle is enabled/disabled during boot (hold right at power up, then release.) Serial interface: volume (+ & ) , track (b & n) , pause/play (p), goto tracknumber (ex: 14<ENTER> )
Power On/off pushbutton. The MAX1674 DC-DC step-up converter makes it possible to power the whole circuit from only one AAA battery. Some larger SD cards will not boot with a weak battery though. A 1.5V alkaline battery performs better than a 1.2V NiMh.
PCB: We used as much SMD-parts as possible. Number of vias reduced to 54, only the bottom pads of the PLCC-socket need to be soldered. The PCB from our shop is a double sided and 100% connection tested PCB with plated-through-hole connections. All holes are drilled already. PCB size = 82 x 45 mm or 3″29 x 1″77.


Schematics: (eagle-file can be downloaded below.)

Full resolution image (GIF format).

Bill of Materials (Parts List:)

For more detail: Echo MP3 player using PIC18LF452

Quick Solutions to Questions related to EchoMp3:

  • What memory cards are supported by the EchoMp3?
    MMC, SD and SDHC cards from 64MB up to 4GB formatted as FAT16 or FAT32 are supported.
  • Which microcontroller does the EchoMp3 use and at what clock?
    The player runs on a PIC18LF452 or PIC18LF458 at 20 MHz.
  • How is the EchoMp3 powered?
    It runs from a single AAA (HR03) 1.2V Ni-MH battery using a MAX1674 step-up converter; a 1.5V alkaline performs better for some cards.
  • Does the EchoMp3 support firmware upgrades?
    Yes, software is upgradeable through an RS232 bootloader connector.
  • What controls are available for user operation?
    A 5-way micro joystick provides volume up/down, track left/right, pause/play (short enter), skip (long enter), and directory scrolling.
  • Can the EchoMp3 display track info and bitrate?
    Yes, the LCD shows artist, title, song number, elapsed time, sampling rate, bitrate and total song time; contrast is adjustable and stored in EEPROM.
  • Is voice recording supported?
    Voice recording in PCM format is possible with the same hardware and source code availability is noted.
  • What audio quality does the EchoMp3 offer?
    It uses a high quality stereo DAC with a typical S/N ratio of 87 dB and typical THD of 0.1%.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter