Controlling a motor with an NPN transistor
April 8, 2008
Apparently I don't yet fully understand transistors, so I'm hoping someone can explain what I'm missing. I'm using USB 5V to power my MCU (an Arduino), and I've got a 9V battery pack (6x AA) for my motors. I'm trying to switch that 9V off and on for a motor. I don't need to change directions or control speed, I just need to be able to give it either 0V or 9V. I thought that I could do this by using a standard NPN transistor like a 2N3904, wiring the 9V positive from the battery to the collector lead, an I/O pin to the base lead, the emitter lead to the motor's positive terminal, and the motor's negative terminal to ground. (The 9V battery pack and the Arduino's 5V power have a common ground). But for some reason, when the base pin on the transistor goes high (5V above ground), the voltage coming out of the emitter pin is only 4.5V, not the 9V that I measure coming into the collector pin. I've spent time reading all about Qfe and Vbe and Ic and I kind of understand all that, but I still don't see why the voltage would be less. It seems like the transistor should be saturated. Can one of you smarter types explain to me what I'm missing?