Five boards and four pins
Five identical boards, 46.4 × 22.4 mm, with everything you need to know printed on the back of each one: the mode table, the name of every pin, and a header whose first pin is square.
Both sides
The front is the pair of aluminium cans, which is the half everybody recognises. The back is where the information is, and it is worth a minute because this board prints more about itself than most.

What is printed, and why it matters
3-5V, over the second pin. That is the supply pin's name and its range
at once, on the part itself, and it is the single fact that separates this
board from the HC-SR04 its listing is named after.
The mode table, in the top left — four rows, two columns, ticks and crosses. It is the truth table for the two solder pads beside it, and it means you never have to look anything up with the board in your hand.
J2 and J1, on the left edge, in that order top to bottom. Note the
order: J2 is the upper one. It is an easy thing to get backwards with an iron
in your hand and a magnifier in the other.
RANGE, beside a third jumper at the right. It sets how far the sensor
tries to reach, not which protocol it speaks —
the solder bridges
covers it.
ECHO/SDA/TX and TRIG/SCL/RX, over the last two pins. One pin, three
names, because one board serves four protocols —
one pin, three names
untangles which name applies when.
The pins
| Pin | GPIO | I2C | UART | 1-Wire | |
|---|---|---|---|---|---|
| 1 | GND — square pad | GND | GND | GND | GND |
| 2 | VCC, printed 3-5V | 3–5 V | 3–5 V | 3–5 V | 3–5 V |
| 3 | ECHO | Echo | SDA | TX | not used |
| 4 | TRIG | Trigger | SCL | RX | Data |
Left to right on the back, pins pointing down. From the front the order
reverses, which is the usual way to end up with VCC and GND swapped. The
silkscreen calls the supply pin 3-5V; this handbook calls it VCC.
What is underneath
One chip does everything: an RCWL-9616 in a 16-pin package, at the top right of the back. The two transducers are on the front. Facing them with the header at the bottom, the left one is the HY40A16T12-1 transmitter and the right one the HY40A16R12-1 receiver; both are 16 mm across, 12 mm deep and tuned to 40 kHz. Around the chip are two decoupling capacitors, two more its receiving amplifier needs, and a power LED with its resistor.
Three resistors are the interesting ones. Two are 10 kΩ, each running from a chip pin to one of the J1 and J2 pads, whose other side is ground: that is the mode-select circuit. The third is 2.2 kΩ, in series with one transducer, and RANGE is the jumper across it. All three are a solder bridge away from being interesting.
Five of them
Enough to put one on each side of a robot and still have a spare, which is the argument for a pack rather than a part. It is also enough to commit one or two to a soldered mode and leave the rest as they came — a bridge is not something you undo casually.
When it does not work
Count from the square pad, which is GND. The order from there is GND, VCC, ECHO, TRIG. The names are printed on the back only, and with the cans facing you the pads read the other way round; the square pad is the one marking both faces share, which is why every sketch in this handbook says to count from it.
A third solder jumper, across a 2.2 kΩ resistor between the chip and one transducer. It ships open. The chip maker's note says bridging it lengthens the typical maximum range, from 3 to 5 m to 5 to 6 m with its own transducers; nobody has measured that on this board. It has nothing to do with the mode.
Yes: a four-pin right-angle header soldered on the back, its pins running out past the bottom edge, so the board can stand upright in a breadboard with the cans facing forward. The 3D model shows it the same way.
Only if the two cans can see out. They need clear air in front of them — a hole each, not a grille and not a sheet of plastic across the front. A cover over the transmitter muffles the burst; a cover over the receiver muffles the echo; either one shortens the range dramatically.
Edit this page — content/books/ultrasonic-sensor/five-boards-and-four-pins.mdx
Questions about this product
See what other owners have asked, and read their solutions.
Ultrasonic Distance Sensor
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.