LiquidLevelSensor‐FS‐IR02SKU:SEN0205
FromRobotWiki
Contents
1Introduction
2Specification
3BoardOverview
4Tutorial
o
4.1Installation
o
4.2Requirements
o
4.3SampleCode
o
4.4ExpectedResults
Introduction
This is a photoelectric liquid level sensor that is operates using optical principles. The
advantages of this are good sensitivity and no need for mechanical parts - meaning less
calibration! The corrosion resistant probe is easily mounted and can handle high temperature and
high pressure. The sensor is equipped with an interface adapter for compatibility with the
DFRobot "Gravity" interface.
Note: Avoid placing the sensor near bright lights or in direct sunlight as these can cause
interference.
Specification
Model:FSIR02
Type:PhotoelectricLiquidLevelSensor
OperatingVoltage:5VDC
OutputCurrent:12mA
OperatingTemperature:‐25~105
LowLevelOutput:<0.1V
HighLevelOutput:>4.6V
LiquidLevelDetectionAccuracy:±0.5mm
Material:Polycarbonate
MeasuringRange:Nolimit
Life:50,000hours
BoardOverview
LiquidLevelSensorFSIR02
LiquidLevelSensorFSIR02PinMappings
Num.NameDescription
1(Red) GND Probe_GND
2(Yellow) GND Probe_GND
3(Blue) VCC Probe_VCC
4(Whitel) OUT SignalOutput
LiquidLevelSensorFSIR02convertboard
LiquidLevelSensorFSIR02PinMapping
Num.NameDescription
Left_1 GND Probe_GND
Left_2 GND Probe_GND
Left_3 VCC Probe_VCC
Left_4 IN SignalInput
Right_1 OUT SignalOutput
Right_2 VCC VCC
Right_3 GND GND
Liquid Level Sensor-FS-IR02 convert board
Tutorial
Installation
Requirements
Hardware
o DFRduinoUNOx1
o LiquidLevelSensorFSIR02x1
Software
o ArduinoIDEClicktoDownloadArduinoIDEfromArduino®
o https://www.arduino.cc/en/Main/Software
SampleCode
/***************************************************
2 * Liquid Level Sensor-FS-IR02
3 * ****************************************************
4 * This example is to get liquid level
5
6 * @author jackli(Jack.li@dfrobot.com)
7 * @version V1.0
8 * @date 2016-1-30
9
10 * GNU Lesser General Public License.
11 * See <http://www.gnu.org/licenses/> for details.
12 * All above must be included in any redistribution
13 * ****************************************************/
14 int Liquid_level=0;
15 void setup() {
16 Serial.begin(9600);
17 pinMode(5,INPUT);
18 }
19
20 void loop() {
21 Liquid_level=digitalRead(5);
22 Serial.print("Liquid_level= ");Serial.println(Liquid_level,DEC);
23 delay(500);
24 }
ExpectedResults
When liquid comes in to contact with the sensor probe the microcontroller will output HIGH
logic. When the liquid is not in contact with the probe the microcontroller will output LOW
logic.
FAQ
For any questions, advice or cool ideas to share, please visit DFRobot Forum.
Powered By DFRobot © 2008-2017