Smart Button
ProductOverview
A smart button is a wireless input device that performs application-defined actions when pressed. Unlike a traditional wired button, it communicates over Bluetooth, allowing placement anywhere within radio range. A homeowner might mount one on the wall to toggle lights; a retailer could place one at checkout to initiate a transaction. The device is self-contained: it has an internal battery, wireless radio, and firmware capable of detecting single taps, double taps, and long presses.
The button shell is molded plastic, featuring a large raised cap for easy pressing and a mechanical return spring that provides tactile feedback. Inside, a minimal circuit board houses the Bluetooth SoC, a CR2032 coin cell, and a debouncing switch circuit. The adhesive mount plate allows stick-anywhere deployment.
How it works
At power-on, the BLE SoC initializes its radio, loads saved pairing credentials from flash, and begins broadcasting advertisement packets every 1–2 seconds. Each packet includes the button's unique identifier and a payload indicating whether it is idle or recently pressed. A smartphone app or hub device continuously listens for these advertisements on the BLE channels (37, 38, 39 in the 2.4 GHz ISM band).
When the user presses the button cap, mechanical force depresses the dome switch, closing a contact to ground. The pull-up resistor normally holds the GPIO pin high; pressing the button drives it low. A debounce capacitor filters transient bounces (20–50 ms noise from the mechanical contact) to reliably detect the press.
The SoC firmware monitors this GPIO edge. When a falling edge is detected, it timestamps the event and checks whether the pin remains low. If the pin returns high within ~20 ms (debounce window), it's noise and ignored. If it stays low for >50 ms, it's a genuine press, and the MCU increments a press counter. If the pin returns high and no new press is detected for 500 ms, the MCU interprets the press pattern:
- Single tap: One press, released, no second press within 500 ms → Send single-tap action.
- Double tap: Two rapid presses (200–400 ms apart) → Send double-tap action.
- Long press: Pin held low for >1 second → Send long-press action.
After detecting a press pattern, the status LED briefly pulses to provide user feedback. The MCU then updates the advertisement payload with the detected action and increases the broadcast rate to 5–10 Hz for 2–5 seconds, ensuring that a nearby receiver device (phone/hub) sees the update promptly.
The receiver app or home automation hub processes the advertisement and triggers the mapped action: turning on a light, logging a database entry, sending a notification, etc. The communication is one-way (button → receiver); the button does not wait for a response, minimizing latency and power consumption.
The CR2032 coin cell is sized for 1–2 years of use at ~10 taps/day. This is possible because the SoC spends ~99% of its time in a low-power sleep mode, periodically waking to broadcast. The cell voltage is monitored by the MCU; when it drops below 2.5 V (indicating nearing end-of-life), the firmware sets a low-battery flag in the advertisement payload. The receiver app alerts the user to replace the battery.
The adhesive backing, typically 3M VHB tape, bonds the button to any clean, dry surface (walls, appliances, furniture). Once affixed, the button is secured and can withstand repeated presses over years without peeling.
The plastic shell provides IP54 rating, splash-resistant but not submersible. Rain or light spray will not damage it, but it is not suitable for shower or submerged use. The antenna is a planar inverted-F type (PIFA) or meander trace on the PCB, tuned to the 2.4 GHz band with a matching network of capacitors and resistors to ensure efficient radiation and reception.
Bill of materials for Smart Button
8 top-level lines as of r157959| # | Item / sub-assembly | Part no. | Qty/assy | Ext. qty | Parts | Type |
|---|---|---|---|---|---|---|
| 1 | Button Housing 5 parts | smart-button-housing | 1× | 1 | 0 | assembly |
| 2 | Bluetooth LE Module 4 parts | smart-button-wireless-module | 1× | 1 | 0 | assembly |
| 3 | Tactile Switch Assembly 4 parts | smart-button-tactile-switch | 1× | 1 | 0 | assembly |
| 4 | Coin Cell Battery Pack 3 parts | smart-button-battery | 1× | 1 | 0 | assembly |
| 5 | Main Circuit Board 3 parts | smart-button-circuit-board | 1× | 1 | 0 | assembly |
| 6 | Adhesive Mount Plate 2 parts | smart-button-mount-plate | 1× | 1 | 0 | assembly |
| 7 | Status Indicator 2 parts | smart-button-led-indicator | 1× | 1 | 0 | assembly |
| 8 | Fastener Set | fastener-set | 1× | 1 | · | part |
717-word article