Use an Arduino to Drive a Pierburg CWA200 Car Electric Water Pump
by jonr6846 in Circuits > Arduino
3707 Views, 2 Favorites, 0 Comments
Use an Arduino to Drive a Pierburg CWA200 Car Electric Water Pump
Some mainstream car manufacturers like BMW use electric water pumps for the circulation of the engine cooling liquid. The advantage of an electric water pump is more consistent and controllable engine temperature, reduced engine load and hence more efficiency. This type pump can be used in almost any car - buy yourself a pump new or from a car breakers but the problem remains of how to drive it? This project is uses an Arduino to drive a Pierburg CWA200 water pump.
Supplies
Arduino
Pierburg CWA200 water pump
Breadboard and jumpers
L7805 - 5V voltage regulator
10K potentiometer
1 off 2N2222 NPN transistor
1 off logic level NPN MOSFET - IRLZ44N or similar
1 off 10uF electrolytic capacitor
1 off 100nF/0.1uF capacitor
4 off 10K resistors
Background and Circuit
The CWA200 requires a constant 12V feed plus a PWM control signal. The PWM signal from an Arduino is very simple with lots of examples available on the web. The issue is that the pump requires a 12V PWM and the Arduino typically works on 5V. A logic level MOSFET can be connected to the the Arduino, but this will invert the Arduino output. A simple solution is to drive the MOSFET via an intermediary transistor, hence the Arduino output is inverted twice.
Secondly, as this project is to work in a car, the 5V feed for the Arduino is derived from the 12V supply found in most cars. An L7805 voltage regulator is used to convert the 12V from the car feed to 5V for the Arduino.
Populate the Breadboard
Using the circuit diagram from the previous step, populate the breadboard and add the jumper wires. Once done, connect :-
Pin 1 - 12V feed to the connector on the motor - usually this has a red wire
Pin 2 - PWM output from the Arduino/MOSFET circuit - usually this has a white wire
Pin 3 - spare - not used
Pin 4 - Ground connector on the motor - usually this has a black wire
Once wired up, the next step is to program the Arduino
BTW - I added an LED to the PWM output to give a visual indication of the output and show it's working.
Program the Arduino
Below is the code for the creation of the PWM signal varied by the position of a potentiometer.
Note the map command rescales the PWM to operate between 60 and 150 versus 255 - this equates to a PWM duty cycle of 23% and 58%. The duty cycle is not read by the pump as an absolute speed controller of 0% thru 100% representing min to max speed. The duty cycle is read by the motor as a command interface, for instance 10% PWM means reset the pump. 100% PWM is "limp home" mode. From testing, the effective speed range is 23% PWM to 58% PWM giving the minimum water movement to the maximum water movement.
Arduino code:-
int led = 9; // the PWM output pin (and LED)
float sensorValue = 0.0; // analog read of pot
float percent = 0.00;
// the setup routine runs once when you press reset:
void setup() {
Serial.begin(9600);
// declare pin 9 to be an output:
pinMode(led, OUTPUT);
pinMode(A0, INPUT);
analogWrite(led, 0);
// initiate pump wakeup
analogWrite(led, 255);// 100% duty cycle
delay(300); // 300ms high pulse
analogWrite(led, 0);
delay(100);
//reset pump
analogWrite(led, 25);// 10% duty cycle to reset it
delay(300); // 300ms high pulse
analogWrite(led, 0);
delay(100);
}
// the loop routine runs over and over again forever:
void loop() {
// set the brightness of pin 9:
analogWrite(led, sensorValue);
sensorValue = map(analogRead(A0), 0, 1023, 60, 150);// rescale 0-1024 to required range
percent = sensorValue / 254;
Serial.print(sensorValue);
Serial.print(" >>>>> ");
Serial.println(percent *100,2);
delay(250);
}
Test Rig
So, this is a test rig with an old watering can, a connector and some pipework - the water is circulated around this closed loop environment. Power for the pump and Arduino comes from a car battery.
The pump can be tested by connecting the PWM signal wire on the pump directly to the 12V feed - after a few seconds, the pump will run at full speed ..... then stop and restart. This sequence will happen repeatedly.
Conclusion
Now you have a working pump driven from a car power supply and the speed controlled by a potentiometer on the Arduino, this can easily be enhanced to include a water temperature sensor, plus some Arduino PID code and you'll have a temperature controlled pump, ensuring the engine will be working at a set temperature as efficiently as possible - irrespective of engine load. From there it's simple to add a relay that triggers at a set temperature, switching on a radiator cooling fan. Further, you could add a feature that keeps the pump/fan running after the engine has shut off to minimize heat soak/hot spots etc.
Have fun.