Continue to Site

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.

  • 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.

I thought I knew electronics but apparently don't know what a current mirror is!

Status
Not open for further replies.

Rich D.

Active Member
I was playing around with some parts. I have a new LED driver that is supposed to deliver 20mA to one or a whole string of LEDs, and it can take from a few volts up to 90 volts. In either case it delivers 20mA. Seems to work fine. It's a Supertex CL520. What I thought was cool was that for about 30 cents, I can skip the current limiting resistor and just hook it up thoughtlessly, getting 20mA even with a varying voltage source.

So if I wanted to drive - say - 9 white LEDs, I could use either about 30 volts or so, or I could split the LED strings into groups of two or three and use only 12 volts power. Of course that would require three of those CL520's right?

Well, if I employed a current mirror using a 4-cent transistor, maybe not. My thinking was that if I put a transistor in the grounded side of the LED circuit, I could "mirror" that current to a few more sets of LED strings and they would all run at the same 20mA.

BUT: It doesn't work that way. Crudely it does - for example when I removed the "master" LED, the other transistors and their LEDs do shut off, but normally they run much brighter than the 20mA needed, and those LEDs all seem to have the voltage sensitivity that a normal current-limiting resistor has. It seems the current mirror idea is not regulating the LED currents at all!

I have a few possible reasons, but I have no idea why this circuit doesn't seem to work like the text books say. Maybe it doesn't work because I'm not using well-matched transistors? Don't think so.
Maybe with the CL520 current regulator setting the current the transistors are not able to find their own "sweet-spot" and regulate current? That doesn't seem right either.
Perhaps the 2N3904's I am using don't have enough current gain? Should I try darlington? They are supposed to have about 100X gain at the currents they are using, so that seems enough.

I am baffled. Yes, this circuit might be a little odd because a CL520 and transistors are more expensive than a few resistors, but this isn't so much an engineering application problem as it is an academic problem. If there is anybody out there that knows what is going on here, I would welcome any explanation.

I attached two sketches - pardon my bad graphics.
#1 is my basic drawing of a current mirror, where I on the left is supposed to create a similiar I on the right.
#2 shows my basic circuit. On the left, 12V supplies the CL520 and a couple of LEDs, then finally the current mirror "input".
The "output" side of the current mirror (there are 2 of them) are connected to similar pairs of white LEDs. Ignore that 258/220 ohm resistor, I tried it to no effect.

So, anybody want to take a stab at this?

Current Mirror v600 S2060025.JPG
Current Mirror v600 S2060025.JPG
LED Current Mirror Test v600 S2060024.JPG
 
Why the CL520?

You might also try adding the missing emitter resistors to the transistors - presumably you are trying to follow a theoretical diagram out of a book?, which miss out many of the vital components to make them work.
 
The diagram you show will work if all the transistors are exactly the same. (on a single die)
You will need to add emitter resistors to all transistors. Set the resistor so that there is about 1 volt across the emitter resistors.
 
I'm using the CL520 because I am just learning how I can use this part.

What will emitter resistors do? All I know about resistors is they are used to prevent thermal runaway when biased for class A.
The current is already limited, so if the bases are at about 1-1/2 volts how will that help?

Realize I don't need this circuit to work, I just want to understand why this current mirror isn't mirroring current. I thought I was pretty smart but this one stumps me.
 
When you say the mirror circuit exhibits voltage sensitivity, does that include the CL520 current regulator?
That device shouldn't.
 
Realize I don't need this circuit to work, I just want to understand why this current mirror isn't mirroring current. I thought I was pretty smart but this one stumps me.

Because there's no emitter resistors - absolutely essential unless the transistors are EXACTLY matched (as in a single IC on the same piece of silicon).
 
Because there's no emitter resistors - absolutely essential unless the transistors are EXACTLY matched (as in a single IC on the same piece of silicon).
That would explain differences in the current between strings but not the variation in current with voltage that the OP reports seeing.
 
apparently don't know what a current mirror is
review:
Top Left picture:
About 1mA flows through 10K, diode, and 1K. There is about 1V across the 1K resistor.
The base of the transistor is 1D above 1 volt, or 1.7V.
The 1.7V is plenty to get the transistor turned on. C-E current flows until 1V is across the emitter resistor. At this point the transistor has just the right amount of base current to get 1mA emitter current. The voltage across each 1K resistors will the same. (almost) The current ratio is set by the emitter resistors. Variations in transistors has less effect.

The diode and the B-E of a transistor are not exactly the same but close.

Top Right picture:
The diode is replaced with a transistor. Current flows through the 10k and into the base of the transistor. This turns on the transistor. The collector steels away the base current. The transistor runs with currents as shown. (if the gain is 100)

Bottom Picture:
Example of current source.
upload_2015-1-15_21-10-45.png
 
Hi,

First, something looks wrong on the schematic. The supply says 12v and the drop on the CL520 says 5.8v but right under that it says 7.1v, and we all know that 7.1v plus 5.8v does not equal 12v. I suspect that the CL520 is not always getting at least 5 volts across it, and that is a good set point for that device. If the supply voltage is reduced it may not get that 5v any longer.

Second, what you guys seem to want to build is a set of current regulators, not a set of current mirrors. When you put a resistor in the emitter of the transistor and place a fixed voltage across the base to ground that constitutes, strictly speaking, a current regulator not a current mirror. If we wants to experiment with a current mirror then there should be no emitter resistors, but if he just wants current regulation then emitter resistors might be ok.

Then also there is the issue of feeding two transistors instead of just one. That means the original current has to split three ways instead of just two.
 
When I use a current mirror ( when I need a good 4~20mA output ) I have to have 1% emitter resistors with an extremely low PPM count so the temperature doesn't mess with the output..... My emitter resistors are only 100 ohm so even touching them causes issues.....
 
A bunch of good points here. 1) That 5.8 volts was maybe a math error, I remember recording the actual voltages directly.

2) The CL520 by itself worked fine, from about 7-8 volts to 25 or more - the LED current remained at 20mA and the brightness of the LEDs didn't vary.

3) I didn't realize that the 20 mA gets split between all the transistors. Makes perfect sense. Duh.

4) I'm starting to come around to a bit of emitter resistance to even out the variations in Vbe of the transistors, but I did swap around the transistors and in any arrangement the non-CL520 LEDs were too bright, so I don't think the variation in transistors is the cause of all of these "issues".

It's worth a try: I will re-create this circuit with some emitter resistance and see if the LED currents are regulated - as in don't vary much with source voltage changes.
 
https://wiki.analog.com/university/courses/electronics/text/chapter-11
When building current mirrors with discreet components you should use emitter resistors to get good results.
View attachment 90264
View attachment 90265

Hi,

Thanks for the redraw. I didnt realize that they were putting a resistor in the emitter of the first transistor too (Q1) somehow i missed that point.
I think it would be a good idea too as it would reduce the sensitivity to various variations.
 
A bunch of good points here. 1) That 5.8 volts was maybe a math error, I remember recording the actual voltages directly.

2) The CL520 by itself worked fine, from about 7-8 volts to 25 or more - the LED current remained at 20mA and the brightness of the LEDs didn't vary.

3) I didn't realize that the 20 mA gets split between all the transistors. Makes perfect sense. Duh.

4) I'm starting to come around to a bit of emitter resistance to even out the variations in Vbe of the transistors, but I did swap around the transistors and in any arrangement the non-CL520 LEDs were too bright, so I don't think the variation in transistors is the cause of all of these "issues".

It's worth a try: I will re-create this circuit with some emitter resistance and see if the LED currents are regulated - as in don't vary much with source voltage changes.

Hi,

You could probably measure right across the CL520 during tests, to make sure it has at least 5 volts across it at all times. If it drops too low then it doesnt work anymore. They spec 4.75v, so 5v should make sure it works all the time.
 
I recently had need for a discrete set of 7 current mirrors (2n3904) to permit running LEDs at a decent current with a typical Vf close to the battery voltage. Dropping resistors would cause large swings in current due to Vcc being close to Vf as the battery discharged. Also Vf could vary quite a bit since I wasn't binning the LEDs based on Vf. I didn't use any emitter resistors and it worked fairly well!
 
I recently had need for a discrete set of 7 current mirrors (2n3904)

...that's just what I was trying to experiment with! What was your trick? and why did it not work for me? Am I using the wrong color LEDs? (that was a joke).
But seriously, did you have any tricks to get it working well?
 
Thanks Mosaic, I suppose that's a "mirror image" (no pun intended) of the same thing. I'm envious that yours seems to be working well, but mine didn't. It's all clear as mud to me now. I am wondering if your use of a limited range of DC voltage (I assume) allows it to work well. The schematic doesn't really show what the input voltage range is.
 
I did screen the transistors for a similar Vbe & Hfe. I discovered that a few of my salvaged trannies had specs all over the map. I ended up using all new ones from Jameco...standard bulk units but they were all within +/- 10 Hfe and 5 millivolts Vbe.
I used this fine kit (thx to Nigel) to do the screening job...
https://www.banggood.com/DIY-Meter-...ESR-Inductance-Resistor-NPN-PNP-p-929603.html

The circuit runs off a Li Ion battery...so around 3.6 thru 4.2V

Here it is in operation....don't laugh too much, its for kids. Play back is more in sync if watched on YouTube natively.
 
Last edited:
Nice toy Mo!! And that tester: Wow - that has a very good price and free shipping! The product description's English is a little funky though.

I've been doing some experimenting with the circuits, and found that the transistors will put out 20mA to the LED no matter the voltage, provided the input current is 10uAmps. (That's roughly a 200X gain?) So that isn't the issue. What I did find is the Vbe was different for different transistors - so that appears to be the issue. Matching transistors - in particular the Vbe - appears to be necessary, or figure out a way to compensate for the differences.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top