IR Remote controlled VMUSIC2 MP3 Player
Ron Czapala
Posts: 2,418
Hack A Day link
Parallax Project Resource Link
I took a VMUSIC2 module, a USB Propeller proto board, a Panasonic IR Detector and an old Sony camcorder remote control (RMT-811) and put them together to create a remote controlled MP3 player.
I used Tim Moore's Multiple serial port driver since it supported RTS/CTS hardware flow control which allowed me to easily capture the "status" information output from the VMUSIC2.
When a song starts playing, the 8.3 filename is displayed and then the ID3 Tag data contained within the MP3 file is displayed. This may include the track number, song title, artist, album and composer.
Then as the song plays, the track time is displayed (see below).
I use Tom Doyle's IR Remote object to drive the Panasonic IR Detector to capture the Sony IR Remote's codes allowing me to pause play, skip songs, stop, play etc.
The program currently starts playing songs randomly and I use the remote to skip but I plan on adding more fuctionality - there are many VMUSIC2 commands (and buttons on my remote) that will be useful. The VMUSIC2 commands are on page 52 of this FTDI Firmware document
I also intend to add a serial LCD display (two line or four line) to display the MP3 information and any menu type data I use for the remote operation.
[
Example of ID3 Tag info:
Parallax Project Resource Link
I took a VMUSIC2 module, a USB Propeller proto board, a Panasonic IR Detector and an old Sony camcorder remote control (RMT-811) and put them together to create a remote controlled MP3 player.
I used Tim Moore's Multiple serial port driver since it supported RTS/CTS hardware flow control which allowed me to easily capture the "status" information output from the VMUSIC2.
When a song starts playing, the 8.3 filename is displayed and then the ID3 Tag data contained within the MP3 file is displayed. This may include the track number, song title, artist, album and composer.
Then as the song plays, the track time is displayed (see below).
I use Tom Doyle's IR Remote object to drive the Panasonic IR Detector to capture the Sony IR Remote's codes allowing me to pause play, skip songs, stop, play etc.
The program currently starts playing songs randomly and I use the remote to skip but I plan on adding more fuctionality - there are many VMUSIC2 commands (and buttons on my remote) that will be useful. The VMUSIC2 commands are on page 52 of this FTDI Firmware document
I also intend to add a serial LCD display (two line or four line) to display the MP3 information and any menu type data I use for the remote operation.
[
Example of ID3 Tag info:
Playing MAISQU~1.MP3
01
Mais Que Nada
Sergio Mendes & Brasil '66
Four Sider
T $00 $00
T $01 $00
T $02 $00
Comments
Can you post a schematic?
Send a link of this page to Hack-a-Day.
I did fill out the hackaday form and linked this thread - Thanks for the suggestion
I split out the song title and artist from the ID3 Tag and display it on a 2x16 serial display.
NEW IR CODES:
- fast forward or rewind 5 secs
- adjust volume up or down
- set playback mode - "play all MP3 files" or "play random MP3 files".
- toggle LCD on or off
- adjust LCD backlight brightness
- skip forward whole directory
- toggle debugging displays to Parallax Terminal on or off
- scroll long song titles
NOTE: When I first hooked up the VMUSIC2 I was a little disappointed because there was some annoying background noise.Not sure whether the switching power supply was the source - should have tried it with batteries I guess.
I stuck a Radio Shack Ground Loop Isolator between the player module and the amplifier. Problem solved! Sounds clear as a bell...
Hack-A-Day, that it!
Thanks erco!
I put almost 800 MP3s on a 4GB thumbdrive. I hit the random play button and enjoy my music...
I'm getting inspired.
Speaking of YouTube, after I uploaded the first video in this thread, I noticed a notation that said "View copyright info". When I clicked it, this message appeared:
I can't believe that playing little snippets of songs in my project would cause someone to attach copyright claims to my video!!!
There are sooooo many YouTube videos where entire songs are featured along with slide show images that can be captured and provide "free" music but my little video drew this kind of attention.
There was also a link to a dispute process
The VMUSIC2 extracts the Track number, song title, artist, album and composer information from the ID3 Tag block in MP3 files.
Sometimes it was not showing up on my LCD display. After verifying that it wasn't a problem with my Propeller program, I started examining the MP3 files. Years ago I wrote my own media player proogram in VB6 and created a DLL to access the ID3 tag data.
The ID3 specifications allow unicode data in the various frame blocks. It turns out the the VMUSIC firmware chokes when it encounters unicode - even in frames that it doesn't utilize e.g. TYER (year) or COMM (comment) frames.
When I changed frames from unicode to ASCII for problem songs, the VMUSIC2 sends the data with no problem.
NOTE: There are MP3s where VMUSIC2 skips information - still researching that...
I am working on a VB6 program which will read an MP3 file and drop unneeded frames and convert any unicode strings to ASCII.
BTW - The VMUSIC2 has no problem with the APIC (album art jpeg) frame - it skips over it.
__________________________________________________________________________
EDIT:
It seems I have figured out a scenario for formatting ID3 Tag info so that the VMUSIC2 will correctly extract it and send it via it's serial output.
I wrote a VB6 program that drops all frames except:
- TIT2 - Title
- TPE1 - Artist
- TALB - Album
- TYER - Year
- COMM - Comments
- TCON - Content type (Genre)
The program also converts any unicode frame information to ASCII and pads the ID3 tag with nulls ($00) to a length of 4095 bytes so that the MP3 starts add address x'1000.This format seems to suit the VMUSIC2 firmware...
For information on ID3 tags: http://www.id3.org/id3v2.3.0
I'm sure I will be tweaking it since I will probably use a different serial LCD display...
I also attached a ZIP file with the VB6 code I used to strip frames from the ID3 tags and convert unicode frame data - not fancy, but pretty quick.
It has a recursive routine to process all MP3 files within a folder and all subfolders.
NOTE: Use the VB6 code at your own risk! It replaces the files within the selected folder, so you probably want to copy the folder and run the program on the copied folder. It also makes the new MP3 files read-only.
The IR receiver is between the display and the Vmusic module.
I really like the blue background (see next post) - I ordered a couple more today.
(The enclosure is more of a beige than rather than bright white too).
I also added an 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.
I also added a LCD driver for NewHaven displays to the OBEX - http://obex.parallax.com/objects/798/
I have used the VMusic2 in a few museum and libraries and I love it.
I'm going to try the IR on a future product.
Jim
The auto-off setting will be read from the EEPROM at power-up so it will persist from one session to the next.
It's not something I will change often, so I am not worried about "wearing out" that address.
I used Mike Green's Basic I2C Driver object.
Parallax also issued me a credit towards Parallax products. Of course, I used it to get more Propeller Proto Boards!!
I made a few more changes. The LCD backlight brightness and volume level are saved in the extra EEPROM space along with the auto-off setting.
The latest code is in the attached ZIP file.
This version can table up to 500 folder names of top-level folders (those directly under the root).
Using buttons on the IR remote, you can select a particular folder to play songs sequentially or random within that folder.
The remote's "Search Mode" button invokes this feature. The first time it is selected, the table is built from the root directory.
The "|<<" and ">>|" buttons are used to navigate the table. Clicking the Play or Index buttons starts sequential or random play within the selected folder (an it's subfolders).
Subsequent pressing of the "Search Mode" button displays the previous table choice and lets you select a different folder.
Pressing "Zero Set Memory" in search mode selects the root directory entry and displays the number of folder entries.
See the remote control's jpeg for the button usage and layout...
EDIT: see ZIP file in next post for version with directory sort
I used JonnyMac's bubble sort routine to sort the directory table. Bubble sorts are not the most effecient but adequate...
Thanks for taking time to document it so nicely.
I noticed Parallax has this a Project of the Week.
Congratulations!
Thanks Duane! I keep thinking of ways to tweak it.
Thought about adding a real time clock or maybe composite video output but who knows.
I have it plugged into my PC soundcard with a 200 watt speaker system - Plus, no stupid radio commercials, or CDs to change.
The ">10" key selects the top-level directory range e.g. 0-9, 10-19, 20-29, etc
The numeric keys are used select a directory within the range - e.g. pressing "7" would pick 7,17,27 etc depending on the current range.
PLAY MODES: The "continue" button toggles between "play once" or "play repeat" and the "shuffle" key selects "play random"
The attached ZIP file contains the SPIN code, etc for this version...
The play mode is also changed and displayed.
The next/prev directory and ">10" buttons let you skip around. The "clear" button returns to the root and displays the number of top-level subdirectories.
I have almost 2500 MP3 files on this drive in 182 directories.
A LEXAR 16GB would not work.