HC-SR04 vs JSN-SR04T
The JSN-SR04T is the waterproof one: a single sealed 40 kHz transducer on a 2.5 m cable that reads about 23 cm to 600 cm, where the HC-SR04's two open transducers read 2 cm to 400 cm and must stay dry (ProtoSupplies JSN-SR04T V3.0 documentation; ElecFreaks HC-SR04 datasheet, p. 1). Both use the same trigger and echo code, divide the echo in microseconds by 58 for centimetres, but the JSN-SR04T V3.0 wants a 20 µs trigger instead of 10 µs (ElecFreaks datasheet, pp. 1, 2; ProtoSupplies). Pick the HC-SR04 indoors and for anything closer than 23 cm, the JSN-SR04T for tanks, sumps, parking sensors and outdoor robots.
Side by side
| HC-SR04 | JSN-SR04T | |
|---|---|---|
| RangeElecFreaks HC-SR04 datasheet, p. 1; ProtoSupplies JSN-SR04T V3.0 documentation | 2 cm to 400 cm | About 23 cm to 600 cm, depending on the target |
| TransducersElecFreaks HC-SR04 datasheet, p. 1; ProtoSupplies JSN-SR04T V3.0 documentation | Two open transducers on the board (send and receive) | One sealed transducer on a 2.5 m cable; driver board not sealed |
| BeamElecFreaks HC-SR04 datasheet, p. 1; ProtoSupplies JSN-SR04T V3.0 documentation | 15° measuring angle | ±37.5° (75° cone) |
| SupplyElecFreaks HC-SR04 datasheet, p. 1; ProtoSupplies JSN-SR04T V3.0 documentation | 5 V DC | 3.0 V to 5.5 V, 5 V recommended |
| CurrentElecFreaks HC-SR04 datasheet, p. 1; ProtoSupplies JSN-SR04T V3.0 documentation | 15 mA | 5 mA at rest, 30 mA while measuring |
| Trigger pulseElecFreaks HC-SR04 datasheet, p. 1; ProtoSupplies JSN-SR04T V3.0 documentation | 10 µs high | 20 µs or wider (mode 0) |
| Echo conversionElecFreaks HC-SR04 datasheet, p. 2; ProtoSupplies JSN-SR04T V3.0 documentation | µs ÷ 58 = cm | µs ÷ 58 = cm in default mode |
| Time between readingsElecFreaks HC-SR04 datasheet, p. 2; ProtoSupplies JSN-SR04T V3.0 documentation | 60 ms or more | 60 ms minimum |
| Other outputsElecFreaks HC-SR04 datasheet, p. 1; ProtoSupplies JSN-SR04T V3.0 documentation | Trigger and echo only | Also 9600-baud serial modes, distance in mm, set by the mode pads |
Which one to pick
- Short distances: it reads from 2 cm (ElecFreaks HC-SR04 datasheet, p. 1), inside the JSN-SR04T's 23 cm blind zone.
- Dry indoor robots, desks and bins, at the lowest cost.
- A narrow 15° measuring angle (p. 1) that picks out one target ahead.
- Water tanks, sumps, rain barrels and anything wet or outdoors: the transducer is sealed and sits up to 2.5 m from the board (ProtoSupplies JSN-SR04T V3.0 documentation).
- Longer reach, up to about 600 cm on a good target.
- Car parking sensors and bumpers, where the small transducer mounts in a hole and the board stays inside.
Swapping one for the other
What changes in the wiring and the code.
- The pins and code carry over: VCC, Trig, Echo, GND, and pulseIn() on Echo divided by 58 (ElecFreaks datasheet, p. 2). Widen the trigger to 20 µs with delayMicroseconds(20) for the JSN-SR04T V3.0.
- Keep both on 5 V: the HC-SR04 is rated for 5 V only (ElecFreaks p. 1), and the JSN-SR04T is listed for 3.0 V to 5.5 V but its vendor calls 3.3 V unreliable. On 3.3 V boards drop Echo through a 1 kΩ / 2 kΩ divider in both cases.
- Move the minimum distance: anything closer than about 23 cm reads wrong on the JSN-SR04T, so mount it farther back than an HC-SR04.
- Leave the JSN-SR04T's mode pads open for HC-SR04-style trigger and echo; a 47 kΩ or 120 kΩ resistor there switches it to 9600-baud serial.
HC-SR04 or JSN-SR04T: questions
Is the JSN-SR04T a drop-in replacement for the HC-SR04?
Almost. The pins and the echo math are the same, but the V3.0 needs a trigger pulse of 20 µs or more and cannot see closer than about 23 cm (ProtoSupplies JSN-SR04T V3.0 documentation), against the HC-SR04's 10 µs and 2 cm (ElecFreaks HC-SR04 datasheet, p. 1).
Is the whole JSN-SR04T waterproof?
No, only the transducer on its 2.5 m cable. Keep the driver board dry or in an enclosure.
Why does my JSN-SR04T read 0 with HC-SR04 code?
The 10 µs trigger the HC-SR04 accepts may not fire the V3.0, which wants 20 µs or more. Also check that the target is beyond the 23 cm blind zone, readings are at least 60 ms apart and the mode pads are open.
Which has the longer range?
The JSN-SR04T, up to about 600 cm depending on the target (ProtoSupplies documentation), against 400 cm for the HC-SR04 (ElecFreaks datasheet, p. 1).
Can either run from 3.3 V?
Not reliably. The HC-SR04 is rated for 5 V DC (ElecFreaks datasheet, p. 1); the JSN-SR04T V3.0 is listed for 3.0 V to 5.5 V but its vendor recommends 5 V. Power them from the board's 5 V pin and divide Echo for a 3.3 V input.
The two references
Checked on 2026-10-29 against 2 sources, the makers’ datasheets first.
This comparison as plain Markdown. /compare/hc-sr04-vs-jsn-sr04t.md

