Specifications
| Type | A piezo disc on a TinkerBlock board with no supply of its own. A tap or a knock reads as a voltage on SIGNAL that grows with how hard it was |
|---|---|
| Disc | XHXDZ-22045 piezo disc, Ø22 × 4.5 mm in a black plastic case, on a black and a red lead soldered to the board |
| SIGNAL | 0 V at rest. After a tap, a hump: up in about 1 ms, down to a third in about 0.1 s. Read it with analogRead |
| Senses | Change, not weight: a tap reads, a steady press drains back to 0 V within a fraction of a second |
| Circuit | 1 MΩ that drains the disc, an SS14 Schottky that stops only the negative half, and 1 kΩ into 100 nF on SIGNAL |
| Limit | Nothing on the board holds SIGNAL below 3.3 V. Finger taps read a volt or two; a hard blow can pass a 3.3 V pin's limit, so add a Schottky from SIGNAL to 3V3 for those |
| Supply | None. There is no VCC pin: both middle pins are printed NC and connected to nothing |
| Pins to wire | 2 of the 4: GND and SIGNAL |
| Header | 4-pin right-angle male, 2.54 mm pitch: GND, NC, NC, SIGNAL, with GND on the square pad |
| Board | 22.4 × 30.4 mm, two 4.8 mm mounting holes 16 mm apart; the disc hangs off one end on its leads. The front prints ANALOG, the back DETECTS VIBRATIONS |
| In the box | 1 × TK59 block with its disc soldered on. It also ships inside the TinkerBlock kits |
What it does
It tells your board that something was tapped or knocked, and roughly how hard. The black disc is a piezo element: bend it and it makes a small charge of its own. The board turns each tap into a smooth hump of voltage on SIGNAL, taller for a harder tap, and drains it back to 0 V in about a tenth of a second.
That is the difference from the TK28 knock sensor, whose spring switch can only say that a knock happened. This one says how hard, which is enough to tell a deliberate knock from a door closing.
Nothing on the block is powered. There is no chip, no LED and no VCC pin: just the disc, a 1 MΩ that drains it, an SS14 diode that stops it swinging below 0 V, and a 1 kΩ into a 100 nF that smooths each tap into a hump.
The page this replaces said to wire VCC to 3.3 V or 5 V (both middle pins are connected to nothing), that the module's clamp makes it safe for any pin (it clamps only the negative half), and that the TK37 buzzer is the same element run backwards (the TK37 is a magnetic buzzer).
Two things to know before wiring
- Two wires. GND and SIGNAL. Both middle pins are NC, and there is no supply to connect.
- It senses change, not weight. A tap reads; a steady press drains back to 0 V while your finger is still down.
Wiring, in four lines
- GND to your board's GND.
- SIGNAL to an analog pin: GPIO 4 on an ESP32-S3, GPIO 34 on an ESP32, A0 on an Uno, GP26 on a Pico.
- NC and NC to nothing: they are connected to nothing on the board.
- No supply wire.
Then read it with analogRead, as often as the board allows, and keep the
highest reading in each 20 ms.
Where to start
The handbook below is nine short articles, each with a working figure. The first reading is the whole build in two wires and a short sketch, and a tap switch counts each tap once.
For how it works, read a disc that makes voltage and four parts, one hump. Before you hit it hard on a 3.3 V board, read how high it goes. If it reads nothing, when it reads nothing.
When it doesn’t work
- Where does VCC go?
- Nowhere: the block has no VCC pin. The header prints GND, NC, NC, SIGNAL, and both NC pins are connected to nothing. The disc makes its own voltage, and nothing else on the board needs power. The pad printed VCC beside the red wire is the disc's own node, not a supply.
- One tap reads as several.
- A tap is a hump that takes a tenth of a second or more to drain, so a sketch that counts readings over a level counts it once per reading. Count a rise instead, then ignore everything for about 150 ms; the handbook's tap switch does exactly that.
- The readings are tiny.
- Tap the disc itself, on its face. It answers to being bent, and a tap on the table beside it bends it very little. Fixed flat to a surface with tape or glue, it picks up knocks on that surface far better than lying loose.
- Can it weigh something, or sense a steady push?
- No. A press makes a charge once, and the board drains it in a fraction of a second, so a steady weight reads 0 V. Use a load cell or a force sensor for that.
- Is it safe on a 3.3 V board?
- For taps, in practice yes: the 100 nF keeps them to a volt or two. But the board's only diode stops the negative half, so a hard blow can take SIGNAL past a 3.3 V pin's limit, with only the 1 kΩ limiting the current. For a drum pad or anything struck hard, add a Schottky diode from SIGNAL to 3V3.
- Is this the same part as the TK37 passive buzzer?
- No. The TK37 is a magnetic buzzer, a coil. This disc is a piezo element, sold by its maker as a buzzer too, but nothing on this board drives it: it only listens.
