Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Sensors & Modules

Capacitive Level Sensor: Non-Contact Liquid Level Detection Guide

Capacitive Level Sensor: Non-Contact Liquid Level Detection Guide

March 11, 2026 /Posted byJayesh Jain / 0

Table of Contents

  • What Is a Capacitive Level Sensor?
  • How Non-Contact Liquid Detection Works
  • Types of Capacitive Level Sensors
  • Capacitive vs Resistive Level Sensors
  • Wiring to Arduino and ESP32
  • Sample Arduino Code
  • Real-World Applications in India
  • Industrial Variants and Standards
  • Troubleshooting Common Problems
  • What to Look for When Buying
  • FAQ

What Is a Capacitive Level Sensor?

A capacitive level sensor detects the presence, absence, or level of a liquid by measuring changes in electrical capacitance near the sensor’s probe or electrode. Unlike float switches or resistive probes, the capacitive type does not need to touch the liquid to work — making it a true non-contact liquid level solution when the electrode is mounted against the outer wall of a tank.

Capacitance is the ability of two conductors separated by a dielectric to store electrical charge. When a liquid — which has a higher dielectric constant (εr) than air — comes close to or between the sensor electrodes, the effective capacitance rises noticeably. Electronics inside the sensor chip convert this capacitance shift into a digital or analog output signal that a microcontroller like an Arduino or ESP32 can read easily.

In India, capacitive level sensors are increasingly common in water storage management, chemical processing, agriculture automation, and food & beverage factories. They are available in compact PCB modules starting below ₹150 and in industrial-grade stainless-steel probes rated IP67 or IP68 for harsh environments.

How Non-Contact Liquid Detection Works

The physics behind capacitive sensing is elegant. Any two conductors separated by an insulating material form a capacitor. The capacitance C is governed by:

C = ε₀ × εr × (A / d)

Where ε₀ is the permittivity of free space (8.854 × 10⁻¹² F/m), εr is the relative permittivity (dielectric constant) of the material between the electrodes, A is the effective area of the electrodes, and d is the distance between them.

In a non-contact setup, the sensor electrodes are pressed against or glued to the outside of a non-metallic container (PVC pipe, plastic tank, glass vessel). The tank wall acts as part of the dielectric. When the liquid level rises above the electrode, the overall εr between the plates increases significantly — water has εr ≈ 80 while air has εr = 1. This jump in capacitance — often tens to hundreds of picofarads — is measured by a capacitance-to-digital converter IC like the FDC1004, AD7746, or simpler comparator circuits.

For continuous level measurement, multiple electrodes are arranged vertically along the tank wall, or a single long strip electrode is used. The sensor chip calculates what fraction of the electrode length is covered by liquid and outputs a proportional voltage or digital count.

Types of Capacitive Level Sensors

1. PCB Breakout Modules

Small, inexpensive boards designed for hobbyist and prototyping use. Typically contain an RC oscillator or dedicated IC. Output is usually a digital HIGH/LOW threshold signal, though some provide an analog voltage. Ideal for water tanks, aquariums, and DIY automation projects.

2. Cylindrical Probe Sensors

Industrial-style sensors in M12, M18, or M30 threaded housings. Rated IP65–IP69K. Output: PNP/NPN switching or 4–20 mA analog. Used in chemical tanks, fuel storage, and food-grade applications. Brands like Pepperl+Fuchs, IFM, and Turck dominate this segment.

3. Strip / Flexible Electrode Sensors

A flexible PCB strip is taped to the side of a translucent container. Electronics at one end scan each electrode segment to build a full liquid level profile. Popular in laboratory and research equipment.

4. Non-Contact Through-Wall Sensors

Optimised specifically for detection through tank walls up to 5–10 mm thick. Some use guard electrodes to eliminate stray capacitance from the tank wall itself, reporting only the liquid contribution. The XKC-Y25 and similar modules are popular with Indian hobbyists for water tanks.

Capacitive vs Resistive Level Sensors

Feature Capacitive Resistive / Conductive
Physical contact with liquid Not required (non-contact possible) Required
Works with non-conductive liquids Yes (oil, petrol, alcohol) No — needs conductivity
Corrosion / fouling risk Very low High
Cost (entry-level) ₹150 – ₹500 (modules) ₹50 – ₹200
Affected by foam / bubbles Can be (dielectric change) Less affected
Suitable for food / pharma Yes (hygienic designs) Limited

Wiring to Arduino and ESP32

The most common hobbyist capacitive level sensor module in India is the XKC-Y25 non-contact liquid level sensor. It has three wires:

  • Red (VCC): Connect to 5V (Arduino) or 3.3V/5V (ESP32 — use 5V for best sensitivity)
  • Black (GND): Connect to GND
  • Yellow (OUT): Digital output — HIGH when liquid detected, LOW when absent (some modules are inverted)

For the ESP32, if the output is 5V logic, add a voltage divider (10kΩ + 20kΩ) or a 3.3V logic-level shifter before connecting to a GPIO pin, since ESP32 GPIO pins are not 5V tolerant.

Stick the flat sensing face flush against the outside of a dry, clean plastic or glass tank wall. Ensure no air gaps between sensor and tank — use insulating tape to hold it firmly. Metal tanks will not work with non-contact mode; use a probe-type sensor instead.

Sample Arduino Code

The following sketch reads the XKC-Y25 digital output and prints the liquid status to the Serial Monitor:

// Capacitive Level Sensor (XKC-Y25) — Digital Read
// Zbotic.in Example

const int SENSOR_PIN = 2;  // Yellow wire → Digital Pin 2

void setup() {
  Serial.begin(9600);
  pinMode(SENSOR_PIN, INPUT);
  Serial.println("Capacitive Level Sensor Ready");
}

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

  if (sensorValue == HIGH) {
    Serial.println("Liquid DETECTED at sensor level");
  } else {
    Serial.println("No liquid at sensor level");
  }

  delay(500);
}

Multi-Level Detection with Three Sensors

// Multi-Level Tank Monitor using 3 Capacitive Sensors
// Mount sensors at LOW, MID, HIGH positions on tank

const int LEVEL_LOW  = 2;
const int LEVEL_MID  = 3;
const int LEVEL_HIGH = 4;

void setup() {
  Serial.begin(9600);
  pinMode(LEVEL_LOW,  INPUT);
  pinMode(LEVEL_MID,  INPUT);
  pinMode(LEVEL_HIGH, INPUT);
}

void loop() {
  bool low  = digitalRead(LEVEL_LOW);
  bool mid  = digitalRead(LEVEL_MID);
  bool high = digitalRead(LEVEL_HIGH);

  Serial.print("Level: ");
  if (high)       Serial.println("FULL (>75%)");
  else if (mid)   Serial.println("MEDIUM (25-75%)");
  else if (low)   Serial.println("LOW (<25%) — Refill needed!");
  else            Serial.println("EMPTY — Pump shutoff active!");

  delay(1000);
}

This multi-level approach is excellent for overhead water tank automation, where you want to automatically start/stop a pump and send alerts before the tank runs dry.

JSN-SR04T Waterproof Ultrasonic Rangefinder

A86 JSN-SR04T Waterproof Ultrasonic Rangefinder Module

Pair with a capacitive sensor for redundant tank level monitoring — ultrasonic measures from the top while capacitive sensors detect side-wall thresholds. IP65-rated for outdoor water tanks.

View on Zbotic

Real-World Applications in India

Overhead Water Tank Automation

India faces acute water scarcity in many cities. Capacitive sensors mounted on the outside of a HDPE overhead tank can trigger a motor pump when the level drops below a threshold and cut power when the tank is full — without any wiring inside the tank. Combined with a GSM module or Wi-Fi-based ESP8266, you can receive SMS or WhatsApp alerts on your phone.

Chemical Dosing in Water Treatment Plants

Chemical tanks often contain corrosive substances like sodium hypochlorite (bleach), ferric sulphate, or alum. Inserting a probe would mean using expensive PTFE or Hastelloy materials. A non-contact capacitive sensor eliminates probe corrosion entirely while providing reliable level switching for dosing pumps.

Pharmaceutical and Food Grade Tanks

Regulatory standards for pharma and food industries mandate that sensors not contaminate the product. Non-contact capacitive sensors meet GMP requirements since no part touches the liquid.

Agriculture: Fertilizer Tank Monitoring

Fertigated irrigation systems (drip + fertilizer injection) need constant liquid level monitoring in fertilizer solution tanks. Capacitive sensors integrated with ESP32 and MQTT can report to a farm management dashboard in real time.

Fuel Level Sensing in Generators

Many diesel generators in India use simple float switches that fail mechanically over time. Non-contact capacitive sensors can replace floats for more reliable fuel level monitoring, reporting via RS-485 or analog 4–20 mA to the genset controller.

Industrial Variants and Standards

Industrial capacitive level sensors sold in India must often comply with:

  • IP67 / IP68: Complete dust protection and water immersion rating
  • ATEX / IECEx: Explosion-proof certification for flammable liquid storage
  • 4–20 mA Output: Standard current loop for long cable runs (up to 300 m) without signal degradation
  • IO-Link: Digital point-to-point communication for smart factory integration
  • Hygienic Design (EHEDG / 3-A): Flush-mount, crevice-free housing for food/pharma

For PLC-based automation (Siemens S7, Allen-Bradley, Delta), look for sensors with NAMUR outputs or IO-Link masters. The 4–20 mA output maps cleanly to standard 0–100% level display on SCADA systems.

Troubleshooting Common Problems

Sensor Always Reads HIGH / Triggered

This usually means stray capacitance from a metal tank wall, nearby cables, or human body proximity. Move all metallic objects away from the sensor face. Ensure the cable is routed away from other power cables. Some sensors have a sensitivity trim potentiometer — turn it down.

Sensor Never Triggers Even with Liquid

Check that the tank wall is non-metallic and no thicker than the sensor’s specified penetration depth (typically 3–8 mm for hobbyist modules). Ensure the sensor face is in full, flat contact with the tank wall with no air gap. Check power supply voltage.

Erratic / Chattering Output

Add hysteresis in software — only accept a state change after 5 consecutive consistent readings separated by 100 ms intervals. On the hardware side, a 100 nF decoupling capacitor between VCC and GND close to the sensor helps with power supply noise.

False Triggers from Condensation

Condensation on the outside of a cold water pipe can fool a non-contact sensor. Mount the sensor on the bottom half of the pipe only, or use a silicone boot to shield the sensor face from ambient moisture.

Capacitive Soil Moisture Sensor

Capacitive Soil Moisture Sensor

Uses the same capacitive dielectric-constant principle to measure water content in soil without corrosion. Ideal for smart irrigation and indoor plant monitoring projects.

View on Zbotic

What to Look for When Buying

  • Operating Voltage: 5V for Arduino, 3.3V/5V for ESP32 — confirm compatibility
  • Output Type: Digital (NPN/PNP) for point-level, analog (0–5V or 4–20 mA) for continuous level
  • Detection Distance / Wall Penetration: 3–8 mm for hobbyist grades; up to 25 mm for industrial
  • Liquid Type: Most sensors specify minimum dielectric constant — water works easily (εr ≈ 80), but oil (εr ≈ 2–5) may need a higher-sensitivity unit
  • Housing IP Rating: IP67 minimum for any outdoor or wash-down environment
  • Response Time: Typically 5–50 ms; fast response is important for high-speed fill lines
  • Temperature Range: Standard −25°C to +70°C; extended grades up to +150°C for hot liquids
5V 12V Soil Moisture Sensor Relay Control Module

5V 12V Soil Moisture Sensor Relay Control Module

Combines a resistive moisture sensor with a relay for direct pump or valve control. A cost-effective complement to capacitive sensors where corrosion in soil is less of a concern.

View on Zbotic

Frequently Asked Questions

Can a capacitive level sensor work through a metal tank?

No. Metal tanks act as a Faraday shield, blocking the electric field from penetrating to the liquid. For metal tanks, use a probe-type capacitive sensor inserted through a port in the tank, or switch to an ultrasonic or radar level sensor.

What is the maximum tank wall thickness for non-contact sensing?

Standard hobbyist modules (XKC-Y25 type) reliably penetrate 3–8 mm of HDPE, PVC, or glass. Industrial sensors with guard electrode technology can work through walls up to 20–25 mm thick. Always verify with the sensor’s datasheet.

Does the liquid temperature affect capacitive sensing?

Yes, slightly. The dielectric constant of water decreases from about 87 at 20°C to 80 at 25°C. For point-level switching this change is negligible. For high-accuracy continuous measurement, look for sensors with built-in temperature compensation.

Can I use a capacitive level sensor for petrol or diesel?

Petroleum products have a low dielectric constant (εr ≈ 2). Standard modules may not trigger reliably. Use a sensor specifically rated for low-εr liquids with higher sensitivity, or choose a differential capacitance design. Always ensure ATEX certification for flammable fuels.

How do I interface a 4–20 mA sensor with Arduino?

Use a 250Ω precision resistor across the Arduino analog input and GND. The 4 mA corresponds to 1V and 20 mA to 5V on the resistor, mapping to analogRead values of 205 (0% level) and 1023 (100% level). Scale accordingly in code.

Are capacitive level sensors accurate enough to replace ultrasonic sensors?

For point-level detection (full / empty / low alarm), capacitive sensors are equally reliable and often cheaper. For continuous level measurement with ±1–2% accuracy, ultrasonic sensors are generally preferred, especially for large tanks.

Conclusion

A capacitive level sensor for non-contact liquid level detection is one of the most versatile and maintenance-free sensing solutions available today. By harnessing the fundamental change in capacitance when a liquid’s dielectric constant interacts with the sensor electrode, these devices eliminate corrosion, contamination, and mechanical failure risks associated with traditional float switches and resistive probes.

Whether you are building a smart water tank controller for your home, automating fertilizer tanks for precision agriculture, or integrating level measurement into an industrial process, a capacitive sensor offers reliable performance from ₹150 hobbyist modules to certified industrial units. Pair them with an Arduino, ESP32, or PLC, and you have a robust liquid level monitoring system suited for India’s diverse applications.

Ready to start building? Explore Zbotic’s sensor range and get the right components delivered quickly across India.

Tags: arduino sensor, capacitive level sensor, level sensing, liquid level detection, non-contact liquid sensor
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
UV Index Sensor VEML6075: Safe...
blog uv index sensor veml6075 safe sun exposure monitor build 596295
blog sensor anomaly detection spot faulty readings in firmware 596297
Sensor Anomaly Detection: Spot...

Related posts

Svg%3E
Read more

Encoder Module: Position and Speed Measurement with Arduino

April 1, 2026 0
A rotary encoder converts the angular position and rotation speed of a shaft into electrical signals that Arduino can count... Continue reading
Svg%3E
Read more

Infrared Obstacle Sensor: Line Follower and Object Detection

April 1, 2026 0
Infrared obstacle sensors are the building blocks of line-following robots, edge detection systems, and proximity triggers. These tiny modules emit... Continue reading
Svg%3E
Read more

Rain Sensor and Raindrop Detection Module: Arduino Guide

April 1, 2026 0
A rain sensor module detects the presence of water droplets on its surface, giving Arduino a simple signal to trigger... Continue reading
Svg%3E
Read more

LiDAR Sensor TFmini: Distance Measurement Beyond Ultrasonic

April 1, 2026 0
When ultrasonic sensors hit their limits — range too short, accuracy too coarse, outdoor sunlight causing interference — LiDAR sensors... Continue reading
Svg%3E
Read more

Pressure Sensor BMP280: Weather Station and Altitude Meter

April 1, 2026 0
The BMP280 barometric pressure sensor by Bosch measures atmospheric pressure with ±1 hPa accuracy and temperature with ±1°C precision. These... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now