1

Is there a way to use the atmega 32u4 breakout board to make a mp3 player without the mp3 shield?

atmega 32u4 breakout from adafruit

Gerben
  • 11,286
  • 3
  • 20
  • 34
  • 2
    I don't think it has enough CPU power to decompress mp3. I think wav-files playback is possible. – Gerben May 23 '15 at 12:22

1 Answers1

1

You don't.

A basic ATmega lacks the computational (and perhaps memory also) resources for mp3 decoding. And even if you do decode to a linear PCM format, you do not have a good way to output it.

You can playback linear PCM data by pulse width modulating a pin, but the limited clock rate will result in limited resolution, and thus poor fidelity. You will also end up with a low sample rate, making it hard to avoid audible artifacts.

The situation can actually be somewhat better with an ATtiny85 - still no MP3 decoding of course, but you can clock the counter/time block at a higher rate and so playback PWM audio with higher fidelity, provided you are willing to tolerate the inaccuracy of the onboard clock oscillator that may shift your audio frequencies by a small amount.

If you want to do MP3, you will need either a more powerful processor (often no more expensive than the one you have, and typically cheaper as a module than anything "-duino"), or else a dedicated function chip to act as a coprocessor for that purpose.

Chris Stratton
  • 5,390
  • 19
  • 40
  • The quality of most MP3 is so bad to begin with. Do you have any empirical data as to how much worse it will be? Are the on board clock oscillations even detectable by a human ear? –  Jul 09 '15 at 22:11