Sampling Rate and Buffer Depth

From Mooshim Engineering Wiki
Jump to: navigation, search

The Mooshimeter app gives the user direct control over the sample rate and buffer depth of the meter. These parameters control how the meter takes a reading.

To generate a reading that is sent to the phone or stored in the log, the Mooshimeter takes BUFFER_DEPTH readings at SAMPLE_RATE, then performs analysis on the complete buffer depending on what analysis is selected. If DC analysis is selected (eg. if the user has selected VOLTAGE_DC), the meter takes the mean of the buffer and sends that to the phone. If AC analysis is selected, the meter takes the RMS value of the buffer and sends that to the phone.

By default, the app will autoselect appropriate sample rate and buffer depth for the kind of analysis being performed

  • For DC analysis, the meter will take 64 samples at 125Hz
  • For AC analysis, the meter will take 256 samples at 4000Hz