Shop OBEX P1 Docs P2 Docs Learn Events
Erco, here's the cheap MP3 modules! — Parallax Forums

Erco, here's the cheap MP3 modules!

John A. ZoidbergJohn A. Zoidberg Posts: 514
edited 2015-06-17 17:18 in General Discussion
I've seen these things already - they are cheaper than the traditional VS1011, and they used the traditional UART interface instead of the SPI.

http://www.ebay.com/itm/UART-Control-Serial-MP3-Music-Player-Module-For-Arduino-AVR-ARM-PIC-/311133945527?pt=LH_DefaultDomain_0&hash=item4871073eb7

Pop in a microcontroller, the whole module does it for you! You only select which file to play and et cetera. SD-Card functions and MP3 decoding are all done inside the module.

Want a talking alarm clock? No need SD-card, just "upload" MP3 files inside, no need programmer too!

http://www.ebay.com/itm/BY8301-16P-SSOP2-MP3-Aduio-Serial-Voice-SPI-FLASH-Module-3W-Amplifier-Micro-USB-/271684522808?pt=LH_DefaultDomain_0&hash=item3f41a8d338

However, the product page isn't all clear - is it the 16 megabyte or 128 megabyte flash? Looks like you can squeeze in a few low-res MP3 inside for some talking applications etc. :)

