Go Down

Topic: A couple of questions on the 2N2222 transistor (Read 6 times) previous topic - next topic

charis

Hi, this is my first post!

I recently started in the world of electronics and i am trying to make myself comfortable with various parts before starting to build real projects.

If this image is taken as a basis, i am struggling to calculate the correct values for R1 and R2:



As with the image, the voltage across the collector is 5V and the current through the Led should be 20mA. The datasheet states that the Collector-Emitter saturation voltage is 0.3V when the current at the collector is 150mA and 1V for a current of 500mA so i assume that for 20mA is even less than 0.3V?

Then if i understand right R1 = (5-0.3)/0.02 = 235 Ohm ?

For the base i am completely lost. The datasheet states that the Base-Emitter saturation voltage is 1.2V when the current at the collector is 150mA but what about a current of 20mA at the collector? Furthermore, the DC Current Gain is 75 for Vce = 10V, Ic = 10mA and 100 for Vce = 10V, Ic = 150mA, but i have a Vce of 5V and a Ic of 20mA. What is the correct gain so that i can calculate the correct value of R2?

Thank you!

Krodal

Try to find a good datasheet, with lots of data. Some datasheets are very short.

The voltage drop over the transistor is perhaps only 0.1 or 0.2 V at 20mA.
But the led has a voltage drop of 1.4 ... 3V. That depends on the color. http://en.wikipedia.org/wiki/Light-emitting_diode#Colors_and_materials

If you want the transistor to be fully on, use about 30% more current through the base than needed.

Suppose the led has a voltage drop of 2V. 3V/20mA = 150 Ohm.
The current gain with Ic at 20mA is about 70. 20mA / 70 = 0.29mA. Add 30% makes 0.37mA.

For safety I assume that the output of the Arduino is 4.5V and the base about 0.7V. 4.5-0.7 = 3.8V
3.8V / 0.37mA = 10k

So 10k would do the job, and 4k7 doubles the base current to be sure. It doesn't hurt the 2N2222.




fungus

The main point of the base resistor is to stop too much current coming out of the Arduino and hurting it.

As such, there's no 'correct' value, anything which lets less than 40mA out of the Arduino pin and more than what the transistor needs to full open will do.

OTOH, 40mA isn't a good design goal for an Arduino pin. You should be able to open the transistor with far less than that.

This page helped me a lot when I started out with transistors: http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/bjt_theory.html

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

JimboZA

Quote
This page helped me a lot when I started out with transistors: http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/bjt_theory.html


Ok, I'm about halfway down the first page of that link and already things are making sense. Things that I first tried to understand about transistors when I was 13 in 1969.

That link ought to be Transistors 101 for everyone.

"I have a question about transistors...."
"Wait, have you read Transistors 101?"
"No, but...."
"Uhuh.... no "buts".... read it then ask if you still need to"

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

cjdelphi

I generally use a 1k on the base, and around 200 - 250ohms from a 5v supply to power a small 5mm LED.

5/1000

0.005 amps at the base of the transistor (it can handle up to 40ma (0.040amps)


Go Up