HUZZAH32 Battery Pin Strange Values

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
binux
Posts: 17
Joined: Tue Jul 25, 2017 10:35 am

HUZZAH32 Battery Pin Strange Values

Post by binux » Thu Aug 31, 2017 11:20 am

Hello everyone,

I'm currently trying to get my HUZZAH32 to return me the current voltage of my connected battery.

As you see in the documentation from adafruit:
https://learn.adafruit.com/adafruit-huz ... /esp32-faq
GPIO35 is connected internally with a 100k ohms voltage divider to expose the current voltage.
(And it's properly connected - also on the board)

Now when I try to read out the value via ADC on pin 35 I get 4095 which is technically impossible. I measured the actual hardware voltage at pin 35 which was around 2.04V and is valid.

Now my question is, is there a bug inside the esp32 branch of micropython? Or did I simply forget to set something?

Thanks.

binux
Posts: 17
Joined: Tue Jul 25, 2017 10:35 am

Re: HUZZAH32 Battery Pin Strange Values

Post by binux » Fri Sep 01, 2017 8:56 am

Actually the issue was a wrong attenuation value at at the adc pin. It is defaulted from 0..1.1v.

See the github issue for more information: https://github.com/micropython/micropyt ... issues/173

Post Reply