Experiment: Motion Stopwatch
The experiment "Motion Stopwatch" reacts to acceleration events like small shocks and measures the time inbetween. The acuracy depends on the speed of the accelerometer in your device and is typically of the order of 5ms to 20ms. The Experiment: Acoustic Stopwatch is very similar, but reacts on sound and is even more precise.
There are no special requirements.
There is no specific setup.
The analysis is not too complicated, but uses a few if-modules to decide how many events have already been counted. Otherwise, chunks of accelerometer data are analysed for their maxima and compared to the threshold. If the threshold is exceeded, we use the time of the maximum.
Problems and resolutions
- The stopwatch stops immediately after being triggered. In this case the vibration is too long. The experiment waits at least 100ms before accepting a second trigger, but if there is a ringing, this can be sufficient to stop the clock again. Try to increase the threshold or increase the minimum delay.
- Trigger events are missed. In this case you probably need to decrease the threshold, so all your noises are above the threshold. You can use the accelerometer experiment to check amplitudes.
- The watch triggers without any motion. In this case you probably need to increase the threshold, so it is not triggered by the background noise. You can use the accelerometer experiment to check amplitudes.