Skip to main content

Compact pushbutton

3D render of the assembled compact pushbutton PCB

A narrower revision of the pushbutton for a desktop mount with only two screw posts.

Download datasheet (PDF)

Actuator-tip height: 12 mm nominal above the component-side PCB surface with the button released. Leave room for the stem to move freely through the lid.

Usage​

Use the two holes along the side of the board to leave the centre free for the actuator. Check the revision before printing a mount. This prototype uses a 20 × 26 mm board and 10 mm between its two holes. The original pushbutton uses four holes.

Protocol​

Choose Button in the console for this prototype. USB contact input. Read the clear-to-send signal (CTS) to get the switch state.

OperationRequest or signalResult
Open with Web Serialport.open({baudRate: 9600, flowControl: "none"})Opens the port for polling.
Set DTR lowport.setSignals({dataTerminalReady: false})Configures the serial control line.
Read with Web Serial(await port.getSignals()).clearToSendtrue = Pressed, false = Released.
Read with WebUSBVendor IN request to the device: 0x95, value 0x0706, index 0, length 2.Bit 0 of byte 0: 0 = Pressed, 1 = Released.

Use either the Web Serial or WebUSB path. The console polls every 10 ms and displays a change after 20 ms of stable readings.

Protocol implementation

Mounting​

The PCB measures 20 × 26 mm, with 2 × Ø2.2 mm clearance holes for M2 screws. The centre-to-centre spacing is 10 mm. Orient the component side with the J1 USB-C port at the bottom. Measure right and up from the lower-left corner of the PCB in the component-side view. The hole centres are at X = 2.5 mm and Y = 7, 17 mm.

Component-side plan and isometric view showing 2 mounting holes and the J1 USB-C receptacle on the bottom edge.

Open full-size drawing · Drawing TSX · PCB source