Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Water Level Sensor: Examples, Pinouts, and Specs

Image of Water Level Sensor
Cirkit Designer LogoDesign with Water Level Sensor in Cirkit Designer

Introduction

The Water Level Sensor (HW-038), manufactured by Generic, is a device designed to detect and monitor the level of water in a tank or container. It is commonly used in automation systems to manage water levels, prevent overflow, and trigger alerts or actions based on water presence. This sensor is simple to use, making it ideal for both hobbyist and professional applications.

Explore Projects Built with Water Level Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-S3 Based Water Level and Temperature Monitoring System with WiFi Connectivity
Image of Monitoraggio livello acqua: A project utilizing Water Level Sensor in a practical application
This circuit is designed to monitor the water level and temperature in a tank using an ESP32-S3 microcontroller. It employs a JSN-SR04T ultrasonic sensor to measure water level and a DS18B20 temperature sensor to monitor water temperature, with a 4.7k Ohm resistor for the DS18B20's signal line pull-up. The measured data is displayed on an I2C LCD and can be transmitted to a web service via WiFi.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled Ultrasonic Water Level Monitoring and Pump Management System
Image of auto water: A project utilizing Water Level Sensor in a practical application
This circuit is designed to monitor water levels using an HC-SR04 Ultrasonic Sensor and display the information on a 20x4 LCD with I2C interface, controlled by an Arduino UNO. When the water level falls below a predefined threshold, the Arduino activates a relay module, which in turn powers a mini diaphragm water pump to refill the tank. The system aims to maintain water levels within set boundaries, automating the process of water level management.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled Ultrasonic Water Level Indicator with LCD Display and Relay Switching
Image of water: A project utilizing Water Level Sensor in a practical application
This circuit is designed to monitor water levels using an HC-SR04 Ultrasonic Sensor and display the information on an LCD I2C Display. An Arduino UNO controls the sensor to measure distance, calculates the water level as a percentage, and toggles a relay to control a pump based on the water level and manual input from a pushbutton. The system allows for manual override of the pump operation and stores the set water level threshold in EEPROM for persistent control across power cycles.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Bluetooth-Controlled Ultrasonic Water Level Detector
Image of Smartshoes: A project utilizing Water Level Sensor in a practical application
This circuit is designed to measure water levels and communicate the data wirelessly via Bluetooth. It uses an Arduino UNO as the main controller, interfaced with a water level sensor and an HC-SR04 ultrasonic sensor for level detection. The system is powered by a 9V battery through a rocker switch and can transmit sensor readings to a Bluetooth-connected device.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Water Level Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Monitoraggio livello acqua: A project utilizing Water Level Sensor in a practical application
ESP32-S3 Based Water Level and Temperature Monitoring System with WiFi Connectivity
This circuit is designed to monitor the water level and temperature in a tank using an ESP32-S3 microcontroller. It employs a JSN-SR04T ultrasonic sensor to measure water level and a DS18B20 temperature sensor to monitor water temperature, with a 4.7k Ohm resistor for the DS18B20's signal line pull-up. The measured data is displayed on an I2C LCD and can be transmitted to a web service via WiFi.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of auto water: A project utilizing Water Level Sensor in a practical application
Arduino-Controlled Ultrasonic Water Level Monitoring and Pump Management System
This circuit is designed to monitor water levels using an HC-SR04 Ultrasonic Sensor and display the information on a 20x4 LCD with I2C interface, controlled by an Arduino UNO. When the water level falls below a predefined threshold, the Arduino activates a relay module, which in turn powers a mini diaphragm water pump to refill the tank. The system aims to maintain water levels within set boundaries, automating the process of water level management.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of water: A project utilizing Water Level Sensor in a practical application
Arduino-Controlled Ultrasonic Water Level Indicator with LCD Display and Relay Switching
This circuit is designed to monitor water levels using an HC-SR04 Ultrasonic Sensor and display the information on an LCD I2C Display. An Arduino UNO controls the sensor to measure distance, calculates the water level as a percentage, and toggles a relay to control a pump based on the water level and manual input from a pushbutton. The system allows for manual override of the pump operation and stores the set water level threshold in EEPROM for persistent control across power cycles.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Smartshoes: A project utilizing Water Level Sensor in a practical application
Arduino UNO Bluetooth-Controlled Ultrasonic Water Level Detector
This circuit is designed to measure water levels and communicate the data wirelessly via Bluetooth. It uses an Arduino UNO as the main controller, interfaced with a water level sensor and an HC-SR04 ultrasonic sensor for level detection. The system is powered by a 9V battery through a rocker switch and can transmit sensor readings to a Bluetooth-connected device.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Water tank level monitoring
  • Automatic water pumps
  • Smart irrigation systems
  • Overflow and leakage detection
  • Home automation projects

Technical Specifications

Below are the key technical details of the HW-038 Water Level Sensor:

Parameter Specification
Operating Voltage 3.3V - 5V DC
Operating Current < 20mA
Output Type Analog and Digital
Detection Range 0 - 100% water level (relative scale)
Dimensions 62mm x 20mm
Interface Type 3-pin header (VCC, GND, OUT)
Material PCB with exposed conductive traces

Pin Configuration

The HW-038 Water Level Sensor has a 3-pin interface. The table below describes each pin:

Pin Name Description
1 VCC Power supply pin. Connect to 3.3V or 5V DC.
2 GND Ground pin. Connect to the ground of the circuit.
3 OUT Output pin. Provides an analog signal proportional to water level or a digital
signal (HIGH/LOW) depending on the water presence.

Usage Instructions

How to Use the HW-038 Water Level Sensor in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground.
  2. Read the Output:
    • For analog output, connect the OUT pin to an analog input pin of a microcontroller (e.g., Arduino).
    • For digital output, connect the OUT pin to a digital input pin. The sensor will output HIGH (1) when water is detected and LOW (0) when no water is present.
  3. Place the Sensor: Submerge the sensor in the water container. Ensure the conductive traces are in contact with the water for accurate readings.

Important Considerations

  • Avoid Corrosion: The exposed conductive traces can corrode over time. Use the sensor in clean water or apply protective coatings to extend its lifespan.
  • Voltage Compatibility: Ensure the sensor's operating voltage matches your microcontroller's input voltage to avoid damage.
  • Signal Noise: Use a pull-down resistor on the OUT pin to stabilize the digital output signal if needed.

Example: Connecting to an Arduino UNO

Below is an example of how to connect and use the HW-038 Water Level Sensor with an Arduino UNO:

Circuit Diagram

  • VCC → Arduino 5V
  • GND → Arduino GND
  • OUT → Arduino A0 (for analog reading)

Arduino Code

// Water Level Sensor Example with Arduino UNO
// Reads the analog output of the sensor and prints the water level percentage.

const int sensorPin = A0; // Connect OUT pin of the sensor to A0
int sensorValue = 0;      // Variable to store the sensor reading

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
}

void loop() {
  sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
  float waterLevel = (sensorValue / 1023.0) * 100; // Convert to percentage (0-100%)
  
  // Print the water level percentage to the Serial Monitor
  Serial.print("Water Level: ");
  Serial.print(waterLevel);
  Serial.println("%");
  
  delay(500); // Wait for 500ms before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output Signal:

    • Cause: Incorrect wiring or insufficient power supply.
    • Solution: Double-check the connections and ensure the power supply is 3.3V or 5V.
  2. Inconsistent Readings:

    • Cause: Signal noise or dirty water.
    • Solution: Use a pull-down resistor for digital output or filter the analog signal in software. Clean the sensor if used in dirty water.
  3. Corrosion of Conductive Traces:

    • Cause: Prolonged exposure to water.
    • Solution: Use the sensor in clean water or apply a protective coating to the traces.
  4. Sensor Not Detecting Water:

    • Cause: Insufficient water contact with the sensor.
    • Solution: Ensure the sensor is fully submerged and the conductive traces are in contact with the water.

FAQs

Q1: Can the HW-038 Water Level Sensor be used with liquids other than water?
A1: The sensor is designed for water detection. It may work with other conductive liquids, but performance and lifespan may vary.

Q2: How can I extend the lifespan of the sensor?
A2: Use the sensor in clean water, avoid prolonged submersion, and apply a protective coating to the conductive traces.

Q3: Can I use multiple sensors in the same project?
A3: Yes, you can connect multiple sensors to different input pins of your microcontroller to monitor multiple water levels.

Q4: Is the sensor waterproof?
A4: No, the sensor is not fully waterproof. Only the conductive traces should be submerged, and the rest of the PCB should remain dry.

By following this documentation, you can effectively integrate the HW-038 Water Level Sensor into your projects and troubleshoot common issues with ease.