Author Topic: Current mirror fail?  (Read 3421 times)

0 Members and 1 Guest are viewing this topic.

Offline Lucky-LukaTopic starter

  • Supporter
  • ****
  • Posts: 240
  • Country: it
Current mirror fail?
« on: September 20, 2019, 06:35:07 pm »
Hi all
I just wanted to realize a current mirror circuit.
Something went wrong: the load current keep rising...
It looks like there is something that I haven't understood of the theory behind the circuit.
Can anyone help me?
https://youtu.be/umwotfRn-ow

Cheers
Memento audere semper.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20363
  • Country: gb
  • 0999
Re: Current mirror fail?
« Reply #1 on: September 20, 2019, 07:25:16 pm »
It would help if you posted a schematic, rather than a video.


Were the transistors matched?

They're obviously not in thermal contact with one another.

In short, this is exactly what you should expect to happen. The transistors need have a similar hFE and VBE at a given current and be at the same temperature, in order for a current mirror to work properly. Adding emitter resistors may help and glue the two transistors together. The VBE can be matched using the diode test function on a multemeter. Matchign the hFE is more tricky, but not as critical as the VBE.
 
The following users thanked this post: Lucky-Luka

Offline Lucky-LukaTopic starter

  • Supporter
  • ****
  • Posts: 240
  • Country: it
Re: Current mirror fail?
« Reply #2 on: September 20, 2019, 08:11:23 pm »
Hi
Q1 Vbe is 0.68V and Q2 Vbe is 0.75V.
You said "The VBE can be matched using the diode test function on a multemeter" but I haven't understood how I can actually do the matching in order to have a better current mirror circuit.
Cheers
Memento audere semper.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20363
  • Country: gb
  • 0999
Re: Current mirror fail?
« Reply #3 on: September 20, 2019, 08:52:34 pm »
The VBE must be matched without the transistors in the circuit.

Set the multimeter to diode test. Connect the base and collector to positive lead and the emitter to the negative lead. Repeat the process with several different transistors until a matched pair is found.

The transistors will need to be at the same temperature to work, so glue them together. 15mA might be too higher current, because it will cause more heating in the transistor driving the LED, than the one with the resistor, as it will have a higher voltage across it.

Emitter degradation resistors can also help. Try putting a 470R resistor between each of the transistors' emitters and 0V.
 
The following users thanked this post: Lucky-Luka

Offline Lucky-LukaTopic starter

  • Supporter
  • ****
  • Posts: 240
  • Country: it
Re: Current mirror fail?
« Reply #4 on: September 22, 2019, 07:56:13 pm »
Thanks for the tips.
Glue them together? Isn't glue insulating?
Cheers
Memento audere semper.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20363
  • Country: gb
  • 0999
Re: Current mirror fail?
« Reply #5 on: September 22, 2019, 08:16:21 pm »
Thanks for the tips.
Glue them together? Isn't glue insulating?
Cheers
Yes, compared to metal, most adhesives are thermal insulators, but they're much better thermal conductors, than air. I recommend cyanoacrylate, commonly sold as superglue, but be careful, it bonds human skin very well.
 
The following users thanked this post: Lucky-Luka

Offline Lucky-LukaTopic starter

  • Supporter
  • ****
  • Posts: 240
  • Country: it
Re: Current mirror fail?
« Reply #6 on: December 08, 2019, 08:26:32 am »
Finally I've found time to improve my circuit as you suggested.
I didn't use emitter resistors but nonetheless the circuit performance improved.

Cheers
Memento audere semper.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Current mirror fail?
« Reply #7 on: December 08, 2019, 10:08:47 am »
Also helps to cascode the output side (Wilson current mirror, sorta).  Then both current-setting transistors see the same voltage and current (give or take a factor of 1-hFE or thereabouts).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Lucky-Luka

Offline magic

  • Super Contributor
  • ***
  • Posts: 7454
  • Country: pl
Re: Current mirror fail?
« Reply #8 on: December 08, 2019, 12:12:22 pm »
The VBE must be matched without the transistors in the circuit.

