SST Liquid Level Sensor with Arduino

Last Updated on March 16, 2024

arduino liquid sensing

By using SST liquid level sensor we can detect the level of liquid via TTL compatible push-pull output. This sensor part is covered with robust material, it allows us to install in limited area of sensing. SST Liquid Level Sensor with Arduino, works without any interfacing components. SST Liquid Level Sensor designed to accurately measure the level of liquid in a container, tank, or reservoir. They are crucial for monitoring fluid levels in systems that involve liquids, such as industrial processes, automotive applications, water management, and more.




Liquid Level Switch / Sensor

An optical liquid level sensor uses an infra-red LED and phototransistor accurately positioned at the base of the sensor’s tip. When the tip is air, infrared light reflects internally round the tip to the phototransistor providing good optical coupling between the two. When the sensor’s tip is immersed in liquid, the infra-red light escapes from the tip causing a change in the amount of light at the photo-transistor which makes the output change state. It can operates with 4.5VDC to 15.4VDC bias, here we use Arduino 5V pin and no attenuating resistor. It gives output current up to 100mA when we give 15VDC bias and the Arduino Uno uses the ATMEGA328 microcontroller, which has an absolute maximum rating of 40 mA source or sink per GPIO. So if you are about to give more than 5V DC consider a current limiting Resistor in the digital input pin.

Position of Sensor 

liquid sensor position
sst liquid sensor position

Arduino SST Liquid sensor Interface

arduino sst liquid sensor

Connect sensors Vcc and Gnd pins to the power pins of arduino and connect output pin of sensor to arduino digital pin 7. Make sure the position of sensor to sense the level of liquid.

Pin out of SST Liquid sensor 

RED     Vs
GREEN    OUTPUT
BLUE      0V

pdf-icon

SST Liquid sensor Data sheet

https://www.sparkfun.com/products/13835

Arduino Code

// Liquid level detection using an SST sensor
//
// When a liquid touches the tip of the sensor,
// an LED at pin 13 turns on.
// 
// Hardware:
//     Sensor    | Arduino
//  -------------|---------
//    Vs (RED)   |    5V
//   Out (GREEN) |   pin 7
//   GND (BLUE)  |    GND

// Pins
const int LIQUID_SENSOR_PIN = 7;
const int LED_PIN = 13;

void setup() { 
  pinMode(LIQUID_SENSOR_PIN, INPUT);
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, LOW);
}

void loop() {

  // Read sensor. If liquid touches the tip, the sensor will 
  // read 0V. Turn on LED if liquid is present.
  int isDry = digitalRead(LIQUID_SENSOR_PIN);
  if ( isDry ) {
    digitalWrite(LED_PIN, LOW);
  } else {
    digitalWrite(LED_PIN, HIGH);
  }

  delay(200);
}

Arduino Code for sst liquid sensor from : https://gist.github.com/ShawnHymel/a7c6cd17f00dd10e4325f72f83842be1




 

 

Leave a Reply

Your email address will not be published. Required fields are marked *