Skip to content

ADS1256 Sampling

The ADS1256 is a 24-bit delta-sigma ADC with an internal 8-channel MUX. The firmware uses it in differential mode to read three geophone channels and packs the results into the RS-422 data stream at the configured sample rate.


ADS1256 Differential PairSEED ChannelGeophone Orientation
AIN0 / AIN1EHZVertical
AIN2 / AIN3EHNNorth–South
AIN4 / AIN5EHEEast–West

Channel assignments are defined in config.yml via the adc_channel field (0, 1, 2) and are pushed to the MCU at startup as part of the Settings Handshake.


The ADS1256 has a one-conversion pipeline delay: when you write a new MUX register the change takes effect on the next conversion, not the current one. This means a naive 3-call loop would read:

Call 1 → MUX=Z → ADC still settling from previous → WRONG
Call 2 → MUX=N → reads Z
Call 3 → MUX=E → reads N

The firmware solves this with four calls per output sample, discarding the last result:

  1. cycleDifferential(AIN0/AIN1) — MUX set to Z; ADC returns previous channel (discard on very first loop).
  2. cycleDifferential(AIN2/AIN3) — MUX set to N; ADC returns Z ✅.
  3. cycleDifferential(AIN4/AIN5) — MUX set to E; ADC returns N ✅.
  4. cycleDifferential(AIN0/AIN1) — MUX back to Z; ADC returns E ✅. Discard this result.

After the 4th call the MUX is primed at channel 0 again, and the cycle repeats cleanly.


The ADS1256 output data rate (DRATE) must be fast enough to complete three differential conversions within one output sample period.

Each conversion takes 1 / DRATE seconds. With 3 channels (plus the discard call = 4 total) and a 10 % SPI overhead margin:

Rearranging:

The settings validator in rpi-seism-common enforces the stricter ×13 rule (9 filter cycles × 1.10 safety margin → rounds up to 13) to guarantee stable settling:

Output rateMinimum DRATERecommended setting
100 Hz1300 SPSDRATE_2000SPS (index 11)
200 Hz2600 SPSDRATE_3750SPS (index 12)
500 Hz6500 SPSDRATE_7500SPS (index 13)

The ADS1256 includes an integrated PGA that sets the input voltage range. For the GD-4.5 + LT1167 signal chain with ~×5.5 analog gain, the geophone signal rarely exceeds ±20 mV. The default setting is:

EnumIndexInput rangeUse with
PGA_646±78.125 mVGD-4.5 + LT1167 (~×5.5 gain)
PGA_325±156 mVGD-4.5 direct or low-gain amp
PGA_83±625 mVHigh-output piezo sensors

The ADS1256 reference voltage directly sets the ADC full-scale range and appears in the StationXML sensitivity calculation:

The default vref = 2.5 V with PGA_64 yields approximately 215,384,678 counts/V before the instrument sensitivity factor.


On startup (before the first reading) the firmware should trigger an ADS1256 self-calibration (SELFCAL command) to zero out internal offset and gain errors. This is particularly important after power-on temperature transients. The calibration takes ~2 ms at 2000 SPS and is invisible to the daemon due to the 2 s boot delay in the handshake sequence.