# What is the purpose of using the transistor in the circuit?

Current sensor using an instrumentation amplifier:

Image source: Texas Instruments INA139, INA169 High-Side Measurement Current Shunt Monitor, Typical Application Circuit (datasheet page 1)

Could anyone explain how this circuit works and why they used the transistor in the circuit?

• Are you familiar with the "golden opamp rule" that an opamp in negative feedback configuration will always try to achieve vin+ == vin-? May 21, 2019 at 14:01

This is not a conventional instrumentation amplifier it is a device specifically designed to provide a current output that is proportional to the current flowing to the load. They are often referred to as "High-Side Current Sensors".

The amplifier is designed to operate with the inputs at or above its own supply rail but the output voltage to feed other circuitry is usually required to be referenced to ground. This is achieved by providing a current output from pin 1 that is then converted to a voltage, Vo, by resistor Rl. This current is not affected by variations in the supply voltage.

The transistor is shown in the diagram of the amplifier to represent the way that the current output is achieved.

In a bipolar transistor the collector current is virtually the same as the emitter current. The transistor base being fed from the amplification stage within the block will act in such a way to force the voltage between the inputs of the amplifier to zero. In that condition the current from the collector will cause a voltage across the 1k resistor a the positive input to match the voltage across the shunt Rs. This results in a current from the emitter proportional to the current flowing to the load. Hence the voltage Vo is also proportional to the load current. As Andy mentioned there will be a small error due to the base current of the transistor but this will commonly be less than1% and there may be other details in the circuit that are not shown to correct for this.

Let's assume Vin+ is 60 V and Is is such that 1 V is dropped across $$\R_s\$$.

Then V(3) = 60 V and V(4) = 59 V.

That means that at the - input of the opamp there will also be 59 V (same as V(4) ) because there is (almost) no current flowing through the 1 k$$\\Omega\$$ resistor between V(4) (same as Vin-) and the - input of the opamp.

In a proper feedback configuration, the opamp will try to make the voltage between its - and + inputs equal to zero. There is not much that the opamp can do to influence the voltage at its - input. However it can influence the voltage at it's + input!

If the opamp would supply some base current into the base of the NPN, that NPN would open and some current could flow from V(3) (also Vin+) through the 1 k$$\\Omega\$$ resistor, into the collector of the NPN, through the emitter of the NPN into $$\R_L\$$

So how much current will the flow through the NPN?

Just so much that the voltage at the + input of the opamp is the same as the voltage at the - input, so 59 V. Since V(3) = 60 V and the opamp will make 59 V at its + input, there will be 1 V across the left 1 k$$\\Omega\$$ resistor. That 1 V is a copy of the voltage across $$\R_s\$$.

1 V across the left 1 k$$\\Omega\$$ resistor means 1 V / 1 k$$\\Omega\$$ = 1 mA is flowing. That same 1 mA (I'm ignoring the base current of the NPN) will also flow into $$\R_L\$$.

If we make $$\R_L\$$ also a 1 k$$\\Omega\$$ resistor then $$\V_O\$$ will become 1 Volt. Again that 1 V is a "copy" of the voltage across $$\R_s\$$.

So the NPN is used, together with the opamp, to copy the voltage across the sense resistor $$\R_s\$$ down to ground level.

At $$\R_s\$$ we had 60 V and 59 V, that is not convenient to feed into an ADC for example. $$\V_O\$$ is 1 V from ground level and easy to feed into an ADC.

I used 1 V across $$\R_s\$$ as a convenient example, it is trivial to choose different values for the resistors to get a different voltage and/or to introduce some gain.

If there is a load current then pin 4 of the circuit is lower than pin 3. Because pin 4 connects directly to the non-inverting input of the op-amp, for the op-amp to remain in equilibrium, the inverting input is "dragged" (due to negative feedback) to the same potential as the non-inverting input. This brings the op-amp into equilibrium.

"Dragging" is done by drawing collector current from the inverting input node AND, the amount of current taken is proportional to the real load current hence, the voltage across $$\R_L\$$ is proportional to real load current. There will be a slight error due to the non-infinite hFE of the NPN BJT and quite often MOSFETs are used instead of a BJT.

The INA1X9 is more than just an op-amp is an analog integrated-circuit designed for high-side current measurement.

You can think of the INA1X9 as a trans-conductance amplifier with a uni-polar output, such as shown in the schematic below: