27

Recently received a small PCB from China with a simple LED driving setup (12v input).

I spent some time probing it out and reverse engineered this schematic;

actual circuit

I'm trying to understand why they designed it so that this uses 2 transistors (granted my understanding of transistors is still limited) while this following circuit would do the same thing if the simulation is correct.

hypothetical circuit

I'm sure with it being Chinese there are some omissions (some footprints weren't populated, all were parallel resistors however). But i'm mainly just hoping to learn.

Tried my best to search around for answers but I couldn't find anything on here (probably don't know the proper terms to use).

I've been dabbling in entry level hobby electronics for some time, micro controllers and the like. But when things get specific I often have no idea what I'm looking at.

uhoh
  • 3,399
  • 2
  • 23
  • 63
VindolandaHand
  • 273
  • 3
  • 5
  • 6
    Some design details are discussed [here](https://electronics.stackexchange.com/a/481317/38098). – jonk Apr 03 '22 at 04:29
  • 1
    @jonk thank you! – VindolandaHand Apr 03 '22 at 09:12
  • 1
    Out of curiosity, what's the schematic program you're using? The green shading looks interesting – raaymaan Apr 03 '22 at 12:41
  • 6
    @raaymaan That's Falstad's circuit simulator, https://www.falstad.com/circuit/. – Cassie Swett Apr 03 '22 at 12:59
  • 2
    Your second design has no current regulation. If the transistor doesn't limit it properly the leds or the transistor will go poof. – Passerby Apr 04 '22 at 03:03
  • Second design actually work. I do have a flashlight (I modded myself) with exactly that circutry albeit different parts. Battery is Li-ion (1 cell 21700, protected of course), resistor 4.7k, LED - 8x5mm while LED's and D882P NPN transistor. LED current is regulated far better than with an resistor only (Battery positive-switch-resistor-LED positive-LED negative-battery negative). Here LED current is roughfly proportional to battery voltage (until battery is nearly depleted at 3.3-3.4V) – Volodymyr Kalinyak Apr 04 '22 at 19:22

3 Answers3

56

It's a constant-current circuit. The current should be about 0.7/68 ~=10mA.

schematic

simulate this circuit – Schematic created using CircuitLab

Your circuit with one transistor would allow a highly variable current to flow through the LED(s), dependent on the supply voltage and the gain of the transistor which is not well known to begin with and will vary greatly with temperature.

The way it works is that Q2 takes current away from the base of Q1 as the voltage across R2 reaches around 0.7V. The current through R2 is very close to the current through the LED(s), only different by 1% or so if hFE \$\ge\$ 100 for the transistors.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • 4
    I'll bet Q1 gets a little toasty, it's dropping the majority of that 12V. – Mark Ransom Apr 03 '22 at 18:20
  • 11
    @MarkRansom OP's actual circuit has 3 LED drops in series (so about 9V) plus the 0.7V across the 68R so only 2.3V across Q1 and thus only 23mW rather than 83mW. With a TO-92 the rise is about 200°C/W so even 83mW isn't too alarming (17°C rise over ambient vs. 5°C). If there was just one LED you'd likely just use a resistor rather than a crude current source. – Spehro Pefhany Apr 03 '22 at 23:26
  • I think you can probably also look at like this: the top of R2 being the output of an emitter-follower stage built around Q2. That stage is driven by common-emitter voltage amplification stage built around Q2, that being inverting. The link from the top of R2 to Q2 is therefore a negative feedback line which delivers the output of the emitter follower back to the inverting input. – Kaz Apr 05 '22 at 05:33
  • 1
    @Kaz the negative feedback is there, but the missing part there is the 'reference' that decides the LED current. In the case of this kind of crude current source (sink actually) the reference is Vbe at some sensible current, which is in the 0.7V range. It will vary substantially with temperature ~-2mV/°C (so the current drops as the temperature of Q2 increases, which may not be a bad thing, but since the LEDs also decrease in efficiency generally with temperature the light output will definitely drop as the ambient goes up. – Spehro Pefhany Apr 05 '22 at 05:57
22

The circuit with two transistors, even if drawn in a non-obvious way, is a constant current circuit for driving the LED.

When enough current flows via 68R resistor, the voltage over it rises, which in turn starts turning on the second transistor, which starts to take away base current from the first transistor.

So the circuit with two transistors provides feedback for constant current driving.

The circuit with only one transistor is much worse, because it relies on the current gain of the only transistor, and the manufacturing tolerance for current gain is huge, so the collector current might be 100x or 400x times the base current, which obviously would be a bad constant current driver.

Justme
  • 127,425
  • 3
  • 97
  • 261
0

This is a current source driver. the LED has a negative voltage/temp coefficient that means when you power the LED from a voltage source the LED will heat up and when it heats up its Vdrop will go down then it will demand more current which heat it up more and agin Vdrop goes more less >> more current >> more heat and it will go through thermal runway To avoid this we use a constant current source to drive LED