Page 1 of 1

2N2222 driven LED strip

Posted: Sat Sep 12, 2015 7:50 am
Hi,

I'm trying to power a 12 V LED strip (6 LEDs) with 2N2222 transistor connected to my Pi's GPIO pin.
The problem I've ran into is when I power the transistor's base the LED lights very dimmly.

The strip itself connected directly to power supply uses about 50 mA.
Circuit
scheme.jpg (16.45 KiB) Viewed 3469 times
What can be the source of my problem?

Re: 2N2222 driven LED strip

Posted: Sat Sep 12, 2015 8:42 am
The voltage across an LED various from type to type and colour to colour.
If your LED has a voltage drop of 2.2V you need at least a 6*2.2= 13.2Volt supply.
White LEDs can requires 3V so you can only use three in series.
And you need a bit of spare voltage across you transistor CE.
Use less LED's (e.g. 5) and always use a series resistor to limit the current.

Re: 2N2222 driven LED strip

Posted: Sat Sep 12, 2015 9:05 am
The 10kΩ resistor limits the base-emitter current to below 0.27mA. The gain of the transistor is probably not high enough to conduct 50mA collector-emitter in that condition, even if sufficient voltage is available.

A 1kΩ base resistor would be a better starting value.

Re: 2N2222 driven LED strip

Posted: Sat Sep 12, 2015 9:16 am

So I took out one LED, and even went down to three. The result was still the same.
With no other things coming up to my mind I tried to change the PSU to PC one and it worked, the LEDs are nice and bright, but now they're ON all the time even if the GPIO is in the LOW state. I also tried to change the base resistor to 1.5 kΩ .

What should I try next?

Re: 2N2222 driven LED strip

Posted: Sat Sep 12, 2015 12:24 pm
Since it is a led strip you made yourself, looks like it, what is the model of the led ?

Is it a 20ma normal led or a 5 Watts type ?

This is very important because we need to know the characteristic of the led.

How much current that the led needs?

A 1K resistor will give you a current of (3.3V -.07)/1K = 1.6 ma at the base which will be around 200ma(minimum) to the collector. But the HFE start to drop drastically after 200ma.

Re: 2N2222 driven LED strip

Posted: Mon Sep 14, 2015 3:11 pm
So I've got two types of LEDs i want to run. They both behave in similiar way.
The first are the previously described some no-name chinese red LEDs, but i've also have some of these yellow ones.

Unfortunately datasheet is in Polish. http://www.powerled.pl/pliki/Powerled_L ... _karta.pdf

According to this PDF my yellow ones take 130 mA per 12 LEDs. But the strip can be dvided in three parts of 4. And that's the quantity I want to start with.

Re: 2N2222 driven LED strip

Posted: Mon Sep 14, 2015 5:18 pm
This is the english version
http://www.powerled.pl/pliki/Powerled_LC_ENGLISH.pdf

If you use only 1/3 of the strip then the current should be
43 ma . A 1K , even a 1.5K resistor between the GPIO and the transistor base should work.

Use a voltmeter and check the voltage between the collector and the emitter when the transistor is ON.
It should be around 0.3V

Also check what is the voltage across the led power lead.

We need a picture and your voltage result.

Re: 2N2222 driven LED strip

Posted: Tue Sep 15, 2015 12:07 pm
If you have not use a series resistor your transistor might have blown up.

Re: 2N2222 driven LED strip

Posted: Wed Sep 16, 2015 4:19 pm
Is it possible to use a series parallel circuit of the LEDs, Two LEDs in series with a 380R resister,
giving 20ma each led ( X 3 ) Them parallel the three rows of series LEDs This will give a total
current of 60ma through the 2n2222. ( 12v - 4.4 =7.6 / 0.02 = 380r

Drive the 2n2222 in to saturation to use as a switch ( 3.3v - 0.6v = 2.7v / 0.01 = 270r

Re: 2N2222 driven LED strip

Posted: Wed Dec 06, 2017 11:15 pm
theenggprojects wrote:
Wed Dec 06, 2017 7:24 pm
Hi,

If you are planning to work on 2n2222, then you must have a look at Introduction to 2n2222. I have shared detailed overview of how it works and have also shared its working Proteus Simulation.

Thanks.
I have looked at your page and I appreciate the effort yo put int it BUT!
The way you use the transistor is not the way I would recommend. I would go even further and say it is wrong.
You put the load in the emitter which requires your base voltage to be above the load.
The best way to use an NPN transistor is to put the load at the collector side which makes the load voltage
independent of the driving voltage. You must then add a resistor in the base.

Also you are driving a motor but you do NOT have a flyback diode. That can damage your circuit!
It is for that reason that I post here. Do NOT use that circuit. It may damage your PI!

Also statements as ". It is the most commonly used Negative-Positive-Negative (NPN) Bipolar Junction Transistor (BJT) available"
shows to me a worrying lack of experience.

Re: 2N2222 driven LED strip

Posted: Sun Dec 10, 2017 3:27 pm
Hi,

You are absolutely right.This circuit is just a demo to show guys about the working of this transistor. If you are working on some project then you have to design its proper circuit. Thanks for mentioning that.

Have a good day.