0
\$\begingroup\$

New to electronics but having fun.

I am trying to turn on/off a water pump with my Raspberry Pi via 3.3V GPIO pin with a BJT 2N5401 Transistor.

I am having success when I attach the Ground pin to the Base of the transistor and the 3.3V GPIO pin to the Emitter. However this seems backwards to me, shouldn't the GPIO pin attach to the Base and the GND be on the Emitter as shown in my second diagram attached.

My circuit diagrams below.

My RPI Circuit

Thanks for having a look!

A little extra about my comment "I think the Pi is not liking the current". In the working setup I am experiencing a little flicker on my Pi which I think means there is a current related issue.

\$\endgroup\$
  • 1
    \$\begingroup\$ Your 2N5401 is a PNP transistor, not NPN as you've drawn your schematic. Get yourself an NPN before you let the magic smoke out of your Pi! \$\endgroup\$ – brhans Jan 27 '18 at 1:35
  • \$\begingroup\$ Is the pump an electrical motor? Without a freewheeling diode connection across the motor, the inductive load of the motor windings will thrash your circuit with unwanted negative voltage surge. In my experience, driving even a small toy motor requires a big transistor with a big heatsink. \$\endgroup\$ – MarkU Jan 27 '18 at 1:39
  • \$\begingroup\$ Related to freewheeling diode circuit: electronics.stackexchange.com/questions/100372/… \$\endgroup\$ – MarkU Jan 27 '18 at 1:48
  • \$\begingroup\$ Also related: electronics.stackexchange.com/a/80142/35022 \$\endgroup\$ – MarkU Jan 27 '18 at 1:50
  • \$\begingroup\$ Thanks brhans, that's complete oversight on my part. I'll get a new one tomorrow and try again. Thanks for pointing that out! Magic smoke is still inside the Pi... for now. \$\endgroup\$ – MangoHeat Jan 27 '18 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.