Centrifugal Pump¶
Introduction¶
A centrifugal pump is a device that can move liquids from one place to another by using a rotating impeller. It can be used to pump water, oil, chemicals, etc. A centrifugal pump has two main parts: a motor and a pump. The motor provides power to the pump and the pump converts the rotational energy into pressure and flow.
Principle¶
A centrifugal pump operates by using a spinning impeller which increases the velocity of the fluid, drawing it into the pump through an inlet pipe. As the liquid exits the impeller’s outer edge, centrifugal force pushes it out through an outlet pipe, resulting in increased pressure. The faster the impeller spins, the higher the pressure and flow of the liquid.
Usage¶
Hardware components
Arduino Uno R4 or R3 board * 1
Centrifugal Pump * 1
Jumper Wires
Circuit Assembly
Code¶
Code explanation¶
Two pins are defined for controlling the motor, specifically
motorB_1A
andmotorB_2A
. These pins will connect to the L9110 motor control board to control the direction and speed of the motor.const int motorB_1A = 9; const int motorB_2A = 10;
Configuring the pins and controlling the motor:
The
setup()
function initializes the pins asOUTPUT
which means they can send signals to the motor control board.The
analogWrite()
function is used to set the motor speed. Here, setting one pin toHIGH
and the other toLOW
makes the pump spin in one direction. After a 5-second delay, both pins are set to 0, turning off the motor.
void setup() { pinMode(motorB_1A, OUTPUT); // set pump pin 1 as output pinMode(motorB_2A, OUTPUT); // set pump pin 2 as output analogWrite(motorB_1A, HIGH); analogWrite(motorB_2A, LOW); delay(5000);// wait for 5 seconds analogWrite(motorB_1A, 0); // turn off the pump analogWrite(motorB_2A, 0); }
Additional Ideas¶
Reverse the pump’s direction by switching the
HIGH
andLOW
values between the pins.Implement a system where the pump toggles its state (on/off) using a button press.
Implement a potentiometer to control the speed of the pump using PWM.
Include sensors to automate the pump’s operation based on certain conditions, e.g., turning the pump on/off depending on water level in a tank.