Hello,
I'd like to get the current battery status on my Metro ESP32-S2 via CircuitPython. I've looked at an example for the Feather m0 express, but its ports are different to the Metro.
Where do I look to learn what port can measure the battery voltage or charge level?
Thank you very much for any help you're able to give me!
Which port on Metro ESP32-S2 measures battery?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- anthonyclarka2
- Posts: 5
- Joined: Sun Jan 02, 2022 12:49 pm
- rpiloverbd
- Posts: 198
- Joined: Mon Nov 29, 2021 8:13 am
Re: Which port on Metro ESP32-S2 measures battery?
It does not look like Metro https://learn.adafruit.com/adafruit-metro-esp32-s2 has a dedicated pin for battery voltage measurement like the A7 pin of Adafruit Feather M0 Express. That means you have to make your own voltage divider circuit and chose any pin between A0-A5 for voltage measurement just like you do with an Arduino UNO.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Which port on Metro ESP32-S2 measures battery?
There is a single breakout hole close to the JST connector for the battery. This is the center-tap of the voltage divider. You can run a jumper from that to any of the analog pins to measure the battery voltage.
- anthonyclarka2
- Posts: 5
- Joined: Sun Jan 02, 2022 12:49 pm
Re: Which port on Metro ESP32-S2 measures battery?
Thank you very much, I really appreciate both your help!
- anthonyclarka2
- Posts: 5
- Joined: Sun Jan 02, 2022 12:49 pm
Re: Which port on Metro ESP32-S2 measures battery?
Oops, one more quick question: Is that single breakout hole near the battery connector marked as "VDIV" on this page: https://learn.adafruit.com/adafruit-met ... s2/pinouts
Thank you very much, sorry to be a hassle.
EDIT: I connected it to A0 and am getting a good reading back. Awesome!
Thank you very much, sorry to be a hassle.
EDIT: I connected it to A0 and am getting a good reading back. Awesome!
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Which port on Metro ESP32-S2 measures battery?
Yup. VDIV stands for Voltage DIVider.
- rpiloverbd
- Posts: 198
- Joined: Mon Nov 29, 2021 8:13 am
Re: Which port on Metro ESP32-S2 measures battery?
Good to know that it is working. Best of luck.
Please be positive and constructive with your questions and comments.