Stufin
Home Quick Cart Profile

Turbidity Sensor With Module for Liquid Particle Detection

Buy Now

Operating Voltage

5V DC

Current Consumption

20mA (max)

Turbidity Measurement Range

0-1000 NTU

Accuracy

5% of full scale

Response Time

<1 second

Operating Temperature Range

0C to 50C

Storage Temperature Range

-20C to 70C

Dimension

40mm x 20mm x 15mm

Weight

20g

Conclusion

The Turbidity Sensor With Module for Liquid Particle Detection is a highly accurate and reliable IoT component designed for measuring turbidity levels in liquids. Its compact design, low power consumption, and analog output make it an ideal solution for a wide range of applications, including water quality monitoring, industrial process control, and environmental monitoring.

Pin Configuration

  • Turbidity Sensor With Module for Liquid Particle Detection
  • Pinout Description
  • The Turbidity Sensor With Module for Liquid Particle Detection has a total of 5 pins, which are responsible for power supply, ground, and communication. Here is a detailed explanation of each pin:
  • Pin 1: VCC (Power Supply)
  • Function: Power supply pin
  • Description: This pin is used to supply power to the sensor module. It requires a DC voltage between 4.5V to 5.5V.
  • Connection: Connect this pin to a stable 5V power supply.
  • Pin 2: GND (Ground)
  • Function: Ground pin
  • Description: This pin is used to ground the sensor module.
  • Connection: Connect this pin to the ground of the power supply or the microcontroller.
  • Pin 3: OUT (Analog Output)
  • Function: Analog output pin
  • Description: This pin provides an analog output voltage that is proportional to the turbidity level of the liquid.
  • Connection: Connect this pin to an analog input pin of a microcontroller or an analog-to-digital converter (ADC) for further processing.
  • Pin 4: SCL (Clock Pin)
  • Function: Clock pin for I2C communication
  • Description: This pin is used for clock signal transmission in I2C communication protocol.
  • Connection: Connect this pin to the SCL pin of a microcontroller or other I2C devices.
  • Pin 5: SDA (Data Pin)
  • Function: Data pin for I2C communication
  • Description: This pin is used for data transmission in I2C communication protocol.
  • Connection: Connect this pin to the SDA pin of a microcontroller or other I2C devices.
  • Connection Structure
  • Here is a recommended connection structure for the Turbidity Sensor With Module for Liquid Particle Detection:
  • Connect the VCC pin to a 5V power supply.
  • Connect the GND pin to the ground of the power supply or the microcontroller.
  • Connect the OUT pin to an analog input pin of a microcontroller or an ADC.
  • Connect the SCL pin to the SCL pin of a microcontroller or other I2C devices.
  • Connect the SDA pin to the SDA pin of a microcontroller or other I2C devices.
  • Note:
  • Make sure to use a stable power supply and a reliable communication connection to ensure accurate and reliable readings from the sensor.
  • Refer to the datasheet of the specific microcontroller or I2C devices used in your project for specific connection requirements.
  • Handle the sensor module with care to avoid any damage or electrical shock.

Code Examples

Turbidity Sensor With Module for Liquid Particle Detection
Overview
The Turbidity Sensor With Module for Liquid Particle Detection is a highly sensitive and accurate sensor designed to measure the turbidity of liquids, detecting the presence of particles and contaminants. This sensor is ideal for applications such as water quality monitoring, industrial process control, and environmental monitoring.
Technical Specifications
Operating Voltage: 5V
 Current Consumption: <20mA
 Output: Analog (0-5V)
 Sensitivity: 0.01-1000 NTU (Nephelometric Turbidity Units)
 Accuracy: 5% of full scale
 Response Time: <1 second
Pinout
VCC (5V power supply)
 GND (ground)
 OUT (analog output)
Example 1: Basic Turbidity Measurement with Arduino
In this example, we will use the Turbidity Sensor With Module to measure the turbidity of a liquid and display the result on the serial monitor using an Arduino board.
Hardware Requirements
Arduino Board (e.g., Arduino Uno)
 Turbidity Sensor With Module
 Breadboard and jumper wires
Code
```c
const int turbidityPin = A0;  // Analog input pin for turbidity sensor
void setup() {
  Serial.begin(9600);
}
void loop() {
  int turbidityValue = analogRead(turbidityPin);
  float turbidity = turbidityValue  (5.0 / 1023.0);
  Serial.print("Turbidity: ");
  Serial.print(turbidity);
  Serial.println(" NTU");
  delay(1000);
}
```
Explanation
In this example, we connect the turbidity sensor to analog input pin A0 on the Arduino board. In the `loop()` function, we read the analog value from the sensor using `analogRead()` and convert it to a turbidity value in NTU using the formula: `turbidity = (analog value)  (5.0 / 1023.0)`. The result is then printed to the serial monitor.
Example 2: IoT-based Water Quality Monitoring with ESP32
In this example, we will use the Turbidity Sensor With Module to measure the turbidity of a liquid and send the data to a remote server using an ESP32 board and Wi-Fi connectivity.
Hardware Requirements
ESP32 Board (e.g., ESP32 DevKitC)
 Turbidity Sensor With Module
 Breadboard and jumper wires
 Wi-Fi router and internet connection
Code
```c
#include <WiFi.h>
#include <HTTPClient.h>
const char ssid = "your_wifi_ssid";
const char password = "your_wifi_password";
const char serverUrl = "http://your_server_url.com";
const int turbidityPin = 32;  // Analog input pin for turbidity sensor
WiFiClient client;
HTTPClient http;
void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
}
void loop() {
  int turbidityValue = analogRead(turbidityPin);
  float turbidity = turbidityValue  (5.0 / 1023.0);
http.begin(serverUrl);
  http.addHeader("Content-Type", "application/x-www-form-urlencoded");
String postData = "turbidity=" + String(turbidity);
  int httpResponseCode = http.POST(postData);
if (httpResponseCode > 0) {
    Serial.println("Data sent successfully!");
  } else {
    Serial.println("Error sending data:");
    Serial.println(http.errorString(httpResponseCode));
  }
delay(10000);
}
```
Explanation
In this example, we connect the turbidity sensor to analog input pin 32 on the ESP32 board. We use the `WiFi` and `HTTPClient` libraries to establish a Wi-Fi connection and send the turbidity data to a remote server using an HTTP POST request. The `setup()` function connects to the Wi-Fi network, and the `loop()` function reads the turbidity value, prepares the data to be sent, and sends the data to the server using the `http.POST()` function.