Site icon Circuit Ideas for You

How to Create a Water Level Sensor Circuit with Arduino

For fun and learning project, we will learn about basic electronics, coding and sensor uses.

Here, we will learn How to Create a Water Level Sensor Circuit with Arduino and this guide teaches us how to make water sensor.

Furthermore, it is good for stopping overflow, checking water in tank or auto watering plants.

We can use Arduino Uno which is easy and flexible, water sensor, IC 7809, LED and resistor, so follow steps to connect parts, write code, send to Arduino and read water level data to do actions.

Arduino Code:

const int waterSensorPin = 2; // Replace 2 with the actual pin number used for the water level sensor

void setup() {
  pinMode(waterSensorPin, INPUT);
  Serial.begin(9600);
}

void loop() {
  int sensorValue = digitalRead(waterSensorPin);

  if (sensorValue == HIGH) {
    Serial.println("Water detected");
  } else {
    Serial.println("No water detected");
  }

  delay(1000); // Delay for 1 second
}

Code Explanation:

Circuit Working:

How to Create a Water Level Sensor Circuit Diagram with Arduino

Parts List:

ComponentsQuantity
Resistors
220Ω 1/4 watt1
Semiconductors
Arduino UNO board1
IC 78091
Water level sensor1
Red LED 5mm 20mA1
Multimeter1
Probes Red and Black2

In this circuit when water drop falls in glass the output pin voltage goes up with water level and this happens because sensor part on PCB feels water and changes voltage.

Water level sensor has two probes, one probe goes in water and lets current flow and other stays dry as reference.

IC 7809 gives steady 9V power to Arduino and sensor and sensor module has 3 pins and 2 are power pins.

Then connect them to Arduinos 5V and GND and this makes circuit work well.

After that, the LED and resistor indicate whether water is present.

If the sensor detects water, the LED turns ON and the resistor limits the current to prevent the LED from burning out.

How to Build:

To build a Water Level Sensor Circuit with Arduino follow below steps for connections:

Testing:

Conclusion:

To conclude, using parts from circuit diagram and steps above we can make working circuit that checks if water is there or not.

We can also add more smart features later like turning on alarm or controlling other devices based on water level.

Exit mobile version