Set the multimeter to diode test. Connect the base and collector to positive lead and the emitter to the negative lead. Repeat the process with several different transistors until a matched pair is found.
Folk wisdom has it that transistors from one production batch tend to match to 3mV. I have actually tested some small (5~20) lots of a few different transistors using exactly your technique and to my moderate surprise I found it to be true, except for super cheap no-name BC547/BC557s where maybe 33% were outliers but still within 10mV between the extremes.

So it would seem that most of the time static mismatch is not going to have significant impact. If I got my math right, the gm=Ic/Vt formula predicts that 2mV mismatch makes some 6~8% difference in collector current and 10mV is less than 1.5x difference and it takes 20mV to get 2x difference. LTspice seems to agree.

Thermal tracking is the real problem because 20mV is a result of merely 10°C difference in junction temperature.
 
The following users thanked this post: Lucky-Luka

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: Current mirror fail?
« Reply #9 on: December 09, 2019, 11:58:24 pm »
Also keep in mind that you're not accounting for the burden voltage of the ammeter.  When you have the ammeter on the left side (where the current is set), the series resistance of the ammeter is added to the 1K resistor, which lowers the current.  When you move the ammeter to the LED side, the reference current on the left is higher because the ammeter's resistance isn't in series with the 1K resistor anymore.
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 
The following users thanked this post: Lucky-Luka

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20363
  • Country: gb
  • 0999
Re: Current mirror fail?
« Reply #10 on: December 11, 2019, 07:02:22 pm »
The VBE must be matched without the transistors in the circuit.

Set the multimeter to diode test. Connect the base and collector to positive lead and the emitter to the negative lead. Repeat the process with several different transistors until a matched pair is found.
Folk wisdom has it that transistors from one production batch tend to match to 3mV. I have actually tested some small (5~20) lots of a few different transistors using exactly your technique and to my moderate surprise I found it to be true, except for super cheap no-name BC547/BC557s where maybe 33% were outliers but still within 10mV between the extremes.
You're probably right. I haven't tried this with transistors but have found LM334s from  the same bag are matched very closely. I made the circuit on page 8 of the data sheet and trimmed it to 50µA. I noticed the regulators from the same bag matched. The diodes will all from the same batch.
http://www.ti.com/lit/ds/symlink/lm334.pdf

Finally I've found time to improve my circuit as you suggested.
I didn't use emitter resistors but nonetheless the circuit performance improved.
Cheers
Good, I'm glad you got it working.

Yes, emitter resistors aren't completely necessary and they do help but do have their disadvantages, apart from more parts, the volt drop across the resistors reduces the maximum voltage across the load, before it stops working. In hindsight, 470R is overkill for 10mA, as it would cause a volt drop of 4.7V. I'd probably opt for 68R to 120R for a 680mV to 1.2V drop.
 
The following users thanked this post: Lucky-Luka

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Current mirror fail?
« Reply #11 on: December 11, 2019, 07:10:15 pm »
Or use a transistor pair dedicated for current mirror applications, such as BCV61, BCV62.
 
The following users thanked this post: Lucky-Luka

Offline magic

  • Super Contributor
  • ***
  • Posts: 7454
  • Country: pl
Re: Current mirror fail?
« Reply #12 on: December 11, 2019, 07:22:26 pm »
Note that the datasheet is silent on the question of internal thermal tracking and even the Early effect. They only guarantee 30% current match at modest 5V and 2.5mW power dissipation.
 
The following users thanked this post: Lucky-Luka

Offline Lucky-LukaTopic starter

  • Supporter
  • ****
  • Posts: 240
  • Country: it
Re: Current mirror fail?
« Reply #13 on: December 23, 2019, 02:11:48 pm »
Also keep in mind that you're not accounting for the burden voltage of the ammeter.  When you have the ammeter on the left side (where the current is set), the series resistance of the ammeter is added to the 1K resistor, which lowers the current.  When you move the ammeter to the LED side, the reference current on the left is higher because the ammeter's resistance isn't in series with the 1K resistor anymore.

It doesn't have anything to do with the post but I just wanted to say that whenever I've got spare time I watch your videos and I love them.
Cheers
Memento audere semper.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf