Gravity: 5V Non-contact Liquid Level Sensor for Arduino Wiki - DFRobot


This small 5V non-contact liquid level sensor with Gravity Interface is able to detect 0-100°C conductive liquid levels in non-metallic containers within 3mm. Provided with digital output(low), the sensor can be directly used on Arduino UNO for liquid level detection of water tank, beverage machine, water pipe, scientific experiment test tube, etc.
With IP67 protection level, the module employs an integrated seamless shell and fully enclosed waterproof glue encapsulation process to block the intrusion of dust and protect internal electric components. Besides, the sensor cable, with great electrical conductivity, is flexible, durable, waterproof, and oil-proof.



Board Overview

Label Name Description
Green OUT Sensor signal output
Red VCC Power supply +
Black GND Power supply -




Connection Diagram

Sample Code

 * @File  Infrared_Approach_Sensor.ino
 * @brief  Detect the status of IO3 and print it in serial port
 * @copyright  Copyright (c) 2010 DFRobot Co.Ltd (
 * @licence  The MIT License (MIT)
 * @version  V1.0
 * @date  2021-03-15
int  OUT = 3;
int  i = 0;
void setup()
  pinMode(OUT, INPUT);
void loop()
   i = digitalRead (OUT);

Expected Results

Read the status of IO3 in real time. When the sensor detects the existence of a liquid at a particular level in a container, the serial port prints 0. Otherwise, the serial port prints 1.


For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get 5V Non-contact Liquid Level Sensor from DFRobot Store or DFRobot Distributor.

Turn to the Top