To continue my learning on the hardware side of electronics, I built a small circuit with a NE555 precision timer in monostable (one-shot) mode to power a fan for about 30 minutes and then turn off. The logic circuit is powered by a little 5V board1 while the fan circuit is powered by a 12V battery2. I originally was going to use a 2N2222 NPN to switch the fan on/off, but found when I turned the 5V supply OFF, the fan would start running - slowly, and the LED dimly lit.

At first I thought it was a bad 2N2222, so I tried another new one - same result. I also tried a 2N3904 -- which worked! No current flow when the 5V circuit is off with the 2N3904. The following diagram is built from how I have things laid out on the breadboard -- so it isn't a perfect CircuitLab model, but hopefully it is clear for this purpose. The pin connections and wiring for the NE555 are accurate.

enter image description here

From the datasheets, the only practical difference between the 3904 and 2222 is the current gain (10 vs. 100) and the current rating (200mA vs. 1A). So from my reading either one should work just fine (the fan draws 140mA).

It could be something as simple as I'm missing a needed resistor, but this has left me scratching my head. It also could well be that I'm just having an ID-10-T moment.

The transistor should function as a switch, and the 12V is well below the breakdown voltage, so with the 5V circuit OFF, none of the 12V supplied devices should see ground. When the 5V circuit is ON (powered), both the 2N2222 and 2N3904 work fine and activate the circuit and run it for about 38 minutes and then turn off. It's only when I turn the 5V supply OFF that the 2N2222 has current flowing across the collector-emitter.

I removed R4 completely disconnecting the base of the transistor and with the 2N2222 and 5V circuit unpowered, that fan starts spinning and the LED lights dimly. I've missed something somewhere...

What am I overlooking? Why isn't OFF, off with the 2N2222?


  1. The cheap green 3.3V/5V regulators you stick on a breadboard and power with either a USB cable or barrel connector.
  2. Old battery out of a APC UPS 12V/9Ah, runs fan for about 30 hours before needing a charge.
  • \$\begingroup\$ (With a current of 140 mA, why not power the '555 from 12 V? What is the idea with R6? (I wouldn't ask if it was 10 k.)) \$\endgroup\$
    – greybeard
    Commented Jun 21 at 8:35
  • \$\begingroup\$ That's supposed to be voltage divider sending 5V though the LED so I don't fry it. And the why the 5V and the 12V? -- I wanted to interface through the transistor -- as much for a learning exercise as anything else. \$\endgroup\$ Commented Jun 21 at 8:37
  • \$\begingroup\$ (Differential resistance of a forward biased diode being low, LEDs just need a series resistance when fed from a voltage source.) \$\endgroup\$
    – greybeard
    Commented Jun 21 at 8:39
  • \$\begingroup\$ Learning is already occurring. I was confused on that, but wanted to make sure I didn't over-power the LED. It did look a bit wonky. \$\endgroup\$ Commented Jun 21 at 8:40
  • 1
    \$\begingroup\$ The 1N4001 is not a Schottky diode as your diagram shows. It is a simple rectifier diode- The 1N4001 is a very slow diode - it will not do a good job of "catching" the voltage spikes that occur when you turn the motor off. A UF4001 would do a better job. \$\endgroup\$
    – JRE
    Commented Jun 21 at 8:58

1 Answer 1


Good chance you've got one of those "2N2222" transistors that has reverse pinout compared to 2N3904 (C-B-E rather than E-B-C). Both kinds are common on the market- there is no standard other than the original TO-18 (metal-case) 2N2222.

As such, you would be operating the transistor in reverse active mode, in which it "sort of" works, up to a point. The hFE (gain) is very low, and the breakdown voltage is rated at 5 or 6V, in practice they break down around 9V if memory serves.

So that would leave you with a few volts across the LED and fan. It's not good for the transistor to do this, the forward hFE can be permanently affected.

  • 4
    \$\begingroup\$ You are 100% correct, but I caught the difference in the One-Semi datasheet. It said the 2N2222 was C-B-E, while the 2N3904 said it was E-B-C -- but I have no clue what brand 2N2222 I have -- let me go swap it around real quick and report back. AAAARRRRGGGGHHH - you hit the nail on the head. The datasheet showing C-B-E for the 2N2222 must be an other brand -- and I was taking that as how the 2N2222 was pinned for ALL makes. Thank you -- learning has occurred -- not all 2N2222 are clocked the same. Why have standards -- let's make it fun and leave them guessing! \$\endgroup\$ Commented Jun 21 at 8:52
  • 3
    \$\begingroup\$ That also explains why the hFE on the multimeter for the 2N2222 was a bit off.... At least I didn't kill the 2N2222, it's quite happy facing the other way around! \$\endgroup\$ Commented Jun 21 at 8:58
  • 1
    \$\begingroup\$ The beautiful thing about standards is that there are so many to choose from! :-) \$\endgroup\$
    – jimc
    Commented Jun 22 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.