Touchless Mouse

Components and supplies

About this project

This project implements a touchless mouse.

The Bitcraze flow breakout contains an optical flow sensor that is able to sense how things are moving in front of it and a ranging sensor to sense the distance to the nearest object. The flow sensor is essentially an optical mouse sensor fitted with a lens focused to track objects far away.

The touchless mouse can detect that a hand is approaching and detect how it is moving, the movements are translated into mouse movements by an Arduino.

By using an Arduino Leonardo (or any other USB device-compatible Arduino) this project is seen as a regular mouse so it works out of the box on any computer.

Hardware setup

The flow deck is connected to two busses of the Arduino:

The PMW3901 optical tracking sensor is connected to the SPI bus

The VL53 ranging sensor is connected to the i2C bus

We also need to power the flow deck, this is done by connecting it to the 5V and GND pin of the Arduino. Note that on Arduino Leonardo, the SPI bus is only accessible on the ICSP pin header.

When an object is detected by the ranging sensor, at a distance between 80mm and 200mm, the movement measured by the flow sensor is sent as mouse movement. When the detected object is below 50mm we press the mouse button. The reason to keep 50mm to 80mm without motion detection and click is to make sure that the mouse is clicking without any movement: without this gap the mouse was always moving a bit when the hand goes down to click.