JSN-SR04T

A waterproof 40 kHz ultrasonic rangefinder that measures distance with a single sealed transducer and is drop-in compatible with HC-SR04 trigger/echo code.

JSN-SR04T: Waterproof ultrasonic ranging

What is the JSN-SR04T?

The JSN-SR04T is a waterproof ultrasonic distance module built around a single sealed 40 kHz transducer on a cable, rather than the two exposed transducers of a bare HC-SR04. The transducer face tolerates moisture and outdoor conditions while the small driver PCB stays dry, which makes it a common choice for tank levels, parking sensors, and outdoor robots. It runs from 5V and draws only a few milliamps at rest, rising to roughly 30 mA during a measurement burst.

In its default mode the module speaks the same protocol as the HC-SR04. You send a short HIGH pulse on TRIG (nominally 10 us, and a slightly longer pulse improves reliability), the module emits a 40 kHz burst, and ECHO returns HIGH for a duration proportional to the round-trip time (about 58 us per centimeter). Dividing that time by two and multiplying by the speed of sound gives the distance. Usable range runs from roughly 25 cm out to several meters, and objects closer than that near blind zone cannot be measured reliably.

The V3.0 board (Manorshi JSN-SR04T-3.0) also supports serial output modes selected by a resistor on the mode pad. With the pad left open it behaves as the standard ping/echo sensor; adding a resistor switches it to a 9600-baud serial stream that reports distance automatically or on a 0x55 command byte. Tinkered simulates the default pulse trigger and pulse-width echo behavior, so existing HC-SR04 sketches work unchanged.

JSN-SR04T pinout

PinFunctionType
VCC 5VPowerPower in
TRIG Trig / RXDigital trigger: 10us pulse (or serial 0x55)Digital input
ECHO Echo / TXDigital echo: pulse-width level outputDigital output
GND GNDPowerPower in

Specifications

Operating voltage
5 V (max 5.5 V)
Interface
GPIO timing (Trigger / Echo)
Dimensions
41 × 28 × 16 mm

Verified from the Tinkered component library · Manorshi (JSN-SR04T-3.0).

Circuit requirements

  • Power the module from a stable, regulated 5V rail. It is specified for 3.0-5.5V but runs unreliably at 3.3V, so 5V is strongly recommended.
  • The 30 mA current spike during each ping can droop a weak supply and cause erratic readings; add a bulk decoupling capacitor (for example 10-100 uF) across VCC and GND close to the module.
  • ECHO drives a 5V logic level. Feeding it straight into a 3.3V microcontroller pin can stress the input, so use a level shifter or a resistor divider (for example 1k in series with 2k to ground) on ECHO.
  • TRIG accepts a standard logic HIGH pulse. A 3.3V microcontroller output is generally enough to trigger it, but keep the pulse clean and at least 10 us wide.
  • Leave the mode-select resistor pad open for HC-SR04-compatible ping/echo operation; a resistor there switches the board into 9600-baud serial modes instead.
  • Respect the near blind zone: readings below roughly 25 cm are unreliable, so mount the sensor with clearance to the closest surface you need to detect.

Board compatibility

The JSN-SR04T connects to any of the microcontrollers supported in Tinkered. Mind the 5 V logic level on 3.3 V boards.

Simulate the JSN-SR04T in your browser

The JSN-SR04T is fully simulated in Tinkered. Wire it into a circuit, write your firmware, and read real values back with no physical hardware. Test your logic before you touch a breadboard.

Open it in the simulator

Common JSN-SR04T mistakes

Expecting close-range readings

The sensor has a blind zone of roughly 25 cm. Targets closer than that return zero, garbage, or a stuck maximum value. Mount it far enough back that your minimum useful distance stays above the blind zone.

Powering it from 3.3V

Despite a 3.0-5.5V rating, the module is unstable at 3.3V and often returns noisy or absent echoes. Give it a clean 5V supply and level-shift the ECHO line if your microcontroller runs at 3.3V.

Wiring 5V ECHO into a 3.3V pin

ECHO swings to 5V. Connecting it directly to a 3.3V GPIO can overstress the input. Use a resistor divider or level shifter on ECHO.

Ignoring supply droop

Each measurement pulls about 30 mA in a short burst. On a shared or long-wire 5V rail this causes voltage dips and jittery distances. A decoupling capacitor near VCC and GND fixes most of the noise.

Assuming HC-SR04 timing is identical

The JSN-SR04T is compatible with HC-SR04 code, but the transducer settles differently and a 10 us trigger is sometimes marginal. Widening the trigger pulse slightly and adding a small delay between readings improves stability.

JSN-SR04T datasheet

Official JSN-SR04T datasheetManorshi (JSN-SR04T-3.0)

Popular JSN-SR04T projects

Water tank and sump level monitor

Mount the waterproof transducer at the top of a tank and log the distance to the water surface to track fill level, trigger pumps, or send low-level alerts.

Car parking and reverse distance sensor

Measure clearance to a wall or obstacle and drive a buzzer or LED bar that speeds up as the vehicle approaches.

Outdoor obstacle avoidance for robots

Use the sealed transducer on a rover or boat to detect obstacles in rain or spray where a bare HC-SR04 would fail.

Non-contact liquid level for irrigation

Keep the electronics dry while ranging down onto a rainwater barrel or reservoir to automate watering based on available volume.

Build with the JSN-SR04T.

Drop the JSN-SR04T into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.