| HC-SR04 | VL53L0X | JSN-SR04T | |
|---|---|---|---|
| Method | Ultrasonic | Infrared laser time-of-flight | Ultrasonic, sealed probe |
| Useful range | About 2–400 cm | Up to about 2 m (around 1.2 m in default mode) | About 25–450 cm (varies by version) |
| Beam | Cone of roughly 15° | About 25° field of view | Wider than the HC-SR04 (varies by version) |
| Interface | TRIG / ECHO pulses | I2C, address 0x29 | TRIG / ECHO pulses (some versions also serial) |
| Supply | 5 V (3.3 V "P" versions exist) | Modules with a regulator take about 2.6–5 V | 5 V on most boards (varies by version) |
| Weatherproof | No | No | Probe yes, control board no |
| Struggles with | Soft or angled surfaces, closer than 2 cm | Bright sunlight, dark or transparent targets | Anything closer than about 20–25 cm |
| Typical price in India | ₹60–120 | ₹200–400 | ₹400–700 |
Three very different ways to answer “how far away is it?”. Ranges are typical values from datasheets and seller documentation — clones vary, so test yours before relying on a number. Prices are indicative.
HC-SR04 — the everyday choice
The blue two-eyed module from every kit. It sends a 40 kHz ping and times the echo.
- Cheap, simple and works up to a few metres.
- 5 V part: on an ESP32 or Pico, ECHO needs a 1 kΩ / 2 kΩ divider (why).
- Soft targets (cloth, foam) and surfaces at an angle reflect the sound away and give no echo.
- Not sealed — inside a closed water tank, condensation corrodes it within months.
Guides: HC-SR04 with Uno, with ESP32. Reads zero? Fix.
VL53L0X — small, fast and precise up close
A laser time-of-flight sensor on a tiny I2C board.
- Millimetre resolution and a narrow beam — good for detecting a hand, a small object, or the edge of a table.
- I2C, so it shares wires with displays; 3.3 V friendly.
- Struggles in direct sunlight and with very dark or transparent targets. Not for water levels.
- Remove the protective film over the window before testing — easy to miss.
Component page: VL53L0X.
JSN-SR04T — the water-tank sensor
Pinout, wiring and errors: JSN-SR04T component page.
The same TRIG/ECHO idea, but the transducer is a sealed, waterproof probe on a long cable, connected to a separate control board.
- Survives the humid, closed space inside an overhead tank far better than an HC-SR04.
- Blind zone of about 20–25 cm: mount it high enough that the full water line is never closer than that.
- Keep the control board dry, in a box away from the tank lid.
- Several versions exist with different modes and supply ranges — check your board’s markings.
Verdict
| Project | Pick |
|---|---|
| Learning, robots, parking sensors, dustbins | HC-SR04 |
| Overhead or underground water tank | JSN-SR04T |
| Short-range precision, gestures, small robots, edge detection | VL53L0X |
Our water tank alarm and parking assistant projects show both ultrasonic sensors in use; day 13 of the learning path explains how the echo timing works.