Arduino water pump not working and beeping

I’m new to arduino and am trying to build a plant watering system without much knowledge on the subject. But my water pump is not working as I expected it to.

I wanted to keep it simple so I bought a Arduino Motor Shield for my Arduino Uno R3. I’m using a motor rated at 3-9V (motor is shown below), I’ve tried two different DC adaptors plugged into the power supply port on the arduino, 12V 1.5A and 12V 2A, even though the motor is rated at 9V, I’ve read that I need a 12V adapter to power the motor shield.
http://www.mabuchi-motor.co.jp/cgi-bin/catalog/e_catalog.cgi?CAT_ID=rs_360sh

The first problem is If I run the motor at full speed, analogWrite(3, 255), it sounds like its going to explode, so I’m trying to run it at a lower speed. But If use values anywhere below 170 the motor will not run and will only make a beeping sound.

Secondly, regardless of the PWM value I run the motor at, the chip gets very hot very quickly.

My question is, why can’t I run the pump at lower PWM values, and why is it getting so hot?
If I bought a 12V water pump and used the same setup, would I not have any of these problems?

void setup() {
  
//  //Setup Channel A
  pinMode(12, OUTPUT); //Initiates Motor Channel A pin
  pinMode(9, OUTPUT); //Initiates Brake Channel A pin
}


void loop(){
  //forward @ full speed, A
  digitalWrite(12, HIGH); //Establishes forward direction of Channel A
  digitalWrite(9, LOW);   //Disengage the Brake for Channel A
  analogWrite(3, 170);   //Spins the motor on Channel A at a speed. approx 90 is min

  delay(3000);
  
  digitalWrite(9, HIGH); //Engage the Brake for Channel A

  delay(1000);
  
}

Why are you engaging the brake again for motor A without stopping the motor first?

I thought engaging the brake was the equivalent to stopping the motor, based on this instructable

eliminate the brake entirely.

you do know the pump MUST be in water right ? it will burn out if not in water

the motor link is to a motor, not a pump.
one version is rated for 12,000 RPM. the other at 7,000 RPM
those are pretty fast.

torque falls off very rapidly with lower RPM.

all in all, I would offer that the motor is a very poor selection for a pump due to probably cavitation issues
and a very poor selection for a variable speed application.

a schematic is in order. parts identification is required.

the pump MOTOR has two wires.
you control pins 3,9 and 12.....
something does not sound right.

WHICH motor shield are you using ?
the one with the L298 that requires PWM for speed ?
the one that uses the TB6612 ?
the one that uses I2C ?

you may not be sending the correct signals and that is why it is not working.
a photo of the board might help identify it.

You are right that that product page was for a motor, but it is definitely a water pump, it looks like this

As for the motor shield, it is the official Arduino brand motor shield with the L298P. And according to this page, all that is required is to plug in the two wires, and to access those pins through code. Actually I don't even plug the motor into regular pins but into the external +, - terminal block.

what happens when you use instead of doing the brake ?

analogWrite(3, 0);

instead of doing the brake ?

and disable the brake on the other chaNNEL ?

NickyNicky:
I thought engaging the brake was the equivalent to stopping the motor, based on this instructable
http://www.instructables.com/id/Arduino-Motor-Shield-Tutorial/?ALLSTEPS

Well, it should stop the motor, HOWEVER, you have not turned the power off, so the motor is now trying to run with the brake on. What the brakes are usually used for is where a motor is being used for some sort of motion and when you turn the power off, you want the object to stay where it is, hence, you engage the brake which locks the motor.

dave-in-nj:
what happens when you use instead of doing the brake ?

analogWrite(3, 0);
instead of doing the brake ?

I tried that, I even tried disabling the delay code and the analogWrite(3,0) altogether, and it doesn't really work. It's becoming so unpredictable, even when I run the PWM at 255 (max), sometimes the motor will run, and sometimes it won't.

