# Op amp current sense circuit

• PhysicsTest
In summary, trying to solve the op amp current sense circuit as per the schematic. R5 makes a voltage divider with the load resistance (RL), which isn't shown. So VD=(RLRL+R5)VC.

#### PhysicsTest

TL;DR Summary: Trying to solve the op amp current sense circuit as per the schematic.

I want to solve the below current sense op amp circuit,

Are the calculations correct? As of now i modified the circuit by removing the capacitors, i will add them once the above circuit calculations are correct, as next step.

MENTOR Note: moved here from EE forum since its HW hence no template

Last edited by a moderator:
sign error in steps 3 & 4, or step 5. I didn't look at the rest of it.

The answer will be ## Vc = (1 + \frac{R3||R4}{R2})Va = 6Va ## .

The output will depend on the load applied. I'm not sure why R5 is present, but there's probably a good reason?

Yes thank you very much for correction

With R5 does the current increase 16 times compared to 6 times without R5?
I don't understand is why the current I flows from C to B, from output to input, should it not be from B to C?

This is not a standard current sense circuit, it is a non-inverting voltage gain circuit,

berkeman
To make sense of this more info is needed. The left side of R1 cannot sink or source any current so I'm guessing there is a shunt resistor and the left side of R1 is the high side of the shunt. The other side of the shunt is grounded since the left left side of R2 is grounded.

.Scott, berkeman and cnh1995
PhysicsTest said:
With R5 does the current increase 16 times compared to 6 times without R5?
No. R5 makes a voltage divider with the load resistance (##R_L##), which isn't shown. So ##V_D = (\frac{R_L}{R_L+R5})V_C##.

PhysicsTest said:
I don't understand is why the current I flows from C to B, from output to input, should it not be from B to C?
If the input voltage is positive the output will also be positive. The current I will flow from C to B because ##V_C>V_B=0## . It flows the other way if the input voltage is negative.

Shows a typical differential amplifier. To me it is more suitable for measuring the voltage across a shunt. The input is connected directly across the shunt. It converts the voltage between V1 and V2 to a voltage between the output of the op-amp and ground. No worry about the voltage on V1 or V2 with respect to ground (within reason).

berkeman
Averagesupernova said:
Shows a typical differential amplifier. To me it is more suitable for measuring the voltage across a shunt. The input is connected directly across the shunt. It converts the voltage between V1 and V2 to a voltage between the output of the op-amp and ground. No worry about the voltage on V1 or V2 with respect to ground (within reason).
Yes! A very common solution. Current sensing often involves high currents and low sensing voltage to avoid heating issues. Those high currents also flow through the ground network and other traces which can create errors. A Diff Amp is a good solution in this case.

OTOH, I have used the circuit posted for this and it's ok IF you are very careful with your PCB layout. If you can amplify the original sense voltage enough you can then tolerate the voltage differences in your ground network. For a circuit like this one it is essential that R1 & R2 are connected directly to the sense resistor.

In both cases, the key point is that ground isn't always "0" volts.

Averagesupernova said:
To make sense of this more info is needed. The left side of R1 cannot sink or source any current so I'm guessing there is a shunt resistor and the left side of R1 is the high side of the shunt. The other side of the shunt is grounded since the left left side of R2 is grounded.

This is the circuit that i am using, what does left side of R1 cannot sink or source any current mean? how to know that?
DaveE said:
No. R5 makes a voltage divider with the load resistance (RL), which isn't shown. So VD=(RLRL+R5)VC.

PhysicsTest said:
what does left side of R1 cannot sink or source any current mean? how to know that?
Because R1 is connected to the input of the opamp, and ideal opamps have infinite input impedance...

PhysicsTest said:
Because the way you originally drew the circuit it wasn't connected to anything so there was no current flowing through it. "Load resistor" isn't a precisely defined term, but it is usually the resistor at the output of a portion of the circuit that determines the current (or voltage) that that circuit provides given it's output state.

PhysicsTest said:

This is the circuit that i am using...
This circuit doesn't do what you described. Virtually no current will flow from the battery. You are measuring the battery voltage and multiplying it by 6x. That's assuming your op-amp can output that much voltage, which it probably can't.

PhysicsTest said:
what does left side of R1 cannot sink or source any current mean? how to know that?
You need to spend some more time studying circuits and op-amps before you continue with this or you will have a very hard time making progress. Circuit design doesn't work well as a random guessing process.

Averagesupernova, PhysicsTest and berkeman
PhysicsTest said:
This is the circuit that i am using
Where did you get it from? Why are you using it in this application of yours?

DaveE said:
This circuit doesn't do what you described. Virtually no current will flow from the battery. You are measuring the battery voltage and multiplying it by 6x.
There is a tiny little "-" sign after the "Battery" label, so it looks like that is the grounded battery return net and the outside connection of R1 is indeed a low-side current sense voltage net. This would have been much clearer if the OP would have added a ground symbol to the Battery- net (but, well, you know).

R5 looks like a clear circuit error, unless the uC requires it for some reason at its ADC input. And the duplication of R3 and R4 is also a clumsy circuit error (since it is easy to get the desired amplification ratios with just 2 resistors instead of 3).

@PhysicsTest -- please post the whole circuit schematic for the whole application, and describe what you are trying to do. You should be able to tell that this is pretty frustrating for us trying to help you with so little information to go on. We can tell you are new to circuits, and we want to help. But when you post only snippets of what you are working on, that is a bad combination with your current level of understanding. Thanks.

Last edited:
Yes i understand and sorry for confusion, i am not sure if this is the correct circuit, but i get confused with a capacitor

so i try to do analysis with capacitor disconnected, and add capacitor only after i understand the circuit, now i can see the behavior of the circuit is completely changed. One question is for every capacitor in the circuit, do i need to use the $$\frac{1}{C}\int I dt$$ the equation becomes complex. In the above circuit, i don't know how to analyze the capacitor? Shall i use the Kirchhoff's law and get the equation?

Ah, finally, that makes a lot more sense.

R5 and C2 form a lowpass filter into the ADC. It may be there for noise reduction, or to better match the sampling frequency of the ADC. You can look up "anti-alias filter" for more information.

C1 in the feedback loop also provides some filtering. Have you ever used LTSpice or other Spice simulation packages before? That may be the easiest way to visualize the filter functions going on in this opamp circuit...

PhysicsTest
Yes i have used LTSpice but i always try to do manually to understand the circuit, is it correct approach?

You can; nothing wrong with that. Have you learned much about opamp based filters yet? The output filter is a simple lowpass filter for anti-alias purposes. The feedback network is a little more complicated, but not too bad. If it were only 1 series RC in the feedback, do you know what type of function that implements and what it is used for?

No i don't know.

Also, did you say what this current sense circuit is used for? The transfer function in that feedback loop is a little unusual for most current sensing applications that I'm familiar with (LED drive, switching power supplies, etc.).

It is used in charger circuit.

PhysicsTest said:
It is used in charger circuit.
Hmm, weird. I wonder why they are doing that then.

If you just think about the basics of that feedback circuit, you can see that it is setting 2 different gains (in combination with the input resistor R2. At low frequencies C3 is an open-circuit, and at high frequencies C3 is a short circuit. So the low-frequency and high-frequency gains are different. Quiz Question -- what are those two gains?

Sorry there is also a capacitor between R1 and R2 of 104pF.

PhysicsTest said:
Sorry there is also a capacitor between R1 and R2 of 104pF.
Across the two opamp inputs? That's okay, that's just another lowpass filter formed with the two differential input resistors.