ADC pins accurancy



  • Hi all,
    i have to read a 24v - 4-20ma output sensor with the board. I have attached an ADC pin to a 4-20ma -> 0-3V volts converter output.

    The output of the converter is very stable, measured by hands with my multimeter, but ADC readings are very unstable, for reference with an output value of 1150mV i have readings between 1000 and 1200mV.

    Any suggestion?



  • ADC wird ESP32 is quite unstable, just google "ESP32 ADC accuracy".

    You can however fix it quite a bit, with

    gpio.setAnalogAttenuation(gpio.ANALOG_ATTEN_DB_0)

    However, you can then only read analog values up to 1,1V.

    More info about this: https://www.neonious-iot.com/lowjs/lowjs_for_esp32/module-gpio.html



  • The documentation says:

    Analog measurements up to 1.5 V.
    For use with setAnalogAttenuation. Only available if not on neonious one, as neonious one always allows up to 3.3 V at industry-standard precision (uses LPC822 for ADC, not the ESP32).
    

    I have the problem with neonious-one, not a generic ESP32 board, this flag seems not applicable.



  • Oh. In my tests, the LPC822 pins always were stable.

    So... What I would do...

    First, a multimeter always averages over quite some time. Does not seem so, but that is the case. So you will have to check with an oscilloscope. Then you see the signal and I'd try to understand why the signal is way it is. Then you can experiment easily with caps and more.



  • Unfortunately i have not an oscilloscope, i't time to get one! I will let you known ... thank you.


Log in to reply