Specifications
| Type | Lever microswitch bumper, normally open, active high |
|---|---|
| Switch | Usakro UK-E0516 lever microswitch, 12.7 mm long, lying flat with its lever past the top edge; clicks after about 1.4 mm of lever travel at about 70 gf |
| Pull-down | 10 kΩ from SIGNAL to GND, on the board. At rest reads LOW, lever pushed in reads HIGH |
| Hit light | Red LED with a 1 kΩ resistor on SIGNAL. Lights while the lever is in, about 3 mA from 5 V |
| Supply | 3.3 V or 5 V on VCC. On a hit, SIGNAL is at VCC, so use 3V3 beside an ESP32, ESP32-S3 or Pico and 5V beside an Uno |
| Current | Nothing at rest. About 3.5 mA from 5 V while the lever is held in |
| Pins to wire | 3 of the 4: GND, VCC and SIGNAL. NC is connected to nothing on the board |
| Header | 4-pin right-angle male, 2.54 mm pitch: GND, VCC, NC, SIGNAL, with GND on the square pad |
| Switch rating | 48 V DC or 125 V AC, 0.1 A; contact resistance 100 mΩ max; rated for 1 000 000 operations |
| Board | 22.4 × 30.4 mm, two 4.8 mm mounting holes 16 mm apart; 7.3 mm tall at the switch |
| In the box | 1 × TK17 block. It also ships inside the TinkerBlock kits |
What it is
A lever microswitch, a 10 kΩ pull-down resistor, and a red LED that lights while the lever is pushed in. At rest the pull-down holds SIGNAL at 0 V and your board reads LOW. When something pushes the lever in about a millimetre and a half, the switch clicks, connects SIGNAL to VCC, and your board reads HIGH. Let go and it is LOW again.

It is the TK04 push button's circuit with a different switch, and it reads the same way. What it is for is different. Ultrasonic and infrared sensors report a distance, and some surfaces fool them. A bumper reports nothing at all until it touches something, and then it is certain. Use a distance sensor such as the TK50 to slow down for what it can see, and this for what it could not.
VCC is the voltage your pin sees
The switch joins SIGNAL straight to VCC, so whatever is on VCC is what your pin receives on a hit:
| Your board | VCC to | On a hit, SIGNAL is | Hit light |
|---|---|---|---|
| Arduino Uno | 5V | 5 V | about 3 mA, bright |
| ESP32, ESP32-S3, Pico | 3V3 | 3.3 V | about 1.3 mA, a little dimmer |
Never 5V beside a 3.3 V board, and never a motor battery. With VCC unconnected, the bumper does nothing and the light never comes on. The LED currents are worked out from a red LED's typical forward voltage rather than measured.
Which pin is which
Switch at the top, header at the bottom, reading left to right:
| GND | to your board's GND | the square pad: count from here |
| VCC | to 3V3 or 5V | your board's logic voltage |
| NC | nothing | not connected on the board |
| SIGNAL | to a digital input | HIGH while the lever is in |
The switch has contacts called COM, NO and NC of its own. The board wires COM to VCC and NO to SIGNAL, and leaves the switch's NC unconnected; the header's NC pin is a different thing that also goes nowhere. The back prints TK17 COLLISION SENSOR and DETECTS IMPACTS instead of pin names. Turned over, the square pad is on the right, and it is still GND.
Wiring, in three lines
- GND to your board's GND.
- VCC to 5V on an Uno, 3V3 on an ESP32, ESP32-S3 or Pico.
- SIGNAL to a digital pin: D2 on an Uno, GPIO 25 on an ESP32, GPIO 4 on an ESP32-S3, GP15 on a Pico.
Leave NC unconnected. Set the pin to INPUT, not INPUT_PULLUP: the pull-down
is already on the board. These are the TK04 push button's pins too.
Example
// The GPIO number SIGNAL is wired to.
// Uno: 2. ESP32: 25. ESP32-S3: 4. Pico: 15.
const int BUMPER_PIN = 4;
void setup() {
Serial.begin(115200);
pinMode(BUMPER_PIN, INPUT); // the block has its own pull-down
}
void loop() {
if (digitalRead(BUMPER_PIN) == HIGH) { // HIGH is a hit
Serial.println("hit");
} else {
Serial.println("clear");
}
delay(200);
}from machine import Pin
import time
# The GPIO number SIGNAL is wired to. ESP32: 25. ESP32-S3: 4. Pico: 15.
bumper = Pin(4, Pin.IN) # no pull: the block has its own
while True:
if bumper.value() == 1: # 1 is a hit
print("hit")
else:
print("clear")
time.sleep_ms(200)Where to start
The handbook below is ten short articles, each with a working figure. The first read is the whole build in three wires and a few lines, and stop and back off is the sketch a robot actually needs.
If your hit counter goes up by more than one per bump, read one bump counts as several and then counting hits.
And before plugging it into an ESP32, VCC sets the voltage is the one page that protects the board.
When it doesn’t work
- Does it read HIGH or LOW on a hit?
- HIGH. The board has a 10 kΩ pull-down, not a pull-up: at rest SIGNAL sits at 0 V and reads LOW; with the lever pushed in, the switch connects it to VCC and it reads HIGH. Sketches written for active-low bumpers test for LOW and get this block backwards.
- Should VCC go to 3V3 or 5V?
- To your board's logic voltage: 3V3 on an ESP32, ESP32-S3 or Pico, 5V on an Uno. On a hit the switch connects SIGNAL straight to VCC, so the voltage on VCC is the voltage your pin receives. 5V on a 3.3 V board's pin is past its rating on every bump. Never the motor battery.
- INPUT or INPUT_PULLUP?
- INPUT. The block brings its own pull-down. The chip's internal pull-up would fight it and leave the resting level somewhere around a volt, which no datasheet promises to read as LOW. In MicroPython, Pin(pin, Pin.IN) with no pull argument.
- Is there a sensitivity adjustment?
- No. There is no potentiometer on the board. The switch clicks after its lever has moved about a millimetre and a half, at about 70 gf, and that is set by the switch. To cover a wider front, fit a light bumper plate that presses on the lever; do not bend the lever or load it with a long wire.
- One bump counts as several.
- Contact bounce: the switch's contacts make and break a few times in the first few milliseconds of every hit. Believe a change only once the pin has held still for about 20 ms. The handbook's sketch does it with millis() and no library.
- It never reads a hit.
- Push the lever until it clicks and look at the red LED. If it stays dark, VCC or GND is not connected, or the cable is one pin over. If it lights, the block is fine and SIGNAL is on a different pin from the one your sketch reads.