Potentiometer Controlled Water Pump Using Arduino
by devkrishnavhora in Circuits > Arduino
33 Views, 0 Favorites, 0 Comments
Potentiometer Controlled Water Pump Using Arduino
This project controls the speed of a pump using a potentiometer and Arduino.
The potentiometer provides a variable analog input to the Arduino. The Arduino reads the potentiometer value and converts it into a PWM value. This PWM signal is used to control the speed of the pump through a motor driver.
By rotating the potentiometer, the user can increase or decrease the pump speed.
Supplies
Deshbot shield
Arduino Uno
DC Water Pump
Motor Driver
Potentiometer
Pin Connections
Pump Motor Driver
Motor DriverArduino Uno
Pump A / IN1 - D6
Pump B / IN2 - D7
GND - GND
Potentiometer
PotentiometerArduino Uno
Middle Pin - A0
One Outer Pin - 5V
Other Outer Pin - GND
Working Principle
The potentiometer produces an analog voltage between 0V and 5V.
The Arduino reads this voltage using analog pin A0.
The analogRead() function produces a value between:
This value is converted into a PWM range:
using the map() function.
The PWM value is then applied to D6, which controls the pump speed through the motor driver.
Control
Program Flow
Programming Concepts Used
analogRead()
Reads the analog value from the potentiometer.
The result ranges from 0 to 1023.
map()
Converts the potentiometer reading into a PWM value.
analogWrite()
Outputs the PWM signal used to control the pump.
Motor Direction
The second motor-driver input is kept LOW:
This makes the pump operate in one direction.
Features
- Potentiometer-based pump control
- Variable pump speed
- PWM speed control
- Simple Arduino program
- Continuous speed adjustment
- Motor driver controlled operation
Downloads
Conclusion
The Potentiometer Controlled Pump project demonstrates how an Arduino can read an analog input and use PWM to control a DC pump.
By rotating the potentiometer, the user can continuously adjust the pump's speed. This project introduces important Arduino concepts such as analog input, PWM, map(), and motor-driver control.