# Low Side Current Sense amplifier

1. ## Low Side Current Sense amplifier

Hi everyone,

I want to create a low side current sensing circuit. The goal is to sense a 0-5 amp magnitude current by using a kelvin resistor, differential op amp, and a 0-3v ADC (from a microcontroller). The problem I have is that the direction of the current is not guaranteed. This is a motor controller, so sometimes the motor will drive current from the ground to the voltage source via the MOSFET's diodes. I want to be able to measure this current as well as the forward current. If I use a differential amplifier to amplify the voltage from the kelvin resistor (4-wire resistor), then I will get some negative voltage when the current is negative. To solve this, I think I need a second amplifier to add a voltage offset to the first amplifier. AKA, the op amp stages would be like this:

stage 1: Amplify the small signal from current sensing resistor (4-wire resistor seems to be the way to go, but correct me if I'm wrong, I'm still relatively new to all of this). The output from here would be -3v to 3v. I guess this means I'd need a -3.3v power supply, or some negative power supply, for this op amp.
stage 2: Add 3v to the output of stage 1, so that we have a 0-6v output. Then I can use a resistor divider to get 0-3v output.

Thanks,
Matt

2. ## Re: Low Side Current Sense amplifier

Assuming that you mean an H bridge controller you can measure the current in the common ground connection(sources of the low side mosfet), the polarity there will always be the same

3. ## Re: Low Side Current Sense amplifier

Originally Posted by alexan_e
Assuming that you mean an H bridge controller you can measure the current in the common ground connection(sources of the low side mosfet), the polarity there will always be the same
Won't current go from both drain-to-source (MOSFET "ON") of Q3/Q4 and also from source-to-drain (MOSFET "OFF", current flowing through the MOSFET body diode) when driving an inductive load?

Thanks,
Matt

4. ## Re: Low Side Current Sense amplifier

the current will flow either from Q2/Q3 or Q1/Q4, in either case the current will go through the shunt resistor which will be connected right before gnd so the voltage polarity on the resistor will be always 0 at gnd side and more positive in the mosfet source side.
By switching different mosfets you invert the polarity applied to the motor coil but the power supply lines are still in the same place so the current flow is the same.

I have done a similar circuit some time ago

Alex

•

5. ## Re: Low Side Current Sense amplifier

Originally Posted by alexan_e
the current will flow either from Q2/Q3 or Q1/Q4, in either case the current will go through the shunt resistor which will be connected right before gnd so the voltage polarity on the resistor will be always 0 at gnd side and more positive in the mosfet source side.
By switching different mosfets you invert the polarity applied to the motor coil but the power supply lines are still in the same place so the current flow is the same.

I have done a similar circuit some time ago

Alex
I understand this, but what if the Back EMF on the motor (when all transistors are in the "OFF" state) causes current to flow through Q3 and Q2. If the motor is modeled as an inductor, and you turn all switches off after having one pair of switches on, then the motor will try to force current backwards through the body diodes of Q3 and Q2, right?

6. ## Re: Low Side Current Sense amplifier

the motor will not generate voltages below gnd (negative), it will just generate voltages reversed from the one it had while working and these will find a way to reach the power supply through the diodes, I don't see a way to have a negative voltage at the source side of the shunt resistor.

---------- Post added at 02:07 ---------- Previous post was at 01:52 ----------

Take a look at H-bridge spiking -- Chuck's Robotics Notebook

•

7. ## Re: Low Side Current Sense amplifier

Originally Posted by alexan_e
the motor will not generate voltages below gnd (negative), it will just generate voltages reversed from the one it had while working and these will find a way to reach the power supply through the diodes, I don't see a way to have a negative voltage at the source side of the shunt resistor.

---------- Post added at 02:07 ---------- Previous post was at 01:52 ----------

Take a look at H-bridge spiking -- Chuck's Robotics Notebook
I see. This makes sense to me now. However, I would still like to build a bidirectional current sensor so that I can put it inline with the motor windings. I guess the way to do that would be to use a differential amplifier and then just read the voltage with an oscilloscope. I am still curious how to read a negative voltage with a microcontroller. This is not the first time I've needed a circuit like this. How do you convert +/- 15v to 0-3v? or +/- 0.1v to 0-3v, where 0v (from the bipolar input) = 0v (to the unipolar input) in both cases?

