Use your hand in the air and play the arcade game using the EFM32 Wonder Gecko development kit!
The goal was to create touchpad replacement that will allow controlling applications by moving hand above the device. Basic functionality is to control cursor x, y position by moving hand that hovers above the sensor but it could be possible to implement gesture recognition like swiping.
Principle of operation consists in measuring light reflected from object. There are three IR LEDs that are consecutively turn on for short period of time and emits light which then reflected from hand (or other object) comes to sensor. Amount of light going to IR sensor depends on hand position – when it is closer to LED, it increases.
To achieve best performance and high measurement rate dedicated part from Silicon Laboratories was used: Si1143 proximity sensor. This has tiny package and very easy implementation.
Si1143 chip is controlled by means of I2C, has two infrared sensors, ambient light sensor, state machine that automates measurements and drives IR LEDs with configurable current. Measurement rate could be defined in wide range and can be set up to 100 times per second.
The device turns on infrared LEDs for about 26us one by one and measures light received by one of IR sensors. Once measurement is done, INT line goes down to inform MCU that new data are available. Digital sequencer could be programmed to repeat this process at specific rate to achieve best trade off between power consumption and responsiveness. LED current is configurable that also lets achieve best performance with lowest current. Specification says that it is possible to go as low as 12 uA for object presence detection using one LED at rate 800ms.
One of challenges was to solder Si1143. There was no time to prepare proper PCB, the chip have tiny package and it was very hard to attach leads to small pads. Below picture shows prepared device – wires thickness could be compared to visible bonding or to chip pads that are 0.3 mm wide.
Everything was assembled on prototyping board of Wonder Gecko Development Kit but other Gecko MCU could be used here as no specific peripherals are used.
There was prepared small Si1143 driver that initializes the chip in automatic measurement mode. When measurement is done, interrupt informs MCU and then driver can read three values that correspond to reflected light for every LED. Based on this information driver makes simple calculation and determines x, y position of hovering object. Driver is also able to detect absence of the object what is used to pause application and lowering the object which simulates touch press.
Below movie demonstrates two simple applications controlled by build pad.
This Hack a Gecko project is a result of a “fun hacking session” and are provided as is, free of charge with no guarantees or support from Energy Micro, to partially or fully show and demonstrate EFM32 Gecko microcontroller capabilities. Get inspired, use at own risk, and build some awesome and cool applications.”
For technical questions about this project, please use our support forum. The Hack-a-Gecko team will answer your questions directly.