This project walks you through building an ESP32-based air mouse using an MPU6050 motion sensor and Bluetooth. The setup enables basic cursor control through hand movements, without the need for a traditional mouse or touchpad.
Components Required
- ESP32 Development Board
- MPU6050 Accelerometer and Gyroscope Module
- LDR (Light Dependent Resistor)
- 56kΩ Resistor
- LiPo Battery
Circuit Setup
ESP32 Air Mouse Hardware Assembly
Step 1: Perfboard Preparation
A small piece of perfboard was cut and its edges filed smooth for easier handling.
Step 2: Component Placement
The MPU6050 was placed directly under the ESP32 to save space, leaving room below for a Velcro tie. The LDR was mounted on the side, and the ESP32 was raised to fit the LiPo battery underneath.
Step 3: Soldering
Due to the tight layout, thin wire strands were used for connections. Kapton tape helped insulate crossing wires, maintaining a clean and compact setup.
Step 4: Powering Up
A LiPo battery was connected and placed under the ESP32. After powering on, the device worked as expected.
Next, the device can be programmed for gesture-based control.
Arduino Code for ESP32 Bluetooth Air Mouse
The ESP32 is programmed using the Arduino IDE to read motion data from the MPU6050 and translate it into cursor movement via Bluetooth HID. The LDR input can be used to enable or disable the mouse function or change cursor modes.
Applications and Use Cases
- Accessibility: Can assist users with limited mobility
- Basic gesture control: Offers an alternative input method
- Smart device interaction: Can be extended to control simple home automation tasks
- Educational: Useful for learning sensor integration and Bluetooth with ESP32
For full assembly details and code: ESP32 Air Mouse using Bluetooth and MPU6050
No comments:
Post a Comment