Liquid Level SensorFSIR02 SKU: SEN0205 From Robot Wiki Contents 1 Introduction 2 Specification 3 Board Overview 4 Tutorial o 4.1 Installation o 4.2 Requirements o 4.3 Sample Code o 4.4 Expected Results 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: Photoelectric Liquid Level Sensor Operating Voltage: 5V DC Output Current: 12mA Operating Temperature: 25 ~ 105 Low Level Output: < 0.1 V High Level Output: > 4.6 V Liquid Level Detection Accuracy: 0.5 mm Material: Polycarbonate Measuring Range: No limit Life: 50,000 hours Board Overview Liquid Level SensorFSIR02 Pin Mappings Liquid Level SensorFSIR02 Num. Name Description 1 (Red) GND Probe_GND 2 (Yellow) GND Probe_GND 3 (Blue) VCC Probe_VCC 4 (Whitel) OUT Signal Output Liquid Level SensorFSIR02 convert board Liquid Level SensorFSIR02 Pin Mapping Num. Name Description Left_1 GND Probe_GND Left_2 GND Probe_GND Left_3 VCC Probe_VCC Left_4 IN Signal Input Right_1 OUT Signal Output Right_2 VCC VCC Right_3 GND GND Liquid Level Sensor-FS-IR02 convert board Tutorial Installation Requirements Hardware o DFRduino UNO x1 o Liquid Level SensorFSIR02 x1 Software o Arduino IDE Click to Download Arduino IDE from Arduino(R) 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 21 22 23 void loop() { Liquid_level=digitalRead(5); Serial.print("Liquid_level= ");Serial.println(Liquid_level,DEC); 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 (c) 2008-2017