Back to the 2025 paper

Module 5: Data Processing

20257m

A microcontroller system needs to store real-time vibration data at 10 kSamples/s, each sample being 16 bits.
(i) Calculate the minimum memory size required for storing 5 minutes of data.
(ii) Suggest a suitable data storage interface (SPI/I2C/Parallel) and justify with bandwidth calculations.

Worked SolutionAI Assisted

Solution: Vibration Data Storage Calculation

Given:

  • Sampling rate = 10 kSamples/s = 10,00010,000 samples/s
  • Sample size = 16 bits = 2 bytes/sample
  • Duration = 5 minutes = 300 s

(i) Minimum Memory Required

Data rate:

10,000×16=160,000 bits/s10,000\times16=160,000\text{ bits/s}

Convert to bytes/s:

160,0008=20,000 bytes/s\frac{160,000}{8}=20,000\text{ bytes/s}

For 300 seconds:

20,000×300=6,000,000 bytes20,000\times300=6,000,000\text{ bytes}

Therefore:

6,000,000 bytes6 MB\boxed{6,000,000\text{ bytes}\approx6\text{ MB}}

Using binary units, this is approximately:

6,000,0001,048,5765.72 MiB\frac{6,000,000}{1,048,576}\approx5.72\text{ MiB}

So at least 6 MB decimal storage is required, excluding filesystem overhead and metadata.

(ii) Suitable Interface

The raw required throughput is:

20,000 bytes/s=20 kB/s20,000\text{ bytes/s}=20\text{ kB/s}

or:

160 kbps=0.16 Mbps160\text{ kbps}=0.16\text{ Mbps}

SPI

SPI is the best choice among the given options for a typical embedded data logger because it provides high throughput with simple hardware and is widely supported by SD cards and external memory.

Even a modest SPI clock of 1 MHz can theoretically transfer:

1 Mbit/s=125 kB/s1\text{ Mbit/s}=125\text{ kB/s}

which is well above the required 20 kB/s, leaving margin for protocol and storage overhead.

I²C

I²C is convenient for sensors and EEPROMs, but its lower typical speed makes it less attractive for continuous high-rate storage.

Parallel

Parallel interfaces can provide high throughput but require more pins and hardware complexity.

Final Answer

  • Minimum data storage: 6,000,0006,000,000 bytes ≈ 6 MB
  • Raw data rate: 0.16 Mbps = 20 kB/s
  • Recommended interface: SPI, because it easily provides sufficient bandwidth with low pin count and is well suited to SD-card/external-memory logging.

Similar questions