Page 1 of 1

Reading VCC level

Posted: Sun May 15, 2016 5:43 am
by askvictor
ESP8266 has the ability to read the Vcc voltage using the internal ADC. Looking at the source, this is enabled in micropython by reading ADC channel 1 (instead of channel 0 for the 'real' ADC). However, this seems to require defining ESP_INIT_DATA_ENABLE_READVDD33 in user_config.h prior to compiling the firmware (source: http://nodemcu.readthedocs.io/en/dev/en ... creadvdd33 ). I've tried doing this and flashing the re-compiled firmware, but the firmware files are identical to not having set this, and reading ADC(1) always gives 65535. Any ideas?

Re: Reading VCC level

Posted: Sun May 15, 2016 7:47 am
by jwissing
I came across this topic when playing with LUA and NodeMCU.
There was a discussion in the Espressif BBS http://bbs.espressif.com/viewtopic.php? ... dd33#p2922.
Perhaps this is helpful.

Re: Reading VCC level

Posted: Mon May 16, 2016 12:07 pm
by kfricke
In that referenced topic Espressif_Faye made an interesting addition to the dependencies to make the internal VCC reading work: "RF is enabled"

I do not want to hijack the topic, so i made up another one for my Huzzah Feather voltage monitoring issues.