This is a non-contact liquid level sensor with status indicator and adjustable sensitivity. It can be used in liquid detection of non-metallic container or pipe(outer diameter>11mm), suitable for all types of detection of curved or flat surfaces, arcs, cylindrical containers or piping fluids. The status feedback of the sensor can be given in real-time. Besides that, the sensor comes with a 4pin sensor adaptor that can directly collect digital signal, convenient for connecting with Arduino or other main-controllers. This liquid level sensor can be widely used in liquid detection of a tank, water dispenser, etc.
Connection DOWN is pull-down and connection UP is pull-up.
Num | Label | Description |
---|---|---|
1(Left, Brown) | VOUT | Liquid Sensor Power Positive, +5V~+12V |
2(Left, Blue) | GND | Liquid Sensor Power Negative |
3(Left, Black) | IO1 | Liquid Sensor Forward/Backward output select |
4(Left, Yellow) | IO2 | Liquid Sensor Level Signal Output |
1(Right, Red) | VIN | Power Positive |
2(Right, Black) | GND | Power Negative |
3(Right, Blue) | IO1 | Liquid Sensor Forward/Backward output select |
4(Right, Green) | IO2 | Liquid Level Signal Output |
Use a screwdriver to rotate the sensitivity knob(on the right of the sensor) anti-clockwise to increase the sensitivity; rotate clockwise to decrease it.
The liquid level sensor will output high/low level to determine the liquid level of a container, and its status can be checked via serial monitor.
/*! * @File DFRobot_LevelSensor.ino * @brief Detecting the liquid level of non-metallic containers,and check the status of sensor through serial port * @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) * @licence The MIT License (MIT) * @author [liunian](nian.liu@dfrobot.com) * @version V1.0 * @date 2020-08-13 */ int inPin = 8; boolean running = 0;//when running=1, the liquid is detected, print out 1, otherwise, print out 0; running=0, the liquid is detected, print out 0, otherwise, print out 1. int modePin = 9; void setup() < Serial.begin(9600); pinMode(inPin, INPUT); pinMode(modePin, OUTPUT); digitalWrite(modePin, running); >void loop()
Function: when running=1, the liquid is detected, print out 1, otherwise, print out 0; running=0, the liquid is detected, print out 0, otherwise, print out 1.
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.