Measuring Voltage

14 views
Skip to first unread message

Martin Hegedus

unread,
Aug 16, 2026, 11:56:06 PM (9 days ago) Aug 16
to hbrob...@googlegroups.com
Hi,

On another thread, Michael Wimble brought up detailed sensor logs.

Going off on a tangent with respect to that, what is the BKM for measuring voltage?

The straight forward way is to use an MCU ADC to measure the voltage from a simple resistor voltage divider (and maybe an analog MUX).

But from the experience of the group, is that the best way to go?  Other options, out of many I guess, is to use a unity gain op-amp to increase impedance and/or something to galvanically isolate the measured circuit and/or separate ADC.  Or is the simple way good enough to monitor the system?

If there are better ways, what chips/circuits are recommended?  Or any other electronic components, other than two resistors, which should be added to the mix?

Thanks
Martin

Chris Albertson

unread,
Aug 17, 2026, 3:30:50 PM (8 days ago) Aug 17
to hbrob...@googlegroups.com
I have always figured that two resisters is good enough, and even 8 bits of resolution is overkill for tracking battery voltage.
I would bet that even if you just use the ADC pins on a common uP, you are actually using an op-amp.

Martin Hegedus

unread,
Aug 17, 2026, 3:45:14 PM (8 days ago) Aug 17
to hbrob...@googlegroups.com
Thanks.

In part I'm curious how isolated the MCU needs to be from the high amp motor/servo circuit when measuring voltage.

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hbrobotics/C0DCAEEA-8721-451D-A75B-9CD99617498D%40gmail.com.

Chris Albertson

unread,
Aug 17, 2026, 4:43:04 PM (8 days ago) Aug 17
to hbrob...@googlegroups.com

I think the only danger is that the motor is braking and generating back EMF into the battery.  Then your nominal 48V battery might have a few more volts than 48 across it.   It needs a fairly heavy robot before this matters much.

OK, let’s assume you are using a 48 volt battery and the MCU runs on 3.3 volts.     So the ADC will have a 0 — 3.3 volt range.      

I would apply a safety margin to the 48 volts and assume it might go to 60 volts.   So I want to divide the power supply volts by 20.

To keep the load low, I want the total resistance to be maybe close to 200K Ohms.   Using common parts, I might pick an 190K and a 10 k resistor.   This is close enough.

This provides a huge amount of isolation.  There is a 190K resistor between the voltage rail and the MCU.   You get this automatically by the nature of voltage dividers.



Measuring current is harder.   You can buy a hall effect current sensor chip on a breakout board or use a low value sense resistor.   If using a sense resistor, I always place a resistor of a few K in series with the MCU pin.  It acts as a current limiter and with a near zero current going to the pin does not drop volts.    I’d go with the hall effect device if the current were more than a few amps, mainly just to reduce losses in the sense resistor.
Reply all
Reply to author
Forward
0 new messages