Hello, I'm having an issue and hoped the wisdom of the forum might be able to help.
I've created a circuit as in the attached diagram. Essentially it has a PN222A transistor with the Arduino Nano's D12 pin connected to its base via a 1k ohm resistor, the collector is connected to the Arduino's 5v and the emitter to a small submersible pump, then ground. This does not work - the motor does not pump water.
However when I swap the the pump out for an LED and 220 ohm resistor it does work as expected.
When the pump is connected directly to the 5v pin then the pump works as expected.
This is the type pump: https://tinyurl.com/yad2d8yz Voltage range (V): DC2.5-6 Working current (mA): 130-220mA Flow (L/H): 80-120 Power (W): 0.4-1.5
Circuit diagram is attached.
Please can anyone offer some advice as to where I may be going wrong?
Thank you,
You have the transistor on the wrong side of the pump. NPN transistors are used on the low side when switching. Connect the + of the motor to the + of the power supply, the other motor lead to the collector and the emitter to ground.
NANO DC Current per I/O Pins=40 mA (I/O Pins)
The Fairchild PN2222 data sheet says the base-emitter saturation voltage is 2V with a collector current of 500mA and a base current of 50mA.
Mayby you are crossing the boundary of what is possible.
NPN transistors go after the load. PNP type go before the load.
Buzzibi used the correct part, you have missed a 2, PN2222A
and that the PN2222 is marginal for this application.
generally speaking a MOSFET is better for use with motors. transistors have too much resistance and get hotter than we like.
If you look into FET's search this forum for FET and see what others recommend and check availability in your location. CHECK THE DATA SHEET ! make sure it is for use with the low voltage signals. many use L in the model IRL.... to show low signal voltage. again, many posts have discussed the use and selection.
and you need to calculate the proper resistor for your load.
I typically use 100 as the hfe for the PN2222
WillPatel also gave you part of your circuit that is missing. since your load is so small, the back EMF will not be as great and your risk is smaller, but it is highly recommended you use a diode to eliminate the spike. 1N4001 or some such should be in your kit $1,00 should buy quite a few.
I moved the pump/load to the other side of the transistor with no visible success.
I then briefly added the LED in series with the motor to check that current is still flowing when it should, which it was even when passing through the motor. (Though it did not move).
This leads me to believe that although the 5v pin -> motor -> ground is enough to power the motor (even the 3v pin does it fine) not enough power is making it through the motor via the transistor to turn it.
I'll look into a MOSFET and order a couple to replace this transistor. I'm hoping this will allow more power to allow the motor to turn.
Whilst I order the MOSFET I'll also get some diodes as recommended.
I'll get back with the outcome of this when the parts arrive.
1k in the base gives 5 mA base current. That, combined with the high current draw of the motor, means you indeed won't get enough current through that motor.
Try decreasing the base resistor to 220-250Ω (not lower or you'll overload the pin!) and you stand a chance to get it working. Also fair chance you're going to end up with a pretty warm, possibly outright hot transistor.
If you don't have those resistor values: look for a set of 30 values x 20 pcs or something like that. When you're at it, get a compartment box with it (you just can't have too many of those). Just add it to your order of diodes. 1N400x is fine for this work (up to 1A, but rather slow reverse recovery).