• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PNP Current mirror not remotely close to simulatoin

xchris

New Member
Hello, is anybody able to help me with this current mirror issue?

I have a board for manufacturing test that was just updated to measure current.
This was simulated using ltspice and looked good.
The finished circuit does not behave even remotely close to the simulation. I realized the transistors are going to vary but I was hoping it would be in the ball park.

The simulation is attached. Basically R1 is the load and on the other side of the mirror Vout goes (through a buffer) into a micro ADC.
We wanted to measure 0-250ma through the load and I was expecting Vout to be 0-3.3 volts corresponding to this current.

In the actual circuit there is way more current on the measuring side of the circuit that expected by the simulation.

Is this just totally wrong and not ever going to work?

Thanks
Chris
 

Attachments

Grossel

Well-Known Member
Please also include a readable image file (preferably PNG) or PDF so members without that software can read the schematic.
 

ronsimpson

Well-Known Member
Most Helpful Member
I was expecting Vout to be 0-3.3 volts corresponding to this current.
I was not expecting that.

So R1 is a load not 240 ohms.
The current in the load in 0-250mA. So the resistance of the load will be infinity to 48 ohms.
----mistake: not 12V on the load but 11.3V.------
So load is 47 min resistance.

Simulation on LTspice R1=45mA and R3=53mA.
In real life I have not had a current mirror (like that) to work well. They make "matched" transistors. Two transistors in one case. That works. If the two transistors are one die it works. Getting two transistors that might be very different, it will not work well.
If you add emitter resistors to each transistor it really helps. I added 15 ohms and the two currents are now 43.8 & 43.9.
Your current range is too big! It can not work at 0 current.
See INA139 and INA169.
1609558797684.png
 

ronsimpson

Well-Known Member
Most Helpful Member
If you need to use the two transistors.
R1(load) has 0 to 250mA, R4 is shunt resistor and will have 0 to 0.33V across it.
This 0 to 0.33V is also across R5. Gain of Q1 amp is 10. Voltage on R3 is 0 to 3.3V.
1609564645398.png
 

crutschow

Well-Known Member
Most Helpful Member
Deleted post.
 

xchris

New Member
Wow. That is amazing comments Ron. Thanks so much.

I know realized this was a very poor design decision on my part. It as a super last minute addition to the board and I do not know what made me think current mirror. I am going hack on this part HV7801 with a 10mohm resistor. I think this should be a much easier route. Comments?

But there is clearly something for me to learn here.

I have 5 boards and they all behave quite similarly. Q1 (transistor that is supposed to mirror current) is, I think, always turned on a lot more then expected.
Why does this not remotely match the simulation?

For example, when R1 set to 1K, I get a I(R1) 11.4mA and a mirror current through I(R3) or 13.8mA. This was more than close enough for what I wanted to achieve.

In reality on all the boards, when R1 is 1K, then I(R1) is around 12mA (ok) but the mirror current I(R3) is 220mA. Similar on all 5 boards.

The only time the results are expected is with R1 set to infinity (no load) :)

Any explanation is appreciated!
 

crutschow

Well-Known Member
Most Helpful Member
In reality on all the boards, when R1 is 1K, then I(R1) is around 12mA (ok) but the mirror current I(R3) is 220mA. Similar on all 5 boards.
That does seem to be really off.
Are you sure the circuit is wired correctly, such as one of the transistors having a reversed connection?
 

eTech

Well-Known Member
Why does this not remotely match the simulation?
Any explanation is appreciated!
Because a current mirror "limits" current to the load. It does not "regulate" current.
As a test, remove the load resistors R2,R3 and Cap C1 in the simulation, then short the Q1 collector to ground. Q1 collector current will be limited to approximately the amount set by the programming R1.

In a current mirror, R1 would be the programming resistor that sets the desired current through the load. The "load" is attached to the collector of Q1.

1609695544551.png
 
Last edited:

crutschow

Well-Known Member
Most Helpful Member
I am going hack on this part HV7801 with a 10mohm resistor. I think this should be a much easier route. Comments?
Sounds like a much better solution.
 

Latest threads

EE World Online Articles

Loading
Top