Sistema de controle de nível de água sem fio

Wireless Water Level Control System

Wireless Water Level Control System
Introduction: In domestic and industrial applications we use water tanks to store water. Filling the tank with water using a water pump is quite common. When the water inside the tank runs out, we must fill it by pumping water using an AC motor and after the tank is filled with water, we stop the motor. This is a manual system, meaning that starting the engine when the tank is empty and turning it off when the tank is full is manual. But now it's no longer manual. The automatic system for starting and stopping the engine based on the water level in the tank is now available on the market. This system is a wired system and connecting the circuit and arranging the wires and the circuit is a little complex. In this system, the biggest disadvantage is the wired connections between the control circuit and the motor. Therefore, we have to use long wires from the top of the house to the water supply unit and the control circuit unit. If we want to adapt this system to large buildings, it will become very expensive and very complex. To overcome this, instead of wired system, if we adopt wireless system, we can reduce cost and complexity. The new and different approach in this project is that water levels are monitored wirelessly and the water pumping system is controlled based on the water level, sending wireless signal from Tx to Rx. Therefore, as there is no wire connection between the water tank and the motor control circuit, we can use this system in tall buildings (with 10 or more floors) at a lower cost. Description: In this project the transmitter is connected to the water tank, from the water tank four water level sensors (connectors) are connected to the encoder. Data from the encoder is transmitted to the receiver. The receiver circuit is connected to the display and motor units. It uses microcontroller to display the water level and control the motor. So, do you want to know how this is possible? How is this done? Let's start. First collect all the necessary components and equipment. Required components and equipment: Sr. No. Component Name Required Quantity 1 RF Tx module (434 MHz) 1 2 RF Rx Module (434 MHz) 1 3HT12E1 4HT12D1 5 LED 1 6 Resistor – 1KΩ (a quarter of a watt) 4 7 Resistor – 1MΩ (a quarter of a watt) 1 8 Resistor – 50KΩ (a quarter of a watt) 1 9 Arduino pro mini 1 development board 10 LCD 16×2 1 11 Transistor BC547 1 12 1 Type C/O PCB Mount Relay 1 13 diode 1N4007 1 14 100 Ω resistor 1 (quarter watt) 15 pot 1 of 10 K 16 Battery – 9V 2 17 Breadboard 3 18 connecting wires Circuit Diagram: Procedure: Transmitter Section: Step 1: Arrange a wire-shaped water tank from bottom to top and similarly arrange four levels with wires (suppose; 25%, 50%, 75%, 100%). Take a total of five tank connections. Step 2: in these five connections connect the last and the lower Vcc wire, and four level contacts remain to the HT12E encoder 10,11,12,13, pins with 1K pull down resistance. Step 3: connect the 1MΩ resistor between 15 and 16 pins of the HT12E. Step 4: connect 17 pins of the HT12E to the 2nd pin of the RF Tx module and 14 pins to ground. Step 5: 1-8 pins of HT12E are address pins, connect all of them to ground and connect pin 18 to Vcc and pin 9 to ground Step 5: Connect RF Tx module pin 1 to ground pin 3 to Vcc and pin 4 to antenna. Receiver Section: Step 1: Connect the 10,11,12,13 pin decoder to the Arduino pro mini 10,11,12,13, pin microcontroller board. Step 4: connect the 50KΩ resistor between decoder pins 15 and 16 of the HT12D. Step 5: Connect 14 pins of decoder to 2nd pin of RF Rx module and 17 pins to LED indicator (LED indicates signal is received) Step 6: 1-8 pins of HT12D are address pins. Connect everything to ground and also connect pin 9 to ground. Connect pin 18 to Vcc Step 7: Connect pins 1, 6 and 7 of the RF Rx modules to Vcc ground pins 4-5 and pin 8 to the antenna. Step 8: Connect pin 2 of Arduino to En pin of LCD, pin 3 to Rs pin and pins 4,5,6,7 to data pins D5-D8. Step 9: The relay coil is connected between the collector of the transistor and the Vcc supply. A diode is connected in reverse bias across the coil. The AC load (lamp) is connected between the common and normally open terminals of the relay contacts. Working: 1. The basic point in this project is to consider that water is a good conductor, if the density of water increases, the conductivity also increases (salt water). Pure water is not a good conductor of electricity. Ordinary distilled water in equilibrium with carbon dioxide in the air has a conductivity of about 10 x 10-6 W-1*m-1 (20 dS/m). Because electrical current is carried by ions in solution, conductivity increases as the ion concentration increases. Thus, conductivity increases as water dissolves ionic species. Typical water conductivity: Ultrapure water 5.5 • 10-6 S/m Drinking water 0.005 – 0.05 S/m Sea water 5 S/m Here S/m = Siemens per meter. 2. According to the construction points, in this project four water levels are measured, the fifth wire (bottom wire) is for applying power supply. When we are filling the tank with water, the water touches the bottom wire, so from the starting point, the water carries the supply voltage (+5V). When the water level increases and reaches 25% level of the conductive wire, this dry wire conducts and gets +5V. This voltage changes the state of the data pin of the encoder chip. Similarly, when water touches the remaining wires, they receive +5 V and change the state of the respective data pin. This is the working principle of this project. 3. The tank water level wires are connected to the data pins of the HT12E encoder chip using pull down resistors (10KΩ). Here, a chance to raise doubts about resistance to falling. Pull down resistance is necessary here because when electrical connections are established between the wire and water, current flows through the wire and this current is converted into proportional voltage by the pull down resistor. 4. When this voltage is applied to the input of the encoder, it will convert parallel data into serial data and power pin 2 of the Tx module. Then the transmitter transmits the data in the form of ASK signal to the receiver. 5. The receiver receives the data and the decoder converts serial data into parallel data. The decoder output pins connected to the Arduino digital pins as inputs. If the 1st input is high, the LCD displays the water level at 25% as per the program. 6. Similarly, the LCD displays all other water levels as the microcontroller obtains data from the transmitter 7. When the water tank is full, the relay changes state and turns off the engine. Photos:
Problems solution: The main problem I faced in this project is that the encoder pins are connected to the four wires and these four wires are connected to the water tank at different levels. This arrangement helps indicate water levels. But the water level wires are not providing enough voltage to the encoder pins. Increasing the contact surface of the conductor with the water solved this problem. When we are programming a microcontroller to display levels on LCD, we must consider all the levels at each stage, by looking at the program we can understand this. Precautions: 1. The status of the address lines must be the same on the transmitter and receiver side. 2. On the transmitter, the 14th pin must be connected to ground or connect a switch between ground and the 14th pin to reset the encoder. 3. On the transmitter, the resistor between 15 and 16 must be between 750MΩ and 1MΩ and on the receiver side, the resistor between 15 and 16 must be between 30KΩ and 50KΩ. 4. If you want to use other batteries, check the HT12E/D data sheet once. 5. Be careful with connections from the tank to the transmitter circuit and relay circuit. 6. In the program we should mention all the levels in each if loop, like, in the beginning only 1st level is high, but in 2nd level, 1st level and 2nd level are high. Therefore, we must mention this in conditions. And there is also mention of two low states.

