Gravity: Non-contact Digital Water / Liquid Level Sensor For Arduino


The non-contact liquid level sensor utilizes advanced signal processing technology by using a powerful chip with high-speed operation capacity to achieve non-contact liquid level detection. Without contacting with a liquid, 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 the sensor is easy to use and easy to install. The liquid level sensor is equipped with an interface adapter that makes it compatible with DFRobot "Gravity" interface. There are 4 levels of sensitivity which are set by pressing the SET button.


Board Overview


Touble Shooting

Symptom Possible Cause Solution
No reaction when powered on(the indicator keeps off when the liquid level reached the induction point, no reaction when adjusting sensitivity) 1.Power connection problem Check and connect the power supply properly
2.The negative and positive are disconnected Connect the power properly
3.Power module is damaged Change the power module
4.Sensitivity is too low Increase the sensitivity
The indicator always keeps on 1.Sensitivity is too high Decrease the sensitivity
2.There are impurities in the inductor, or other metal objects near the inductor Clean the inductor, and keep it away from other metal objects
3.The liquid container is not insulative completely Change the container or drill mount holes on the container to install the inductor


Connection Diagram

Non-contact Liquid Level Sensor-XKC-Y25-T12V Installation Instruction (Nonmetal) Non-contact Liquid Level Sensor-XKC-Y25-T12V Installation Instruction (metal surface) Non_contact Liquid Level Sensor-XKC-Y25-T12V Connection diagram

Sample Code

* Liquid Level Sensor-XKC-Y25-T12V
* ****************************************************
* This example is to get liquid level

* @author jackli(
* @version  V1.0
* @date  2016-1-30

* GNU Lesser General Public License.
* See <> for details.
* All above must be included in any redistribution
* ****************************************************/
int Liquid_level=0;
void setup() {

void loop() {
Serial.print("Liquid_level= ");

Expected 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.


Q&A Some general Arduino Problems/FAQ/Tips
Q What is the sensor working principle?
A Its working principle is to use the water sensing capacitor to detect whether liquid is present. In the absence of liquid near the sensor, there will be a presence of distributed capacitance, and therefore there are some certain static capacitance to ground on the sensor. When the liquid level slowly increases close to the sensor, the parasitic capacitance of the liquid will be coupled to the static capacitance so that the final capacitance value of the sensor becomes larger and the changed capacitance signal is then input to the control IC for signal conversion,. Then converting the changed capacitance into the amount of change in the electrical signal. Lastly, by using a certain algorithm to detect and judge the degree of this chang we can determine when the amount of change exceeds a certain threshold that means the liquid level to reach the induction point.
A For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get Gravity: Non-contact Digital Water / Liquid Level Sensor For Arduino from DFRobot Store or DFRobot Distributor.

Turn to the Top