Skip to content
Language:en

Doppler effect experiment

Hear the Doppler effect: a moving tone changes pitch, and the frequency shift gives the speed of the source.

Play a steady tone on another device (for example with the tone generator), type its frequency, press Start, then move the source.

Readings are processed on your device only: nothing is recorded or sent unless you export it.

Frequency heard
—
Shift
—
Speed of the source
—
Speed (km/h)
—

Listening for the tone…

Positive speed: the source comes closer. v = c (1 − f₀ / f).

Runs entirely in your browser. Your files never leave your device.

About this tool

The siren of an ambulance sounds higher while it comes towards you and lower once it has passed: that is the Doppler effect. Recreate it with two phones. On the first, play a steady tone, for example 2000 Hz with our tone generator, then swing it on a string, carry it while walking or rolling past. On the second, open this page and press Start.

The microphone tracks the pitch it hears around the expected frequency with sub-hertz precision. When the source approaches, the frequency rises; when it moves away, it drops. From the shift the page computes the speed of the source: v = c (1 − f0 / f), positive when it comes closer. At walking pace the shift is only a few hertz, so keep everything else quiet.

How it works

  1. Play a steady tone on a second device and type its frequency.
  2. Press Start and allow the microphone.
  3. Move the source towards and away from the phone.
  4. Read the frequency shift and the speed.

The strongest frequency within ±15 % of the source frequency is found by FFT with parabolic interpolation. The speed of sound follows the air temperature you enter.

Worked example

One phone plays 2000 Hz with the tone generator while a friend walks toward the second phone at a brisk 1.5 m/s. The page hears about 2008.8 Hz and computes v = 343 × (1 − 2000 ÷ 2008.8) ≈ 1.5 m/s. As the friend walks away, the pitch drops to about 1991 Hz.

Swinging the source on a string in a circle makes the frequency rise and fall at each turn.

Good to know

  • Use a high tone (2000 to 4000 Hz): the shift in hertz is larger and easier to measure.
  • Keep the room quiet; other sounds near the test frequency disturb the tracking.
  • Tie the phone securely before swinging it, and swing over a soft surface.

Frequently asked questions

Which frequency should I use?
Between 1000 and 4000 Hz works well: high enough for a clear shift, low enough for phone speakers. 2000 Hz is a good start.
Why is the speed noisy?
At 2000 Hz, 1 m/s shifts the pitch by only about 6 Hz. Move faster, reduce background noise and keep the tone loud and steady.
Does it work with a car horn?
Only if you know the horn’s true frequency at rest. Measure it first with the source still, then type that value.