Which port on Metro ESP32-S2 measures battery?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
anthonyclarka2
 
Posts: 5
Joined: Sun Jan 02, 2022 12:49 pm

Which port on Metro ESP32-S2 measures battery?

Post by anthonyclarka2 »

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!

User avatar
rpiloverbd
 
Posts: 198
Joined: Mon Nov 29, 2021 8:13 am

Re: Which port on Metro ESP32-S2 measures battery?

Post by rpiloverbd »

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.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Which port on Metro ESP32-S2 measures battery?

Post by adafruit_support_bill »

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.

User avatar
anthonyclarka2
 
Posts: 5
Joined: Sun Jan 02, 2022 12:49 pm

Re: Which port on Metro ESP32-S2 measures battery?

Post by anthonyclarka2 »

Thank you very much, I really appreciate both your help!

User avatar
anthonyclarka2
 
Posts: 5
Joined: Sun Jan 02, 2022 12:49 pm

Re: Which port on Metro ESP32-S2 measures battery?

Post by anthonyclarka2 »

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!

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Which port on Metro ESP32-S2 measures battery?

Post by adafruit_support_bill »

Yup. VDIV stands for Voltage DIVider.

User avatar
rpiloverbd
 
Posts: 198
Joined: Mon Nov 29, 2021 8:13 am

Re: Which port on Metro ESP32-S2 measures battery?

Post by rpiloverbd »

Good to know that it is working. Best of luck.

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”