-->
Page 9 of 9

Re: ADC ??

PostPosted: Fri Feb 12, 2016 5:20 pm
by martinayotte
bgowland wrote:Tests with the ADC and the on-board LDR show readings over 4000 (decimal) with a very bright light shining on the LDR. That indicates 14-bit as mentioned by others.

Unfortunately, this 14bits is absolutely impossible ! (and I've never saw any posts about that)
The Espressif ESP8266 datasheet clearly states that ADC is 10bits, range 0-1023 from 0-1V input.

The fact that "reading over 4000" is mentioned by someone only indicate that some firmware is probably doing multiplication of the 10bits real reading.

Re: ADC ??

PostPosted: Fri Feb 12, 2016 5:44 pm
by DaniloFix
martinayotte wrote:ESP8266 itself is really 0-1V for 0-1023 data.
For example, on Wemos D1 Mini, there is already a voltage divider, so it is already handling 0-3V and lower it to 0-1V accordingly, so maybe NodeMCU is actually doing the same.


I think you are right about this - I found 2 resistors located next to pin A0 (ADC) on the board. Haven't checked with my multimeter, but it's the only resistors in that area, so most likely a voltage divider for the ADC.

Good to know :-)
Thanks.

Re: ADC ??

PostPosted: Tue Mar 15, 2016 6:44 pm
by kostbill
Hi,

I am constantly reading the value 165 (I am using FreeRTOS, system_adc_read()), which is close to the value I was expecting it to be, but when I change the input, the value doesn't change.

I don't want to use an AVR just for the analog value.

Thanks.

Re: ADC ??

PostPosted: Tue Mar 22, 2016 5:26 am
by NDE
i'm going round and round in circles on trying to read the internal Vdd using the SDK's

Note:
• system_get_vdd33 can only be called when RF is enabled.
• system_get_vdd33 can only be called when TOUT pin is suspended
• The 107th byte in esp_init_data_default.bin(0〜~127byte)is named as “vdd33_const“ , when TOUT pin is suspended vdd33_const must be set as 0xFF, that is 255

what i'd like to setup is a routine that took an internal/external flag and set the 107th byte as appropriate and returned the reading as a float.

any pointers out there as how to set the 107th byte or has anyone already got a routine that does something like this to save me having to reinvent the wheel.

thanks neil