Stufin
Home Quick Cart Profile

Float Sensor CSDP (Double Pin)

Buy Now on Stufin

Magnetic float design

Ensures reliable and accurate detection of liquid levels, even in harsh environments

High accuracy and sensitivity

Detects liquid levels with precision, even with small changes in the liquid surface

Robust and compact design

Suitable for use in a variety of industrial and commercial applications

IP67 ratingOffers protection against dust and water ingress, making it suitable for use in harsh environments

Operating temperature range

-20C to +80C, allowing for use in a wide range of applications

Low power consumption

Minimizes energy consumption and reduces system power requirements

Technical Specifications

---------------------------

Supply voltage

5V to 24V DC

Output signal

Digital (NO or NC)

Sensitivity

Adjustable (optional)

Response time

<100 ms

Float material

Stainless steel or plastic (optional)

Cable length

1m to 5m (custom lengths available)

Mounting options

Threaded or flanged mounting for easy installation

Applications

--------------

Liquid level monitoring

In tanks, containers, and pipes

Industrial automation

Process control, tank management, and leak detection

Water management

Water treatment, storage, and distribution systems

Home automation

Water level monitoring in sump pumps, sewage systems, and swimming pools

Conclusion

----------

The Float Sensor CSDP (Double Pin) is a reliable and accurate sensor for liquid level detection, offering a range of features and benefits that make it an ideal choice for various IoT applications. Its compact design, high accuracy, and low power consumption make it suitable for use in a wide range of industries and environments.

Pin Configuration

  • Float Sensor CSDP (Double Pin) Documentation
  • Pin Description
  • The Float Sensor CSDP (Double Pin) has two pins that serve specific purposes in detecting liquid levels. Here's a breakdown of each pin:
  • Pin 1: Signal Pin (S)
  • Function: Outputs a digital signal indicating the liquid level status
  • Signal Type: Digital (High/Low)
  • Logic Level:
  • + High (VCC) when the float is in the up position (no liquid contact)
  • + Low (GND) when the float is in the down position (liquid contact)
  • Connection: Typically connected to a microcontroller's digital input pin or a logic-level device
  • Pin 2: Ground Pin (GND)
  • Function: Provides a reference ground for the sensor's internal circuitry
  • Connection: Should be connected to a common ground point in the system, usually the power supply's ground or the microcontroller's ground pin
  • Connection Structure
  • To connect the Float Sensor CSDP (Double Pin) to your system, follow this structure:
  • 1. Connect Pin 1 (Signal Pin) to a Digital Input Pin:
  • Connect Pin 1 to a digital input pin on your microcontroller (e.g., Arduino, Raspberry Pi, etc.) or a logic-level device (e.g., relay module, etc.).
  • Ensure the microcontroller's digital input pin is configured to read the signal correctly.
  • 2. Connect Pin 2 (Ground Pin) to a Common Ground Point:
  • Connect Pin 2 to a common ground point in your system, such as the power supply's ground or the microcontroller's ground pin.
  • Make sure the ground connection is secure and free from noise to ensure accurate signal transmission.
  • Example Connection Diagram
  • Here's an example connection diagram:
  • ```
  • Float Sensor CSDP (Double Pin)
  • | |
  • | Pin 1 (Signal) | Pin 2 (Ground)
  • | |
  • | [connection] | [connection]
  • | |
  • | Microcontroller | Power Supply
  • | (Digital Input) | (Ground)
  • | |
  • ```
  • In this example, Pin 1 of the Float Sensor CSDP is connected to a digital input pin on the microcontroller, and Pin 2 is connected to the power supply's ground point.
  • By following this connection structure and understanding the pin functions, you can integrate the Float Sensor CSDP (Double Pin) into your IoT project and accurately detect liquid levels.

Code Examples

Float Sensor CSDP (Double Pin) Documentation
Overview
The Float Sensor CSDP (Double Pin) is a level sensing device designed to detect the presence or absence of a liquid in a tank or container. It is commonly used in IoT applications such as water level monitoring, chemical storage, and industrial automation. The sensor operates on the principle of capacitance measurement, providing a reliable and accurate way to detect changes in the liquid level.
Technical Specifications
Operating Voltage: 5V DC
 Output Type: Digital (High/Low)
 Response Time: 10ms
 Accuracy: 1mm
 Material: Stainless Steel
 connectors: 2-pin JST-XH (compatible with most microcontrollers)
Pinout
The Float Sensor CSDP (Double Pin) has a 2-pin JST-XH connector, with the following pinout:
Pin 1: VCC (5V DC power supply)
 Pin 2: OUT (Digital output)
Code Examples
### Example 1: Basic Usage with Arduino
In this example, we'll demonstrate how to use the Float Sensor CSDP (Double Pin) with an Arduino board to detect the presence or absence of a liquid.
```c++
const int sensorPin = 2; // Connect sensor output to digital pin 2
void setup() {
  pinMode(sensorPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  int sensorState = digitalRead(sensorPin);
  if (sensorState == HIGH) {
    Serial.println("Liquid detected!");
  } else {
    Serial.println("No liquid detected.");
  }
  delay(1000);
}
```
### Example 2: Raspberry Pi Python Script for Tank Level Monitoring
In this example, we'll use the Float Sensor CSDP (Double Pin) with a Raspberry Pi to monitor the tank level and send notifications when the level falls below a certain threshold.
```python
import RPi.GPIO as GPIO
import time
import smtplib
from email.mime.text import MIMEText
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Set up sensor pin as input
sensor_pin = 17
GPIO.setup(sensor_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
# Set up email notification
def send_notification(subject, message):
    msg = MIMEText(message)
    msg['Subject'] = subject
    msg['From'] = 'your_email@example.com'
    msg['To'] = 'recipient_email@example.com'
server = smtplib.SMTP('smtp.example.com')
    server.sendmail('your_email@example.com', 'recipient_email@example.com', msg.as_string())
    server.quit()
while True:
    sensor_state = GPIO.input(sensor_pin)
    if sensor_state == GPIO.HIGH:
        print("Liquid detected!")
    else:
        print("No liquid detected.")
        # Send notification if tank level is low
        send_notification("Low Tank Level Alert!", "The tank level has fallen below the threshold.")
    time.sleep(60)  # Check every 1 minute
```
### Example 3: ESP32 MicroPython Script for IoT Integration
In this example, we'll use the Float Sensor CSDP (Double Pin) with an ESP32 board running MicroPython to send tank level data to a cloud-based IoT platform.
```python
import machine
import time
import urequests
# Set up sensor pin as input
sensor_pin = machine.Pin(32, machine.Pin.IN)
while True:
    sensor_state = sensor_pin.value()
    if sensor_state == 1:
        print("Liquid detected!")
        tank_level = "Full"
    else:
        print("No liquid detected.")
        tank_level = "Low"
# Send data to IoT platform
    url = "https://iot-platform.com/api/tank_level"
    headers = {"Content-Type": "application/json"}
    data = {"tank_level": tank_level}
    response = urequests.post(url, headers=headers, json=data)
if response.status_code == 200:
        print("Data sent successfully!")
    else:
        print("Error sending data:", response.text)
time.sleep(300)  # Send data every 5 minutes
```
Conclusion
In this documentation, we've demonstrated the basic usage of the Float Sensor CSDP (Double Pin) with popular microcontrollers such as Arduino, Raspberry Pi, and ESP32. The sensor's digital output makes it easy to integrate with various IoT applications, allowing for accurate and reliable level sensing in a wide range of scenarios.