mp3 playback module

Haku

Senior Member
I've been wanting controlled playback of mp3s with a Picaxe for quite a while now, I've seen the 4D Somo module but looking around for other modules I discovered this one which is less than half the price:

http://www.mdfly.com/products/sd-card-mp3-player-module-rs232-ttl.html

It's larger at 51mm x 21mm, needs more voltage (6v-12v) and uses a normal SD card instead of the micro sized. The specs seem a bit sparse, no details on why it has both RX & TX when it doesn't say what information the module can send out, just what input control commands it has, but otherwise looks fairly simple & straightforward to use. I do wonder what all the other unnamed connection pins are for.

I ordered a couple and a couple of 1GB SD cards, altogether worked out about the same as a single Somo module without a card, when they arrive I'll post back with my findings on how I got on with them.
 
Last edited:

hippy

Technical Support
Staff member
Looks interesting but the datasheet is sparse, no indication of bit-rates, VBR, and a lot of other things which would be useful to know. I guess the 6V-12V power requirement is because it has regulators on-board. May be able to reverse engineer it and use 5V.

I'd guess the extra pins are because the module was designed for other uses as well; most seem to be straight from what I'd guess is the processor, some via pull-ups/pull-downs, so perhaps matrix keypd, LCD display. Whether any of that's supported in the firmware as delivered is anyone's guess.

The only thing to watch for is signal polarity for TX and RX but looks a breeze to control from a PICAXE. You probably made the right choice; buy one, see what it does and how well, report back. If it doesn't do what you want, you'll have had fun playing with it!
 

Chavaquiah

Senior Member
When you receive them, could you please try to see what chip they use (if the markings have not been erased, of course)?
 

Haku

Senior Member
The straight TTL RS232 connection and the price won me over on the Mdfly one as it's something I could easily work out how to use without needing to ask for help, the size of the Somo one is very nice but I can live with the size of the Mdfly one.

With the sparseness of the specs I've no idea how loud the output is especially as it's coming straight from the main chip, but I've just finished soldering up one of these miniature 3W audio amps from DealExtreme and I'm very impressed with it, might be an ideal combination with the mp3 module.

It's going to be interesting testing out what types of mp3 file they can handle, I'll have to cook up a batch of them with different bitrates etc. to test.
I'll certainly look at the main chip to see what it is they use.
 

hippy

Technical Support
Staff member
The price with shipping was too tempting not to take a chance on so thanks for the link and you won't be alone if you get stuck, assuming they arrive and this side of Christmas using the 'skinflint' mail option, though you may well be the one called on for help :)

Thinking of the TX pin which is undocumented; hopefully it puts out some equally simple one byte acknowledgements for what is sent and, particularly useful, something which indicates when a track has reached its end. Guess we'll find out.
 

Jamster

Senior Member
I noticed there is another pretty sweet mp3 decoder on that site, just press the previous button at the bottom of the page. it might be significantl easyer to rig up although the manuel dosn't really help.

One other thing if it is as easy as it seems, is that you can buy premade rack mount units that play mp3 files yet they cost around £120-£300. How does that work??? :)
 
Last edited:

MPep

Senior Member
The second page of the datasheet on that webpage shows (extremely brief) interface specs of 4800,8,N,1.

Also, from the diagram on Page 1, U1 looks to be a voltage regulator.
 

hippy

Technical Support
Staff member
More expensive and rack mount units probably support larger storage, a means to update memory without removing it, support higher bit rates, and produce higher quality audio out. Also the cost of racking isn't cheap, and comes all assembled. It really is a case of you get what you pay for.

I wasn't clear on how the other module needs buttons wiring up and it's harder to interface to a PICAXE than something which takes serial in.
 

Haku

Senior Member
I've assembled quite a few rackmount 'mp3 player' units in the past for someone, they're currently used as part of a tannoy/scheduled announcement system in hotels/factories/and one major airport, the mini-itx rackmount case alone costs £175 and then you had to add mainboard/ram/hd/cd/LCD panel/custom made driver hardware with balanced line output & software etc. which all push the price up.

I do hope this Mdfly mp3 module works just the details say, it could be a nice inexpensive way of adding custom audio effects to projects. The module with the SD & USB host sockets looked interesting for being able to play from a USB memory stick but it doesn't appear to have any easy way of selecting specific tracks to play.
 

westaust55

