how to use 2n2222a transistor as a switch?

Thread Starter


Joined Jan 8, 2013
I want to control a supercapacitor of 47000 μF using 2n2222a as a switch which will be controlled by a microcontroller. Pl suggest, how to use it as a switch ? what could be the value of base resistance? Thanks.


Joined Dec 20, 2007
The maximum allowed continuous current for a 2N2222A is 800mA but its maximum spec'd current is 500mA.
Its maximum saturation voltage loss is 1V so at a collector current of 500mA it gets very hot.
Its datasheet shows that it saturates best when its base current is 1/10th the collector current.
But a microcontroller cannot supply a current as high as 50mA so the switched current cannot be as high as 500mA.

If your microcontroller can supply 20mA at 4V then the transistor can switch 200mA and its base voltage will be about 0.8V. Then the base resistor has 3.2V across it and Ohm's Law calculates its value to be 3.2V/20mA= 160 ohms. Its power is only 3.2V x 20mA= 0.064W so ANY resistor size will be fine.

The emitter connects to ground and the switched load connects between the positive power voltage and the collector.