Comments

  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2015-06-16 08:57
    Found a site with relative documents in a zip file
    http://www.da-share.com/misc/catalex-mp3-board-yx5300-chip/

    zip file: http://www.da-share.com/files/datasheets/Catalex_YX5300_Docs.zip

    Also forum discussion here http://www.thebackshed.com/forum/forum_posts.asp?TID=7319 - talks about issue playing small files


    Docs say micro sd <= 2gb and micro sdhc <= 32gb
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-06-16 09:30
    John, Nice links.

    I've never found the generic MP3 player all that useful in robotics, other than a robot that plays random music and sounds as it rolls along. Though pumping data into a VS1011 can be taxing (the Propeller can do it and still have headroom for other tasks), it's really what you need if you want to synchronize the sound playback with a robot function. Since you're managing the data bytes, you know exactly where you are in the sound clip, and your programming can use clever timing to synchronize those with events.

    I suppose another alternative is to play monaural sound, and use the other side for a data track. I've never done that, but I imagine it's within the realm of possibility.

    I'd be interested in an imported version of this (doesn't have to be a shield, just SPI from Flash to feed the data): https://www.sparkfun.com/products/10628

    I don't troll eBay very much these days. Anything decent along those lines out there?
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2015-06-16 12:19
    Just came across this nifty sound board - NO MCU needed...

    https://learn.adafruit.com/adafruit-audio-fx-sound-board
    Would you like to add audio/sound effects to your next project, without an Arduino+Shield? Or maybe you don't even know how to use microcontrollers, you just want to make a sound play whenever you press a button. What about something that has to be small and portable? You are probably feeling a little frustrated: it's been very hard to find a simple, low cost audio effects trigger that is easy to use and does not require any programming
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-06-16 12:38
    I think you meant to write "no MCU needed." This one looks to be an American version of the eBay offerings, with the exception it's the cheaper VLSI chip because it lacks MP3 playback (you have to wonder how many of the imported boards pay the MP3 royalty).

    Piping MP3 (or WAV or OGG) data to a VLSI or similar chip isn't all that hard. SPI is rudimentary, and all these chips have a "gimee more data" pin that tells the MCU when to send out a burst again. There are SPI and SD libraries that do the heavy lifting. It's prerty much just a question of an MCU waiting for the Ready pin to change to send another burst.

    On the Arduino the processor is occupied at least 50% of the time processing this data, depending on the data rate. You want nice sound, of course, so you encode at a bitrate that gives you the quality you need. The higher you go, the more data that has to be shuttled from MCU to sound chip, and the less time the Arduino has for anything else.

    Enter the Propeller. Just use one or two cogs to send data to the sound board, and you still have cogs left over for checking button presses, pinging the odd ultrasonic sensor, or flashing LEDs. Most of the MCU-driven MP3 boards are shields, which just add to the size. One of these 24-pin form factors would be ideal.
  • ercoerco Posts: 20,256
    edited 2015-06-16 15:46
    Great find, John! Thanks for the shoutout, I ordered one to try.

    Speaking of sound projects, I just dropped off a toy model to a client an hour ago. It needed a sound chip. I was about to build a chiprecord board and amplifier when I found a $6 toy that had a suitable sound in it. I figured I still needed an amplifier for the volume I needed, which is a pain, cuz then I need another micro pin to turn the amp on & off. Much to my surprise, the toy sound chip had plenty of volume once I put a decent sized speaker on it. The speaker in the toy was only 3/4" diameter yet put out surprising sound.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-06-16 16:32
    erco wrote: »
    I just dropped off a toy model to a client an hour ago.

    Could I be you? I mean, the highlight of my day is taking my dog to the McDonald's drive-thru and sharing a breakfast burrito with her.
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2015-06-16 16:33
    I've always been impressed with the simplicity of playing WAV files with a Propeller to add custom sound to any project. It was a piece of cake to add sound clips from a CD to the Time Machine prop I made for a Christmas Play a couple years ago using the Propeller. Used Audacity to convert CDA files to WAV, copied to SD, called out using Kye's WAV KISS Player. From there, just initialize and then call out the WAV file to play:
    variables:
        lPin = 26       ' audio out pins
        rPin = 27
    
        doPin = 22      ' SD card pins
        clkPin = 23
        diPin = 24
        csPin = 25
    
        wpPin = -1
        cdPin = -1
    
    
    object used:
    
      wav   : "V2-WAV_DACEngine.spin"
    
    
    Lines of code required to use:
    
    'WAV Player Initilization 
       wav.begin(lPin, rPin, doPin, clkPin, diPin, csPin, wpPin, cdPin)
    
    ' Play WAV file 
       wav.play(string("SFX.wav"))    
    

    The EFX-TEK AP16+ is a good example of making a WAV player with triggers and custom control with the Propeller: http://www.efx-tek.com/topics/ap-16.html

    I liked this one from Sparkfun because of the mixing capabilites: https://www.sparkfun.com/products/13660

    Not sure how easy it would be to have the prop mix more than one WAV file into a single output. I would think a few WAV files could be blended reasonably easy. Just start/blend another WAV object right?
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-06-16 20:23
    Have you worked out a way to prevent the "pop" when the DAC is first opened? Or is that mostly a hardware thing? It was pretty loud on the Prop-BOE.

    Jon shared some code he developed (I think for the EFX-TEK) but it didn't agree with the library I was using at the time. I'm not enough of a PASM guy to know how to merge the two.

    Anyway, yes, WAVs are good, too. But for some reason people have this aversion to the format, even though it's clean and crisp and clear (we have SD cards that arte plenty big to hold the files). All their stuff is MP3.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-06-16 21:45
    Has anyone hacked cell phone speakers? I just got a Samsung Galaxy and the sound coming out of it is quite good for the size.
  • John A. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2015-06-17 07:45
    erco wrote: »
    Great find, John! Thanks for the shoutout, I ordered one to try.

    Speaking of sound projects, I just dropped off a toy model to a client an hour ago. It needed a sound chip. I was about to build a chiprecord board and amplifier when I found a $6 toy that had a suitable sound in it. I figured I still needed an amplifier for the volume I needed, which is a pain, cuz then I need another micro pin to turn the amp on & off. Much to my surprise, the toy sound chip had plenty of volume once I put a decent sized speaker on it. The speaker in the toy was only 3/4" diameter yet put out surprising sound.

    No problem man! Glad you liked these as well!

    Some years back I built an SD-Card Wave file player, using a cheap DIP format PIC32. Worked pretty well.

    But at a cheaper price I can replace all that with that module. And less time worrying about the FAT32 drivers for the microcontroller. :)
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2015-06-17 11:14
    Have you worked out a way to prevent the "pop" when the DAC is first opened? Or is that mostly a hardware thing? It was pretty loud on the Prop-BOE.

    I never experienced any pop and I don't recall if it was because I used updated code or if I got lucky. My setup was a Prop-BOE with the line out connected to a set of powered computer speakers and subwoofer. It was paired with a digital I/O board to control some LED strips and muffin fans. My code zip is attached along with a couple pics.

    More details of the project are on this thread: http://forums.parallax.com/showthread.php/152388
    Here are two YouTube videos of the project and one has good audio of the keypad entry sequence. The other video has a lot of background noise from the other people and kids that were in the sanctuary when I was filming. I had intended on re-shooting video by myself after the play, but didn't get a chance. I still need to put the entire project write up onto the forums.

    This is the Time machine jumping from 2013 to 1978
    http://www.youtube.com/watch?v=QYMjnMPeGqU

    This is a keypad entry sequence where the month and day are entered, but no year (thus causing part of the problem of the time machine jumping to random years)
    http://www.youtube.com/watch?v=EyhqAzLbkiE

    attachment.php?attachmentid=114495&d=1434564300
  • ercoerco Posts: 20,256
    edited 2015-06-17 12:02
    I also ordered some of these cheapo MP3 players to hack. TF card also required. The pink ones (only) are 99 cents, free ship. :)

    http://www.ebay.com/itm/191583556799

    $_57.JPG
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-06-17 17:18
    The "pop" is apparently when the DAC opens at a non-zero level, which is likely because it was previously floating. Sometimes it's noticeable, sometimes it's not.

    I do now remember I did this with a pre-release version of the Prop-BOE. I don't recall revisiting WAV file playing with the release version of the board that I now have.
Sign In or Register to comment.