Using ADC on ESP8266-1 to get 'system voltage' #10761
Unanswered
Fisherman48
asked this question in
ESP8266
Replies: 1 comment 11 replies
-
AFAIK, the ESP8266 has just one 10 bit ADC with external input, with a voltage range of 0..1V. ADC(1) is for the internal Vdd voltage. It seems that one is scaled up internally to a internal 16 bit range. The ratio you get between read.u16() and read() is always 64 or 2**6. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
Moving from lua to micropython I load fw 19.1 to a handfull of old esp8266-1 1Mb and trying out my new environment using Thonny.
I want to monitor the 'system voltage' using diff power sources.
When looking at machine.ADC( ) , it accepts 0 and 1 for parameter and I get values I cant interprete.
ADC(1) looks like measuring on the absent /open ADC pin (all 16 bit ones) on the 8266-1 device - but the values from ADC(0) are no sense for me.
at 3.1 V - gives 3.1V/40=0.0775
2367 38
2367 40
2431 40
2431 41
2431 41
4194176 65535
4194176 65535
4194176 65535
4194176 65535
4194176 65535
at 3.7 V - 3.7V/120=0.031
7423 120
6463 104
7359 120
7167 116
7167 116
4194176 65535
4194176 65535
4194176 65535
4194176 65535
4194176 65535
Br /Stefan in the Archipelago of Stockholm
Beta Was this translation helpful? Give feedback.
All reactions