ESP8266 ADC pin only works with 0-1V #50
-
I'm using a pair of AA batteries and a step up/boost to get the 2.6V of my rechargeable NiMH batteries up to 3.3V. When I tried plugging the battery+ terminal directly to the single ADC pin on the microcontroller, the whole program simply stopped working. After a bit of research I discovered that the ESP can only do a maximum of 1V on the ADC pin. So I've taken the approach of using a voltage divider to bring the voltage down to 1V. With this set up it so far appears to be working (though it's reported my battery as being at 100% the whole time, I'm leaving it running to see if it actually registers any battery drain). My question is this: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi Dan, your assumption on the library documentation is right in regards to the assumptio the ADC accepts the same voltage as Your voltage divider is appropriate and your Thanks for using this library! |
Beta Was this translation helpful? Give feedback.
Hi Dan, your assumption on the library documentation is right in regards to the assumptio the ADC accepts the same voltage as
VCC
pin and, to my knowledge, the ESP approach is quite unique as it doesn't allow to measure the board pins output without a voltage divider.I've run some tests myself using an ESP32 board in order to confirm the library works also under these uncommon conditions and I haven't found the need to change anything.
Your voltage divider is appropriate and your
0,93 V
figure is also correct so I assume you should be able to see the battery getting drained and being reported by the library: feel free to post again if you encounter any issue or to close this discussion i…