The XKC-Y26-V is a non-contact capacitive liquid level sensor manufactured by DFRobot. This sensor is designed to detect the presence or absence of liquid across a non-metallic container wall. It operates on the principle of capacitive sensing, which allows it to detect liquid levels without direct contact, thus avoiding contamination and corrosion issues associated with traditional contact-based sensors. Common applications include water level monitoring in tanks, aquariums, and industrial equipment.
Pin Number | Description | Notes |
---|---|---|
1 | VCC | Connect to 5V to 24V DC |
2 | GND | Connect to ground |
3 | Signal Output (OUT) | Digital output (high/low level) |
// Define the pin connected to the sensor's output
const int liquidLevelPin = 2;
void setup() {
pinMode(liquidLevelPin, INPUT); // Set the liquid level pin as an input
Serial.begin(9600); // Start serial communication at 9600 baud
}
void loop() {
int sensorState = digitalRead(liquidLevelPin); // Read the sensor output
if (sensorState == HIGH) {
Serial.println("Liquid detected!"); // Liquid level is high
} else {
Serial.println("No liquid detected."); // Liquid level is low
}
delay(1000); // Wait for 1 second before reading again
}
Q: Can the sensor detect any type of liquid? A: The sensor is designed to detect most types of liquids, but its performance may vary with different dielectric constants.
Q: Is the sensor safe to use with corrosive liquids? A: Yes, as a non-contact sensor, it does not come into direct contact with the liquid, making it suitable for use with corrosive substances.
Q: Can the sensor detect liquid through any material? A: The sensor can detect liquid through non-metallic materials such as plastic or glass, within the specified thickness range.
For further assistance, please contact DFRobot's technical support.