Skip to content

Plot motion in realtime webapp using ultrasonic doppler sensing via microphone and speakers

Notifications You must be signed in to change notification settings

jake-g/ultrasound-motion-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ultrasound Motion Detector

Plays ultrasonic (>20k Hz sinusoid) from computer or phone speakers and measures Doppler shift response via microphone. See ultrasound_doppler.js for algorithm details, and plotter.js for plot configuration.

Webapp Options

  • toggle doppler: Toggle the algorithm.
  • toggle synth: Toggle and audible synth to play tones proportional to the motion. Like a theramin!
  • toggle gate: Clamps motion to 0 if its magnitude is below a threshold
  • toggle fullscreen: Entry or exit fullscreen browser.

Theory

doppler shift equation

Motion near (within a few meters) the microphone/speaker will induce a measurable Doppler shift to the emitted source sinusoid. The received sinusoid's change in frequency is proportional to the magnitude of motion. Information about the direction of the motion relative to the speaker/microphone pair can also be extracted based on the sign of the change in frequency. More info in the linked paper.

Ultrasound Doppler Algorithm

A sinusoid of ultrasonic frequency is emitted via the speakers and received via the microphone. The change in frequency between the emitted sinusoid frequency and the perceived sinusoid is computed in realtime and converted to a unitless motion magnitude using Doppler shift principles

Ultrasound Frequency Initialization

The ultrasound sinusoid is initialized by sweeping 19 kHz to 22 kHz and choosing a frequency that has low ambient noise.

Credits

Algorithm based on doppler which is pasted on the research from the Ubicomp lab. The plotting display uses the smoothie.js charting javascript library. Doppler equation image from hyperphysics.

About

Plot motion in realtime webapp using ultrasonic doppler sensing via microphone and speakers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published