I've been working on a project and cannot seem to get it right. I'm using an arduino to control a motor, and turning it on and off via a transistor. I had an issue with it not working, so I posted this question:
I had the motor on the wrong side of the transistor. I fixed that. It's still not working. The odd issue is, however, that when I disconnect the motor, and hook a multimeter up to the leads going to the motor, the voltage is correct.
Before I go further, here's my amateur schematic.
And let me apologize for not knowing what I'm speaking about exactly. I've 20+ years of IT and programming, but never really understood the ins and outs of electronics, the terms (I still am not sure if the cathode is the + or - end), and the proper way to address a lot of this. So in case I made the schematic wrong, I'll 'pseudocode' the circuit in english:
Motor, with diode going between the + and - terminals. The end of the diode with the white line is towards the positive terminal. (99% sure that is correct, when hooked to my multimeter, positive probe on the white stripe end and negative on the other, no current passes)
NPN2222 transistor. To illustrate the alignment, imagine it laying on a table, the flat side down. The pins are towards you, the black top away from you. The pin on the right side is the emitter, correct (for a NPN2222, or are they all the same?) That is grounded. The middle pin is hooked to the arduino digital pin with a 540ohm resistor in between (found that value by using some online transistor/resistor calulators. I may have done it wrong). The collector, the left pin, connects to the negative pole of the motor, as well as the diode (the non-striped side).
The positive pole of the motor/the striped end of the diode connects directly to the battery pack.
When the pin activates, the motor does not turn.
Now, where I am very confused:
I disconnected the motor. I put an LED in it's place. The LED lights up. I read other posts here regarding lowered voltage, the motor only getting like 2.7 volts instead of 3 because of the transistor, etc. So I hooked my multimeter up to the wires that would attach to the motor. When the arduino activates, I'm reading 2.97v on the pins. Thats more than enough to run the motor. What the heck is going on?
So then I hook the motor back up, and put the multimeter on the pins. When it should be turning on, it's only reading 0.17v. Without the motor, it reads 2.97v, with the motor - 0.17v.
I do know the motor has a high current draw. I tried my device with a micro mini motor and even attached directly to the battery it wasn't powerful enough to turn the wheel it was geared to. So I pulled a slightly larger motor from a remote control toy. This is strong enough, but pulls a little over 200ma (the micro motor pulled about 100). Is that possibly the issue? The transistor should easily be able to handle that.
Whats got me SO confused is without the motor the pins ARE getting 2.97V. With it, the the motor does not turn, and I'm reading .17v.
What am I doing wrong?