Skip to main content

Buzzer

3D render of the assembled buzzer PCB

A USB-powered passive piezo sounder for playing notes and audible alerts.

Download datasheet (PDF)

Modeled component height: approximately 3.0 mm above the component-side PCB surface.

Usage​

Choose Add device → Buzzer, enter Frequency (Hz) and a duration, then choose Beep. Try 440 Hz followed by 880 Hz to hear an octave. The default is 4000 Hz, where the sounder is rated. Lower pitches can be quieter. Leave an opening over the sound outlet in your enclosure.

Boards identifying as version 1.x have the original oscillator buzzer and use the Modulation (Hz) control. Their mounting pattern is 19 × 25 mm.

Download revision 2 firmware · Prototype fabrication files

Protocol​

USB serial · 115200 baud · DTR on. Send one ASCII command per line, ending in LF (\n).

CommandPurposeReply
idIdentify the device and firmware.DEVICE tscircuit buzzer 2.0.0
helpList supported commands.One line of command syntax.
?Alias for help.Same command list.
statusRead the playback state.STATUS idle or STATUS buzzing
beepPlay the default 250 ms beep.OK
beep 500Play for the given duration in milliseconds (0–10000).OK
tone 440 750Play a 440 Hz tone for 750 ms. Accepts 20–4000 Hz and 1–10000 ms.OK
stopSilence the buzzer immediately.OK
led onTurn the indicator on.OK
led offTurn the indicator off.OK

A new beep or tone replaces the current timer.

Legacy binary commands

Send A5 5A, opcode, sequence number, payload length, payload, then CRC-8. The CRC covers the opcode through the last payload byte (polynomial 0x07, initial value zero). The maximum payload is 48 bytes. The reply is AC, the same sequence number, and a status byte.

OpcodePayloadAction
0x10Duration in ms, two bytes, little-endian.Play for 0–10000 ms.
0x20One byte, 0 or 1.Turn the indicator off or on.

Status 0 means success, 2 means CRC mismatch, 3 means excessive length, and 4 means an invalid opcode or argument.

Protocol implementation

Mounting​

The PCB measures 24 × 30 mm, with 4 × Ø2.2 mm clearance holes for M2 screws. The centre-to-centre spacing is 20 × 20 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, 22 mm and Y = 2.5, 22.5 mm.

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

Open full-size drawing · Drawing TSX · PCB source