# How to measure voltage with a floating supply?

In the example below, ground of a dual supply is referenced to +Vout.

Assuming we have a MCU connected to VCC and +Vout, if we then try to measure the voltage at +Vout with the ADC, we're basically measuring the ground of MCU.

The actual measurement should be the voltage between +Vout and -Vout, which we can assume to have the maximum value of 20V.

• How do you measure the floating voltage in this situation?
• The link just describes the method using difference amplifiers. Jun 11 at 19:02
• @ElectronSurf I'm saying your desire to not use another supply is the norm, yet another supply always ends up being used anyways. It is obviously not because we want to. If there was a simpler way, you can be sure as hell we would all being using it. Jun 11 at 19:10
• @devnull Yes I want to measure the voltage difference between +Vout and -Vout, The most negative value of -Vout? what do you mean? Jun 11 at 19:14
• I see that you are using my drawing. That's fine. And to solve the issue with GND and ADC measurement, all you need is an inverting amplifier with a gain of less than one. As devnull has shown you. Or add another separate floating supply just for the voltmeter uC.
– G36
Jun 11 at 21:01
• This was the reason I made this drawing in the first place. I simply wanted to show and explain how this most widely used topology of a lab power supply works.
– G36
Jun 12 at 6:54

Since the voltage being measured is not floating, but only negative with respect to the ADC, these are the 2 simpler options I can think of.

If you can trust the 0V reference for measurement (e.g. low current), it is doable with a simple inverting amplifier connected to -Vout with the module of the gain less than one.

Below I've assumed you can use the voltage reference in you circuit also as the ADC reference and I've also assumed it is 1.25V (modify the resistors otherwise): the gain is $$\-\frac{5k}{80k}=\frac{1.25}{-20}\$$.

No accuracy requirements were mentioned and we also don't know the load current. You can have considerable error with the circuit above by assuming that +Vout is 0V (with respect to the ADC) at the load. To avoid this, you could use a differential amplifier (which brings other problems, like resistor mismatch).

Both circuits have the same simulated output since wire resistance is zero: 1.25V for -20V at -Vout and 0V for 0V at -Vout.

• How did you power the op amps in the simulator? are they powered from VCC and VEE supplies in the question? Jun 11 at 20:21
• Which opamp model are you using? The decision on how to power them depends on this, on their output range for the ADC and the values of the voltage rails you have. Jun 11 at 20:23
• I was using the wrong simulator, thank you. Jun 12 at 5:41