Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Dsbaha
#25497
martinayotte wrote:I don't think the ADC is capable/fast enough to handle real-time audio.
You maybe should look to add external ADC/DAC board with audio compression.


That was my backup plan. I wanted to keep the component counts down to a minimum.

I've been poking around the source code of esp8266web (from pvvx) and it seems to me that it may be do-able. There is a UDP WAVE function on it. Anyone know what software program can interpret the UDP WAVE output?

If I can get away w/ 8khz sample, I'll be more than happy.

Once again, thanks everyone for the replies! I really appreciate it. I'm still learning, and all the replies have been helpful.
User avatar
By Dsbaha
#25737 Just wanted to post an update;

I've made a voltage divider with the following values;
R1 = 10k
R2 = 4.3k

So, when the microphone outputs VCC/2 (1.6 volts) going through the voltage divider, the ADC sees 0.5v (which is the half way mark).

So, now I'm getting a reading of 512 of for silent. I originally thought I had to get a reading of 0 for silent, but I was mistaken. I need to get both sides of the 0 for PCM to work.

I've been reviewing ESP8266WEB from PVVX located at https://github.com/pvvx/esp8266web and I'm going to try and modify the wdrv.c and try to include it in my project.

Thanks everyone for your help!
User avatar
By martinayotte
#25740 As previously stated, if VDD/2 is your zero crossing for audio signal, and since you don't subtract it in hardware using an OpAmp, it is normal that you get 512 for silence.
But having a second thought, you don't need to subtract it in hardware, especially that it is not Audio Level like I thought, simply do the subtraction in software... ;)

Now, the challenge ! do you figure out the fastest sampling rate you can achieve ?
Are you able to reach the 8k samples ?