Two floating grounds in circuit containing an op amp differential amplifier

Thread Starter

dykesc

Joined Apr 17, 2016
5
I am working on a small 1-12 vdc, 1 amp max power supply containing two LM317 regulators (one in current limit configuration and the other for voltage set and regulation). Power to my power supply is floating 24 vdc from a bridge rectifier. I saw a design that accomplished the current limit function with an op amp circuit thus eliminating the need for the "current limit" LM317. The current sensing portion of the circuit works by placing a 1 ohm resistor (appropriate wattage) into the circuit prior to the LM317 regulators. Input signals to a differential op amp are obtained through voltage dividers placed on the incoming and outgoing current ends of the resistor. The op amp I am using required a split supply (+ and -) since it would not allow op amp outputs (nominally 0 to 1 volt) close enough to the grounded rail in a single supply.configuration. This was accomplished using 4 9 volt batteries with center as ground. I breadboarded this current sensing portion of the op amp circuit and interfaced it with my previously described power supply circuit. This of course required joining the commons for both circuits. When I did this I noticed the output of the differential amplifier was -230 mv. The circuit worked as expected in terms of sensing current via a correlating voltage at the differential op amp output except for having to mentally add 230mv to the value I was reading on my DMM to account for the -230mv offset. Through trial and error I was finally able to reduce the offset to +5 mv, or thereabouts, by adding a 100 ohm resistor between the two floating supply commons at the point where they joined.

Obviously the two floating supply "commons" were at sightly different potentials. How should I have recognized this would be a problem before I interfaced the circuits? Why was the differential mode op amp output affected by this?
 

MrAl

Joined Jun 17, 2014
7,196
Hi,

You should draw and post the circuit.

Why go through all that when the second LM317 works much simpler?
Was it because it is harder to adjust the current then?
 

GopherT

Joined Nov 23, 2012
8,012
How should I have recognized this would be a problem before I interfaced the circuits? Why was the differential mode op amp output affected by this?
As soon as you noticed the following...

Obviously the two floating supply "commons" were at sightly different potentials.
A each segment of your circuit needs a low-resistance path to a common ground. Without, you will have noise or off-set errors or both. Kind of like trying to do precision weighing while the scale is bouncing around in the backseat of your car. No accuracy or precision.
 

Thread Starter

dykesc

Joined Apr 17, 2016
5
As soon as you noticed the following...



A each segment of your circuit needs a low-resistance path to a common ground. Without, you will have noise or off-set errors or both. Kind of like trying to do precision weighing while the scale is bouncing around in the backseat of your car. No accuracy or precision.
Is there a way through circuit analysis / calculation (not measurement) to determine what the potential difference between the two commons was going to be and to determine what size resistor interface was needed to deal with it? Also I'm still not understanding why the op amp output went to -230mv without use of the 100 ohm resistor between the two commons.
 

GopherT

Joined Nov 23, 2012
8,012
Is there a way through circuit analysis / calculation (not measurement) to determine what the potential difference between the two commons was going to be and to determine what size resistor interface was needed to deal with it? Also I'm still not understanding why the op amp output went to -230mv without use of the 100 ohm resistor between the two commons.
No, floating means floating for a reason. Rub a balloon on your forearms before you make the measurement and you will see a different result before adding the resistor. Without a connection, there is no way to know. That is why a common ground is critical. Also, why use a 100ohm resistor instead of a bare wire. With the resistor, an change in current running through the resistor will change the voltage between your two "grounds".


