reed switch/The board/01. The four pins
The board · 01 of 9

The four pins

Four pins, three of them wired: GND on the square pad, VCC to one end of the reed switch, and SIGNAL on its other end with a 10 kΩ to GND. NC is connected to nothing. A magnet closes the switch 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 other end of the switch. 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: a magnet reads HIGH. The front prints this pin in lower case, "signal".

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

What HIGH means

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

The back of the TK41, header at the bottom: a black board with a gold border, lonely binary across the top, the two solder joints of the reed switch at the upper corners, a large drawing of a horseshoe magnet, two round LEGO holes, a gold box printed TK41 REED SWITCH, four header pads with the square one on the right, and MAGNETIC ACTIVATION along the bottom edge. No pin names are printed on this side.
The back. Turned over, the square pad is on the right, and it is still GND.

VCC is not a free choice

Because a closed switch puts VCC straight onto SIGNAL, 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.

The front says signal in small letters. Is that a different pin?

No, it is the same SIGNAL every TinkerBlock block has, printed in lower case on this one. It is the right-hand pin, farthest from the square pad.

Where this goes next

The glass switch, the pull-down and the light, and what each one is for.

What is on it →

Edit this page — content/books/reed-switch/the-four-pins.mdx

Community

Questions about this product

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

Ask a question ↗

Reed Switch

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 →