1
\$\begingroup\$

I'm new with the RasPi and I'm trying to build an automated irrigation system. The code is ok because it does what I want, it takes measurements of water content and when it's low, it changes one output (the one going to the DC motor) to High. I'm following this schematic:

Motor driver using only a 2N2222 transistor?

Same connection but using a 2N2222A transistor, 1k resistor and 1N4007 diode and a 3V DC hobby motor - not this one but close:

Small hobby motor

Source

Connecting the motor directly to the 3V power supply consumes 180mA, and the hFE of the transistor is about 150, so I calculated that the RasPi needs to output about 1.2mA to the transistor base.

The problem here is that the motor does not spin at all, with this setup my meter reads 180mA between the power supply + and the diode, and 0.2V between the motor leads.

What am I doing wrong? I also have to say that the transistor gets hot.

Thanks in advance!

\$\endgroup\$
  • \$\begingroup\$ There are three different schematics on the page that you linked to. \$\endgroup\$ – Dampmaskin Oct 10 '17 at 13:17
  • 2
    \$\begingroup\$ With only 3 V for the motor and the voltage drop across the transistor, you might find it won't work. If you give the motor a bit of help by turning it when it is powered, does it try to rotate? Can you measure the voltage drop across the transistor (collector to emitter)? Are you sure you connected the diode the right way round? \$\endgroup\$ – Andrew Morton Oct 10 '17 at 13:48
  • \$\begingroup\$ It didn't rotate while applying rotation with my fingers. I tried supplying 4.5V and 6V and it also didn't move, after a few seconds at 6V the transistor burned :/ I guess it was a bad one? it's supposed to be rated at 50V 800mA... Maybe I'll just use a MOSFET as it may be simpler, the only reason I tried this schematic is because I had this 2n2222a lying around. Also, the diode is connected the right way, cathode (line) pointing towards the +3V power supply \$\endgroup\$ – Unicoln Oct 10 '17 at 14:03
  • 1
    \$\begingroup\$ It should have worked. Double check the pin out. \$\endgroup\$ – Passerby Oct 10 '17 at 14:22
  • 1
    \$\begingroup\$ Not enough base current. Aim for 18mA Ib (Ic/10) to saturate the transistor, i.e. minimise the voltage drop across it. As a bonus, taht'll help it to stay cool. \$\endgroup\$ – Brian Drummond Oct 10 '17 at 21:49

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.