Its so strange, cause I have a little 5v motor that works perfectly under all PWM conditions. You think this is just a problem with the motor ?

NickyNicky:
I tried that, I even tried disabling the delay code and the analogWrite(3,0) altogether, and it doesn't really work. It's becoming so unpredictable, even when I run the PWM at 255 (max), sometimes the motor will run, and sometimes it won't.

Its so strange, cause I have a little 5v motor that works perfectly under all PWM conditions. You think this is just a problem with the motor ?

that is certainly a possibility. any brushed motor has a potential issue with brushes or any other bits.
Since your board has two drivers, have you tried to burn up ... er... run the motor from the other side ?

Does the motor run reliably if you connect it direct to the power it expects without your controller in the circuit? If yes, then there is a problem with your circuit, if no, then the motor is a problem. If the motor runs fine with direct power to it, then my first suspicion as the cause for "erratic" operation is electrical noise (or an insufficient power supply that sags when you apply power to the motor). DC motors are notoriously noisy and if you don't take care to use good grounds and bypass caps etc., it will cause all sorts of things to happen.

The motor runs smoothly and reliably when I connect it straight into the VIN pin using a 9V adapter. But when I drive it through the motor shield problems occur.

Ideally I would want to drive the motor shield/motor with a 9V power adapter so that I can run the motor at max PWM (255), but there isn’t enough power if I do that because the motor shield also needs power.

I thought to myself, maybe I’ll just run the motor at max power for the project, I don’t need it to be on that long so it’s ok. But as I was trying to test that out, the motor stopped responding, the lights on motor shield were blinking and I could hear a ticking sound.

So…… is there any solution to this apparent “electrical noise” ?

I thought that if i bought this motor, than i wouldn’t need to worry about PWM, but is there any way of knowing whether this motor will have electrical noise as well ?

But I find it confusing, because I’ve seen a tutorial with the same pump and same voltage, but their project works where mine doesn’t

Hi,
Can you post a picture of your project please, so we can see your layout?

Thanks.. Tom... :slight_smile:

photos

i've also noticed. that if the motor stops working, and then I switch the positive and negative wires on the motor, it could start working again

Hi,




Tom.....

an update:
it seems to basically work now. i have a feeling it wasn't working great because I was previously using a powerbar

It will run on max power PWM(255) for about a minute, and then stop working, which is okay. It will stop and then the motor shield lights will start blinking. Does anybody have any guesses what is happening? The motorshield chip is a little hot, so overheating is a possibility. Or is there not enough current ?

video

Hi,

Place a 0.1uF Capacitor across the motor terminals, that is at the motor.
Have you measured the motor current?

Tom... :slight_smile:

i just tried with the capacitor and it didn't change anything. i saw another tutorial that said put a diode across the motor terminals, is that for the same reason? what reason is it?

i just tried measuring the current:

  • i put the multimeter wires in between the motor shield positive wire and the motor positive wire
  • the values started about 1.30A and then over time decreased to around 1.10A
  • after about 40 seconds i noticed a smell, and saw the tip of the wire that was touching the multimeter end was glowing red and making a smell

..so what do these variables mean? lol

NickyNicky:
I’m new to arduino and am trying to build a plant watering system without much knowledge on the subject. But my water pump is not working as I expected it to.

I wanted to keep it simple so I bought a Arduino Motor Shield for my Arduino Uno R3. I’m using a motor rated at 3-9V (motor is shown below), I’ve tried two different DC adaptors plugged into the power supply

A proper circuit diagram would be helpful.

Power supplies for arduino and motor should be seperata.

Some wall warts (power supplies ) will not tolerate inductive loads without shutting down.

its very simple

its just a motor shield, on top of a arduino uno rev3, and on the motor channel A terminal block, i have the motors positive end going into the positive terminal block, and the motors negative end going into the negative terminal block. i have a 12v power supply inserted into the arduino power supply jack. thats all

im now just curious why the wire got so hot and was smoking , that doesn't seem normal