-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Analog input voltage can be 3.3V #5020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
According to this tutorial and my personal test with my Amica, 1.0V delivers 320 and 3.3V delivers 1024 at 10-bit resolution. I guess 3.3V is possible.
The voltage range that can be applied to the ESP8266 ADC is 0-1.0V. If you go above 1V you will fry the electronics. *many users don't know about, or at least don't know the implications of, this internal voltage divider, and apply a voltage to the board pin from another external voltage divider. This interacts with the board divider and can produce apparently wrong readings from the ADC. |
Can we write it in a way that people need to be careful when trying to read ADC? I was looking around but this issue isn't addressed at all and I was confused that my readings at 1.0V are 320. As a safe method, one can start reading 1.0V to make sure that they don't fry with 3.3V. If the readings are 1/3 of 1024 -> then they can be sure about 3.3V. |
Added warnings.
Or people could have the sense to look at the schematic of the board
they're using...
…On Thu, 9 Aug 2018, 14:41 SarenT, ***@***.***> wrote:
Can we write it in a way that people need to be careful when trying to
read ADC? I was looking around but this issue isn't addressed at all and I
was confused that my readings at 1.0V are 320. As a safe method, one can
start reading 1.0V to make sure that they don't fry with 3.3V. If the
readings are 1/3 of 1024 -> then they can be sure about 3.3V.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5020 (comment)>, or mute
the thread
<https://github.com./notifications/unsubscribe-auth/ALP8xQky-lcbIgOrEolpKuLmg0eDzAFEks5uPC3kgaJpZM4V1Bxj>
.
|
In my case, I didn't find the schematics and many new electronic hobbyists might need further explanation/warnings to avoid fatal mistakes. |
Yes, I agree - RoboIndia don't seem to provide much information about
anything.
You could trace the track from the A0 pin but that really shouldn't be
necessary.
The problem with your suggested method is 'how many people have a 1V
source?'
I think that something about "1V on the actual ESP8266 - breakout boards
MAY implement voltage dividers" should be sufficient.
On 9 Aug 2018 16:06, "SarenT" <[email protected]> wrote:
In my case, I didn't find the schematics and many new electronic hobbyists
might need further explanation/warnings to avoid fatal mistakes.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5020 (comment)>, or mute
the thread
<https://github.com./notifications/unsubscribe-auth/ALP8xQ7LDlw69hjVmzFjheDuOff6ZWZcks5uPEHQgaJpZM4V1Bxj>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SarenT go ahead and rephrase as discussed.
The suggestion for unknown boards to start with 1V is actually not too bad. Users won't have a 1V power source, but they should have a pot. They can power it with 3.3V and measure the midpoint output with a voltmeter to make sure it's below 1V, then connect it to the ADC pin. If the ADC reading is of the order of 1000, then there's no divider on the board, and max voltage is 1V.
OTOH, if the reading is about 1/3 of 1024, then the divider is there and max voltage is 3.3V.
doc/reference.rst
Outdated
@@ -42,7 +42,7 @@ either to read voltage at ADC pin, or to read module supply voltage | |||
(VCC). | |||
|
|||
To read external voltage applied to ADC pin, use ``analogRead(A0)``. | |||
Input voltage range is 0 — 1.0V. | |||
Input voltage range is 0 — 1.0V or 0 — 3.3V. | |||
|
|||
To read VCC voltage, use ``ESP.getVcc()`` and ADC pin must be kept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There also should be mentioned, that many boards (it means basicaly all boards which are not bare esp) has voltage divedr in theirs design, so ESP.getVcc() will produce totaly wrong results - possible resistor connected to A0 pin has to be removed before using this function
requested changes
According to this tutorial and my personal test with my Amica, 1.0V delivers 320 and 3.3V delivers 1024 at 10-bit resolution. I guess 3.3V is possible.