Electronic – NPN transistor to run 12V 0.5A from 3.3v 4mA

transistors

I assume this question is very common, because I read a lot of answers here, but I still missing somthing..

I have "Electric Imp" module, which have max I/O pin power output of 4mA, and its run on 3.3V.
I need to run electric door, which consume 12vdc 500mA at max.

So i started and checked the 2N2222A transitor:
Ic(MAX) = 1A – good enough.
Vceo(MAX) = 40V – good enough

and now I am geting to the base needs (the gain):
in the Hfe I see that the closest is Ic=500mA, Vce = 10V (I need 500mA and 12V, so it is close enough), the gain for this will be 40, which means I need 500/40 = 12.5mA as output.. I do not have it.. am I right so far?

Another thing I am missing is – where can I see in the datasheet that 3.3V is enough on the base, BJTs is not Voltage , but current base, right?

if I am right so far, so I need 500mA/4mA = Hfe of 125, but I couldnt find such resistor.. I can add relay 12vdc coil with lower current than 500mA and use the NPN to run the coil so it will run the door lock..

Thanks, Gabi.

Best Answer

You are correct. With a gain of 40, the 2n2222A is not right for your limited current. There are four solutions.

  1. Replace the load with something smaller. Using a smaller relay, which turns on the electric door lock.

schematic

simulate this circuit – Schematic created using CircuitLab

  1. Make a Darlington Pair with two transistors. The beta will square, but the voltage drop across the base will be higher (1.4V instead of 0.7V). Just need to recalculate the resistor.

schematic

simulate this circuit

  1. Use the 2n2222 as a switch for a PNP transistor. A 2N2907 is the typical complementary PNP transistor for the 2N2222, but any suitable PN will work. R3 is a weak pull up, R2 sets the base current for Q2 when Q1 is on.

schematic

simulate this circuit

  1. Use two NPN as a simple switch. This inverts logic. When your output is low, Q1 is Off, so Q2 is on via R2. When your output is high, then Q1 is On, pulling Q2's base to ground, keeping it off. The default state of this, when the GPIO is not yet turned on, may result in the lock opening when the GPIO is not yet turned on.

schematic

simulate this circuit