# How to configure an opamp for differential mode to trip an NPN?

I'm learning op-amps at the moment, so try to bear with me because this text will most likely contain a lots of errors.

I have a chip resistor, 10mohm, that I intend to use as a shunt for measuring current. Vcc = 5V, I = 2A normally. I = 2.5A means things are going wrong, 3A = dead wrong. So, somehow I want to watch the voltage drop of the resistor, and when the current goes to high (I haven't set a limit yet, but let's say 2.5A) I want an NPN to conduct, just for the sake of testing.

So, I've got two measuring points on the resistor: Rs1 and Rs2. 2.5A with 10mohm is 25mV. That is, when the voltage drop over Rs1 and Rs2 > 25mV, trip the NPN. If voltage drop < 25mV, do nothing.

Rs1 and Rs2 goes to an opamp's in+ and in-. Other than that, I'm stuck. I am completely clueless what sort of feedback network I'm supposed to use to achieve what I want. Googling for "opamp differential amplifier" gives me http://www.electronics-tutorials.ws/opamp/opamp_5.html which seems to be basic enough for me to understand, but I've been reading this paragraph five times now and I just don't get it:

Then differential amplifiers amplify the difference between two
voltages making this type of operational amplifier circuit a
Subtractor unlike a summing amplifier which adds or sums together
the input voltages. This type of operational amplifier circuit is
commonly known as a Differential Amplifier configuration and is
shown below


This sounds like it's what I'm trying to achieve, but what does it mean that the circuit is a "Substractor"? If I'm supposed to amplify the difference and letting the 25mV-level trip the NPN-base, what's substracting got to do with it?

I'm clueless, really.

Is differential amplifier the kind of feedback type I'm searching for here, for my testing?

• You would be advised to look for "high side current sense" chips. These devices will go a long way toward solving many of the problems you face. Do be sure to read the device data sheets to understand how they work. Feb 26, 2017 at 23:52
• What you are trying to do is make something similar to a crowbar. When the load current is too high, you pull the rail down hard to GND. But once the rail is pulled down, the rest of your circuit will cease to function correctly because it just de-powered itself. So, what happens then? Probably nothing good. You are pulling the rug out from under yourself. I think what you may want is to use an SCR rather than an NPN transistor. Once triggered, the SCR will stay triggered until the current is somehow reduced to a very low level (or zero). Feb 27, 2017 at 2:18
• Use a high-side shunt. Then some kind of shunt amplifier, either off the shelf or an instrument amplifier. Then a comparator. The output of the comparator turns on the NPN. en.wikipedia.org/wiki/Instrumentation_amplifier Feb 27, 2017 at 5:09

## 1 Answer

You probably don't need any feedback but you will need a reference to compare the voltage you get from the current sense resistor to. A resistor divider from a stable voltage rail is the most basic, a divider across a zener diode is recommended or there are cheap little voltage reference ICs. I would recommend a comparator rather than an op-amp (they work in much the same way but comparators are better suited to this since they are not trying to be nice and linear).

I'm going to assume that the resistor isn't at a high voltage relative to ground, you don't need to connect one side to ground ('tis preferred though) but it can't be outside of the voltage rating for the comparator unless you have it on an isolated supply (which is kind of what I drew).

If you have a voltage rail that is stable enough you can get rid of the zener and the resistor that feeds it and just use the voltage divider. These values here will be appropriate for a 5.1V zener (a very common value).

simulate this circuit – Schematic created using CircuitLab

Also just a technicality but you don't really 'trip' a bipolar transistor since they conduct proportionally to the gate current, even though the circuit as a whole results in a 'tripping' effect at the current limit.

• And if it trips and pulls the rail down close to zero volts? What happens to the output of the op-amp then? Feb 27, 2017 at 4:22
• 100 ohms shouldn't be low enough to do that, I just put the transistor in because he wanted to have the output switch an NPN and that's an example of how it could be hooked up. Now that I think about it pulling down the voltage reference would be a good way of making it latch until the current is removed though...
– TWiz
Feb 27, 2017 at 4:28
• It is what the OP wants to do. Crowbar the rail. You are right. Your circuit is OK. Feb 27, 2017 at 4:34
• I didn't really get that from the question, but if you are doing this circuit for a crowbar then unless you know the fault will resolve itself quickly then you need it to also trip a relay or something that will turn the supply off until you manually reset it, otherwise it will just oscillate on and off and possibly burn out the crowbar transistor.
– TWiz
Feb 27, 2017 at 10:05
• It was from another question, which I cannot find anymore. I think it may have been deleted. I may be wrong. But many of the details are the same, including the "trip" terminology and the current limit. Feb 27, 2017 at 16:06