Mictronics | Michaels Electronic Projects

MP3stick MP3 Player

MP3stick - MP3 Player

The MP3stick is a simple and small portable MP3 player. A microcontroller Atmel AVR ATmega128 is the heart of the circuit. MP3 decoding is done by an VLSI VS1011b decoder IC. A MMC/SD card works as memory medium for MP3 files, playlist files and skin files. The player is designed to draw his power from a LiIo/LiPo battery with 3.6V. a charger cicuit, based on MAX1811, is included. All information will be shown on a Nokia color LCD with 128×128 pixel and 256 colors. The player will work in text-only mode and if a skin file is available, also with nice graphic skins. A docking port allows outside connectivity for serial control signals, audio signals and charger voltage input.

Project Pictures

MP3stick v11

MP3stick v11
Player

Player in stop mode
Playing

While playing a song
Menu

Inside the menu
Bottom Layer

Bottom Layer with LCD connected
Bottom Layer

Bottom Layer without LCD
Top Layer

Top Layer without SD card
Top Layer

Top Layer with SD card inserted
Side View

Side view of player with LCD
Enclosure

Enclosure, top, audio out
Enclosure 2

Enclosure, bottom, docking port
Enclosure 3

Enclosure, side, key and card
Enclosure 4

Enclosure, lower and upper half
Enclosure 5

Enclosure, lower and upper half
Package 1

No space wasted
Package 2

Side view, no card
Package 3

Side view with card
Complete

Completed, Overall size 22x39x64mm

