PNP cascode current mirror instability oscillations output current issues troubleshooting

panic mode

Joined Oct 10, 2011
5,002
true, one could get diodes that match the tempco of transistor or use same NPN transistor as a diode etc, while one can compensate things out it is increasing complexity and does get messy. but even without that, quick and dirty fix improves original circuit output considerably (some 20x).

another possibility is to make 0-20mA source is using OpAmp. something like this:
U1 is precision 2.5V reference, R2 is sensing resistor so max current is 2.5V/120Ohm = 20.8mA
With RV one can adjust setpoint and transistor takes the heat.
for this to work OpAmp need to have inputs that can go rail to rail. basically OpAmp compares voltage across R2 and top part of RV1.

1741112539331.png

another simple circuit can work as universal analog output. to control it one can use 0-5V or PWM. don't recall where i stumbled on this one so cannot credit it. i did try it and it looked ok.
1741113651914.png
 

Thread Starter

franktyres

Joined Mar 4, 2025
16
does the reading change faster if you touch Q4 by soldering iron or ice cube?
Yes, when I touched them, the voltage changed rapidly. I’m not sure if this was due to thermal variation or the pressure my finger applied to the component. I haven’t tried using an ice cube, and from what I remember, the transistors weren’t hot.
 

panic mode

Joined Oct 10, 2011
5,002
Hi I don’t want to give an answer without thinking it through, but Vce(q1) and Vce(q4) are around 0.7V. The component with the 22V is actually Rref, if i’m wrong tell me, thank you
Q1,Q2,Q3 have low Vce but for Q4 this is about 22V. voltage across output resistor is 12mA*103 Ohm = 1.2V

so Vce for Q4 is 24V - 0.7V - 1.2V = 22.1V
 

Thread Starter

franktyres

Joined Mar 4, 2025
16
Q1,Q2,Q3 have low Vce but for Q4 this is about 22V. voltage across output resistor is 12mA*103 Ohm = 1.2V

so Vce for Q4 is 24V - 0.7V - 1.2V = 22.1V
Oh, sorry, I got confused and mixed up Q3 with Q4. Also, I forgot that this branch behaves differently from the Q1-Q3 branch.
 

panic mode

Joined Oct 10, 2011
5,002
Yes, when I touched them, the voltage changed rapidly. I’m not sure if this was due to thermal variation or the pressure my finger applied to the component. I haven’t tried using an ice cube, and from what I remember, the transistors weren’t hot.
how rapidly? heat from finger is not very different from room temperature and should not cause significant or fast change. it may be just poor contact on the breadboard.

you handpicked transistors with same gain but this is only one of the criterias. Vbe need to be matched as well. since this is difficult to accomplish, one can add resistors in emitter circuits
 

Thread Starter

franktyres

Joined Mar 4, 2025
16
true, one could get diodes that match the tempco of transistor or use same NPN transistor as a diode etc, while one can compensate things out it is increasing complexity and does get messy. but even without that, quick and dirty fix improves original circuit output considerably (some 20x).

another possibility is to make 0-20mA source is using OpAmp. something like this:
U1 is precision 2.5V reference, R2 is sensing resistor so max current is 2.5V/120Ohm = 20.8mA
With RV one can adjust setpoint and transistor takes the heat.
for this to work OpAmp need to have inputs that can go rail to rail. basically OpAmp compares voltage across R2 and top part of RV1.

View attachment 343739

another simple circuit can work as universal analog output. to control it one can use 0-5V or PWM. don't recall where i stumbled on this one so cannot credit it. i did try it and it looked ok.
View attachment 343740
I really like your first circuit, but my mind isn’t trained enough to fully understand everything that’s going on. I don’t quite get how the OpAmp comparison works. Sorry if I don’t grasp it on the first attempt—I just finished my bachelor’s and don’t have much experience yet
 

Thread Starter

franktyres

Joined Mar 4, 2025
16
true, one could get diodes that match the tempco of transistor or use same NPN transistor as a diode etc, while one can compensate things out it is increasing complexity and does get messy. but even without that, quick and dirty fix improves original circuit output considerably (some 20x).

