Stufin
Home Quick Cart Profile

Magnetic Float Sensor FSH01 (Horizontal)

Buy Now on Stufin

Supply Voltage

5-24V DC

Output Signal

Reed Switch (Normally Open or Normally Closed)

Sensing Distance

Adjustable (up to 10mm)

Response Time

<10ms

Operating Temperature

-20C to 80C

Storage Temperature

-30C to 100C

Humidity

5-95% RH (non-condensing)

Dimensions

50mm x 25mm x 15mm (L x W x H)

Weight

50g

Applications

The Magnetic Float Sensor FSH01 (Horizontal) is suitable for a wide range of applications, including

Liquid level detection in tanks, containers, and reservoirs

Monitoring of fuel, oil, and chemical levels

Water level detection in industrial, commercial, and residential applications

Leak detection and overflow prevention

Automation and control systems in industries such as food processing, pharmaceuticals, and chemical processing.

Pin Configuration

  • Magnetic Float Sensor FSH01 (Horizontal) Pinout Documentation
  • The Magnetic Float Sensor FSH01 (Horizontal) is a widely used IoT component for detecting liquid levels in tanks, containers, and other vessels. The sensor has a horizontal design and operates based on the principle of magnetic reed switch activation. Here's a detailed explanation of the pins and their connections:
  • Pinout:
  • The Magnetic Float Sensor FSH01 (Horizontal) has 3 pins:
  • 1. VCC (Power Supply):
  • Pin Name: VCC
  • Pin Function: Power supply input
  • Connection:
  • + Connect to a positive voltage source (typically 5V or 12V DC)
  • + Ensure the voltage supply meets the sensor's operating voltage range ( typically 4.5V to 24V DC)
  • Note: VCC pin should be connected to a stable power source to ensure reliable sensor operation
  • 2. GND (Ground):
  • Pin Name: GND
  • Pin Function: Ground connection
  • Connection:
  • + Connect to the negative terminal of the power source or a common ground point
  • + Ensure a sturdy ground connection to prevent electrical noise and interference
  • Note: A good ground connection is essential for the sensor's reliability and accuracy
  • 3. OUT (Output):
  • Pin Name: OUT
  • Pin Function: Output signal
  • Connection:
  • + Connect to a microcontroller, logic circuit, or other devices that can interpret the sensor's output signal
  • + The OUT pin provides a digital signal indicating the presence or absence of liquid:
  • - LOW (0V) when the magnetic float is not activated (no liquid present)
  • - HIGH (VCC voltage) when the magnetic float is activated (liquid present)
  • Note: The output signal is typically an open-drain configuration, so an external pull-up resistor is required if the connected device does not have an internal pull-up
  • Connection Structure:
  • Here's a suggested connection structure for the Magnetic Float Sensor FSH01 (Horizontal):
  • VCC (Pin 1) Power Source (Positive Terminal)
  • GND (Pin 2) Power Source (Negative Terminal) or Common Ground Point
  • OUT (Pin 3) Microcontroller/Logic Circuit/Input Device (with external pull-up resistor if necessary)
  • When connecting the sensor, ensure that:
  • The power supply voltage meets the sensor's operating voltage range
  • The ground connection is sturdy and reliable
  • The output signal is properly connected to a microcontroller, logic circuit, or other devices that can interpret the sensor's output signal
  • By following these guidelines, you can successfully integrate the Magnetic Float Sensor FSH01 (Horizontal) into your IoT projects and achieve reliable liquid level detection.

Code Examples

Magnetic Float Sensor FSH01 (Horizontal) Documentation
Overview
The Magnetic Float Sensor FSH01 (Horizontal) is a non-contact liquid level sensor that uses a magnetic float to detect the presence or absence of a liquid at a specific level. The sensor is designed to be used in horizontal mounting configurations and is suitable for a wide range of applications, including industrial automation, process control, and IoT projects.
Technical Specifications
Operating Voltage: 5V DC
 Output: Digital (High/Low)
 Sensing Range: Up to 5mm
 Response Time: 10ms
 Operating Temperature: -20C to 80C
Pinout
The Magnetic Float Sensor FSH01 (Horizontal) has a 3-pin interface:
VCC (5V Power Supply)
 GND (Ground)
 OUT (Digital Output)
Code Examples
### Example 1: Basic Usage with Arduino
This example demonstrates how to use the Magnetic Float Sensor FSH01 (Horizontal) with an Arduino board to detect the presence or absence of a liquid.
```c
const int sensorPin = 2;  // Digital input pin for sensor output
int sensorState = 0;      // Variable to store sensor state
void setup() {
  pinMode(sensorPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  sensorState = digitalRead(sensorPin);
  if (sensorState == HIGH) {
    Serial.println("Liquid detected!");
  } else {
    Serial.println("No liquid detected.");
  }
  delay(500);
}
```
In this example, the sensor output is connected to digital pin 2 on the Arduino board. The code reads the sensor state and prints a message to the serial monitor indicating whether a liquid is present or not.
### Example 2: Using with Raspberry Pi (Python)
This example demonstrates how to use the Magnetic Float Sensor FSH01 (Horizontal) with a Raspberry Pi board using Python.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
sensor_pin = 17  # GPIO pin for sensor output
GPIO.setup(sensor_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
    if GPIO.input(sensor_pin):
        print("Liquid detected!")
    else:
        print("No liquid detected.")
    time.sleep(0.5)
```
In this example, the sensor output is connected to GPIO pin 17 on the Raspberry Pi board. The code uses the RPi.GPIO library to read the sensor state and print a message to the console indicating whether a liquid is present or not.
### Example 3: IoT Application with ESP32 (MicroPython)
This example demonstrates how to use the Magnetic Float Sensor FSH01 (Horizontal) with an ESP32 board using MicroPython to send data to a cloud-based IoT platform.
```python
import machine
import urequests
sensor_pin = machine.Pin(32, machine.Pin.IN)  # Sensor output pin
while True:
    if sensor_pin.value():
        print("Liquid detected!")
        urequests.post("https://example.com/iot-api", json={"sensor": "FSH01", "state": "true"})
    else:
        print("No liquid detected.")
        urequests.post("https://example.com/iot-api", json={"sensor": "FSH01", "state": "false"})
    time.sleep(10)
```
In this example, the sensor output is connected to pin 32 on the ESP32 board. The code uses the `urequests` library to send a POST request to a cloud-based IoT platform with the sensor state (true or false) as a JSON payload.
Note: Make sure to modify the code examples to match your specific use case and hardware configuration. Additionally, ensure that the sensor is properly calibrated and mounted according to the manufacturer's instructions.