Moderator
but it doesn't appear to have any easy way of selecting specific tracks to play.
I didn't think that was a big issue.
If you want to play song 001, just send 01 to the module, play song 010, send 0A
Much the same as the 4D Systems SOMO-14D audio module except in hexadecimal rather than decimal. Easy enough to program on the PICAXE
 
Last edited:

Haku

Senior Member
The ability to play specific mp3s on demand is why I wanted such a module like the Somo one, without that you have to try and keep track of how many times the microcontroller triggered the next or prev button which could get tricky, especially if the player remembers which track was last playing/played when it powers up.
 

westaust55

Moderator
But . . . . there is no need to keep count or am I losing the plot (not undear of :rolleyes: ).
Just send the file name/number but in hexadecimal text (ie "0A" not "010")
 

Haku

Senior Member
This module doesn't have that ability, but this module does which is why I ordered two :)


edit: I found an eBay listing for what appears to be an identical module:
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=290456973947
it has more details on what the other pins of the 20 pin connector do; button inputs for volume control, sequential play and 8 buttons for direct playback of the first 8 mp3s. The regulator is a variable output LM317 so the chip could be using almost any voltage. The SCL & SDA lines suggest it has i2c control but no mention of that anywhere.
In the pdf the details of the Mdfly one the other lines on the 20pin connector have been purposely blanked out so maybe it is programmed differently.


edit2: found two China based retailers selling two identical $10 SD audio modules which appear to be controlled similarly to the Somo module:
http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=168_170&products_id=418
http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=168_170&products_id=627
http://www.emartee.com/product/41540/MP3-Sound-Module-Mini-SD-Card
http://www.emartee.com/product/41928/MP3-SD-Card-Sound-Module
 
Last edited:

hippy

Technical Support
Staff member
I do hope this Mdfly mp3 module works just the details say, it could be a nice inexpensive way of adding custom audio effects to projects.
Note there are only a few in stock and it could be a case of 'when they're gone they're gone'. It would be worth contacting the supplier before making big plans for it.

Don't forget that Rev-Ed also sell the VMUSIC2 as USB030. In terms of cost, a lot can depend where one is and what shipping rates are, and, as is often pointed out, there can be a lot more to it than bottom-line raw component costs.
 

Grogster

Senior Member
Seems interesting - please keep us posted. :)
At that price, might get a couple in myself to tinker with... ;)

EDIT: Have bought a couple to play with - no pun intended.
Well, maybe just a little... :p

Again, please do post back with your results.

ANOTHER EDIT: Just got confirmation back from Mdfly that they will be getting more modules in stock.
 
Last edited:

Grogster

Senior Member
Some more info from MDFLY: Module supports any standard bitrate from 32kbps to 320kbps, but NOT VBR files, so I understand. 4800-baud is the only available interface speed.

Can't wait to tinker with mine when they arrive.

They now have 5 units left, so others are also buying them up...
 

Haku

Senior Member
I got confirmation my two modules were posted on Monday, with any luck they'll arrive by the weekend, small packets by normal airmail from US to UK has taken less than a week in the past but with how crappy UK's Royal Mail is nowadays I'm not holding my breath.

When I was looking around for various mp3 player modules I kept an eye on the stock levels of the Mdfly module and noticed it started at 13, I bought two making it 11, then saw this sequence over a couple of days; 9, 15, 13, 11, indicating they hopefully keep getting more stock in. But maybe I should've kept it quiet so I could have had all the cheap mp3 modules I ever wanted ;)

Thanks for the details on what type of mp3 the module can play.
 

Grogster

Senior Member
My order brought the units to 9(I bought units 11 & 10).

Hell, at that price, if they have any functionality at all, then it is money well spent. :)

Examining the information I have, I would be confident that the MDFLY units can have the exact same buttons on them as in the e-bay(was it?) listing.

All button inputs appear to be via resistor packs, which would prevent any damage by directly grounding any of the first 8 pins, so one of my first experiments will be with buttons to see what happens. I too, will keep this thread updated - once mine arrive!

But maybe I should've kept it quiet so I could have had all the cheap mp3 modules I ever wanted ;)
I for one, really appreciate you posting the link - I have given it out to a few of my electronic chums. Nice one, Haku. :)

EDIT: I see they are now down to 2 units... :p
 
Last edited:

Grogster

Senior Member
Got my two modules today in the post.
I will try them out tonight.

