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.

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?
 
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
 
Thank you, but my problem is still not solved.

Without the transistor evrything works like it should.

What colour are the LED's and what is their current rating.??
 
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 :p
 
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 :p

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
    LEDcolours.gif
    12.2 KB · Views: 380
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.
 
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.

Latest threads

Back
Top