# Ten seconds to know whether a MEMS accelerometer really works | OneStack

> Case study: a bench and firmware that tell in seconds whether a MEMS accelerometer is present and well coupled to the structure, even with the machine running.

URL: https://www.onestack.it/en/case-studies/mems-sensor-10s-test

[← All case studies](/en/case-studies)Test systems for high-reliability applications

# Ten seconds to know whether a MEMS accelerometer really works

A bench and firmware that say yes or no on whether a MEMS accelerometer is present and well coupled to the structure, even in the hands of a non-specialist operator and with the machine running.

![3D render of the test bench: two steel plates clamped by tie rods with the discs and the boards inside, handles on the sides and the actuator on top](/_astro/banco-mems.BVjo7je3_Z2tCAuW.webp)![](/_astro/banco-mems-xray.CArss8sQ_Z1wwNRX.webp)

\> 40 dB

signal-to-noise ratio in every configuration

~10 s

test duration, with a yes/no result

23 dB

margin on the acceptance threshold

Test bench

**Generator and amplifier**pure tones at chosen frequencies

**Actuator and structure**steel plate · modal analysis

**MEMS accelerometers**two accelerometers on SPI with FIFO

**Measurement firmware**lock-in detection · double threshold

**Operator software**self-test · yes/no result

## The context

The client installs MEMS accelerometers on structures that differ from one another. After installation a simple confirmation is needed: is the accelerometer there, does it work, is it firmly attached to the structure? Whoever runs the check is not a measurement specialist, and the test must give a yes or no in a few seconds. The structures are part of mission-critical systems: a poorly attached accelerometer must not pass the check.

## The problem

An accelerometer that is “alive” but badly attached still returns data: the defect is invisible by eye. Moreover, every structure has its own resonances, and background noise in an industrial environment can easily drown a weak test signal.

## Technical choices, and why

**Pure-tone excitation instead of broadband.** With a tone at a known frequency, all the test energy is where we look for it, so little power is enough to rise above the noise.

**Frequencies chosen through modal analysis.** Before fixing the tones we studied the resonances of the test structure with automated sweeps and chirps. The tones fall away from resonances, so the response depends on how the accelerometer is coupled, not on the shape of the structure.

**Lock-in detection on the microcontroller.** The firmware multiplies the accelerometer signal by a reference at the tone frequency and averages it: everything not at the test frequency, machine noise included, cancels out.

**A double threshold: amplitude and signal-to-noise ratio.** A badly attached accelerometer responds more weakly, a faulty one responds with noise. With both thresholds we catch both cases.

**Two phases.** A one-off calibration for each type of structure, then the ten-second operational test, always the same for the operator.

**Two accelerometers read in parallel** over SPI, with FIFO and double buffering, without losing samples.

## How we verified it

-   Automated sweeps and chirps with a generator and oscilloscope driven over SCPI.
-   Monte Carlo simulation to measure noise robustness: the test stays reliable up to 19 mg of added noise, against 1–10 mg typical of an industrial environment.
-   Operator software with self-test and automated tests.

## The result

Signal-to-noise ratio **above 40 dB** in every configuration tested, a test of about **10 seconds** with a yes/no result and a **23 dB margin** on the acceptance threshold.

## What we bring to your projects

Signal processing on the microcontroller, test bench design, measurement automation and tests designed for the people who run them every day.

## Services

-   Firmware development

## Technologies

-   MEMS accelerometer
-   SPI with FIFO
-   Lock-in detection
-   Modal analysis
-   Monte Carlo
-   C# WPF
-   SCPI
-   xUnit

## More case studies

[

![3D render of the control board: microcontroller in the centre, connectors for the two isolated channels on the side, pluggable terminal blocks and power and service connectors](/_astro/interfaccia-rugged.CkQk4iYb_1A6Ozp.webp)![](/_astro/interfaccia-rugged-xray.CZb6dpZZ_Z1kxhOu.webp)

23 tests in ~75 s

Systems for harsh environments

### A rugged interface that updates in the field and never bricks

A portable, battery-powered unit that powers and controls two remote devices over isolated channels. The hard part was making it reliable far from any lab. Its firmware updates in the field and, if something goes wrong, rolls back on its own to the last working version.

Read the case →

](/en/case-studies/rugged-interface-secure-ota)[

![3D render of the measurement bench: the sensor under test and three boards inside a black anodised aluminium housing, with two BNC connectors and an M12 connector](/_astro/banco-sensore-capacitivo.DpjM9RDJ_2dpT9y.webp)![](/_astro/banco-sensore-capacitivo-xray.CdoncSBR_Z1LXalp.webp)

~1.4%

Test systems for high-reliability applications

### The test method would not have worked. We found out before building it

A bench that tells in seconds whether an electric-field sensor works, measuring capacitances of a few picofarads in air. The method planned at the start was ruled out with measurements, before any money went into hardware.

Read the case →

](/en/case-studies/capacitive-sensor-test)[

![3D render of the Bluetooth Channel Sounding anchor board: nRF54L15 SoC with chip antenna, accelerometer, power from USB-C or a 12–24 V terminal block](/_astro/ancora-ble.Ckke5SRn_1319HC.webp)![](/_astro/ancora-ble-xray.yah8tbey_Z2nf2oG.webp)

3 layers

Retail and large public spaces

### Indoor localization in shopping centres, without collecting personal data

Counting and following people flows in large public spaces, and locating with centimetre precision only what needs it. A three-layer architecture, each layer with the right radio technology.

Read the case →

](/en/case-studies/indoor-localization)

## Got a deadline?

Tell us about your project: within 48 hours you get a proposal with phases and dates. If needed, we sign an NDA before seeing your files.

[Request a proposal](/en/contact)[Urgent? Call +39 030 535 7183](tel:+390305357183)
