Controlling DC Water pump with PWM

Hi! I wanted to control the speed of a water pump using pwm. I couldn't find a data sheet for the pump but here is a link with some info: VMA421: WATER PUMP – Velleman – Wholesaler and developer of electronics

I have controlled other DC motors using PWM without any problems but with this pump it is not working at all. Unfortunately i don't know how to draw schematics but i'm just using a mosfet transistor and an extrernal 12V power supply. I have connected other DC motors to make sure the circuit is working.

When i give any signal less then 255 using analogWrite the motor is just making a little bit of noise. But as soon as i go from 254 to 255 the motor runs at full power. Can anyone help explain this to me?

Thanks in advance!

DrJanItor:
Unfortunately i don't know how to draw schematics...

Time to learn. Schematics are the lingua franca of electronics. symbols Inputs on the left, outputs on the right. Positive supply voltages above, ground and negative supply voltages below. Hand drawn is OK if clear and legible. There's software like ExpressSCH to help.

And, post your code in. code. tags.

A sample:

OK i'm sorry, here is a hand drawn schematic:

And the code:

int motorPin = 3;


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

void loop() {
  analogWrite(motorPin, 255);
}

IRF520 only turns fully on with 10V on the gate. With 5V it barely turns on, with a PWM signal, that could result in an effective voltage of less than 5V.

Try a better MOSFET, one that turns full on at lower voltages, such as this one

You should add a pulldown resistor on the gate. The pwm cannot return to low in your schematic.

If the pump turn on at 255, the Mosfet is maybe not ideal (not fully open) but it can drive the motor at least a bit. The pwn should work.

CrossRoads:
Try a better MOSFET, one that turns full on at lower voltages, such as this one

Could OP use the M3 schematic posted earlier and utilize the same MOSFET after adding Q5, etc?

Just go buy one or more of these and be done with it! (but you still need the diode :grinning: )

Aliexpress example

Thanks everyone for the replies! I will make sure to add i pull-down resistor and buy a more suitable mosfet.

The problem with getting something like that from AliExpress is that its pretty likely to be either
fake, counterfeit or simply not a logic-level MOSFET. Reputable suppliers are the place to go.

There are loads of IRF520's or worse being unloaded as "Arduino compatible" when its not.

You say the pump is not working at all. Have you connected it directly across 12V to see if it is even functional.

From the linked web page:

driving mechanism: brushless DC motor

Probably won't work with PWM, needs steady, low ripple DC.

Hi,
The link provides the specs of the pump.

vma421_1.jpg
BLDC motor doesn't like PWM.

Tom.... :slight_smile:

vma421_1.jpg

Most if not all of those small cheap pumps are BLDC - it makes waterproofing very easy.

I have a whole bunch of them, never tried PWM, never felt the need to lower the speed. It likely will not work indeed. Other models have a throttle on the inlet, which you can use to lower the volume.

TomGeorge:
Hi,
The link provides the specs of the pump.

BLDC motor doesn't like PWM.

Tom.... :slight_smile:

JCA34F:
From the linked web page:Probably won't work with PWM, needs steady, low ripple DC.

Oh. I had just gotten my logic level mosfets and realised it made no difference. I thought it was possible to control all DC motors like this. I guess i learned something new. Thank you!

JCA34F:
From the linked web page:Probably won't work with PWM, needs steady, low ripple DC.

So how do variable speed computer fans, which are BLDC, work then? :astonished:

Paul__B:
So how do variable speed computer fans, which are BLDC, work then? :astonished:

Must be that the internal electronics read the PWM and adjust the controls to the fan. The PWM is usually supplied on a separate signal input, it's not the power supply itself that's modulated.

Paul__B:
So how do variable speed computer fans, which are BLDC, work then? :astonished:

Different BLDC and controllers for different uses I would say.
Built for a prices.. el-cheepo!!!!
Tom... :slight_smile:

Brushless motor can be controlled with a potentiometer if you rely on this site (at the very end).
https://www.boxerpumps.com/en/products/miniature-diaphragm-pumps-air-gas/boxer-3kd-diaphragm-pump-series/

Have a google for the fan types ...

Computer fans run off variable voltage :

cdb101:
Brushless motor can be controlled with a potentiometer if you rely on this site (at the very end).
https://www.boxerpumps.com/en/products/miniature-diaphragm-pumps-air-gas/boxer-3kd-diaphragm-pump-series/

I think you're referring to this device which is linked to from that page.

No word on whether it works with brushless motors (likely not), the specs do match those of the brushed motors that are suggested as option for that pump on the page you linked to, and it will work great with that type of motor.