Look at the datasheet of the op amp. There is an input offset voltage listed. That is the differential error that is possible (not always the same but within listed range. Once you amplify, that error is amplified. There is also an output error listed but that is not as critical since it is not amplified.

Finally, when your grounds are floating, what reference are you comparing the voltages to?
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,021
There is no way to compute the difference you get in the real world which is why the multiplicity of "ground" are typically tied together. That is exactly what R2 = 0 would do.

I have little idea where you are going with this circuit but there are customized op amps that will read your current and give you a scaled output. Google "high side current monitor".
 

Thread Starter

dykesc

Joined Apr 17, 2016
5
No, floating means floating for a reason. Rub a balloon on your forearms before you make the measurement and you will see a different result before adding the resistor. Without a connection, there is no way to know. That is why a common ground is critical. Also, why use a 100ohm resistor instead of a bare wire. With the resistor, an change in current running through the resistor will change the voltage between your two "grounds".

When I tied the grounds directly together (bare wire), without the 100 ohm resistor, the -230mv offset appeared on the op amp output. That is why the 100 ohm resistor is there. The 100 ohm resistor reduced the offset to approximately 5mv which I could live with. I just want to understand (1) why the resistor was necessary, (2) why the op amp output offset (-230mv) appears when the grounds are connected directly together (bare wire).


Look at the datasheet of the op amp. There is an input offset voltage listed. That is the differential error that is possible (not always the same but within listed range. Once you amplify, that error is amplified. There is also an output error listed but that is not as critical since it is not amplified.

Input offset voltage is miniscule. There is no amplification through the op amp in my circuit. Output just reflects the difference of the two inputs.

Finally, when your grounds are floating, what reference are you comparing the voltages to?
I would measure using two oscilloscope probes set up for a differential measurement between the two commons (grounds).
 

GopherT

Joined Nov 23, 2012
8,012
I would measure using two oscilloscope probes set up for a differential measurement between the two commons (grounds).
Then why do you care about the error between grounds? Either join the grounds or ignore the grounds. Also, when you do that, you ARE connecting the two grounds on your circuit because the common on oscilloscope probes are connected to eachother if on the same scope unless you have a very special scope with isolated grounds. Even if you have two different scopes, the ground pin plugged into mains is likely connected to the ground pin connected to the second scope - which are both connected to the associated probes. In other words, your circuit is a mess and your plan is full of errors.

If you are going to keep justifying your crazy methods yet complain that you have a problem, there is no solution. If you listen to the people giving you advice, and implement their suggestions, then you will see that the problem is easily solved.
 
Last edited:

Thread Starter

dykesc

Joined Apr 17, 2016
5
Then why do you care about the error between grounds? Either join the grounds or ignore the grounds. Also, when you do that, you ARE connecting the two grounds on your circuit because the common on oscilloscope probes are connected to eachother if on the same scope unless you have a very special scope with isolated grounds. Even if you have two different scopes, the ground pin plugged into mains is likely connected to the ground pin connected to the second scope - which are both connected to the associated probes. In other words, your circuit is a mess and your plan is full of errors.

If you are going to keep justifying your crazy methods yet complain that you have a problem, there is no solution. If you listen to the people giving you advice, and implement their suggestions, then you will see that the problem is easily solved.

Gopher,
I have obviously offended you somehow. That was not my intent. I do appreciate the help you and others are attempting to give me. I should have said that before now.

I must stand up for myself to some degree. The circuit I posted earlier in this thread does work. I can sense the current through the 1 ohm resistor at the top of the circuit by observing the output of the op amp which varies from 0 to 1 volt corresponding to a 0 to 1 amp current through the 1 ohm resistor. The only problem I had was the -230mv offset signal which appeared at the op amp output when I joined the two circuit grounds together through a direct, bare wire, connection. I stumbled on a solution to eliminate the offset by inserting the 100 ohm resistor between the two circuit grounds where they connect. I guess I have become a little anal about trying to understand why the direct, bare wire connection resulted in the -230mv op amp output. I would still appreciate any additional insights into why this occurs you or anyone else might have. That's why I came here. In fact I just joined allaboutcircuits yesterday and this is my first post. I'm not off to a very good start it appears.

I am by no means an expert in electronics but I do very much enjoy working with and understanding circuits. I know the people on this board are much more knowledgeable than me. That's why I joined. I know there are better op amps (single supply,rail to rail) that would be better in my circuit. I'm just trying to understand what I observed with the op amp I am working with now.

Again my apologies for any offense I have caused. Don't know what else to say.
 

GopherT

Joined Nov 23, 2012
8,012
Gopher,
I have obviously offended you somehow. That was not my intent. I do appreciate the help you and others are attempting to give me. I should have said that before now.

I must stand up for myself to some degree. The circuit I posted earlier in this thread does work. I can sense the current through the 1 ohm resistor at the top of the circuit by observing the output of the op amp which varies from 0 to 1 volt corresponding to a 0 to 1 amp current through the 1 ohm resistor. The only problem I had was the -230mv offset signal which appeared at the op amp output when I joined the two circuit grounds together through a direct, bare wire, connection. I stumbled on a solution to eliminate the offset by inserting the 100 ohm resistor between the two circuit grounds where they connect. I guess I have become a little anal about trying to understand why the direct, bare wire connection resulted in the -230mv op amp output. I would still appreciate any additional insights into why this occurs you or anyone else might have. That's why I came here. In fact I just joined allaboutcircuits yesterday and this is my first post. I'm not off to a very good start it appears.

I am by no means an expert in electronics but I do very much enjoy working with and understanding circuits. I know the people on this board are much more knowledgeable than me. That's why I joined. I know there are better op amps (single supply,rail to rail) that would be better in my circuit. I'm just trying to understand what I observed with the op amp I am working with now.

Again my apologies for any offense I have caused. Don't know what else to say.
A ground is a ground. A circuit is not intended to have multiple reference points and then "spray and pray" as an infinity man would say. In other words, this is not a guessing game, or luck. You should use one ground and design for the specification of the parts. If you need a 0.00 V offset, then buy and use an op amp that has a nulling pins. Add the appropriate potentiometer to the nulling pins and set to zero per the datasheet.

On the other hand, if this works for you, run with it. There is no assurance that the gain will be stable as you exchange power AC adapters or anything else because nobody "designs" circuits like this.

Good luck.
 
Top