Description
What it is
The TSW-20 waterproof optical sensor is a tool for measuring the turbidity of liquids.
Features
- Type: Optical Sensor
- Waterproof
- Name: TSW-20
- SKU: ARD0011344
- Price: 8.67 €
- Availability: Pre-order
What it is for
The TSW-20 sensor is ideal for monitoring the turbidity of water in electronic systems, such as: water turbidity alarms in a reservoir (alarm activation when turbidity exceeds a predefined value). Compatibility with Arduino or ESP32 should be verified in the datasheet.
Tutorial: How to Use Waterproof Optical Sensor TSW-20
The TSW-20 optical sensor is ideal for measuring the turbidity of liquids, useful for environmental or industrial monitoring projects. This tutorial will guide you through the installation and use of this sensor.
What you need
- Arduino Uno
- USB Cable
- Training Connections
- Computer with Arduino IDE installed
Steps
- Connect the TSW-02 sensor to the VCC and GND connector of the Arduino
- Connect the sensor output to digital pin 2 of the Arduino
- Open Arduino IDE and create a new project
- Insert the provided code from the tutorial
- Upload the code to the Arduino
- Open the serial monitor to view the data
Example code
const int sensorPin = 2;
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
delay(1000);
}
Mini project
Create an alarm system to monitor the turbidity of the water in a tank. The alarm activates when the turbidity exceeds a certain value.
Common mistakes
- Connect the sensor to the wrong pin
- Do not upload the code to the Arduino
- Do not configure the serial monitor correctly
- Do not check the power supply voltage on the datasheet
Recommended accessories
- Arduino Uno
- USB cable
- Training connections
- Test tank
Frequently asked questions
Does the sensor only work with the Arduino Uno?
No, you can use any Arduino or compatible microcontroller.
What is the measurement range of the sensor?
Check the datasheet.
Can I use the sensor for other types of measurement?
The sensor is designed specifically for liquid turbidity.





Reviews
There are no reviews yet.