

The these variables are compared to a fixed number (100 here) for identifying the current condition. This way the voltage at each prob is scanned to corresponding variables. For example q=analogRead(qut) converts the voltage (in the range 0 to 5V) at the “quarter” probe into a number (in the range 0 to 1023) and saves it into the variable “q”. The Arduino reads the sensor output through the analog input pins using analogRead function. Int v=100 //comparison variable(needs some adjustment) Complete program for the water level controller using Arduino is given below. Resistor R4 limits the current through the power ON LED. resistor R1 limits the current through the back light LED. POT R2 is used to adjust the contrast of the LCD. Resistor R3 limits the base current of Q2. Transistor Q1 drives the buzzer and resistor R5 limits the base current of Q1. Same method is used for measuring the level of water in the sump tank.ĭigital pin 7 of the Arduino controls the buzzer and digital pin 8 controls the motor. Arduino reads the voltage dropped across each pull down resistor for sensing the level of water in the tank. As a result current flows through that probe and this current is converted into a proportional voltage by the pull down resistor. When the water touches a particular probe, electrical connection is established between that probe and the +5V probe because water has slight conductivity. Resistors R6 to R9 are pull down resistors.The dry end of this wire is connected to +5V DC. A fifth wire is positioned at the bottom of the tank. The dry ends of these wires are connected to analog input pins A1, A2, A3 and A4 of the Arduino respectively.

The sensor assembly consists of four aluminum wires arranged at 1/4, 1/2, 3/4 and full levels in the tank. Conductive method is used to measure the level. The circuit diagram of the water level controller using Arduino is shown above.
