Non-contact Liquid Level Switch SKU:FIT0212

From DFRobot Electronic Product Wiki and Tutorial: Arduino and Robot Wiki-DFRobot.com

Introduction

This non-contact liquid level switch can be triggered when the liquid level fall below the sensor attached to the outside surface of a non-metal container.

Unlike traditional liquid level sensors, it does not need to be immersed into liquid. So, in this way, liquid will not be contaminated and the life of the sensor will not be reduced so fast because of the contact between liquid and sensors.

The sensor is very sensitive and stable, and the output current is upto 100mA which can directly drive a relay.

You can use this switch to monitor the condition of your water machine or make a water-drinking reminder by attaching it to the surface of your cup.


Specification

  • Power supply: +5V
  • Working current: 25μA
  • Working temperature: -25~125℃
  • Detectable wall thickness: 1~13mm
  • Dimension(mm ± 1): 16.5 x 8.5 x 5.5 (Not include the cushion on the sensor)
  • Cable length: 30cm ± 1cm


Tutorial

Connection Diagram

The sponge should be attached with the container
Or you can remove the sponge
Do NOT have the sponge projected outwards


FIT0212 Connection.png


NOTE:

Please keep the container empty or keep the liquid level lower than the sensor installation place before supply power EVERY TIME.

This sensor has a power-on zero calibration. It will detect liquid level Zero position once it gains the power supply.


NOTE: The sponge is to make it flexible to use most of the glue or a doble sided tape on the sponge to stick it to the non-metal container, if your container is too thick (over 8mm), you can remove the sponge and use a proper glue/ tape to fix it on the container.


Sample Code

Check the detection result
void setup(){
  //start serial connection
  Serial.begin(9600);
  pinMode(2, INPUT);
  pinMode(13, OUTPUT); 
}

void loop(){
  //read the switch value into a variable
  int sensorVal = digitalRead(2);
  //print out the value of the liquid level
  Serial.println(sensorVal);
  if (sensorVal == HIGH) {
    digitalWrite(13, LOW);    
  } 
  else {
    digitalWrite(13, HIGH); 
  }
}



DFshopping car1.png Get it from Non-contact Liquid Level Switch or DFRobot Distributor.