

The Ultrasonic Waterproof Sensor is a robust and versatile electronic component designed to measure distances or detect objects using ultrasonic waves. Its waterproof design makes it ideal for outdoor or wet environments, where exposure to water or moisture is a concern. This sensor emits ultrasonic waves and measures the time it takes for the waves to bounce back after hitting an object, allowing for precise distance measurement.








Below are the key technical details of the Ultrasonic Waterproof Sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Operating Current | ≤ 15mA |
| Detection Range | 20cm to 450cm |
| Accuracy | ±1cm |
| Operating Frequency | 40kHz |
| Waterproof Rating | IP67 |
| Operating Temperature | -15°C to +70°C |
| Output Signal | Digital (High/Low) or PWM |
The Ultrasonic Waterproof Sensor typically has four pins. Below is the pinout and description:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin. Connect to 3.3V or 5V. |
| 2 | TRIG | Trigger pin. Send a HIGH pulse to initiate ultrasonic wave transmission. |
| 3 | ECHO | Echo pin. Outputs a pulse width proportional to the distance of the detected object. |
| 4 | GND | Ground pin. Connect to the ground of the power supply. |
Below is an example code to interface the Ultrasonic Waterproof Sensor with an Arduino UNO:
// Define pins for the Ultrasonic Waterproof Sensor
const int trigPin = 9; // TRIG pin connected to digital pin 9
const int echoPin = 10; // ECHO pin connected to digital pin 10
void setup() {
pinMode(trigPin, OUTPUT); // Set TRIG pin as output
pinMode(echoPin, INPUT); // Set ECHO pin as input
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Send a 10µs HIGH pulse to the TRIG pin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Measure the duration of the HIGH pulse on the ECHO pin
long duration = pulseIn(echoPin, HIGH);
// Calculate the distance in cm
float distance = (duration * 0.034) / 2;
// Print the distance to the Serial Monitor
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
delay(500); // Wait for 500ms before the next measurement
}
No Output or Incorrect Readings:
Unstable or Fluctuating Readings:
Short Detection Range:
Q: Can this sensor be used underwater?
A: No, the sensor is waterproof but not designed for underwater use. It is suitable for wet or humid environments but should not be submerged.
Q: What is the maximum detection range?
A: The sensor can detect objects up to 450cm (4.5 meters) away.
Q: Can I use this sensor with a 3.3V microcontroller?
A: Yes, the sensor operates with both 3.3V and 5V power supplies, making it compatible with 3.3V microcontrollers like the ESP32.
Q: How do I clean the sensor?
A: Use a soft, damp cloth to clean the sensor. Avoid using abrasive materials or submerging the sensor in water.