Page 1 of 1

Control motor with transistor

Posted: Tue May 26, 2015 10:33 pm
by elib
Hello everybody,

I'm from Belgium and I'm new in this communauty.
I'm building my first project with a Raspberry pi 2 but I'm stuck with the following part :

I want to start and stop a motor from the RP2 with a MOSFET IRF520 (n type so) but my circuit isn't working and it seems like it's loosing power somewhere. (The motor don't do anything, I can only hear a small "click" every 2 seconds which is my schedule task).

Here is a layer of how I do :
Image

Everything is working when I put a LED (it's toggling on and off) because it need less power.
-> The motor work if directely connected to the baterry.

Thanks in advance for your help!

Re: Control motor with transistor

Posted: Tue May 26, 2015 11:22 pm
by drgeoff
1. You do not appear to have the RPi ground and the battery negative connected together directly.

2. The RPi GPIO voltage can never reach more than 3.3 volts, which may not be high enough to turn the FET on enough to pass sufficient current to start the motor turning.

Re: Control motor with transistor

Posted: Wed May 27, 2015 12:20 am
by danjperron
If you look at the specification the minimum Vgs is around 4.5V so you will need to step up the Vgs by adding a transistor/fet stage, or a I.C. which will boost the voltage you apply to Vgs.

I use them a lot and normally I put way more Voltage on the gate, ~12V .
mosfetboost.jpg
mosfet boost by battery
mosfetboost.jpg (55.79 KiB) Viewed 1953 times
For testing purpose you could add a 2 X AA battery in series between the resistor at the GPIO and the gate.
The 1K resistor is only there to protect the GPIO in case of bad handling.
This way you will have 3V when GPIO is low (Motor OFF)
6.3V when GPIO is HIGH (Motor ON) at the gate of mosfet.