I plan to use the new 18M2 for this, as it supports 4800 buad natively.
I know that other chips in the M2 or X2 range do too, but this is a chance to play with the new 18M2, which I have not done anything with yet. :)

I will post back with all results...
 
Last edited:

Grogster

Senior Member
Initial tests are great - VERY easy to use and get working.
My tests were using a 2GB uSD card in a SD card adaptor.

BUTTON MODE WORKS.
In this mode, based on the graphic on the e-bay(???) listing, you just ground the pin to play the mp3 you want.

I have not yet tried the PICAXE interface mode, but the buttons work.

Volume buttons also work, but in somewhat large steps - this could probably be helped by using a PICAXE and pulsout command.

By default, the module fires up with maximum volume setting.

Sound is very clean, crisp and no pops/clicks during start/stop or skipping tracks.

Can't believe the @%!@ price of these things!
They are my new toy for the month. ;)

The module has a red SMD LED for power on, and another red one which is on when playback is happening. The playback LED is connected to the BUSY line, so this could be harnessed by a PICAXE to tell it when the unit is ready.

Standby current is 30mA, Startup current is about 38mA.
Playback current is 38mA.

EDIT: Sequential play(pin14), allows you to step through all the mp3 files the module can find on the card. Numbers DO NOT need to be in sequence for this to work, so you can files named 001, 002,075,110, and first press plays 001, 2nd press plays 002, 3rd press plays 075 and 4th press plays 110. This is nice, as the SOMO module would fall over with the next/previous button presses if the filenames were not in sequence.

ANOTHER EDIT: Not really having much luck with the serial command mode though. It starts playing a song, but always the wrong one. PLAY/PAUSE and STOP commands work, but asking for specific songs does not. I am wondering if we have all the relevant information? I will send an e-mail to MDFLY and see what they say about it. I can confirm that the speed is 4800 baud, and that the only information that seems to come back down the TXD line, is an echo of the command byte sent to the unit on the RXD line. The experimenting continues...
 
Last edited:

hippy

Technical Support
Staff member
What of the other chips ? If one of them is an MP3 stream to audio converter then the chip is probably a commonly available micro. If it is; counting legs and noting where power, crystal and reset connect may be enough to identify which.
 

Haku

Senior Member
Aw no fair, I was the one that told everyone about them and mine haven't even arrived yet :( but based on reading your initial results using them I did just order 3 more, whilst everyone was keeping an eye on their main store I was keeping an eye on their eBay listing :D

Even if selecting which track to play through serial commands isn't working properly, the fact it has 8 different button inputs for the first 8 tracks still gives you the ability to select a few tracks 'on demand' which is still very useful.
 

Grogster

Senior Member
Okey dokey - I have sorted out the serial command problems with the help of MDFLY.

The module DOES NOT read the filenames themselves, rather it reads the sector-pointer from the FAT entry for that filename, SO this means that if you have(as I do) a batch of test files named 001,005,0015,075,100,150,165,195,199 - then the 5th filename pointer in the FAT is to 100.mp3, and NOT 005.mp3. :D

Once you get your head around that, it works beautifully.
If you have a sequence of mp3's, and they are all sequentially numbered, then there is no problem.

Oh and Haku - Sorry your modules have not arrived yet, but beleive me - they are worth the wait, they sound fantastic for $10!!!! :)
 

hippy

Technical Support
Staff member
If you have a sequence of mp3's, and they are all sequentially numbered, then there is no problem.
But perhaps only when written one at a time to a freshly formatted SD card in ascending order.

If you have 001.mp3, 002.mp3 and 003.mp3, drag and drop as a collection to SD Card and they may be put in the FAT in order 002.mp3, 003.mp3 then 001.mp3.

Directory listings usually show files in sorted order which will often not be the order they are stored in FAT but they may be copied in FAT order or some other random order.
 

Haku

Senior Member
Oh that's great you sorted out the filename numbering & playback oddness, can't wait to receive them!

What does it do with non-mp3 files? I wonder because if you have a lot of files on there all called by numbers it's not like you can remember which is which so a small .txt file on it storing the names of the tracks would make things easier.
 

Grogster

Senior Member
Well, I thought I was winning, but I am not.
Worked OK with the first batch of files, but not the next.

In both cases, I formatted the SD card(in my camera), then copied the files one-by-one to the card, but now we still don't have correct file playback.

