I implemented a circuit very similar to the following (original source: 8051 - Can an NPN transistor be driven? ) to control power to a vibration motor from my micro.
I made the following modifications:
- Power supply is 5V DC regulated, not 3.3V
- R1 is changed to 100K (to try to save battery power)
- R2 is changed to 1K (to pass GPIO pin value to transistor easier)
- Q2 is TIP31
- PowerV is not a separate supply. Instead it is replaced with a 51 ohm 1/2 watt resistor connected to the same 5V DC regulated supply to prevent the rest of the circuitry from overheating or shutting down
I ran tests using a voltmeter with the motor physically disconnected. In my software on the micro, I can choose to make the GPIO pin high-impedance or grounded. This part works. What doesn't work is the voltage reading at the "Load". It's always stuck around 5V no matter what the value of the GPIO pin state is.
I have tested the motor by connecting it directly to 4 AA batteries that are at 75% good status (not weak) and the motor runs flawlessly in that setup so the motor isn't at fault.
I also ran a conductivity test on the motors and that was normal.
What's the best way to fix this without hogging power? The only thing I could think of is that my R1 and R2 ratio is terrible and that I should just make R2 24K since I multiplied R1 by 10 in my design?