Introduction: Arduino Controlled Pump for Draining Water
The idea of this project came out when I bought a condensing gas boiler for my apartment. I don't have any drain close by for the condensed water the boiler produces. So the water is collected in a 20 liter tank (drum) for few days and when it gets filled up, i have to discharge it manually. So I decided to make an Arduino controlled pump which will discharge the water with only one push of the button. A display shows the status of the pump. I've added two level sensors to stop the pump if the drain is either overflowing or the level is dropping inside the collecting tank. This is important for the well functioning of the pump, in order to always be submerged.
Step 1: Parts Used for the Project
For this project I've used:
- Arduino uno board for testing (Arduino nano for final project)
- 12V submersible water pump
- a protoboard
- a relay module
- a 10k potentiometer
- 4 NPN transistors
- a buzzer
- jumper wires
- different resistors
- a push button
- a switch
Step 2: Last But Not Least
I've attached Arduino's source code.
This is my first Arduino project. I'm satisfied I've managed to make it work and actually save time by using this pump. I will work on its appearance though and to perfect it a bit more. I'm opened for suggestions.
Step 3: Creating the Water Level Sensors
This project has two water level sensors. One will stop the pump if the water level drops so the pump will always be submerged and the second one will stop the pump in case the discharge tank gets overfilled. The sensor is made from two wires and two NPN transistors connected as a Darlington switch. A very small current passes once the wires are submerged and this activates the signal into Arduino.
How to connect the transistors T1 and T2:
T1: Emitter to Base of T2
T1: Collector to Collector of T2
T1: Base to Ground through a 470K rezistor
T1: Base to Arduino analog Pin A0 (for the first sensor) and Pin A1 (for the second sensor)
T1: Base of the sensor's first wire that will make contact in the water
T2: Emitter to ground.
Second wire of the sensor will come from 5V through a 10K rezistor.
Once the sensor connected to Arduino A1 analog gets out of the water, the pump stops and the LCD displays the message "Pump off/Low lvl. No water in the tank". Once the wires on the second water level sensor reach the water, the pump will stop and the LCD will display "Pump off/ Hi lvl".
Step 4: Setting Up Arduino Digital Pins
I've used a 12V submersible pump which was supplied from an 12V wall adapter.
The pump is controlled by the Arduino digital pin no 9 through a relay.
Arduino digital pin No 8 is connected to a push button in order to start the pump or to stop it manually.
Arduino digital pin No 11 controls a white LED - which indicates whether the pump is available or not.
Arduino digital pin No 12 controls a green LED - which indicates when the pump is on.
Arduino digital pin No 13 controls a red LED - which indicates when the pump is stopped (I've also added a buzzer to get a sound signal when the pump has stopped).
Arduino digital pins No 2,3,4,5,6,7 are connected to the LCD.
Participated in the
Microcontroller Contest 2017