Post Go back to editing

CN0540 + DE10-Nano IEPE acquisition: amplitude discrepancy and calibration questions

Thread Summary

The user is experiencing a 3x amplitude discrepancy (30 mVpp vs 100 mVpp) when using a PCB IEPE accelerometer with the CN0540 and AD7768-1 on a DE10-Nano. The final answer suggests using IIO-Oscilloscope with CN0540 plug-ins for initial setup and verification, and experimenting with CN0532-style calibration to address the issue. The recommended approach includes zero-offset calibration and verifying the waveform in IIO-Oscilloscope.
AI Generated Content
Category: Software
Product Number: cn0540
Software Version: ADI 2023_R2

Hello,

I would like to ask for advice regarding data acquisition with an IEPE accelerometer using the CN0540 board on a DE10-Nano.

System setup

  • DAQ: DE10-Nano + CN0540 (AD7768-1)

  • Sensor: PCB IEPE accelerometer, sensitivity 100 mV/g

  • Acquisition environment: Linux (no IIO Oscilloscope GUI, user-space data collection and file logging)

  • Software/versions: ADI 2023_R2

    • boot_2023_r2_2025_03_18

    • HDL git sha: d146370c1

    • Linux git sha: 2e8908932dfd

Issue description

When driving the sensor on a shaker at 1 g:

  1. Using a PCB IEPE signal conditioner + oscilloscope, the signal is about 100 mV (peak-to-peak), which matches the 100 mV/g specification.

  2. Using DE10-Nano + CN0540, under the same condition, the measured data shows only about 30 mV (peak-to-peak).

So the measured amplitude with CN0540 is roughly 3× smaller than expected.

I’m wondering whether any additional calibration or configuration is required to obtain the correct physical units.

Environment and code overview

Below are key snippets from my acquisition code (C):

(1) ADC setup

int sys = open(dir, O_RDONLY | O_DIRECTORY); if (sys >= 0) { write_sysfs_rel(sys, "scan_elements/in_voltage0_en", "1"); write_sysfs_rel(sys, "sampling_frequency", "4000"); close(sys); }

(2) CN0540 IEPE power and control

int g = open("/sys/bus/iio/devices/iio:device2", O_RDONLY | O_DIRECTORY); if (g >= 0) { write_sysfs_rel(g, "out_voltage0_raw", "1"); // IEPE power ON write_sysfs_rel(g, "out_voltage5_raw", "0"); // FDA Disable=0 write_sysfs_rel(g, "out_voltage6_raw", "1"); // FDA Mode=1 write_sysfs_rel(g, "out_voltage2_raw", "1"); // Shutdown=1 (active) close(g); }

(3) Board Gain Calibration

// DAC outputs ~1V, ADC average measured → compute attenuation board_gain = 1.0 / fabs(adc_v);

(4) Zero-offset Calibration

// Compute DAC correction code from measured offset int code = (int)llround(-offset_v / ds); write_sysfs_rel(dac_dir, "out_voltage0_raw", cb);

(5) Streaming

snprintf(cmd, sizeof(cmd), "iio_readdev -b %d -s 0 %s voltage0", IIO_BUF_LEN, dev); FILE *pipe = popen(cmd, "r");

(6) Conversion to voltage

int32_t s24 = ...; double phys = (scale != 0.0) ? (s24 * scale * board_gain) : s24; fprintf(cur, "%.9f\n", phys);

Questions

  1. Is an additional calibration step required (beyond Board Gain and Zero-offset) to get accurate voltage or g values for IEPE sensors using CN0540 + AD7768-1?

  2. Is my Board Gain Calibration method valid? (1 V DAC output → measure ADC → compute 1/fabs(adc_v))

  3. Are there any recommended CN0540 front-end settings (FDA_MODE, FDA_DIS, SHUTDOWN, IEPE bias) or required IIO/sysfs attributes to ensure the correct gain and amplitude?

  4. Could the ~3× amplitude difference (30 mVpp vs 100 mVpp) be due to an internal gain/attenuation or filter stage in CN0540/AD7768-1?

  5. What is the recommended end-to-end procedure (power-up order, IEPE bias stabilization, use of in_voltage_scale, etc.) to correctly convert raw codes to physical units?

Notes

  • I confirmed that the same sensor + conditioner + oscilloscope gives correct amplitude.

  • I suspect a gain path or mode setting issue in the CN0540 front-end.

  • Any advice or reference configuration would be greatly appreciated.

Thank you in advance for your help.

Questions (Summary)

  1. When using the CN0540 + AD7768-1 combination with an IEPE sensor, is any additional calibration process required?
    (Currently, only Board Gain Calibration and Zero-offset Calibration are applied.)

  2. Is my current Board Gain Calibration method — generating 1 V from the DAC, measuring the ADC average, and computing 1/fabs(adc_v) — considered correct or recommended?

  3. Among the CN0540 control settings such as FDA_MODE, FDA_DIS, SHUTDOWN, and IEPE bias, are there any recommended combinations or required sysfs attributes to ensure proper operation and scaling?

  4. For the same sensor under 1 g excitation, the measured amplitude differs (30 mVpp with CN0540 vs. 100 mVpp with Signal Conditioner). Could this difference be caused by internal attenuation, gain path configuration, or filter characteristics within the CN0540 or AD7768-1?

  5. What is the recommended end-to-end procedure for accurately converting CN0540 + AD7768-1 data into physical units (V or g)?
    For example: correct power-up sequence, IEPE bias stabilization time, and how to use in_voltage_scale for proper scaling.

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.