Measuring Voltage on a Positive Ground System

I have a solar setup with a positive common ground. I would like to use a Nano to measure the voltage from the panels and the batteries... the problem is that the Nano will be powered from the system. Since the Nano uses a negative ground reference, I can't figure a way to use a single uC to read both voltages. I can do one side or the other using a simple voltage divider, but because the negative rails are at different potentials, I believe the reading from the side opposite of the Nano supply would not be accurate.

Any ideas?

InPhase277:
I have a solar setup with a positive common ground.

No you don't. You have a common positive system. The ground has nothing to do with it and is just for your reference of measuring. And I think you define all voltages positive so the ground is not there :wink:

One thing you could do is connect the Arduino to the side with the highest voltage. Via a resistor divider you can measure the voltage there (let's call it V1). And now you connect the negative of the other side (which is not Arduino GND) to the Arduino analog as well (probably via a voltage divider as well), let's call that V2.

The voltage on the other side is V1 - V2.

If you can't connect the Arduino to the highest voltage things become a bit more complicated because from the point of view from the Arduino the negative of the other side now is a negative voltage and you can't directly measure it.

An Arduino can measure negative voltages by connecting the voltage divider not to ground but to +5 or +3.3.
We need more info of the solar/battery voltage, and what else you are going to connect to the Arduino.
Leo..

An Arduino can measure negative voltages by connecting the voltage divider not to ground but to +5 or +3.3.

Is that like AC negative voltages? Like requiring a DC blocking capacitor ...just in case....at the middle of the voltage divider?

The divider has 5V at the very top..... and 0V at the very bottom. And the incoming AC signal applied to the middle (with DC blocker capacitor).

Not sure what OP means by "positive common ground" and "negative ground reference" etc through.

Message to the OP...... pop up a basic diagram please.

Southpark:
Is that like AC negative voltages? Like requiring a DC blocking capacitor ...just in case....at the middle of the voltage divider?

The divider has 5V at the very top.....

and 0V at the very bottom. And the incoming AC signal applied to the middle (with DC blocker capacitor).

Not sure what OP means by "positive common ground" and "negative ground reference" etc through.
Message to the OP...... pop up a basic diagram please.

  1. Not quite the same as measuring AC with a cap.

  2. Yes.

  3. Negative voltage at the bottom, and the tap to the analogue input.

  4. A diagram could explain things.
    Leo..

I apologize for any confusion. I am an electrician and so my terminology is based around that trade. When I say "positive common ground", I mean that the positive terminal of the solar panels is directly connected to the positive terminal of the battery bank, and it is grounded, i.e., all non-current carrying metal parts of the system is connected to the positive side for short circuit protection.

The negative side of the system is where all overcurrent protection and switching is done. There is a buck converter that is switched on the negative side by an N-channel MOSFET.

What I mean by "negative ground reference" is that the arduino measures it's analog pins against the negative side of the circuit, its "ground". If the arduino is powered by the solar panel side of the circuit, its negative pole will be at a different potential than the negative pole of the battery from the point of view of the arduino.

I suppose I could use a resistor divider and then calibrate the code against a multimeter.

Here's a basic diagram of the buck circuit that I plan to use, with voltage and current measurement omitted. At this moment, a basic cheapo Chinese PWM regulator controls the system. I have built and tested the buck circuit on the bench and it works great, but I realized that measuring the voltage and feeding it back to the uC would be tricky with the positive common.

Edit: apparently the pic is too large to attach.

I see what you mean! Nice. Thanks for explaining.

Ok....what I think is... the arduino has it's '0V' pin connected to the 'negative terminal' of the battery.

The 'negative' terminal of the solar panel is connected to the negative terminal of the battery (as well as connected to the '0V' pin of the arduino.

The 'positive terminals' of the panel and the battery are both connected to EARTH, right?

The arduino should still be able to function (ie.....able to measure the voltages of the battery, and the panel) - as long as the '0V' pin of the arduino isn't earthed as well.

IMHO, if a circuit point is not connected to Earth, it should not be called "ground". For example the Arduino "GND" should be referred to as "0V" or CC (circuit common) or something besides "ground".

[/RANT] :slight_smile:

The usual reason for grounding the negative terminal of the Arduino is to keep the voltages on the exposed pins low enough that you can't hurt yourself. With appropriate precautions, you could connect that terminal to a 11kV high voltage line and it would still function.

So, it seems sensible to connect the Arduino 0V to the negative terminal of the battery. But that means everything on the Arduino side now has a large potential relative to the people using it. The battery might be 50V and that DC voltage needs to be treated with the same respect as mains voltage. All enclosures, conduits, switches and fittings must be rated for mains. If the user (or you) hits a button hard enough to smash it and expose the conductors inside then you have a great risk of electrocution.