MDFLY suggest I format the card to FAT32, but Windoze flatly refuses to do it - actually, Windoze refuses to format ANY SD card in ANY format you choose, it just reports that "The format could not be completed."

Time for some Linux...

The Linux partition manager can format anything, so I will get out my copy of Puppy and format the card to FAT32 tomorrow and see what happens, but for tonight - after a whole day of trying to make this work - I have had enough. :mad:
 

hippy

Technical Support
Staff member
Format under Windows then use Properties to see how the card is formatted, it should be FAT16/32. Formatting in a camera doesn't always work because it may try avoiding trampling on other files already there, it may just create its own directory structure rather than format. Depends on camera.

Another issue in copying is how deleted FAT entries are used. Deleted entries may be used after other files are placed on card so later files added may appear in the earlier FAT positions. Thus 'freshly formatted' card is always the best place to start from.

Since XP ( possibly 2000 ), Windows has refused to format disks and cards to user requirements; you need to go back to 98SE, Linux or something else to do that. Some say FORMAT command line switches will do it, but I never had any luck.

As long as any text file is added last it should never be requested so shouldn't affect the player whether non-MP3 allowed or not.

Don't forget that this is a module intended to be embedded so the approach is to put what you want where you want on card, determining what you have on card is therefore known. I agree; it's nice to know what was put there.

It should be possible to write a PC application which remembers what files were put on card so the card can be rebuilt easily. A simple batch file copy would be a good first approach.
 

Haku

Senior Member
I tried formatting the two 1GB SD cards I got off eBay in two different machines, on my Win2k tower I could format it FAT/FAT32/NTFS and on my Eee900 running XP I could format it FAT/FAT32.

There's a slew of programs out there for organizing files on FAT drives numerically/alphabetically, they're still used today by people who want tracks to play back in the right order on cheapie mp3 players; http://www.murraymoffatt.com/software-problem-0010.html

Back when I got my iRiver H140 40gb mp3 player there was a lot of discussion of copying files in numerical/alphabetical order to reduce startup time, after formatting use this DOS command in the directory of the source files to do that; "xcopy * g: /S" where g: is the destination drive.

Post has finally arrived, but no modules :(
 

1968neil

Senior Member
In stock

Hi,
The module just arrived this morning, now it is available.

Thanks,
Regards

2010-10-05

--------------------------------------------------------------------------------

www.MDFLY.com

I emailed the supplier and yes they are back in stock !
Happy Days !

Neil
 

Grogster

Senior Member
Pardon my drunken post last night...

Will see if I can find time to format my SD card to FAT32 and run another test.

Not sure I understand WHY there are these problems with any device that uses FAT16 or FAT32. The whole idea of the filesystem, is so that the system(whatever that may be) can call up a file from the FAT and load it.

If you have to place files on the card one-by-one etc, then what is the point of FAT16/32?

To me, it just seems like jumping through these hoops to get filenames to work etc, is what the freakin' filesystem is supposed to do for you. In other words, you ask for 005.mp3, and the FAT knows where that file is in the scheme of things - why do you have to do all this other shuffling around?

Oh, and Haku - thanks for the link to the sorting software - I am reading that now.

But I digress...
 
Last edited:

hippy

Technical Support
Staff member
The limitation isn't within the FAT system itself but in the firmware of the MP3 payer; rather than search for a named file it uses whatever is in a particular numbered FAT entry.

The FAT system places no obligation or requirement on where in FAT a filename is placed and it's the responsibility of the system looking for a file to search the FAT to find files by name. Because the MP3 player doesn't play by the rulebook you have to jump through hoops to put the files in place where the MP3 player expects to find them.

Why the firmware doesn't search for named files I don't know, lack of space or it's the easy option probably, and, as always, you get what you pay for. It's also a fine example of how saving cost in one place can create cost and effort in another.
 

Chavaquiah

Senior Member
In other words, you ask for 005.mp3, and the FAT knows where that file is in the scheme of things - why do you have to do all this other shuffling around?
Because it does... not.

It knows that the first file in the system starts here, the next starts there and so on. Nearby, there are also some labels - of more use to the OS than anything else - that could be parsed to discover that the first file is known as "008.MP3", some other file is sometimes called "MYPWDS.TXT", etc.

Now, parsing filenames involves string manipulation (big scare with memory limited devices) and a more intimate knowledge of FAT versions. Doable. Not so cheap.

Of course, the real reason is so users can have more fun, micromanaging bits and bytes. :cool:
 
Top