Table of Contents

Rechargeable Air Mouse

Author: Răducu Ioan Ștefan

Introduction

This project features a rechargeable air mouse, a handheld device that allows users to navigate a screen from a distance. It functions similarly to a standard mouse, featuring left and right-click buttons. However, the cursor is controlled by adjusting the device's angle and position. This creates a user experience similar to using a TV remote or a laser pointer.

The primary purpose of this device is to assist users during presentations. Beyond this, it serves a variety of other applications, such as interacting with digital whiteboards or operating a computer from across the room.

The inspiration for this project came while observing a professor using a laser pointer to highlight information on a projector. I realized I could develop a device that not only highlights but also allows the user to select text, draw, and navigate through slides.

These capabilities make the device ideal for professional presentations, creative tasks, and even free time activities.

General Description

The core of this project is the ESP32 DevKit V1 (WROOM-32D), featuring an integrated antenna for wireless communication. It interfaces with a computer via Bluetooth using the HID (Human Interface Device) protocol. For motion tracking, the microcontroller is connected to an MPU6050 (GY-521 module) using the I2C protocol.

The power system consists of a 3.7V LiPo battery connected to a TP4056 charging module. To meet the power requirements, an MT3608 step-up converter boosts the battery voltage to the 5V necessary for the ESP32 and the IMU. Additionally, the microcontroller is wired to monitor the battery's voltage levels in real-time.

User feedback and interaction are handled through LEDs, which display the battery status and operating mode, while buttons provide the main interface for computer interaction and power control.

Hardware Design

List of Components

Schematic

The circuit has a power assembly which has four power lines:

The rest of the circuit is buttons and LEDs for GPIO (using PWM and Interrupts), MPU-6050 (GY-521 Module) IMU for inertial measurement (using I2C). For power stability a 420uF bulk capacitor is used. A 100nF capacitor is present for filtering the ADC battery voltage reading.

ESP32 Pinout Configuration

ESP32 Pin Connected To Function Type Description
GPIO 34 VBAT_DIV Analog Input (ADC) Battery monitoring via 100k/100k voltage divider.
GPIO 33 Wake Button Digital Input (RTC) System wake-up button; triggers wake from Deep Sleep.
GPIO 13 Button 2 Digital Input General purpose tactile switch.
GPIO 14 Button 3 Digital Input General purpose tactile switch.
GPIO 25 Button 4 Digital Input General purpose tactile switch.
GPIO 26 Button 5 Digital Input General purpose tactile switch.
GPIO 27 Button 6 Digital Input General purpose tactile switch.
GPIO 32 Button 7 Digital Input General purpose tactile switch.
GPIO 22 MPU-6050 SCL I2C Clock Clock line for I2C communication.
GPIO 21 MPU-6050 SDA I2C Data Data line for I2C communication.
GPIO 19 MPU-6050 INT Digital Input Hardware interrupt signal from MPU-6050.
GPIO 15 LED 1 Digital Output Status LED (330Ω resistor).
GPIO 16 LED 2 Digital Output Status LED (330Ω resistor).
GPIO 17 LED 3 Digital Output Status LED (330Ω resistor).
GPIO 18 LED 4 Digital Output Status LED (330Ω resistor).
GPIO 4 LED 5 (PWM) PWM Output Intensity-controlled LED (330Ω resistor).
5V (Vin) MT3608 OUT+ Power Input Stabilized 5V from the step-up converter.
3V3 MPU-6050 VCC Power Output 3.3V supply for IMU and sensors.
GND Common Ground Ground Common reference ground for the whole circuit.

Hardware Notes

Hardware Tests

The first hardware test used is LED illumination on battery power. It checks the power assembly, ESP32 and LED integrity and wiring.

LED illumination on battery power

ioan_stefan_raducu_test1.jpg

The second test was testing the buttons, displaying which button was pressed using UART (while the battery is disconnected). The wake button works accordingly.

The third test was ADC reading trough the voltage divider. The test requires the battery being connected while the power assembly does not feed power to the ESP32. The wire connecting them was removed temporarily for this test. As we plug and unplug the battery, I could observe that the voltage rises to the expected voltage in one reading, slowly decreasing to zero after the battery is unplug. This test requires a hardware modification (one wire to disconnect) in order to work without risking burning either the project or the computer motherboard.

Software Design

Coming Soon

Results

Coming Soon

Conclusions

Coming Soon

Download

Coming Soon

Journal

Bibliografie/Resurse

Export to PDF