# How to measure voltage of a battery

Hey,
how can I measure the voltage of a battery pack with the mini maestro ?
The voltage is up to 25V.

best regards

Hello.

The Maestro’s pins cannot handle more than 5V, so you can use a voltage divider that divides the 25V down to somewhere safely within the 0-5V range. You will also want to choose a high enough resistance to avoid drawing too much current from the battery. After you get a reading, you can multiply the result by the appropriate value to get back to the actual battery voltage.

- Ryan

Do you mean it on this way ?

Hello.

That would work, but you’re making things more complicated than they need to be by adding R3. I suggest you connect your battery’s ground directly to the Maestro’s ground and pick appropriate values for R1 and R2. The voltage on the Maestro input will be:

battery voltage * R2 / (R1 + R2)

Also, I’m a bit confused. In your first post you say that your battery voltage can be as high as 25 V, but you’re only using 11 V in your diagram. Don’t forget to account for the fact that well-charged batteries can have a voltage much higher than their nominal voltages. If you’re using a 24 V battery pack, I expect the voltage to be significantly higher than 25 V when the pack is fully charged. Please take care to use a voltage divider that ensures the voltage on the Maestro input never exceeds 5 V.

- Ben

Hello,

yes, I will use a 3s Lipo with maximum 12,6V full charged. But maybe also a 6s with up to 25,2V (so I just use 6 instead of 3 resistors).
But why do you say that I could remove R3 ? Then the voltage at the Maestro would exceed 5V ?!

Thank you for help !

I’m suggesting you remove R3 and pick better values for R1 and R2. In general, it’s a bit strange to not have common grounds, and it could lead to problems if you forget that your system is set up that way. Note that you could get the same effect if you just move R3 in series with R1, which would let you simplify your diagram to use two resistors: R1’ = 470*2 = 940 and R2 = 470.

- Ben