I am a hobbyist. Doing some experiments with sound quality. I'll pin point my problem and requirements.
Problem statement :I want to play audio files ( recorded in human voice, not music files, just some plain human speech files)
I have tried : a project with an Arduino microcontroller and MicroSD card but audio quality was not at all good from the link below https://www.instructables.com/id/Audio-Player-Using-Arduino-With-Micro-SD-Card/ https://circuitdigest.com/microcontroller-projects/arduino-audio-music-player It just used an arduino UNO board, microSD using SPI, a speaker and an LM386 Audio Amplifier.
I read about the details and got to know that I need a DAC for better quality (as PWM cannot serve the purpose), and a speaker also. But there are a number of things available and I dont understand which one to buy and start a project.
Can you share the details of some micro-controller board with a DAC which suffice my purpose, memory to store audio files (or I can use a microSD card device), and a speaker project which I can follow and make one. I am looking for a board based solution, after getting some results, I can go for separate micro-controller and DAC.
Thanks in advance.
-
For what I read about it (no references readily available), it's mostly better to have a separate DAC since internal DACs are mostly 10 or 12 bits, for decent audio quality you need at least two channels of 16 bit DAC.Michel Keijzers– Michel Keijzers02/27/2019 11:58:54Commented Feb 27, 2019 at 11:58
-
Hi and welcome to the Arduino SE community. It is good to see the effort you put into your question. I hope to see you more around this site.sa_leinad– sa_leinad02/27/2019 15:25:40Commented Feb 27, 2019 at 15:25
-
2There are boards that will read the SD, decode the audio, and amplify it, all-in-one. You micro-controller only has to "tell" the board to play sound file 1, 2, 3, or whatever number. For example the DFPlayer (or one of it's clones on eBay).Gerben– Gerben02/27/2019 16:07:25Commented Feb 27, 2019 at 16:07
-
I really liked the DFPlayer and it seems that its a readymade solution for my problem. Can I find its circuit diagram and ICs used in this so that I can implement it in parts on breadboard.muphy– muphy03/04/2019 18:52:42Commented Mar 4, 2019 at 18:52
-
You can buy a cheap MP3 player and use Arduino to "press" its buttons, works the best assuming the UI logic of the thing isn't too convoluted.Avamander– Avamander03/18/2019 00:25:28Commented Mar 18, 2019 at 0:25
2 Answers 2
Here is the schematic and breadboard layout I was using. Coding can be found in this Arduino.cc thread
https://forum.arduino.cc/index.php?topic=180769.60
One would think that single channel for voice would be enough. Remember the old Sprint commercials? "So quiet you can hear a pin drop", that was only single channel. 12 bits at 16 MHz for max 8 KHz bandwidth would be good. Per Wikipedia "In telephony, the usable voice frequency band ranges from approximately 300 Hz to 3400 Hz. It is for this reason that the ultra low frequency band of the electromagnetic spectrum between 300 and 3000 Hz is also referred to as voice frequency, being the electromagnetic energy that represents acoustic energy at baseband. The bandwidth allocated for a single voice-frequency transmission channel is usually 4 kHz, including guard bands, allowing a sampling rate of 8 kHz to be used as the basis of the pulse code modulation system used for the digital PSTN. "
I think several folks, such as Adafruit.com, DFRobot.com, and others make cards with DAC outputs. Or you could get a DAC only card from Gravitech.us
I started a project at Arduino.cc to sample 16 bits at 44.1KHz, store to SD card, then play it back later. I used external SPI ADC and DAC, and member fatlib16 there helped me to code it. You can find it by searching "sample, record, playback later" and it should pull it up.
-
Thank you for the answer and the details. I am thinking that I'll record audio with 16 bits depth at 44.1KHz and do some experiments with adafruit for sound quality and store in SD card. Arduino already has SPI to interact with SD card module. Can you please tell me that which DAC you have used and which speaker you have used.muphy– muphy02/28/2019 05:50:16Commented Feb 28, 2019 at 5:50
-
1Digitizing with ADC AD7680, sending it to DAC AD5662-1. Speaker, I was using self-powered PC speakers for playback. See answer for schematic.CrossRoads– CrossRoads02/28/2019 11:33:45Commented Feb 28, 2019 at 11:33