ADC Accuracy
-
I'm trying to measure input voltage using a voltage divider.
When measuring the voltage on the ADC pin with a multimeter, I get 0.8V. According to the docs, the input range is 0-1.1V, right? In that case this should give me a 12bit ADC reading of 2979, but the actual reading is 3231. That's off by 0.06V (which corresponds to 0.3V when measuring higher voltages using an 1:5 voltage divider).
This is how I'm initializing the ADC:
pin_adc = adc.channel(pin='P20')Am I doing something wrong?
-
@dbrgn No. The ADC is simply bad. And the real range is something like .07V - 1.05V, but slightly varying between device, some non-linearity and a huge amount of noise. See also the discussion in the espressif forum , e.g. here:
https://esp32.com/viewtopic.php?f=19&t=2881&p=13739&hilit=ADC+linear#p13739
If you need as precise ADC, use an external ADC, e.g. from analog devices, like ADS1115 (I2C) or ADS1118 (SPI). -
Ouch. That's probably something that should be documented by Pycom. Thanks for the link!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login