You’d be hard pressed to find a public restroom that wasn’t packed full of hands free technology these days. From the toilets to the sinks and paper towel dispensers, hands free tech is everywhere in modern public restrooms.
The idea is to cut down on the spread of germs. However, as we all know too well, this technology is not perfect. We’ve all gone from sink to sink in search of one that actually worked. Most of us have waved our hands wildly in the air to get a paper towel dispenser to dispense, creating new kung-fu moves in the process. IR simply has its limitations.
What if there was a better way? Check out [Ackerley] and [Lydia's] work on gesture recognition using ultrasound. Such technology is cheap and could easily be implemented in countless applications where hands free control of our world is desired. Indeed, the free market has already been developing this technology for use in smart phones and tablets.
Where a video camera will use upwards of 1 watt of power to record video, an ultrasound device will use only micro watts. IR can still be used to detect gestures, as in this gesture based security lock, but lacks the resolution that can be obtained by ultrasound. So let us delve deep into the details of [Ackerley] and [Lydia's] ultrasound version of a gesture recognizer, so that we might understand just how it all works, and you too can implement your own ultrasound gesture recognition system.
Most of us are aware of the Doppler Effect – the compressing and stretching of waveforms as the source moves toward or away from a point. Consider a device that consists of a tone generator above the 20kHz human ear threshold (ultrasound) and a microphone transducer that would react to reflections of the ultrasound waveform. If an object, such as a hand, were moving toward the device, the reflected waveform would experience a Doppler shift. Such a shift would be seen by the microphone. The same would happen if the object were moving away from the device. This frequency shift can be calculated by:
In order to determine if an object is moving toward or away from the device, you must compare the outgoing and incoming frequencies. [Ackerley] and [Lydia] decided to use the Fast Fourier Transform equation to do this – the same technique used by Microsoft’s Sound Wave, which inspired their project. Unfortunately their assigned processor, the Atmel 1284p, would not be able to handle the Fast Fourier Transform AND signal acquisition at the same time. It was just not fast enough. Stumped, their instructor suggested a clever idea. An idea that will open up gesture recognition via ultrasound to the world of the 8 bit micro controller. You see, instead of doing the frequency comparison on the resource limited digital side, do it on the analog side with an AD633 Analog Multiplier IC (pdf warning).
It turns out that if you multiply two sine waves, you will get two different products. One will be the difference and the other will be the sum of the two waveforms. There is beauty in this. Our paradigm has shifted. This single 8 pin IC can determine the difference in frequency between the incoming and outgoing signals. Consider an outgoing frequency of 24kHz. Now consider a hand moving toward the device creating a Doppler shifted frequency of 24.1kHz. The output of the AD633 would be 1kHz and 48.1kHz. The 48.1kHz is easily filtered away and you are left with the 100Hz, or the difference between the incoming/outgoing frequencies that an 8 bit micro controller can easily sample.
Now a keen eye will see that the Doppler shifted frequency only reveals magnitude, and not direction. [Ackerley] and [Lydia] solve this problem by observing subtle changes in amplitude of the difference frequency. Many more details of how this is done can be found in the linked article. The image below show’s their algorithm in the Atmel detecting a “pull” motion.
The genius of this project is that a viable gesture recognition system can be implemented with cheap components. The approach of doing a similar system with a PC or smart device would be different. We would like to see the microcontroller side pushed further. Imagine a system in an elevator where the passenger could “draw” the number to the floor he or she wanted to go to. Or a paper towel system that would dispense towels as we twirled our hand, and stop when we stopped twirling. Or a sink that could change water temperature with a simple gesture. Such systems, using the technology designed by [Ackerley] and [Lydia], should be possible.