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:
Same connection but using a 2N2222A transistor, 1k resistor and 1N4007 diode and a 3V DC hobby motor - not this one but close:
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!