Power pump from arduino 5V

Hi,
I’m kind of new to this and are building a self watering system. I have a pump that operates from 3-6 volts. But the pins on the arduino can’t power the pump. By googling I found that using a mosfet and the arduinos 5v output might work. If I connect the pump to the 5V on the arduino the pump is working fine but on a HIGH output digital pin it don’t get sufficient power.

Would the setup of the attached sketch work? I will use a digital output pin to control the pump via a mosfet. Please let me know if I got i totally wrong.

waterpump.pdf (119 KB)

What is your power source? Is it 7v or is it 12v?

Do you know how much current the pump draws?

This is quite likely to burn out the 5v regulator on board the Arduino. It can't supply a lot of power and if the input is 12v then the power is even further reduced.

The best way to avoid this is to connect the positive side of the pump to the raw input power. Even though it's only a 6v pump, it's quite OK to connect it to 12v so long as your Arduino output is one of the PWM pins and you use analogWrite(128) as the fastest speed.

(128 is half of the maximum, which means the pump sees half of the input voltage.)

Is it such a 2 dollar white cheap pump from Ebay ?

http://www.newegg.com/Product/Product.aspx?Item=0N2-0075-00005

According to Ebay, they are : 130 - 220 mA

MorganS:
What is your power source? Is it 7v or is it 12v?

Do you know how much current the pump draws?

This is quite likely to burn out the 5v regulator on board the Arduino. It can't supply a lot of power and if the input is 12v then the power is even further reduced.

The best way to avoid this is to connect the positive side of the pump to the raw input power. Even though it's only a 6v pump, it's quite OK to connect it to 12v so long as your Arduino output is one of the PWM pins and you use analogWrite(128) as the fastest speed.

(128 is half of the maximum, which means the pump sees half of the input voltage.)

..... I'm trying to picture this but I can't. Are you saying to tie the ground from the pump to the Arduino? I think it's a two wire pump...

And wouldn't tying the positive leg from pump directly to 12v burn out the motor regardless of PWM, unless you implement a low pass filter or something? You are still seeing 12v square waves, and if the motor is not rated for 12v, well, fizzle/pop/smoke? All PWM is doing is changing the duty cycle not the voltage.

Can you go into a bit more detail? I'd be interested in learning more about powering something that way!

The motor has inductance. Switching it to 12v will not instantaneously push in lots of current. Due to the inductance, it takes time for the current to increase to the value you would expect from the DC resistance of the motor. If you switch it off very quickly, then it never sees lots of current and it behaves as if it was connected to a lower voltage.

Most little motors can be connected to higher voltage for some time (like 5 seconds, maybe 30 seconds.) They don't burst into flame instantly.

Peter_n:
Is it such a 2 dollar white cheap pump from Ebay ?
http://www.ebay.com/itm/271721247157
http://www.newegg.com/Product/Product.aspx?Item=0N2-0075-00005

According to Ebay, they are : 130 - 220 mA

Yes, it's that kind of pump

MorganS:
What is your power source? Is it 7v or is it 12v?

Do you know how much current the pump draws?

This is quite likely to burn out the 5v regulator on board the Arduino. It can’t supply a lot of power and if the input is 12v then the power is even further reduced.

The best way to avoid this is to connect the positive side of the pump to the raw input power. Even though it’s only a 6v pump, it’s quite OK to connect it to 12v so long as your Arduino output is one of the PWM pins and you use analogWrite(128) as the fastest speed.

(128 is half of the maximum, which means the pump sees half of the input voltage.)

Thanks for your reply. I didn’t realize it could burn out the Arduino regulator.

I haven’t decided on the power source yet. Ultimately I would like to use solar power with a battery pack that can supply sufficient power while the sun isn’t shining. Maybe a 5V solar panel with a USB-power source would work to power both the Arduino and the pump. The pump then draws power directly from the power bank as would the arduino.

Any risks with this setup?

waterpump2.pdf (119 KB)

Is that a logic-level mosfet ?
I would add a protection resistor from Arduino digital pin to gate of 1k.
And I would add a flyback diode (a diode in reverse, paralllel to the pump).