Water Level Sensor interfacing with Arduino: In this tutorial you will learn how to interface water level sensor with Arduino. Water level sensor is used to measure water level in water tank or in any other equipment. In our daily life we need to detect the level of water like in water tank at the top of roof which is not directly accessible and in laboratories where specific level of any liquid is required to be monitored. In such applications water level sensor is very useful. In today’s tutorial we will see how to interface water level sensor with Arduino and how to monitor specific water level using this assembly. Water level sensor gives output int the form of voltage.So before using water level sensor, you should know, how to meausre analog voltage using Arduino and if you are new to arduino programming I recommend you to check this arduino programming in c tutorial first.
Hardware Required
- Arduino UNO
- Water level sensor
- Connecting wires
Pin Configuration
Water level sensor is provided with three output terminals.
Specifications
- Operating Voltage: DC5V
- Working current: less than 20mA
- Sensor Type: Analog
- Detection area :40mm x16mm
Circuit Diagram of water level detector
Connect the circuit as follows:
Sensor S pin with Arduino Analog pin A0
Sensor + pin with Arduino 5V
Sensor – pin with Arduino GND
Video lecture
Code for water level sensor interfacing with Arduino
void setup() { Serial.begin(9600); } void loop() { int val = analogRead(A0); // read input value Serial.print("Pin Value "); Serial.println(val); delay(2000); }
Testing the Circuit:
- After hardware connection, insert the sample sketch into the Arduino IDE.
- Using a USB cable, connect the ports from the Arduino to the computer.
- Upload the program.
- See the results in the serial monitor
Result:
More and more you dip the board in water the value on serial monitor keeps on increasing.
is it possible to convert it to assembly language?
you can check the output file where you code is stored to know either Arduino IDE generate ASM file or not.
Every compiler first generate assembly file and then convert it into hex or binary file
Hi Sir Good Afternoon i am trying to interface the water level sensor using Arduino nano for harvesting the fish Aquarium automatic water level detecting and filling the water below average of water but, the tank depth was 45CM the sensor size only the 5 cm how to apply the same application using long height sensor OR if any chance to increase the size of sensor please reply this question sir thank you
Hi Sir Good Afternoon i am trying to interface the water level sensor using Arduino nano for harvesting the fish Aquarium automatic water level detecting and filling the water below average of water but, the tank depth was 45CM the sensor size only the 5 cm how to apply the same application using long height sensor OR if any chance to increase the size of sensor please reply this question sir thank you