Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirMouse — Bluetooth HID Mouse Glove

A wearable glove-based Bluetooth mouse. Wrist tilts move the cursor, two push buttons handle clicking, holding, dragging, and scrolling — all powered by an ESP32 and an MPU6050 IMU, broadcasting as a standard BLE HID mouse. No drivers, no dongle, no flat surface required.

Made By : Kushagra Baranwal (241220032)

AirMouse demo — wrist-tilt cursor control


Why

Traditional mice need a flat surface. That's a problem during presentations, for mobility-impaired users, or in remote-control scenarios. AirMouse replaces the surface with your wrist.

Applications

Because AirMouse controls the cursor through wrist motion rather than surface contact, it fits scenarios where a traditional mouse is awkward or unusable:

  • Presentations on large screens / projectors — walk away from the podium and still drive the cursor from across the room, instead of being tied to a desk-bound mouse or fumbling with a laser pointer that can't click.
  • Classroom and lecture teaching — a teacher can annotate slides, scroll through material, or highlight content on a projected screen while facing the class, without turning back to a laptop to move the mouse.
  • Home theatre / smart TV control — navigate a media center or smart TV UI from the couch without a trackpad remote.
  • Accessibility — for users with limited fine motor control or difficulty operating a standard mouse on a flat surface, wrist-tilt control offers an alternate input path; BOOT-button pause and the shake-to-recenter gesture help prevent unwanted cursor drift.
  • Clean-room / sterile environments — labs, kitchens, or medical settings where touching a shared physical mouse is undesirable; the glove-based interface keeps hands free of surface contact.
  • Remote/robotics control interfaces — since it broadcasts as a standard BLE HID mouse, it can double as a lightweight gesture controller for any software that already accepts mouse input (e.g. driving a cursor-based robot dashboard).

Features (Phase 2)

Feature Trigger Behavior
Cursor movement Wrist tilt Gyro rate → mouse delta X/Y
Left click Left button short press Gyro frozen during the click
Left drag Left button hold (>180ms) Gyro active, button held
Right click Right button short press Buffered 280ms to rule out a double-click
Right drag Right button hold (>180ms) Gyro active, button held
Scroll mode toggle Right button double-click No click sent to host — no context-menu popup
Pause / resume BOOT button Freezes cursor entirely
Recenter Sharp wrist shake (>2.5g) Zeroes cursor, 1.5s cooldown
Deadzone filtering Rates below 10°/s zeroed to kill drift

Phase 2 replaced flex sensors with push buttons for more reliable click detection, and fixed a right-click popup bug via double-click buffering.

Hardware

Component Interface Notes
ESP32 Dev Board BLE HID host Dual-core, 240MHz
MPU6050 I2C (SDA→GPIO21, SCL→GPIO22) 6-axis gyro + accel, default addr 0x68
Left button GPIO32 (INPUT_PULLUP) Left click / hold-drag
Right button GPIO33 (INPUT_PULLUP) Right click / hold / double-click
BOOT button GPIO0 (INPUT_PULLUP) Pause / resume toggle

All buttons use internal pull-ups — pin reads LOW when pressed, no external resistors needed. MPU6050 draws power directly off the ESP32 3.3V rail; total draw is ~80mA during active BLE transmission.

Wiring

MPU6050    VCC -> 3.3V   GND -> GND   SDA -> GPIO21   SCL -> GPIO22
Left btn   one leg -> GND   other leg -> GPIO32
Right btn  one leg -> GND   other leg -> GPIO33
BOOT btn   onboard, GPIO0

How it works

Click vs. hold. On press-down, nothing is sent immediately. If the button releases before HOLD_THRESHOLD_MS (180ms), it's a click. Past that threshold, it transitions to a hold — the button-down HID event fires once, and the gyro becomes active for dragging.

Double-click scroll toggle, without the popup bug. Sending a right-click immediately on press and then checking for a second press causes the OS to briefly show a context menu before scroll mode kicks in. Instead, this firmware buffers: on first release it starts a DCLICK_WINDOW_MS (280ms) timer and sends nothing. A second press inside that window toggles scroll mode with no click ever sent to the host. If the window expires with no second press, the single right-click fires then. The OS never sees a right-click during a double-click, so no popup ever appears.

Gyro freeze during clicks. While a button is in its short-press zone, gyroActive() returns false — this stops the cursor from jumping mid-click. It's active again during drags and in scroll mode.

Tuning

All pin assignments and tuning constants live in config.h, separate from the sketch logic in AirMouse.ino:

Constant Default Effect
SENSITIVITY_X / SENSITIVITY_Y 0.3 Pixels per deg/s
DEADZONE_RATE 10.0°/s Below this, gyro rate is zeroed
HOLD_THRESHOLD_MS 180ms Click vs. hold/drag boundary
DCLICK_WINDOW_MS 280ms Double-click detection window
SCROLL_SENSITIVITY 0.05 Deg/s → scroll ticks
RECENTER_G_THRESH 2.5g Shake magnitude to trigger recenter
LOOP_DELAY_MS 5ms ~200Hz update rate

Quick reference if something feels off: cursor creeping at rest → raise DEADZONE_RATE; cursor too slow/fast → adjust SENSITIVITY_X/Y; double-click hard to trigger → raise DCLICK_WINDOW_MS; scroll too fast → lower SCROLL_SENSITIVITY.

Setup

  1. Install the ESP32 board package in the Arduino IDE.
  2. Install MPU6050_light — either via Library Manager, or copy it straight from libraries/ in this repo (see libraries/README.md for exact versions and setup).
  3. Wire the MPU6050 and buttons per the diagram above.
  4. Open firmware/AirMouse/AirMouse.ino in the Arduino IDE (it will pick up config.h automatically from the same folder) and flash it to the ESP32.
  5. Open Serial Monitor at 115200 baud. Hold the device still for ~3s while it calibrates gyro/accel offsets.
  6. Pair "AirMouse" from your host's Bluetooth settings — works on Windows, macOS, Linux, and Android with no drivers.

Cost

~₹729–749 in parts (ESP32, MPU6050, buttons, breadboard, glove) — well under commercial gesture mice, which start around ₹1500.

Limitations

  • MPU6050 gyro drift requires periodic recalibration; no onboard temperature compensation.
  • USB-tethered power only in this phase — no battery yet.
  • Breadboard prototype isn't durable for extended wear.
  • BLE range and latency are a step behind USB.

Roadmap

  • Phase 3: Custom PCB, Li-Po battery + USB-C charging, 3D-printed enclosure, basic mobile config app.
  • Phase 4: Flex-sensor finger gestures, adaptive gesture recognition, multi-host pairing.
  • Phase 5: Manufacturing feasibility, open-source build guides.

Repo structure

AirMouse/
├── firmware/AirMouse/
│   ├── AirMouse.ino   # main sketch — BLE setup, button state machine, gyro loop
│   └── config.h       # pins, tuning constants, timing thresholds
├── libraries/          # vendored dependencies (MPU6050_light, ESP32 BLE)
├── hardware/          # wiring diagrams, BOM
├── docs/               # presentation, requirements
└── README.md

Acknowledgements

Thanks to Mir Asrar and Priyanka Jintikar for their guidance on this project.

About

A wearable Bluetooth HID mouse - control your cursor with wrist tilts via ESP32 + MPU6050. No drivers, no dongle, no flat surface required.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages