Component guide · Intermediate · 3 min read
Waterproof Ultrasonic Sensors

JSN-SR04T and A02YYUW
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
Waterproof ultrasonic sensors such as the JSN-SR04T and A02YYUW put the transducer in a sealed probe on a cable, so they can measure water level in a tank or work outdoors. They have a larger minimum distance (often 20 to 25 cm) than an HC-SR04, and many offer a UART output that gives the distance directly. Mount them square to the surface and keep them out of splashes and condensation.
Key specs at a glance
- Range
- About 20 to 450 cm for JSN-SR04T; about 3 to 450 cm for A02YYUW (check the version)
- Dead zone
- Readings closer than the minimum are unreliable
- Outputs
- Trigger/echo like HC-SR04, or UART distance frames
- Supply
- 3.3 to 5 V on newer versions; some older boards need 5 V
- Beam
- Wider than a bare HC-SR04, so keep it away from tank walls
- Protection
- Probe is water-resistant; the control board is not
How they differ from the HC-SR04
The HC-SR04 uses two open transducers, one to send and one to listen. A waterproof probe uses a single sealed transducer that does both, so it must wait for its own ring to die away before listening. That creates the larger dead zone close to the sensor.
The trade is durability: the probe can sit above water, in dust or outdoors. Only the probe is sealed, so put the small control board in a box.
Wiring and modes
In the default trigger mode, wire it like an HC-SR04: VCC, GND, TRIG and ECHO to digital pins, and use the same pulse timing code. Because the sensor can be slower to recover, leave at least 60 to 100 ms between readings.
Many boards have a resistor position or pad that switches the output mode, such as continuous UART output at 9600 baud. The A02YYUW sends 4-byte frames: a header byte 0xFF, distance high byte, distance low byte, and a checksum. Read them on a UART and check the checksum before using the value.
Measuring a water tank
- 1Mount the probe at the top, pointing straight down, at least the dead-zone distance above the highest water level.
- 2Keep it away from the walls, inlet pipe and ladder so the beam sees only the water.
- 3Water level = mounting height minus measured distance. Volume = level times the tank's cross-section area.
- 4Take several readings and use the median, which rejects odd echoes.
- 5Condensation on the probe face causes false readings; a short shroud and a small vent help.
Send the result over Wi-Fi with an ESP32 and MQTT for a tank monitor that switches a pump.
Try it: Voltage divider calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Mounting the probe closer to the water than its dead zone.
- Pointing it near the tank wall or inlet pipe.
- Leaving the control board exposed to water.
- Polling faster than the sensor can recover.
- Ignoring the checksum in UART mode.
Frequently asked questions
Can I use HC-SR04 code with the JSN-SR04T?
Yes in its default mode. Leave more time between readings and expect a larger minimum distance.
Why does it read wrong values close up?
It is inside the dead zone, roughly 20 to 25 cm on many JSN-SR04T versions.
Is the whole sensor waterproof?
Only the probe. Keep the control board in an enclosure.
How accurate is it for tank level?
Usually within a centimetre or two in a calm tank when mounted squarely and averaged.
Does it work at 3.3 V?
Newer versions do. Older ones may need 5 V, with a divider on ECHO for a 3.3 V board.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 23 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
- JSN-SR04T module documentation
- DFRobot A02YYUW product wiki and protocol
- MaxBotix ultrasonic sensor application notes
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.




