VS1003B based MP3 player
Rayman
Posts: 14,651
Just finished initial testing a prototype MP3 player based on the VS1003.
The driver was a lot more difficult that I thought, but not too bad.
I was turned off in the past by the high cost of these chips.
But, recently noticed this one for $4.95 at Sparkfun.
Only problem I'm having is that it plays MP3 just fine, but won't play wav or midi, like it claims it can...
Anyway, if I can make this all work, I'll be getting closer to a MPEG video player...
One downside is that it uses a lot more pins than regular wav file playback (that uses just 2 pins).
But, for low sample rate stuff, I think I can use a I2C to SPI adapter to use only 2 pins...
The driver was a lot more difficult that I thought, but not too bad.
I was turned off in the past by the high cost of these chips.
But, recently noticed this one for $4.95 at Sparkfun.
Only problem I'm having is that it plays MP3 just fine, but won't play wav or midi, like it claims it can...
Anyway, if I can make this all work, I'll be getting closer to a MPEG video player...
One downside is that it uses a lot more pins than regular wav file playback (that uses just 2 pins).
But, for low sample rate stuff, I think I can use a I2C to SPI adapter to use only 2 pins...
Comments
How about some pics of the prototype?
OBC
I have been suggesting a MIDI board to Ken and MattG for a while, and it would be nice to see some more options on the market, assuming you plan to commercialize this.
MIDI only needs Rx and reset. It's just the MP3 that takes more pins, but the Prop can't decode MP3 anyway, so it's not a fair comparison. These chips decode standard 160 kbps MP3, so the sound quality should be quite good.
-- Gordon
I thought I saw several MP3 players in the object exchange.
-- Gordon
The one I saw was using a VNC1L chip.
And here I was expecting someone to say they had done that in one cog...
This is only 3/4 of the actual board though...
The real one actually has another pushbutton on the other side of the audio jack.
Also, this one is missing the microphone circuit...
There are some other things I still need to test:
pushbuttons, LEDs, microphone, line in.
Also, it seems I need to figure out how to disable the WMA feature (or else pay Microsoft a million dollars...).
One other thing I'd like to do is reduce the number of cogs require to play from SD...
Right now, it takes 4 if you want to play and do other things at the same time
(1 main Spin cog, 1 for SD, 1 for MP3, and 1 to coordinate SD and MP3)
Also, I'd like to see what kind of metadata I can extract from the stream... I think the VS1003 chip does some of this for me...
I just took a look at the competition (other VS1003B boards)....
(Maybe one should do this before designing a product?)
I think I can be price competitive with the imported version...
One think I see that I wish I'd done is include mounting holes...
But, if absolutely required, I suppose one could remove the switches and drill mounting holes there...
I'm not sure about the VS1003, but the other chips don't provide a register or other function for this, so I doubt this one does, either. You need to sift through the stream. Some Arduino code here for comparison:
https://github.com/madsci1016/Sparkfun-MP3-Player-Shield-Arduino-Library
It makes use of some methods in the SdFat library for the Arduino, and the methods are likely similar to ones you have available for the Prop, or can readily create.
On licensing: The later chips have some of the features that require licensing disabled by default, but it doesn't look like WMA is one of them. They suggest instead looking at a status register to see what format is playing, and disable it if it's WMA. As you're not creating an end-user device, I wonder if this is even meaningful or required. Your product is basically a breakout board for the chip, for the purposes of evaluation and education.
How did you handle the output? I assume you used the protective circuit described in the docs, but how about the bypass for GBUF, when using an external amplifier? SparkFun's boards have the basic protective circuit, but in the past, treated GBUF as a kind of ground (which it's not), and only recently started advising people to read up on the output circuitry recommended in a separate VLSI document. As it's only a couple resistors and a capacitor per channel, it would be so much easier if it were already on your board. People could use the direct headphone circuit, or if they connected to on board amplifier, attach through the bypassed circuit.
-- Gordon
It is true that the "ground" on the earphone connector hovers at Vdd/2, so connecting that to earth gound could be bad.
That problem could arise if you connect the earphone output to a Line-In of an amplifier...
I think a lot of Line-In connections are AC coupled, so you'd be OK if that was true.
I think computer speakers are AC coupled too, but don't know for sure...
If you're using batteries, you'd be also OK.
Have you ever tried the VS1000 module VLSI sells? It only plays OGG Vorbis, but this makes it license free. The module is about $5 in quantity of 100, and directly connects to TTL serial or USB. It has a small 16 MB built-in Flash, and can read from a micro-SD card. Playback can also be controlled via I/O, and the standard firmware is supposidly updatable. Being able to play MP3s is handy, but for a sound effects project OGG is as good, and the module appears very easy to use. It's about $15 in single quantity, but so far I haven't found a US-based reseller.
URL is here: http://www.vlsi.fi/en/products/vs1000module.html
-- Gordon
Also, the chip is licensed for MP3. They've paid Fraun... (something) the $$ already, so you don't have to worry about that.
On a seperate note, I was finally able to play a midi file. Turns out the chip is extremely picky about the file format.
Had to use a tool called GN1:0 to get it in the format it likes.
Still need to figure out how to play WAV files. My guess it that it's really picky about that format too...
I'm still kicking myself for not including mounting holes...
When I get the boards, I'll try taking them to a big hole punching press and see if I can easily put mounting holes under the switches...
I've seen another regular poster here, MacTuxLin as I recall, post in the VLSI forums about the VS1000, so if you see this thread, let us know about your experiences with the chip, reflashing the firmware, etc.
Anyway, this is looking t-riffic, even without the mounting holes!
-- Gordon
maybe I should buy a bunch before they figure out they made a mistake...
But, if someone wants to pay more... It looks like one can possibly use the other VS10XX chips with this board.
I took a look at the VS1053B and the only possible problem is that there are 5 pins that I have not connected that are connected for the VS1053b.
Four of them or I2S output, so I don't think that's a problem. But, one is an additional digitial I/O ground. But, I'd guess that pin isn't needed either if not using the I2S bus...
Yeap. I was working on VS1000d last year (will be continuing very soon once I've finished current project) . In the end, to me, I felt its better to get down coding in VSIDE. (the latest version works without having to compile & sending to VS1000 in dos command line window, finally!). Its just a little tricky as you'll need to compile & 3 firmware each time but the documentation seems sufficient. I got it to comm with Prop1 using UART with specific controls. The VS1000 module is very neat (small & compact). I already have a proto-type casing using this module with a simple prop setup for mobile media. Unfortunately, that's all I've reach at the moment.
Gordon, we bought a bunch of these modules & I'll be bringing some (maybe 5 pcs) along with me to Parallax Expo & can sell to you if you're interested. I'll bring more if anyone is interested, Rayman?
I'm planning on being there, so I'll likely take you up on the offer for at least one.
-- Gordon
They work! At least, they play MP3 files...
Still need to see of the LEDs, buttons, and microphone work...
Had hoped that could use Prop pins to power the device, but it turns out that it draws too much current for that.
Here's a board photo and test setup:
Interesting sidenote: The VS1003 records and plays a wav format that is compressed, called: IMA ADPCM
From the little bit I've read about it, this simple compression seems like something that the Prop could do in real time too.
Sounds like a 4:1 compression factor. Not huge, but still could be useful in some instances maybe...
But, I think I just found some buttons that I can make work. It's not perfect, but I think it will work:
So, I've just had this new version made (at least the prototype):
I hope it will fix the earlier problems...
One thing I was wondering is if the kinda funny floating ground output of this chip would be able to work with powered PC speakers or home theater systems. So, in a very small experiment, I just tried the original version on one set of powered PC speakers and one home theater system audio input. I'm happy to report that it works very well in both cases without any popping or hissing. So, I'm thinking that most new systems have capacitively coupled inputs and with work with simple output circuit that I'm using here.
Only change I'm thinking about making is moving the GND next to VDD so it can plug directly onto the Proto board USB...
Now, I have to figure out what to do with about 5 of this old version I made... They work, but I'm not happy with them enough to sell them...
Anyway, here's what I think is the latest the code: (it's not letting me upload...)