logo elektroda
logo elektroda
X
logo elektroda

[Solved] ESP32 ADC and noise from VS1053 for audio spectrum analyser

faber 1032 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18359933
    faber
    Level 24  
    I am adding an audio equalizer in the ESP32 + VS1053 circuit. The audio signal from the VS1053 goes to the amplifier. I fed one channel (right) directly to the ADC on the ESP32 for signal analysis (FFT) and spectrum analyser display.
    Generally everything works reasonably ok but there is a lot of noise? And here is my question. Should the signal to the ADC be connected directly ? (I did not use any resistor). Voltage from VS1053 around 1.9V, from what I read ESP32 has 0 to 3.3V
  • ADVERTISEMENT
  • #2 18359967
    khoam
    Level 42  
    faber wrote:
    Generally everything works reasonably ok but there is a lot of noise?.
    .
    The ADC input on the ESP32 is quite sensitive to noise, which causes interference in its operation. The manufacturer recommends inserting an RC circuit plus possibly using multisampling.

    faber wrote:
    Voltage from VS1053 in the region of 1.9V, from what I have read the ESP32 has 0 to 3.3V
    .
    Above 1.8 - 2.0V (for an attenuation set to 6dB) the ADC characteristic becomes flat. This largely depends on the actual value of the internal reference voltage, which can vary from 1000mV to 1200mV, and should be 1100mV. This can be calibrated, but the procedure itself is somewhat complicated.
  • ADVERTISEMENT
  • #3 18360349
    faber
    Level 24  
    Indeed, I've done a bit of reading on the subject of v_ref and characteristics and it's not colourful. But I also came across advice that with ADC_ATTEN_DB_6 (halving the voltage) and using a 220k resistor plus a 0.1 uF capacitor is pretty good. And it looks pretty ok, I've applied and am testing, I can hardly see the noise, it's much better.
    I will organise sound samples and test thoroughly.
  • ADVERTISEMENT
  • #4 18360388
    khoam
    Level 42  
    faber wrote:
    with ADC_ATTEN_DB_6 (halving voltage reduction)
    .
    This is a 6dB input attenuation setting - in this case its operating range is 150 - 1750 mV with correction for the actual value of the internal reference voltage. If you are using the Arduino HAL on the ESP32, the default attenuation value (without setting with the analogSetAttenuation() or analogSetPinAttenuation() functions) is 11dB and the range is 150 - 2450 mV.
  • #5 18361654
    faber
    Level 24  
    ok, after many attempts I am left with a 220k resistor and a 0.1uF capacitor, with the ADC_ATTEN_DB_2_5 setting. The analyser works on 4+, the rest I can adjust with ranges.
    PS I measured the v_ref and in my case it is 1094mV, the default setting is as you already wrote 1100mV. This calibration requires changing the readout function everywhere it is used so I will give up. Thanks for your help
ADVERTISEMENT