What resistors needed for 2N2222 transistor?

Status
Not open for further replies.

Robin91

New Member
Hello,

I have troubles solving the correct resistor values for my transistor controlled led arrays.
After searching the web and trial and error i have got evrything working except the lights are to dim.

My setup:

PIC16F877A on 5V to control the 21 lines of leds and some other stuff.
2N2222 transistor to pass the 12V to the leds.
1 row contains of 6 leds for testing (gonna be 21).

Im using the transistor to put the - (end of the led row) on the ground / mass.
The led rows contains some 600 ohm resistors to get 20mA.
Now when i connect a 5V source to the base with a 10k resistor the leds stay very dim.

Do i need to put a resistor on the emitter instead of the base or am i missing something else?
 

hi Robin,
Calculate the resistor value for the Base assuming the transistor has only got a gain of 10 to 20max, when saturated [ which is what you want].

so 5v - 0.7Vbe = 4.3v , if the LEDs require say 20mA, then Ib must be 1mA to 2mA, say 2mA.... 4.3v/0.002 = ~2.2K, I would use a 1K5...
 
Last edited:
Thank you, but my problem is still not solved.
The only thing what gives my leds the right brightness is by passing 20V trough the transistor instead of the 12V.
How could it be that the resistor need to pass almost the double of the normal voltage to make it work correctly.

Voltage connected to circuit + 20V
Voltage connected to transistor emitter 0V
Transistor collector is connected to teh ground of the circuit.

When i measure the voltage of the circuit i get precise 12V.
Without the transistor evrything works like it should.
 
Are the LEDs connected to the emmitter or the collector of the transistor.

Post a schematic.

JimB
 
The leds are not the problem, because when i leave the transistor out, they work perfect on 12V.
But the leds are normal "high brightness" leds of 20 mA / 3-3.3V i got from ebay.

* And they are white if that matters
 
Last edited:
The leds are not the problem, because when i leave the transistor out, they work perfect on 12V.
But the leds are normal "high brightness" leds of 20 mA / 3-3.3V i got from ebay.

* And they are white if that matters

IT DOES MATTER.
Three White LED's in series drops at least 9Volts, so with a 600R series resistor thats 3/600 = 5mA.!!!!

EDIT: also check the 2N2222 connections.
 
Last edited:
Oke i didnt know sorry.
So you need to calculate the dropped voltage when choosing a resisor?
But it does not matter if i put the resistor on the base or the end of the array right?

I guess ill buy some 150R resistors then.
 
Oke i didnt know sorry.
So you need to calculate the dropped voltage when choosing a resisor?
But it does not matter if i put the resistor on the base or the end of the array right?

I guess ill buy some 150R resistors then.

hi, No problem.

A 150R with 3 White should give around 20mA... I believe you have a 2N2222 problem, either faulty or wired incorrectly.
The 2N2222 has a good all round specification and 1K5 to the base should be fine from a 5V PIC pin.
Lets know..

The 150R should replace the 600R in your drawing, no other changes needed.
 
I accedently blew up my test resistor on the board and when i replaced it, the leds burn like they should.
Thank you very much for your help.
 
I accedently blew up my test resistor on the board and when i replaced it, the leds burn like they should.
Thank you very much for your help.

hi,
Thats good.
Look at this image for reference.
 

Attachments

  • LEDcolours.gif
    12.2 KB · Views: 386
If the PIC blinks the LEDs for a duration that is less than 30ms then the LEDs will appear dimmed.
I agree that maybe the emitter and collector pins of the 2N2222 are mixed up.
 
Thank you evryone but my problem is already solved.

I had the wrong resistors and a broken transistor.
 
congratulations...

so what was your solution then?

did you just replace the transistor and the 600R resistor to 150R?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…