Hi , I am trying to turn on/off a dc 12v 2amps pump with uno and TIP 42C transistor. I have a 12 V 3A power supply . the ground is connected to arduino and emitter. + of power supply is directly connected to the pump. When i connect LED to the pump end instead of the pump , i can turn on and off the led. But when I connect the pump to the circuit it doesn't work. Also if i leave the LED( which is on) on the circuit and connect the pump the LED turns off too. What I might be doing wrong ? I tried to power the pump directly from the power supply and it works.
That's a PNP transistor so I think you have the load on the wrong side.
Edit.... have a look at the npn / pnp examples here
You want a NPN device or you'll have to bother with level shifting. Or a logic-level n-channel power MOSFET.
As its a pump you must add a flyback diode across the load to prevent circuit damage.
I don't know many about electronics , but I changed the transistor to TIP 120 and it works now.
MarkT: As its a pump you must add a flyback diode across the load to prevent circuit damage.
As for this , I read in couple places to use diode. I get confused as to where exactly to place the diode. In some examples they put the diode between + and - ends of the pump , and in some they put it between e and c end of the transistor.
It goes across the pump... but it must be "backwards" remember: the cathode of the diode goes to the + although that might seem "wrong".
thank you for the help