Ensures reliable and accurate detection of liquid levels, even in harsh environments
Ensures reliable and accurate detection of liquid levels, even in harsh environments
Detects liquid levels with precision, even with small changes in the liquid surface
Suitable for use in a variety of industrial and commercial applications
| IP67 rating | Offers protection against dust and water ingress, making it suitable for use in harsh environments |
-20C to +80C, allowing for use in a wide range of applications
Minimizes energy consumption and reduces system power requirements
Technical Specifications
---------------------------
5V to 24V DC
Digital (NO or NC)
Adjustable (optional)
<100 ms
Stainless steel or plastic (optional)
1m to 5m (custom lengths available)
Threaded or flanged mounting for easy installation
Applications
--------------
In tanks, containers, and pipes
Process control, tank management, and leak detection
Water treatment, storage, and distribution systems
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.
Float Sensor CSDP (Double Pin) DocumentationOverviewThe 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 SpecificationsOperating 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)PinoutThe 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 ArduinoIn 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 2void 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 MonitoringIn 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 IntegrationIn 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
```ConclusionIn 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.