another possibility is to make 0-20mA source is using OpAmp. something like this:
U1 is precision 2.5V reference, R2 is sensing resistor so max current is 2.5V/120Ohm = 20.8mA
With RV one can adjust setpoint and transistor takes the heat.
for this to work OpAmp need to have inputs that can go rail to rail. basically OpAmp compares voltage across R2 and top part of RV1.

View attachment 343739

another simple circuit can work as universal analog output. to control it one can use 0-5V or PWM. don't recall where i stumbled on this one so cannot credit it. i did try it and it looked ok.
View attachment 343740
Leaving aside everything that has been discussed so far, the most important thing is that I need a circuit that can generate 12 mA with high precision and that the output isn’t affected by the load.
Adjusting with the right resistance can I do what I need with this circuit?
I really really thank you for the time you spent by answering me
 

sparky 1

Joined Nov 3, 2018
1,218
A better choice is to use voltage controlled current semiconductor because the Characteristic's of certain mosfets
are much better for current mirrors than trying to use a current controlled audio amplifier transistor.
What is an ideal current mirror? What are some finite control methods that support high precision current control?
Is there a control mechanism (a common denominator) within the typical application's hardware that can be used
to enhance a current mirror's finite control?
 
Last edited:

crutschow

Joined Mar 14, 2008
38,529
I need a circuit that can generate 12 mA with high precision and that the output isn’t affected by the load.
one could get diodes that match the tempco of transistor or use same NPN transistor as a diode
No matter how many diodes you use, you still end up with the temperature coefficient of one diode causing a change in the constant-current, since there is one more diode drop than base-emitter diode drop.

Changing to the TL431 will minimize temperature effects and provide a stable current (other than heating effects of the transistors, which can be minimized by using dual matched transistors, such as the PMP3906AYSH dual 2N3906).
The LTspice sim of that circuit below shows only a very slight change in current for a source voltage change of 12V to 24V, and R1 varying from 1Ω to 500Ω

1741117870893.png
 
Last edited:

Thread Starter

franktyres

Joined Mar 4, 2025
16
i made a mistake in previous post (OpAmp inputs were backwards) so here is a corrected version
View attachment 343745
I tried to simulate this circuit, but I obtained a different behavior for I_R5 (which I assume is I_out).

1741168921624.png

UPDATE
1741169429983.png
By adjusting the scale, the visualization improves and becomes more similar; however, this sinusoidal behavior can still be observed, which you did not have. How can it be ?
 
Last edited:

panic mode

Joined Oct 10, 2011
5,002
the difference is in the simulator settings. i had checked uic or "Skip initial operating point solution".
when i zoom into the graph i can see the output changing. in this case supply was changing +/-3V which of course
is going to have an effect on output, though output changes are only +/-15uA.
on a 12mA output, that is 0.125% at the extremes.

but i would expect that PSU is much cleaner than that... if we change the 24V variations to +/-0.2V, simulation shows that output current changes less than +/-0.8uA.
1741180937264.png


 

Attachments

Last edited:

sparky 1

Joined Nov 3, 2018
1,218
The current mirror using p channel might use something like this matched pair.
The data sheet shows 4 typical set ups for current.
ALD1102

In the LT1006 Not sure which PNP transistors inside but they must match. Must have been a lot of work.
The external trim and the RTD temperature application show good linearity reading.
There has been one study ongoing using diode inc DMMT5401 pair
MMDT5401
 
Last edited:

tonyStewart

Joined May 8, 2012
237
I would prefer to avoid diodes unless for protection and use my modified Howland Current source.

Choose any reference you like. I chose 100 ohm load, and 0 to 10V input with a single supply = 12V with current buffered by emitter followers driven by a CMOS R2R or BJT that works to input=gnd. Your choice. Accuracy depends on resistors.

For 0 to 10V in R4/R2=R2/R1 = 4 for 0 to 20mA out.
R5 allows for ESD or EMC protection to be added to Vin+ but does not affect Iout.

Any questions? Next offset for 4 mA

1741220781048.png
 

panic mode

Joined Oct 10, 2011
5,002
the lesson should be that current source made from discrete components is hard to beat solutions that use ICs. in ICs components are trimmed to match, close together (thermal coupling). also for constant current source clean supply matters as fluctuations here will have tendency to bleed through to the output.
1741271527841.png
 
Top