0

I want to turn on a pump that is running 12V and draws a current of max 1.7A with my Arduino Uno.

To do this, I bought the RFP30N06LE MOSFET and followed these instructions to wire it all up.

I connected the red wire from the pump to VIN of the Arduino and plugged a 12V 2A power brick into the Arduino. However, when I put the output pin to HIGH, the pump only pumps weakly and the MOSFET gets very hot.

When I connect the pump straight to VIN and GND, it works as expected, so the Arduino is able to provide the required current. I'm thinking that there is something to the MOSFET that I am not understanding correctly. I measured VGS at 4.5V, so the MOSFET should be able to handle the current. Is there anything I am missing?

This is the wiring: enter image description here

This is the (very simple) sketch I'm using to test it all:

#define PIN_PUMP_ON 7

void setup() {
  pinMode(PIN_PUMP_ON, OUTPUT);
}

void loop() {
  digitalWrite(PIN_PUMP_ON, HIGH);
  delay(1000);
}
  • 5
    Can you show a photo of the wiring? or a schematic. Can you show the sketch that you use. Be careful with 12v. Never power the motor via the VIN pin. Use the 12v to power the arduino board and the motor. Do you use a breadboard, that will go wrong. A breadboard can not handle the high current of the motor. The mosfet is a very nice mosfet, it should not get hot. – Jot Jan 21 at 21:22
  • 1
    followed these instructions .... no you did not .... the instructions do not say to connect the motor to the Arduino Vin – jsotola Jan 22 at 1:57
  • I added the sketch and a wiring diagram. What is the issue with using VIN? According to the Arduino docs, it can be used to access the 12V I'm supplying with the power jack: You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin. – pumper Jan 22 at 6:14
  • Between the barrel jack power plug and VIN is a diode. It depends on the arduino uno or clone how much current that diode can take, but 1.7 amps is too much. You also let the ground current of the motor go through the arduino board via the GND pin. I don't like that either. – Jot Jan 22 at 10:24
  • 1
    I would expect the diode to release it's magic smoke within seconds of motor on. – Jeff Wahaus Jan 22 at 12:45
2

Vin is only rated to supply at most 1A due to the reverse polarity protection diode in series from the barrel jack to the Vin pin. You try and draw 1.7A thru that and you may smoke it. The Vin header is also only rated for 1A.

Connect the motor to the supply directly. The Arduino Gnd must also connect to the supply. R2 limits Arduino IO pin current to a safe level. R1 keeps the MOSFET off while the Arduino boots up. Diode dissipates motor generated current when the MOSFET goes from On to Off. The RFP30N06LE looks to be rated for full turn on with Vgs of 5V, and Rds of 47milliohm, that part should be ok to use.

Powering the Arduino from the same source as the motor may cause issues. If you can power the Arduino from USB or a seperate battery pack and not the same 12V that powers the motor, that will probably yield better results, especially if the 12V droops at all under heavy loads from the motor. That could cause Arduino resets.

schematic

simulate this circuit – Schematic created using CircuitLab

1

Rewire the motor power so that it is not using any Arduino Power or GND pins. Only connect the MOSFET gate to an Arduino pin using a suitable resistor. The MOSFET drain needs to go directly to your power supply ground. This way you're not cooking your Arduino. A relay instead of the MOSFET would prevent the MOSFET resistance from reducing the power of your motor.

The 3 big pins under the Arduino's power connector (2 GND and 1 +V) can be used to power your motor, just solder directly to them for Motor +V and GND for MOSFET drain. This bypasses the Arduino's diode.

  • Why do you say not to connect the ground of the arduino and the motor power supply? I've seen other high amperage projects for Arduino that specifically suggest to do just that, e.g. powering a long string of WS2812b RGB LEDs. Is there a criteria that is different here (like a motor) that I'm not understanding? – Kelly S. French Jan 22 at 16:36
  • If you connect the ground directly to the barrel jack pins it will prevent the current from running through the Arduino PCB. – Jeff Wahaus Jan 23 at 12:40
  • I found a reference to the situation that has me confused, see point #7 in this answer: arduino.stackexchange.com/a/34531/42061 about running a motor with a separate power supply but connecting the grounds of both supplies. Maybe this should be a question of its own? – Kelly S. French Jan 23 at 15:11
0

Under no circumstances should you connect the motor to VIN on the Arduino. A motor draws far too much current.

You want to have the ground on the arduino connected to the ground for the motor, but you want different positive supplies for the 2 different devices. You also need to make sure you have a properly sized protection diode wired in parallel with the motor, but pointing against the flow of current.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.