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

Introduction

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.

Features

Specification

Board Overview

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

Dimension

Tutorial

Requirements

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 (http://www.dfrobot.com)
 * @licence  The MIT License (MIT)
 * @version  V1.0
 * @date  2021-03-15
 */
int  OUT = 3;
int  i = 0;
void setup()
{
  Serial.begin(9600);
  pinMode(OUT, INPUT);
}
void loop()
{
   i = digitalRead (OUT);
   Serial.println(i);
   delay(5);
}

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.

FAQ

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

More Documents