-->
Page 1 of 1

ADC - How use internal VDD measure?

PostPosted: Mon Feb 08, 2016 6:33 am
by Rabis.49
Hi together,
I have a little bit trouble with the adc, because I try to use the adc for VDD measure. All examples that I found use a external voltage divider (with two resistor). Herehttp://nodemcu.readthedocs.org/en/dev/en/modules/adc/ I found the description for internal adc use but it doesn't work. What could be wrong?
I'm not so familiar to do this:
The default setting in the NodeMCU firmware can be controlled via user_config.h at compile time, by defining one of ESP_INIT_DATA_ENABLE_READVDD33, ESP_INIT_DATA_ENABLE_READADC or ESP_INIT_DATA_FIXED_VDD33_VALUE. To change the setting at a later date, use Espressif's flash download tool to create a new init data block.

Is anyone so clever for solve this problem. However, many thanks for reading, interest and help!
Regards
Rabis49

Re: ADC - How use internal VDD measure?

PostPosted: Sat Feb 13, 2016 10:15 am
by grhhm
In older versions of ADC module it was limitation: the adc.readvdd33() function should be called when WIFI is disconnected only.

Practically, when it works it returns 4096 (12 bits asserted) value. It didn't measure real system voltage. My last try was about month ago. Maybe it is fixed already. I use the regular ADC input with 2 resistors, as you mentioned. This works independently of WIFI status.

Re: ADC - How use internal VDD measure?

PostPosted: Sun Feb 14, 2016 12:01 pm
by Rabis.49
Hi,
thanks for this fundamental answer. I could believe that - what a mistake (also in documentation).
Well, so I try the "old fashion" method with resistors - it's a pity.

Kind regards
Rabis49