Page 1 of 3
ADC on A0 voltage range and number of bits
Posted:
Sun Jun 26, 2016 12:03 pm
by lotus49
I have read that the ADC on the ESP8266 has an input range of 0V-1V. I have also read that it is 0V-Vcc. Which is it?
Is it a 10 bit (i.e. 0-1023) ADC?
Re: ADC on A0 voltage range and number of bits
Posted:
Sun Jun 26, 2016 12:12 pm
by lotus49
Having just read an article on this subject, I noticed in the comments that someone said that the ESP12 has an internal voltage divider to convert 3.3V to 1V so I should state what I am using.
I am using a NodeMCU V3, which I believe is based on an ESP-12E.
BTW Is it not possible to edit posts on this forum?
Re: ADC on A0 voltage range and number of bits
Posted:
Sun Jun 26, 2016 12:42 pm
by martinayotte
The ADC is effectively 0-1.0V on 10bits.
It can be used to read from A0 or internal VCC (with internal divider), but it can not do both at the same time, because for reading the VCC, the A0 must be left floating. Also, the mecanism to switch between both mode is done by setting a byte in the firmware and it is the internal bootloader that detect that byte, it can be switched again during application execution.
BTW, this is true for all the ESP8266.
(For your question about editing post, Yes, but only your own posts)
Re: ADC on A0 voltage range and number of bits
Posted:
Sun Jun 26, 2016 1:35 pm
by lotus49
Thank you, that was very helpful as ever and explains why I had read two different things.
I don't know how I missed the option to edit posts. If it's only available after you have posted so many times that would explain it but otherwise, I must have been half asleep when I looked for it and didn't find it.