Introduction
- In this article, I will explain about connecting the liquid Sensor With Arduino Mega 2560.
- It can generally be used to get the measure of the liquid.
Parts Of Lists
- Arduino Mega 2560
- Liquid Sensor.
- Hook Wires.
Liquid Sensor
- Liquid level sensors are used for all types of applications.
- They are extensively used within automobiles.
- Which rely on a substantial amount of different fluids in order to operate to check.
- How much gas in the car, windshield washer fluid, oil levels.
Figure 1: Liquid Sensor
Connection
| Sensor | Board |
| Vcc | 5V |
| Gnd | Gnd |
| Vin | A1 |
- const int sensorPin = 1; //sensor pin connected to analog pin A1
- int liquid_level;
- void setup()
- {
- Serial.begin(9600); //sets the baud rate for data transfer in bits/second
- pinMode(sensorPin, INPUT); //the liquid level sensor will be an input to the arduino
- }
- void loop()
- {
- liquid_level = analogRead(sensorPin); //arduino reads the value from the liquid level sensor
- Serial.println(liquid_level); //prints out liquid level sensor reading
- delay(1000); //delays 1000ms
- }
Explanation
- In this Article I explained about the Liquid Sensor
- It can be used to find the quality of the liquid which we have.
- It can easily print the value in the Serial monitor.
Output

Figure 2: Output

hari prasathPosted Sep 15, 2017, 10:57 AM
I am Hariprasath studying diploma EEE final year in psg polytech coimbatore I doing my project IoT based plz help me
Shobana JPosted Jul 8, 2016, 4:09 AM
Keep sharing.Nice one
Sr KarthigaPosted Jul 5, 2016, 10:38 AM
Thank you santhakumar sir
Sr KarthigaPosted Jul 5, 2016, 10:38 AM
Thank you prasanna bro
Sr KarthigaPosted Jul 5, 2016, 10:38 AM
Thank you vignesh mani sir
Santhakumar MunuswamyPosted Jun 25, 2016, 3:07 AM
Nice share
Prasanna MuraliPosted Jun 21, 2016, 9:32 PM
Nice one..
Vignesh ManiPosted Jun 14, 2016, 11:57 AM
Good one