8. ## Re: Low Side Current Sense amplifier

Yes, how my \$4 mutimeter puts ( - ) when current flows in revese direction?

•

9. ## Re: Low Side Current Sense amplifier

I don't see a way to have a negative voltage at the source side of the shunt resistor.
I see it though.

As a first point, you have to distinguish between average and instantaneous current. Secondly, you have to distinguish between unipolar and bipolar PWM schemes.

In bipolar PWM mode, you'll observe bipolar currents in the shunt resistor in most operation states. In unipolar PWM, there's a zero current period, when the current recirculates through either both low side or high side switches. You get negative current at least during generatoric (breaking) motor operation, and also negative current peaks in motoric operation, if the current ripple magnitude is sufficient high.

In other words, dksoba is basically right.

10. ## Re: Low Side Current Sense amplifier

Originally Posted by FvM
I see it though.

As a first point, you have to distinguish between average and instantaneous current. Secondly, you have to distinguish between unipolar and bipolar PWM schemes.

In bipolar PWM mode, you'll observe bipolar currents in the shunt resistor in most operation states. In unipolar PWM, there's a zero current period, when the current recirculates through either both low side or high side switches. You get negative current at least during generatoric (breaking) motor operation, and also negative current peaks in motoric operation, if the current ripple magnitude is sufficient high.

In other words, dksoba is basically right.
Being right or wrong doesn't really matter to me (although eventually it'd be nice to know the right answer). What I'm trying to do is measure a positive or negative current using a single sided ADC. I'd like to amplify a +- 0.1v input signal, for example, so that it outputs a 0-3v signal with 1.5v output corresponding to a 0v input.

11. ## Re: Low Side Current Sense amplifier

the schematic I describe is

assuming that we have a differential amplifier where I have the opamp connected you say that we will get negative output?
There will be times when we will have a negative voltage with reference to the gnd in the upper side of the resistor?

12. ## Re: Low Side Current Sense amplifier

You are right, the amplifier question can be in fact answered without referring to the application. You should know however, which signal bandwidth has to be processed by the amplifier, or in contrast, if some kind of averaging filter is intended for the amplifier.

I understand, that single supply operation is preferred. If we have an ADC range near to the supply voltage, a rail-to-rail OP would be required in addition. For the zero shift to mid range, you'll need a reference voltage, e.g. the ADC reference.

The amplifier can be desgned as a basic single OP differential amplifier, for +/- 0.1 to +/- 1.5V, we need a gain of 15, respectively a resistor ratio of 1:15. To implement the 1.5 V zero shift with a 3V reference, the reference resistor to +ve OP input can be replaced by two 2*R2 resistors, connected to 0 and 3V.

P.S.:
There will be times when we will have a negative voltage with reference to the gnd in the upper side of the resistor?
Yes. Obviously as a average value, when the motor is breaking/generating and sourcing power to the DC bus. And as an instantaneous value, depending on the PWM operation.

13. ## Re: Low Side Current Sense amplifier

Something like that?

1 members found this post helpful.

14. ## Re: Low Side Current Sense amplifier

Something like that?
is the ADC referenced (ground reference) to j1.1 or j1.2?

•

15. ## Re: Low Side Current Sense amplifier

If you read my description strictly, it refers to this circuit:

1 members found this post helpful.

16. ## Re: Low Side Current Sense amplifier

Originally Posted by FvM
P.S.:
Yes. Obviously as a average value, when the motor is breaking/generating and sourcing power to the DC bus. And as an instantaneous value, depending on the PWM operation.
Then I have to apologize for misguiding the OP.

Alex

17. ## Re: Low Side Current Sense amplifier

Originally Posted by FvM
If you read my description strictly, it refers to this circuit:

Sorry, I missed that post! It makes more sense to me now. When I get off work I'll go simulate/build that circuit and see if I can further my understanding.

Thank you very much FvM. If I want to give you points, what kind of points should I give you?

--[[ ]]--