Reading VCC level

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
askvictor
Posts: 23
Joined: Tue Mar 22, 2016 9:08 pm

Reading VCC level

Post by askvictor » Sun May 15, 2016 5:43 am

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?

User avatar
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

Re: Reading VCC level

Post by jwissing » Sun May 15, 2016 7:47 am

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.

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Reading VCC level

Post by kfricke » Mon May 16, 2016 12:07 pm

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.

Post Reply