12VDC Pump control using PWM

Hello all,

First time poster, long time reader. I am relatively new to the Arduino game, and am having trouble solving a PWM-DC pump conundrum. I currently have a 12V brushless DC pump hooked up to be controlled using PWM attained from the analog input of a pot. I'm using a transistor to control the higher voltage, a 1k ohm resistor for isolation (I think that's the correct term), and a diode for inductance surge protection - a pretty typical set up from what I have read.

The problem: The pump only runs while analogWrite is set to 255. For all values except fully on, it does not turn. Furthermore, the pump turns at a slower rate when plugged into a 5 V rail, but again, only when the pot is fully turned -when analogWrite is set to 255. I am confident with the coding and hardware because I have swapped out the pump for cooling fans which turn at varying speeds in accordance to the pot. So the pump works, the pump speed can be varied by connecting to different voltages, and the circuit works perfectly when fans are used. It seems PWM does not work with the pump... which is just a brushless DC motor... so it should, right?

I looked for a datasheet for the pump, but it's a cheap (but awesomely quiet and nicely built) motor from China and have had trouble finding anything helpful. Could it be that the pulse width is too short for the motor to get started? This seems to contradict everything I've read on DC motors. Is this common for DC motors? Seems to me that it should work. Any advice would be greatly appreciated. Go easy on a chemical engineer trying to learn to do cool things using this 'lectricity thing.

COMPONENTS

Pump:
model: DC30A-1230
max voltage: 12V;
power: 4.8W (~400 mA assuming 12V)

Transistor:
model: TIP31AG
max collector/emitter voltage: 40V
max base voltage: 5V
max current: 3A

Power source: 12VDC @ 5A

This is a evidently a brushless motor (as you state) which means it has a controller inside it. A brief search turned up no evidence that the controller supports PWM speed modulation. It is probably set to run at some constant speed, from a 12 V power supply.

If you want to use PWM and a transistor to control a motor, you will be better off with a conventional brushed motor. Or you can buy inexpensive brushed motor controllers, or brushless motors with controllers that do support speed control (expensive).

http://www.bldcpump.com/model-note/

They state that the 30-series is 2 phase brushless and cannot be speed controlled.

This might work (untested):

Filter the PWM output of the arduino so it gets close to DC:
Feed the filtered voltage to the adj pin of a LM317 or similar. What you have done is building a PWM controlled voltage regulator.

MOTOR CONTROL.JPG

To control that pump, you need to supply a variable voltage. Here are two ways of doing this:

  1. Use a linear voltage regulator controlled by the Arduino, or (equivalently) smooth the PWM output and amplify it. If the pump draws much current, then the regulator will dissipate a lot of heat.

  2. Use a flyback diode, inductor and capacitor at the output of the TIP31A. You will need to increase the Arduino PWM frequency so that the inductor can be a reasonably small size, and preferably replace the TIP31A by a logic-level power mosfet. In effect, this turns the Arduino into a switching regulator.

I would go with (2). If you use 31kHz PWM frequency, then a 1mH inductor (rated at no less than 500mA) and 100uF capacitor should be sufficient.

Thank you everyone for the helpful and speedy responses. I have a few questions regarding the recommended circuitry scheme, but first I was wondering a bit more about the pump. Thank you, Chagrin, for finding the naming breakdown and seeing that this model does not support speed control, but what exactly does "support" mean? What is required to "support" PWM control in the motor? I thought using the Arduino to externally simulate analog control using different pulse widths was pretty simple, and therefore ingenious -turn it on and off faster or slower and the motor will run faster or slower. Is it that the pump cannot accept input voltages that fast (~490 Hz), or perhaps the controller senses for a steady input voltage and refuses to run if it is not stable? As I see it, the controller is there just to run the commutation schema. In any event, this behavior contradicts the behavior of the brushless computer fans that respond to PWM seemingly as they should... por que?

Sorry for asking many (perhaps stupid) questions, but without any specific technical information, I don't know what to think.

The possibility of have a supply voltage switched on and off 490 times a second influencing the commutation scheme is quite severe in my world.. hence my schematic. Give it a try, I don't think you will damage anything in the worst case you have sent $1 on a lm317 in vain

NateH:
As I see it, the controller is there just to run the commutation schema. In any event, this behavior contradicts the behavior of the brushless computer fans that respond to PWM seemingly as they should... por que?

Personally, I am surprised that computer fans (other than the ones with a separate PWM pin) work at all with PWM. It is not at all surprising to me that the electronics used to do the commutation requires a steady supply voltage.

Thanks for the help guys. Sorry I haven't responded, but I've been waiting for the parts to come in and been working on other aspects of the project.

