Description
This is a non-contact water / liquid level sensor for Arduino. It utilizes advanced signal processing technology by using a powerful chip (XKC-Y25-T12V) with high-speed operation capacity to achieve non-contact liquid level detection. No contact with liquid makes the module suitable for hazardous applications such as detecting toxic substances, strong acid, strong alkali, and all kinds of liquid in an airtight container under high pressure. There are no special requirements for the liquid or container and this liquid sensor is easy to use and easy to install.
Pin Description:
Interacting with Arduino:
Arduino Code
/***************************************************
* Liquid Level Sensor-XKC-Y25-T12V
* ****************************************************
* This example is to get liquid level
* ****************************************************/
int Liquid_level=0;
void setup() {
Serial.begin(9600);
pinMode(5,INPUT);
}
void loop() {
Liquid_level=digitalRead(5);
Serial.print(“Liquid_level= “);
Serial.println(Liquid_level,DEC);
delay(500);
}
Results
If the liquid level sensor detects the presence of liquid, it will output HIGH and turn the LED ON. If no liquid is detected it output LOW and turn the LED off.