Skip to content
A

Distance

Interfacing JSN SR04T Distance with Arduino Uno

What is the JSN SR04T?

JSN SR04T practical reference

A sealed, probe-style ultrasonic sensor built for liquid-level sensing and outdoor robotics where the open-faced HC-SR04 won't survive. Unlike the exposed dual-transducer face of an HC-SR04, the JSN-SR04T's transducer is embedded in a waterproof probe connected to the driver board by a cable, letting it be mounted through a tank lid or exposed to rain and moisture while the electronics stay protected — making it the standard choice for DIY water tank level monitors and outdoor obstacle-avoidance robots.

Key specifications

  • Sensor type: Waterproof probe-style ultrasonic ranging sensor with separate driver board
  • Operating voltage: 5 V DC (some variants accept 3.3-5.5V)
  • Operating current: ~8 mA typical, ~30 mA during ranging pulse
  • Measuring range: 20cm to 600cm (varies slightly by revision, some rated to 450cm)
  • Blind zone: ~20-25cm minimum detection distance — objects closer than this are not reliably detected
  • Probe design: Waterproof transducer housed in a sealed metal/plastic probe on a cable, separate from the driver PCB
  • Interface: Trigger/Echo pulse mode (HC-SR04-compatible timing) on most revisions; some variants also support UART mode
  • Beam angle: Narrower than the HC-SR04, which helps reduce false echoes in a tank but also means careful aiming

Pinout and connection notes

Code and wiring are largely identical to a standard HC-SR04 in pulse mode, but the 20-25cm minimum blind zone is significantly larger, so mount the probe with enough clearance from the closest expected surface (e.g. the bottom of an empty tank). Because the transducer sits inside a probe, some condensation or splashing near the tip is fine, but the driver PCB itself should still be kept dry and away from direct water exposure.

  • VCC: Power, 5V DC (check your specific revision for 3.3V tolerance)
  • Trig: Trigger input — send a short pulse to start a ranging cycle
  • Echo: Echo output — pulse width proportional to round-trip time
  • GND: Ground

Integration checklist

  1. Confirm the exact part number and breakout-board revision.
  2. Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
  3. Check controller pin assignments and bus address or interface mode against the example code.
  4. Power up with external loads disconnected, then test signals before full integration.
  5. If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.

Troubleshooting and reproducibility

Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.

Setting Up JSN SR04T with Arduino Uno

Wiring

Component pinArduino Uno pinNote
VCC5V
TrigD9Any digital pin works
EchoD8Pulse width proportional to round-trip time
GNDGND

Swipe sideways to see every column →

C++
  • The ~20-25cm blind zone matters a lot for tank-level projects: if the sensor sits too close to the liquid surface at a full tank, it won't register a reading. Mount it high enough to clear the blind zone even when full.
  • Only the probe on the cable is waterproof — the small driver PCB is not, and needs to stay in a dry enclosure.
  • The beam is narrower than a standard HC-SR04, which helps in a tank but means aiming matters more; angled or rippling surfaces can miss the return echo.

Related Components

Related Guides & Projects