To: share@parallax.com
Subject: Customer Application
Submission
IR Remote controlled
VMUSIC2 MP3 Player
The VMUSIC2 MP3
module from Future Technology Devices International (FTDI) has been around for
many years and I have often thought about whether it would be a suitable
replacement for a home stereo CD changer. This module contains the Vinculum VNC1L USB host controller chip
and VLSI VS1003 MP3/WMA
Audio Codec decoder chip. Pre-compiled firmware allows you to play MP3 files
from a USB Thumbdrive as well as reading, writing files,
etc.
In the past,
figuring out the best way to control the VMUSIC2 using multiple buttons, menus,
etc with a microcontroller had deterred
me from starting a project. However, after my old Sony
camcorder died, I kept the infrared remote control
and got the
idea of using it to control the VMUSIC2 instead of using
hard-wired buttons.
By default, the
VMUSIC2 extracts certain ID3 Tag metadata (song title, artist,
track number, album and composer) from the MP3 file and sends it out the serial
port. Also, as the song plays, it sends data each
second with the elapsed play time. The firmware can be
customized to turn off this "status" information, but I wanted to display
it on an LCD. The module also supports RTS/CTS hardware flow
control enabling a microcontroller to send and receive data without
losing any. Browsing the web for VMUSIC2 projects, it seemed that hobbyists were
having trouble handling all of this status information. Many projects either
ignored the data or tried to get by without using hardware flow control.
When I first
received my VMUSIC2 I wrote a small Basic Stamp program to drive it. Since the
BS2 supports serial RTS/CTS hardware flow control, it worked well. I wrote
another BS2 program to receive the IR codes from my old Sony camcorder remote
control utilizing the Panasonic 38 MHz IR detector sold by Parallax.
I had concerns
about trying to drive the VMUSIC2, IR detector and a serial LCD display with the
BS2 and decided a Propeller with eight processing cogs would handle these
devices with no problem.
I searched the
Parallax Propeller Object Exchange (OBEX) for a serial port object with
hardware flow control to drive the VMUSIC2 and found Tim Moore's
Multiple Serial Port driver http://obex.parallax.com/objects/340/.
I wired the devices
to a USB Propeller Proto board and started working on the program. I used
graph paper to make a template for cutting openings in the project box for the
VMUSIC2 and LCD modules.
I removed the power
jack from the Propeller Board and wired a different power jack to the
board so the jack could be on the back of the enclosure rather than
the bottom. I did create an access opening on the bottom for the
Propeller board's USB connector. A 4GB thumbdrive lets me put over 800 MP3s
(192 kbps bitrate).
I
implemented the following features for various buttons on the remote
control:
- repeatedly play all
MP3 files or repeatedly play random MP3 files
- control
volume level
- skip a forward or
backward one track
- skip an entire
directory
- fast forward or
backward 5 seconds
- pause or stop
playback
- turn the LCD
display on/off
- control the
brightness of the LCD backlight
- scroll long song
titles and/or artist information
- Auto-off feature - the LCD display turns on, displays the
title and artist for 10 seconds and then turns off until the next song
starts
- toggle displaying
debug information on the Parallax Serial Terminal (if connected to
computer via USB cable)
- display Disk ID
information on the Parallax Serial Terminal
Problem with ID3
Tag information
The ID3 Tag
information was not being passed from the VMUSIC2 for certain MP3 files.
After verifying that it wasn't a problem with my Propeller program, I started
examining the MP3 files.
It turns out the the
VMUSIC2 firmware is particular about the ID3 Tag structure. While the ID3
specifications allow Unicode data in the various frame blocks, the VMUSIC2
cannot handle Unicode - even in frames that it ignores e.g. TYER (year) or
COMM (comment) frames. It also had some other problems with
tags.
I wrote a VB6
program to process my MP3 files dropping unneeded frames and
converting others.
When I changed any
Unicode frames to ASCII and padded the ID3 Tag length to 4096 bytes,
the VMUSIC2 handles the tags with no problem.
Bill of
Materials