Go Down

Topic: Playing WAV on Mega 2560 (Read 1 time) previous topic - next topic

noob314

Dec 08, 2019, 11:29 pm Last Edit: Dec 08, 2019, 11:43 pm by noob314
I have zero experience creating sound with MCU.

What would be required minimum to play a WAV file from SD card? It doesn't have to be quality, perhaps only enough clear for voice (8bit, 8000, mono).

What I'm planing is to add voice feature to my navigation project, which will be able to play some short samples, periodically when needed, as "Turn left" and similar.

I'm planing to add headphone speaker, ear plug speaker or some spare small speaker used in mobile phones.

In brief theory I read here and there, I'm aware only that can be used PWM or external DAC (I have some 8bit and 16bit and enough free pins on 2560) with small speaker driver (amplifier), however never actually tried any so far, nor I'm certain what is the most suitable.

Requirement is as well to maximally save power.



Power_Broker

The easiest thing to do is to play the files using a DFPlayerMini module. You can control it using this library (also installable through the Arduino IDE's Libraries Manager - search "DFPlayerMini_Fast").



"The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind."
   - Nikola Tesla

Go Up