About NPN transistor

Hello, i recently ordered some transistors on ebay and i expect them to be delivered soon. The type of NPN i bought was 2N2222 / 2N2222A, and the reason i tell you this is because i have one question.

I want to use the transistor as a normal switch - i expect from him the following: when it receives +5V on the Base pin, a +12V to flow from the collector to the emitter. (here i provided “schematic” made via paint). Tell me, is that possible?

So long as you don't exceed the collector current or power dissipation ratings of the transistor, use a catch diode if driving an inductive load, and limit the base current with a resistor.

Allan.

Yes it is possible. Put the load between the positive supply voltage and the collector and the emitter to ground. This is called a low side switch. A resistor is required between the Arduino output pin and the base of the transistor to limit base current and protect the Arduino output. The value of the resistor depends on the required collector current and the transistor gain, but a general rule of thumb value is around 200 ohms minimum.

groundfungus:
Yes it is possible. Put the load between the positive supply voltage and the collector and the emitter to ground. This is called a low side switch. A resistor is required between the Arduino output pin and the base of the transistor to limit base current and protect the Arduino output. The value of the resistor depends on the required collector current and the transistor gain, but a general rule of thumb value is around 200 ohms minimum.

Thank you but am not sure I will be able to do this. Can you please provide me a simple schematic?

here is a schematic that shows a bipolar transistor (BJT) and a MOSFET driver for a small motor (load).dc motor driver.jpg

Thank you that is really helpful but i have a few more questions:

  1. Why is this 10k ohm resistor from the emitter to the base as it connects the +5V through 220 ohm resistor with ground;
  2. And as i am doing H-bridge with 4 NPN transistors two of them will connect the ground to the negative side of the motor, but the other 2- they are supposed to allow the +12V to flow from the collector to the emittor when +5V is being applied to the base.

. Why is this 10k ohm resistor from the emitter to the base

It is not the emitter and base it is the source and gate. It stops the gate floating and thus turning on when the Arduino is not powered or during the time at start up between applying the power and setting that pin as a low output.

And as i am doing H-bridge ....

Bad idea to do your own especially as you know so little about transistors, designing a good h-bridge is an advanced topic.

but the other 2- they are supposed to allow the +12V to flow from the collector to the emittor when +5V is being applied to the base.

That is not going to happen. At the least you need two more transistors, and use PNP or P-channel FETs for the top switches. Just buy a h-bridge.

JMD1:
Hello, i recently ordered some transistors on ebay and i expect them to be delivered soon. The type of NPN i bought was 2N2222 / 2N2222A, and the reason i tell you this is because i have one question.

I want to use the transistor as a normal switch - i expect from him the following: when it receives +5V on the Base pin, a +12V to flow from the collector to the emitter. (here i provided "schematic" made via paint). Tell me, is that possible?

No, 5V on the base pin and POP! bang goes your new transistor.

The base-emitter voltage and current must not go above their max ratings, which means you feed the
base via a resistor to limit the current - base-emitter voltage will typically be 0.6 to 0.8V, depending on
the current - you never set this voltage, you set the current and let the base-emitter voltage find its own level.

Damn, it didn't knew it is so complicated... ok thanks to everybody who replied here.