Project source code

Project source code

###

#include
//decoder 10,11,12,13 output pins connected to arduino 10,11,12,13 digital pins as input.int tx1 = 10;int tx2 = 11;int tx3 = 12;int tx4 = 13;int relay = 8;int buzzer = 9;LiquidCrystal lcd(2, 3, 4, 5, 6, 7); void setup { pinMode(tx1,INPUT); pinMode(tx2,INPUT); pinMode(tx3,INPUT); // decoder output microcontroller reading as input. pinMode(tx4,INPUT); pinMode(relay,OUTPUT); Serial.begin(9600); lcd.begin(16, 2); lcd.print("ENGINEERS GARAGE"); lcd.setCursor(0, 1); digitalWrite(relay,HIGH); delay(1000);} void loop { // reading data and storing in avariable for further use. int Tx1 = digitalRead(tx1); int Tx2 = digitalRead(tx2); int Tx3 = digitalRead(tx3); int Tx4 = digitalRead(tx4); if (Tx1 == HIGH && Tx2 == LOW && Tx3 == LOW && Tx4 == LOW ) { lcd.setCursor(0, 2); lcd.print("Water Level"); lcd.print(" 25%"); // change the analog out value: } if (Tx1 == HIGH && Tx2 == HIGH && Tx3 == LOW && Tx4 == LOW ) { lcd.setCursor(0, 2); lcd.print("Water Level"); lcd.print(" 50%"); // change the analog out value: } if (Tx1 == HIGH && Tx2 == HIGH && Tx3 == HIGH && Tx4 == LOW ) { lcd.setCursor(0, 2); lcd.print("Water Level"); lcd.print(" 75%"); // change the analog out value: } if (Tx1 == HIGH && Tx2 == HIGH && Tx3 == HIGH && Tx4 == HIGH ) { lcd.setCursor(0, 2); lcd.print("Tank Full"); lcd.print(" !!!! "); // change the analog out value: digitalWrite(buzzer,HIGH); delay(1000); digitalWrite(relay,LOW); }}
//Program to

###

Circuit diagrams

RF16

Back to the blog

Leave a comment

Comments need to be approved before publication.