How to use A-Star 32U4 SV to read battery voltage when using external step-down regulator

I’m using a A-Star 32U4 SV board powered though PWR-/+ by a external step down regulator to generate 12V from a 4S LiPo. I want to measure the voltage of cell 1 (should be less than 4.2V max) using the A5 analog input of the ATMEL 32U4. Unfortunately I let the magic smoke out of the MCU when I connected 4S Cell 1 pin to A5 and had to buy another…

A couple of questions:

  1. What is the correct way to monitor a single cell battery voltage on an analog in pin in my setup?
  2. Since the battery is on the other side of the power switch, how bad is it to back power the A-Star board through the A5 pin?
  3. Should I connect the battery negative lead to the AREF pin?


Hello, Stephen.

We have a couple A-Star 32U4s that have “SV” in their name and include a power switch. Which one are you using? In either case, the SV versions of the A-Stars can handle voltages up to 36V, so you should be able to power them from a fully-charged 4S LiPo battery.

It is difficult to pinpoint exactly what might have happened, but it seems like you accidentally connected a voltage that was higher than the A-Star’s analog input could handle. How did you verify that the voltage on the pin you connected was actually from a single LiPo cell?

You could connect to the output on your LiPo’s balance port for the first cell in your battery to read its voltage, but it would be safer and give you a better measurement to instead monitor the full battery voltage with a voltage divider. To answer your other questions, it is generally bad practice to send a signal or apply a voltage to an input pin on a device that is not powered. That could partially power the device and cause weird behavior or damage. You should not connect the AREF pin to ground (the negative battery terminal). AREF is used as the reference for the highest voltage analog input you expect to read, but for most applications it is fine to leave it alone. You can read more about the AREF pin on Arduino-compatible boards on the Arduino reference page for it.