What is on the board · 01 of 9

The four pins

Four pins, three of them wired. GND and VCC power the block, SIGNAL tells your board whether the button is down, and NC is connected to nothing. Pressed, SIGNAL reads HIGH: the board has a pull-down, not a pull-up.

What is on the board

A 12 mm tactile switch under a blue cap, two small resistors, a red LED, and a four-pin header along the bottom edge. The header is right-angled, so the pins point out past the edge of the board and it lies flat in a breadboard or on a cable.

The TK04 seen from the button side: a black board with a gold-plated border, a large round blue cap on a square black switch near the top, two small resistors and a tiny LED below it, two big round mounting holes, lonely binary printed up the left edge, a boxed ACTIVE HIGH up the right edge, and a right-angle header labelled GND, VCC, NC and SIGNAL from left to right.
The button side. GND is on the left, SIGNAL on the right.

The switch is a USAKRO 12 × 12 mm part with 0.3 mm of travel. Under it, the two resistors are the 10 kΩ pull-down, on the left, and the 1 kΩ for the LED, on the right. The LED is the small part between them and the header.

The four names

The four pins
Pin
Pins
4
Pins to wire
3
Pitch
2.54 mm
SIGNAL is the output. Released, the 10 kΩ pull-down holds it at 0 V and your pin reads LOW. Pressed, the switch joins it to VCC and your pin reads HIGH, and the red LED beside it lights. HIGH means pressed: that is what ACTIVE HIGH on the silkscreen says.

GND is on the square pad. The pull-down and the LED both return here.

VCC goes to one side of the switch and nowhere else. That is unusual enough to have its own article: whatever you connect to VCC is what your pin receives when the button is down.

NC means not connected, and on this board it means it literally. The net list, which is the list of every electrical connection on the board, does not mention it at all.

SIGNAL is the output. Released, it sits at 0 V and your board reads LOW. Pressed, the switch joins it to VCC and your board reads HIGH. The silkscreen says so on the front: ACTIVE HIGH.

Not a pull-up board

Many button boards are wired the other way round, with a resistor to the supply and the switch to ground, and on those a press reads as LOW. Sketches written for them test for LOW, and plenty of them are online. On this board that sketch reports a press all the time you are not pressing. The pull-down explains the difference in one figure.

The back of the board

The back of the TK04: a black board with a gold border printed lonely binary across the top, a large push-button icon with a downward arrow, two mounting holes, TK04 PUSH BUTTON in a boxed label, four header pads in a row with the square one on the right, and WORKS ONLY WHILE PRESSED along the bottom.
The back. The part number is here, and the square pad is now on the right.

Turned over, the order reverses. The square pad is on the right, and it is still GND. The back prints TK04, the number on the box, and WORKS ONLY WHILE PRESSED: this is a momentary switch. Let go and SIGNAL goes back to LOW.

When it does not work

Which pin is GND?

Hold the board with the button facing you and the header pins pointing down. Read GND, VCC, NC, SIGNAL from left to right. GND is also the square pad, which is the one mark that survives when the board is in a breadboard and the labels are hidden.

Do I have to connect NC?

No. It is not connected to anything on the board, on either side. It is there so every TinkerBlock block has the same four-pin header and one cable fits all of them. Wiring it does no harm and changes nothing.

The back has no pin names. How do I tell which is which from there?

Turned over, the order reverses: SIGNAL is on the left and GND on the right, and GND is still the square pad. The back prints WORKS ONLY WHILE PRESSED instead of the names. Count from the square pad and you cannot get it backwards.

My old sketch says pressed is LOW. Is my board different?

No, the sketch was written for a different kind of button board, one with a pull-up. This block has a pull-down: released reads LOW, pressed reads HIGH, and the front of the board says ACTIVE HIGH. Test for HIGH.

Where this goes next

Why the block's VCC pin goes to 3V3 beside an ESP32 and 5V beside an Uno.

VCC sets the voltage

Edit this page — content/books/push-button/the-four-pins.mdx

Community

Questions about this product

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

Ask a question ↗

Push Button

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