dc42, I took your advice and tried to make a psuedo-switching regulator. Using a 1mH inductor, a 100uF capacitor, a Schottky diode, and a quick switching logic level MOSFET (14N05L) I am able to control the computer fans better without the clicking sound that was occurring when I was using straight PWM on a transistor -probably the sound of the controller frying... But it seems the output voltage is limited to ~3.75 volts. This is the same when I hook it to a 12V or 5V power supply. I've tried frequencies from 488 Hz up to 62kHz, but nothing changes. This is enough to control the 5V computer fans, but the 12V pump does not turn.

Any idea why the voltage may be limited at 3.75V? From what I understand, a duty cycle of 100% should allow the output voltage to be equal to the input, either 5V or 12V.

Thanks for your help!

  1. What is the specification of your 1mH inductor? In particular, its resistance and its saturation current.

  2. Please post a schematic, and indicate where on it you were measuring the output voltage.

Thanks.

The inductor is from Jameco: http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_371979_-1

I changed the PWM frequency using the function from Arduino playground. For testing, I am using an analog reading from a pot to set the pulse width using analogWrite to the MOSFET. Seems like it's working because the voltage is adjustable from 0 to ~3.75V and the fan is much quieter, but for some reason it is limited to 3.75V, no matter if Vin is 12V or 5V .

I have no idea what could be limiting the voltage.

Nate

The problem is that you are trying to use a N-channel mosfet as a high-side switch. You need to use it as a low-side switch instead.

dc42, YOU ARE A SAINT!! It works! Thank you so much.

I have to go out now, but I'll look into n-channel versus p-channel and high versus low side more later. This was the last difficulty I had -though I may find something else- but I think prototyping is over! Time to solder and make it look pretty. Thanks again. If you're ever in Western Pennsylvania, I drinks are on me.

Nate

Hi.. new member joining in on the thread!

Im running a similar setup using two Chinese pumps as a wave simulator in my nano reef aquarium. I think I hit the same problem tonight as my pumps wont variate their output over pwm and cut off below a 240 pwm threshold. I assume that their is some circuitry built into the pumps but I would love to see if you guys overcome this issue..

Will try to variate the voltage tomorrow to see if it spins up..

Thanks

What sort of motors are in the pumps ? A "brushless" motor has a completely different operating principle to a DC motor.

I am wondering if you can point me in the right direction or help me write a brief for an Arduino kit that will maintain a constant flow from a pump under varying resistance conditions.

We want to develop what could be coined a s a ‘digital pump’ - it is set to 2 litres per minute (or have a set of micro-switch settings for 1.5lpm , 2, and 2.5)

The function is for Window Cleaning.

The pumps would typically be RO PUMPS .. basically 60-80PSI and maximum draw of 6-8 AMPS.

The purpose is window cleaning with pure water …

The resistance is caused by varying hose and tube arrangements :

a) the pump could be 10 - 100m away from the glass,

b) the operator could be using 10mm ID down to 5mm ID hose/tube

c) the operator is using a water fed brush - it could have 2 - 4 jets or a rinse bar with several holes drilled in it ..

d) the operator could have the brush fitted with jets that have a 1mm bore through to a 4mm bore

e) the operator could be cleaning windows from ground to 25m high using a telescopic carbonfibre pole .. see

Typically a window cleaner will set the flow rate at the ground … when he sets up - but the changing conditions change his flow and therefore his efficiency.

A conservative window cleaner could use as little as 1 litre per minute, but there are other guys using 2.5 lpm.

I do not want a product with LED screens … I want it to be integral with the 12V pump and practically factory set. We can make it in China ( I live in China) so we can make a custom housing .

We would also like to have a digital version of the pressure switch that saves the pump before the pressure switch is activated.

My plan is that we could use cheaper pumps if we are managing them - and we could add this circuit to our cheaper pumps and sell them at the same price as the industry standard ( Shurflo and Flojet) ..

Can you help me at all ?

dc42:

NateH:
As I see it, the controller is there just to run the commutation schema. In any event, this behavior contradicts the behavior of the brushless computer fans that respond to PWM seemingly as they should... por que?

Personally, I am surprised that computer fans (other than the ones with a separate PWM pin) work at all with PWM. It is not at all surprising to me that the electronics used to do the commutation requires a steady supply voltage.

Commutation is stateless so its not surprising it works, its just the ripple-current
rating of the decoupling capacitors in the control circuit and of the switching device that worry me.

hello every one here !!
i have a problem and i need a help,

Hi,
You would be better to start your own posting, than add to an old one.
Look here;

[http://forum.arduino.cc/index.php/topic,148850.0.html](http://" http://forum.arduino.cc/index.php/topic,148850.0.html")

It will tell you how to use the forum.

Tom.... :slight_smile: