

The JSN-SR04T is an ultrasonic distance sensor that uses sound waves to measure the distance to an object. It features a waterproof design, making it suitable for outdoor applications. This sensor is capable of providing accurate distance measurements in a range of 20 cm to 6 meters. Its robust design and reliable performance make it ideal for applications such as obstacle detection, liquid level measurement, and outdoor robotics.








The JSN-SR04T is designed to operate in a variety of environments, offering reliable performance even in challenging conditions. Below are its key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Operating Current | ≤ 30 mA |
| Measuring Range | 20 cm to 600 cm |
| Accuracy | ±1 cm |
| Operating Frequency | 40 kHz |
| Waterproof | Yes |
| Output Signal | High/Low TTL |
| Trigger Input Signal | 10 µs TTL pulse |
| Echo Output Signal | Pulse width proportional to distance |
| Operating Temperature | -20°C to +70°C |
The JSN-SR04T has a 4-pin interface for easy integration into circuits. Below is the pinout description:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (5V DC) |
| 2 | Trig | Trigger pin: Sends a 10 µs pulse to initiate measurement |
| 3 | Echo | Echo pin: Outputs a pulse width proportional to distance |
| 4 | GND | Ground connection |
Below is an example of how to use the JSN-SR04T with an Arduino UNO:
// Define pins for the JSN-SR04T sensor
const int trigPin = 9; // Trigger pin connected to digital pin 9
const int echoPin = 10; // Echo pin connected to digital pin 10
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
// Set pin modes
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
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 / 58.0;
// Print the distance to the Serial Monitor
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
// Wait before the next measurement
delay(500);
}
No Output from the Echo Pin:
Inaccurate Distance Measurements:
Sensor Not Responding:
Q: Can the JSN-SR04T detect objects closer than 20 cm?
A: No, the minimum measurable distance is 20 cm. Objects closer than this may not be detected accurately.
Q: Is the sensor fully waterproof?
A: The ultrasonic transducer is waterproof, but the control board is not. Ensure the control board is protected from water.
Q: Can I use the JSN-SR04T with a 3.3V microcontroller?
A: The sensor requires a 5V power supply. If using a 3.3V microcontroller, you may need a level shifter for the Trig and Echo pins.
Q: How do I reduce noise in the measurements?
A: Use a decoupling capacitor across the power pins and shield long wires to minimize noise.
By following this documentation, you can effectively integrate the JSN-SR04T ultrasonic sensor into your projects and troubleshoot common issues.