Go Down

Topic: Using analog input on NodeMCU ESP8266 (Read 49625 times) previous topic - next topic

PieterP

From the schematic in reply #4:
1 V * (100 kΩ + 220 kΩ) / 100 kΩ = 3.2 V

The maximum value you can get is 1023 (0x3FF), not 1024. However, you're right, the divisor is debatable. For example, the ATmega328P datasheet tells you to divide by 1024. I don't know if there's anything in the ESP8266 datasheet about it.

DaleSchultz

thanks Pieter, and yes, I found a very long thread on the 1023/1024 question!

cossoft

As just some addition numbers:-

HiLetgo brand version from Amazon, with an AI-THINKER device.
3.0 volts on A0 reads as 991 units.  
That leads to a max. 1023 reading of 3.1V.


How can this be so variable?  It doesn't make sense at all. If the ADC divider resistors are so crap, surely all the other bits would be too and the thing just wouldn't work.  The Uno ADC is pretty reliable.

Confused. Again  :smiley-confuse:

Go Up