TK50 ultrasonic/What is in the box/03. Five boards and four pins
What is in the box · 03 of 11

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 board, both sides
46.4 × 22.4 mm
Count from the square pad. That is GND, and it is the one marking both faces carry. The order from it is GND, VCC, ECHO, TRIG, with VCC printed 3-5V. The names are on this side only, above a right-angle header whose pins run out past the bottom edge. The two jumpers at the left choose the protocol from the table beside them; the third, at the right, is RANGE, and it leaves the protocol alone.

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.

The back of the TK50 board: a white mode table top left reading MODE J1 J2 with rows GPIO cross cross, I2C tick cross, UART cross tick, 1WIRE tick tick; two small gold solder jumpers on the left edge labelled J2 above J1; a white box reading TK50 ULTRASONIC DISTANCE SENSOR with lonely binary beneath it; a sixteen-pin chip at the top right; a jumper labelled RANGE at the right; and a right-angle four-pin header along the bottom labelled, left to right, GND, 3-5V, ECHO slash SDA slash TX and TRIG slash SCL slash RX, the GND pad square.
The back of the board. Everything you need to wire it and to choose a mode is printed here.

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

PinGPIOI2CUART1-Wire
1GND — square padGNDGNDGNDGND
2VCC, printed 3-5V3–5 V3–5 V3–5 V3–5 V
3ECHOEchoSDATXnot used
4TRIGTriggerSCLRXData

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

Which way round does the header go?

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.

What is the jumper marked RANGE?

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.

Do the boards come with the pins fitted?

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.

Can I mount it behind a panel?

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.

Where this goes next

Four wires and a dozen lines, with no library at all.

The first reading →

Edit this page — content/books/ultrasonic-sensor/five-boards-and-four-pins.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

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.

Browse Modules and blocks on the forum →