tilt sensor/The board/01. The four pins
The board · 01 of 10

The four pins

Four pins, three of them wired: GND on the square pad, VCC to one lead of the tilt switch, and SIGNAL on its other lead with a 10 kΩ to GND. NC is connected to nothing. When the left edge of the board is the low one the switch closes and SIGNAL reads HIGH, which is what ACTIVE HIGH on the front says.

Three wires and a spare

The header is four right-angle pins, 2.54 mm apart, printed GND, VCC, NC and SIGNAL from left to right with the parts facing you. GND is on the square pad, and that pad is the only way to tell four identical holes apart. Count from it.

The four pins, and the switch
Show
Pins
4
Pins to wire
3
Pitch
2.54 mm
SIGNAL is the switch's other lead. Open, the 10 kΩ holds it LOW; closed, it is joined to VCC and reads HIGH. That is what ACTIVE HIGH on the front means: HIGH when the left edge, where the can's leads are, is the low one.

Pick a pin to see where it goes. GND is where the pull-down, the capacitor and the LED end. VCC reaches one lead of the tilt switch and nothing else. SIGNAL is the switch's other lead, with a 10 kΩ and a 100 nF to GND beside it. NC is in no net at all.

What HIGH means here

The front prints ACTIVE HIGH up its right edge. With the switch open the 10 kΩ holds SIGNAL at 0 V: LOW. With it closed, SIGNAL is joined to VCC and reads HIGH. There is no library and nothing to set up beyond pinMode(pin, INPUT).

What closes it is the part that needs saying. The brass can lies across the top of the board with its two leads at the left end, and it closes when that end is lower than the other. So HIGH means "the left edge is down", not "tilted": tip the right edge down and it reads LOW, and lying flat it can read either. Which end is lower works through every way up.

The back of the TK62, header at the bottom: a black board with a gold border, lonely binary across the top, the two solder joints of the tilt switch's leads at the upper right, a gold drawing of a slightly tilted square outline cut through by a level line, two round LEGO holes, a gold box printed TK62 TILT SENSOR, four header pads with the square one on the right, and ANGLE DETECTION along the bottom edge. No pin names are printed on this side.
The back. Turned over, the square pad and the switch's leads are both on the right; the pad is still GND.

VCC is not a free choice

A closed switch puts VCC straight onto SIGNAL, so VCC decides what voltage your board's pin sees. Wire it to the voltage your board's pins run at: 3V3 on an ESP32, an ESP32-S3 or a Pico, 5V on an Uno. VCC is your logic voltage shows what the wrong one does.

When it does not work

Which end of the header is GND?

The square pad. From the front, parts up and pins pointing down, it is the left-hand pin, and the order is GND, VCC, NC, SIGNAL. The back prints no pin names; turned over, the square pad is on the right and it is still GND.

Should I connect NC to something?

No. It is soldered to a pad that no trace reaches, so it makes no difference either way. It is there so every TinkerBlock block has the same four-pin header and one cable fits all of them.

Which is the left edge once the block is mounted?

The edge the brass can's two leads are at. Look for the two silver wires bent down into the board at one end of the can: that end is the one that has to go down for SIGNAL to read HIGH, however the block is turned.

Where this goes next

The brass can, the pull-down, the capacitor and the light, and what each one is for.

What is on it →

Edit this page — content/books/tilt-sensor/the-four-pins.mdx

Community

Questions about this product

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

Ask a question ↗

Tilt 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 →