Hardware description

  • IC4 ATmega128L-8A,UMain controller running at 8MHz internal RC oszillator, circuit is ATmega1281 or ATmega2561 compatible
  • IC2 VS1011b MP3 decoder IC
  • IC3 LM2940IMP-5.0 Low drop fixed voltage regulator, supplies 5V to battery charger from 5-26V input voltage
  • IC5 MAX1811ESA LiIo/LiPo battery charger, set to 100mA charging current, selectable battery type
  • IC6 LP2981IM5-3.3 Low drop fixed voltage regulator, main 3.3V power supply
  • IC1 LT1932 White LED driver, power supply for LCD backlight
  • LCD1 Nokia color LCD from Nokia 6610 phone, connected via Hirose DF23 connector
  • SW1 Alps SLLB Slide and push button switch made by Alps
  • CARD1 FPS009-3002 Yamaichi SD/MMC slot
  • K4 7pin Header Docking port , 2.54mm / 0.1″ Pinout:
    • 1 – Charger input 5-26V
    • 2 – Serial input, 19200 Baud, 3.3V level
    • 3 – Serial output, 19200 Baud, 3.3V level
    • 4 – GND
    • 5 – Left audio out
    • 6 – Right audio out
    • 7 – Not connected
  • PCB size without battery: 60x35x11mm
  • Player overall size: 22x39x64mm
    1. Copy your MP3 files to SD/MMC card as required. Don’t care about file and folder names or directory structure.
    2. Create an M3U playlist from your SD/MMC card content. Save this playlist root directory of your card. The first 32 characters of the filename will be equal to MP3stick playlist name.The firmware supports normal and extented M3U playlists, where the extented format is preferred.
    1. Download the iPod theme skin. All required files are included.
    2. Change the BMP images as required, read the Bitmaps.txt file about there format and decription.
    3. Change the lcd_layout.h as required. If you change this file you must recompile and reload the firmware with this file included.
    4. Run the skin_packer.exe to compress all BMP images to one binary file, the skin.skn.
    5. Copy the skin.skn file to your SD/MMC card root directory.Note: The MP3stick player will work without *.skn file, but in text-only mode then.
    1. Connect the MP3stick PCB to your STK500 development board via ISP interface. For pin-out see schematic file page 2.
    2. Program the correct fuse settings. See pictures above.
    3. Unpack the ZIP file and run the batch file “ISP_rc_calib.bat”. The tool will tell you the RC calibration byte after successful calibration process. STK500 is expected on COM1.
    4. Enter the calibration byte in firmware file “firmware_conf.h” then recompile and update the firmware on your player.

    Power consumption

    • Test voltage 4.1V
    • Play mode, LCD Backlight OFF, 2GB card 52mA
    • Play mode, LCD Backlight 50%, 2GB card 66mA
    • Play mode, LCD Backlight 100%, 2GB card 85mA
    • Stop mode, LCD Backlight OFF, 2GB card 27mA
    • Stop mode, LCD Backlight 50%, 2GB card 42mA
    • Stop mode, LCD Backlight 100%, 2GB card 58mA
    • Sleep mode, 2GB card 860uA
    • Sleep mode, no card 540uA

    Firmware features

    • Written in C for WinAVR compiler based on avr-gcc v3.4.5 or higher including avr-libc v.1.4.3 or higher
    • Supported file system FAT32
    • Direct M3U playlist support
    • ID3 v1 & v2 tag support (title, artist, album, title length[v2])
    • Color skin/theme support, Yampp3USB/Yampp7 compatible
    • Adjustable LCD contrast, backlight brightness and auto off time, bass enhancer in VS1011b, volume and balance
    • All adjustable options are stored in EEPROM Serial IO interface
    • 3.5mm audio jack
    • External audio via docking port
    • One key handling
    • Battery voltage monitoring
    • Auto power off on low battery
    • Remote control via serial interface
    • Information output for firmware and bootloader via serial interface

    Key handling

    • Stop mode
      • Up – no function
      • Center short press – no function
      • Center long press – enter menu
      • Down – no function
    • Play mode
      • Up – previous title
      • Center short press – no function
      • Center long press – enter menu
      • Down – next title
    • Menu mode
      • Up – previous menu entry / increase selection
      • Center short press – execute function, select/deselect entry to modify
      • Center long press – no function
      • Down – next menu entry / decrease selection

    Serial control commands

    • Play – g
    • Stop – G
    • Next title – n
    • Previous title – p
    • Next playlist – N
    • Previous playlist – P
    • Menu – M
    • Up – U
    • Down – D
    • Enter – E
    • Sleep – S

    Menu functions

    • PLAY / STOP
      • start and stop playing
    • NEXT TITLE
      • select next title
    • PREV TITLE
      • select previous title
    • NEXT PLAYLIST
      • select next playlist
    • PREV PLAYLIST
      • select previous playlist
    • VOL
      • change volume, range 0 – 10
    • BAL
      • change balance, range -10 – 0 – +10
    • BASS Hz
      • change bass boost low limit frequency, range 0-150Hz
    • BASS dB
      • change bass boost amplitude, range 0-15dB, 0dB turns the booster off
    • RANDOM
      • change random play mode
      • OFF – normal play mode, song after song, single playlist
      • SONG – random song from actual playlist
      • PL – song from random playlist
      • PL+SONG – random song from random playlist
      • PL->PL – song after song from all playlists
    • BLIGHT s
      • change backlight auto off time, range 0-25s, 0 means always on
    • BLIGHT %
      • change backlight brightness, range 0-100%
    • CONTRAST
      • change LCD contrast
    • SLEEP
      • turn player off, set into sleep mode
    • BOOTLOAD
      • call the bootloader for firmware loading
    • Only for empty controller: Programm the bootloader into the ATmega128 using a In-Circuit-Programmer (ISP)
    • Compile the firmware as required, or use the precompiled firmware file.
    • Copy the firmware binary file: MP3stick.bin to the root directory of your MMC/SD card
    • Cycle power or call the bootloader from menu
    • The bootloader will search the root directory for the file MP3stick.bin. The file will be deleted by the bootloader after programming the uC.
    • You can monitor bootloader activity via serial interface.
  • How to use the Bootloader

    • Only for empty controller: Programm the bootloader into the ATmega128 using a In-Circuit-Programmer (ISP)
    • Compile the firmware as required, or use the precompiled firmware file.
    • Copy the firmware binary file: MP3stick.bin to the root directory of your MMC/SD card
    • Cycle power or call the bootloader from menu
    • The bootloader will search the root directory for the file MP3stick.bin.
      The file will be deleted by the bootloader after programming the uC.
    • You can monitor bootloader activity via serial interface.

    Fuse Settings in AVR-Studio and PonyProg2000


    Fuse Settings AVR-Studio

    Fuse Settings AVR-Studio

    Fuse Settings PonyProg2000

    Fuse Settings PonyProg2000
    Not tested in PonyProg2000!

    How to M3U playlists

    1. Copy your MP3 files to SD/MMC card as required. Don’t care about file and folder names or directory structure.
    2. Create an M3U playlist from your SD/MMC card content. Save this playlist root directory of your card. The first 32 characters of the filename will be equal to MP3stick playlist name.The firmware supports normal and extented M3U playlists, where the extented format is preferred.

    How to create and use skins

    1. Download the iPod theme skin. All required files are included.
    2. Change the BMP images as required, read the Bitmaps.txt file about there format and decription.
    3. Change the lcd_layout.h as required. If you change this file you must recompile and reload the firmware with this file included.
    4. Run the skin_packer.exe to compress all BMP images to one binary file, the skin.skn.
    5. Copy the skin.skn file to your SD/MMC card root directory.Note: The MP3stick player will work without *.skn file, but in text-only mode then.

    How to calibrate the internal RC oscillator

    1. Connect the MP3stick PCB to your STK500 development board via ISP interface. For pin-out see schematic file page 2.
    2. Program the correct fuse settings. See pictures above.
    3. Unpack the ZIP file and run the batch file “ISP_rc_calib.bat”. The tool will tell you the RC calibration byte after successful calibration process. STK500 is expected on COM1.
    4. Enter the calibration byte in firmware file “firmware_conf.h” then recompile and update the firmware on your player.

    BOM BOM_MP3stick_v11.pdf
    8.6 KB 96 Downloads Details...
    Bootloader Bootloader_v1.10.zip Version: 1.10
    43.5 KB 69 Downloads Details...
    Firmware Firmware_v1.14.zip Version: 1.14
    112.6 KB 124 Downloads Details...
    iP*d Theme iPod_Theme.zip
    31.0 KB 66 Downloads Details...
    MP3stick PCB Gerber Files MP3stick_Gerber_v11.zip Version: 11
    217.8 KB 99 Downloads Details...
    MP3stick Schematic Schematic_v11b.pdf Version: 11b
    362.6 KB 221 Downloads Details...
    RC Calibrator RC_Calibration.zip
    47.8 KB 57 Downloads Details...

    6 comments

    • Nikolaj · 12.07.2010 at 11:16

      Hi, look there are new microchip called

      http://www.vlsi.fi/en/products/vs1053.html

      which can read Ogg Vorbis / MP3 / AAC / WMA / FLAC, so maybe you could upgrade your stick with that chip, I do not think it would be very hard.

      And can I put other for example vs1003 instead of vs1011?

      About sd card, there is some micro or mini sd, can I use that instead of big sd card?

      Thank you,

      Nikolaj

    • Admin comment by Michael · 12.07.2010 at 17:12

      This project will not be continued, cause I’m sticking with the yamppPod instead.

      The VS1003 can be replaced, but firmware changes will be necessary.

      Micro or mini SD cards will work, just use an adapter.

    • Milek · 13.07.2010 at 11:57

      Hi Michael

      I have problems with LCD.I’ve got the mirror screen.Is problem
      with LCD or another controller instead Philips PCF8833 or just
      6610 LCD from unknown series.
      Could you please describe it more in details the calibration?

      thanks for the answ.
      best regards
      Milek

    • Nikolaj · 13.07.2010 at 20:05

      Hi Michael,

      Can I use this MicroSD adapter?

      http://gravitech.us/MicroResearch/Others/MICROSD-ADP/MicroSD-ADP_Schematic.pdf

      Can I use vs1053? I will need to made firmware changes? Because this is never and cheaper chip.

      You said you are sticking with the yamppPod. I do not have conditions to program arm micro controllers, you use them because they are faster? But do you have better sound quality?

      Thank you,

      Nikolaj

    • Admin comment by Michael · 13.07.2010 at 21:00

      Nikolaj,

      when I said adapter I meant something like this: http://prosoft-informatica.com/loja/images/micro_sd_adapter.jpg
      A level converter is not needed since the MP3stick is running at 3.3V internally anyway.

      About the VS1053 I don’t know, but firmware changes are required for sure, possibly some hardware changes as well.

      With the yamppPod sound will not be better cause it uses a VS1033.

      Btw, ARM programming is easy, an FT2232 is required to make an openOCD JTAG programmer. See the yammpPod reference documentation.

    • Admin comment by Michael · 13.07.2010 at 21:06

      A mirrored LCD is mainly because of the LCD design. Can be fixed through firmware changes.

    Leave a Reply

    Before you submit form:
    Human test by Not Captcha

    Theme Design by devolux.nh2.me

    My Counter

    • Total Visitors 516,353
    • Visitors today 335
    To top