Using the Doppler Effect for Motion Sensing, Browser Scrolling...

Description

I saw today's project this past Saturday from Daniel Rapp and it bumped everything else, just had to share this. First, it currently works in Chrome, yeah, yeah... I know...but use Chrome to best see this work... But it IS a Microsoft Research paper.

What's also cool is that this is all driven via JavaScript...

Motion sensing using the doppler effect

image

Recently I stumbled upon an interesting paper for implementing motion sensing requiring no special hardware, only a speaker and mic! Unfortunately the paper didn't include code to test it, so I decided to reproduce it here on the web!

What is the doppler effect?

First of all, what is the doppler effect? The doppler effect is a physical phenomenon which affects waves in motion. The standard example is the effect on a fire engine siren as it quickly drives past. When it moves towards you the sound waves are compressed, and so the frequency becomes higher, and when it moves away from you the frequency becomes lower.

...

Applications

Now for the fun applications!

Motion sensing

The most obvious application for this is motion sensing. Below I've calculated the left and right bandwidth of the 20 kHz region (defined as the number of frequencies to the left and right that are within 99.9% in amplitude of the 20 kHz tone). I've then attached their difference to the size of the box.

...

Scrolling

A cool application to motion sensing, as suggested by the SoundWave paper, is scrolling (see the video above). Click below to try it out.

Start hands-free scrolling

This implementation doesn't have the double-tap feature for reversing the scrolling-direction, instead it's just using the left and right bandwidth-difference. Thus if you want to scroll down you have to move your hand quickly towards the computer, and slowly away from the computer.

...

Library

Did this give you any ideas? I also created a small library to play around with this. Just run

  doppler.init(function(bandwidth) {
var diff = bandwidth.left - bandwidth.right;
});

to start experimenting.



Tag:

Coding4Fun

The Discussion

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.