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.
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.
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.