Knock2Drink lets bar and restaurant customers order drinks by knocking on the table — no apps to open, no buttons to press. A Seeed XIAO with an onboard IMU sits at the table and listens for vibrations. Knock three to six times and the device recognises the pattern using a trained machine learning model, sends the result over Bluetooth to a companion app, where the waiter sees the order appear instantly. Staff can configure the app in advance to map each knock pattern to a specific drink. The status of the order is communicated back to the customer with an RGB LED.
The problemAnyone who has worked in a busy bar knows the drill: customers wave, shout, or try to make eye contact for minutes before getting served. Existing table-ordering solutions require customers to scan a QR code, download an app, or interact with a screen. We wanted something that required absolutely no effort from the customer — something as natural as knocking on a door.
The result is Knock2Drink.
How the system worksThe flow from customer to consists of 3 stages:
- customer knocks on the table
- microcontroller classifies the knock pattern (machine learning on-device)
- Result sent over Bluetooth to waiter's phone app.
- App displays the ordered beverage where a waiter can accept or decline the order
The intelligence is entirely on-device. The XIAO runs the trained model locally and sends only the final classification ("3 knocks", "4 knocks", etc.).
Machine learning with Edge ImpulseOur model was taught to detect single knocks with the IMU (inertial measurement unit). The model was trained with 100 recorded samples of single knock accelerometer data and 100 recorded samples of idle/noise.
Spectral analysis (FFT) was used for the classification of data. A neural network model was used for machine learning. We have achieved 100% accuracy on our training and test sets.
The Seeed Studio XIAO nRF52840 Sense microcontroller operaters in 2 states. Primarily it is in a low power sleep state to preserve battery life. An interrupt tied to an accelerometer spike wakes the MCU, which enters its scanning state where a machine learning model is ran on the recorded accelerometer data. If a knock is detected another scanning interval is fired to detect subsequent knocks. After the number of knocks is counted, the ID of the device and the knock code is sent over Bluetooth to the companion app.
Companion appThe Knock2Drink app enables the waiter to map different knocks to different drinks. The system supports ordering of 4 different drinks with 3-6 knock sequences.
When a knock is detected a pop-up with an option to accept or decline the order appears on the screen. The device ID is used to identify the table where the order is coming from. The state of the order is transmitted back to the customer with an RGB LED. Red means declined, green means accepted.
After an order is handled it is added to the order history.
Statistics on the amount of orders and most ordered beverage are also available.










Comments