Back to Home

Gesture Controller 3x3 for Smart Home

Gesture controller on 3x3 matrix solves the problem of excess commands in smart home without screens. Uses TTP223 for touch trajectories, CLI for debugging. Suitable for local control of light, climate, and scenarios.

Gesture Matrix 3x3: Alternative to Smart Home Switches
Advertisement 728x90

3x3 Gesture Matrix for Local Smart Home Control

In a smart home, the problem of too many commands for a limited space leads to compromises: mechanical switches limit functionality to one or two actions, touchscreens slow down interaction and are glaring in the dark. A prototype gesture controller based on a 3x3 matrix in the format of a standard wall switch (6x6 cm) can distinguish dozens of touch trajectories without a screen, providing mnemonic gestures for lighting, climate, and scenes.

Control covers lighting (main, accent, shades), climate (heating, air conditioning), and security (locks, sensors). Commands are divided into isolated (turning on a sconce) and scenes ("sleep" mode: lights off, shades closed, temperature down).

Why Standard Solutions Are Inadequate

Mechanical blocks with 5–8 keys require an electrician for reassignment and take up wall space. Touch panels add delays: screen activation, menu navigation. Voice control depends on the network, is prone to false triggers, and is inconvenient at night. Single capacitive sensors (TTP223) are limited to 2–3 gestures (short tap, long press, double tap).

Google AdInline article slot

The gap between a single sensor (few commands, simple) and a screen (many commands, complex) is filled by the 3x3 matrix. Zones of ~20x20 mm are intuitive (left/center/right), recognizing trajectories by touch.

Encoding Principle: Trajectories Instead of Timing

Single sensors distinguish by duration, limiting to 3–4 commands. The matrix adds space:

0 1 2
3 4 5
6 7 8

A gesture is a sequence of touches: swipe 0→1→2 (horizontal), 0→4→8 (diagonal), L-shaped (0→3→6→7), Z-shaped. Mnemonics: top row — overhead light (right on, left off), bottom — floor accent lighting, center — main light/off.

Google AdInline article slot

Finite state machine logic:

  • IDLE: waiting for first touch.
  • CODING: collecting chain (on multi-touch — minimum index).
  • RELEASE: pause >300 ms → processing (MQTT, HTTP, relay).

Short gestures for frequent actions (1 touch), complex ones for rare scenes. Memorization within 1 day for 3–5 daily commands.

Prototype Implementation with TTP223 and MCU

For the matrix, TTP223 modules (10x15 mm) were used, eliminating crosstalk. The controller (ESP32-like) processes GPIO without custom boards. Debug CLI firmware touch_matrix9_map_cli:

Google AdInline article slot
  • raw: raw GPIO levels.
  • mapping: calibration of logical zones 0–8 to physical pins (saved to NVS).
  • path: recording and output of trajectory.
  • demo h1: verification against reference (OK/FAIL).
> mapping
Press cell 0: [touch GPIO5]
Press cell 1: [touch GPIO6]
... (9 cells)
Mapping saved to NVS

> path
[trace 0-1-2] -> path: 0>1>2

> demo h1
OK (expected: 0-1-2)

The prototype confirms recognition without false triggers in basic tests.

Use Cases

  • Entering a room: cell 4 — main light, swipe top row — all off, diagonal — "away" (light/shades/climate).
  • By the bed: corners — left/right sconce, center — nightlight, down — "sleep".
  • Utility room: large gestures for light/ventilation with gloves.
  • Offline mode: gesture → relay on MCU, no network.

Limitations and Additions

  • Learning gestures (realistic for 3–5 commands).
  • Risk of false positives (humidity, accidental touch) — not for locks without confirmation.
  • No feedback — add LED statuses.

The matrix is a local remote for quick actions, complementing screens/apps.

Key Takeaways

  • The 3x3 matrix encodes dozens of mnemonic trajectories in a switch format.
  • TTP223 + MCU provide simple implementation without a screen or network.
  • CLI debugging (mapping, path, demo) speeds up prototyping.
  • Niche: between mechanics (1–2 commands) and screens (slow).
  • Limitations: learning curve, false positives, no built-in feedback.

— Editorial Team

Advertisement 728x90

Read Next