CN0532 vibration sensor board

The adi.cn0532.cn0532 interface extends the CN0540 data-acquisition interface for the CN0532 vibration sensor board and its ADXL1002 accelerometer. It inherits CN0540 buffered acquisition, sample-rate, bias-voltage, and GPIO controls and adds automatic offset calibration.

Capture vibration data

import adi

sensor = adi.cn0532(uri="ip:192.168.2.1")
sensor.sample_rate = 256000
sensor.rx_buffer_size = 4096

acceleration_signal = sensor.rx()
sensor.rx_destroy_buffer()

The returned array contains the board’s single AD7768-1 receive channel as floating-point samples. Convert the samples to application-specific vibration units using the sensor configuration and calibration for your setup.

Offset calibration

Call calibrate() while the sensor is stationary and connected. Calibration adjusts the LTC2606 bias DAC over 20 iterations to make the AD7768-1 ADC codes approach zero mean:

sensor = adi.cn0532(uri="ip:192.168.2.1")
sensor.calibrate()

Calibration destroys an active RX buffer before changing the DAC. A subsequent rx() call creates a new buffer. If the required correction is outside the DAC range, the method clamps the setting and prints a warning that calibration may not converge.

Inherited board controls

CN0532 inherits the CN0540 controls, including shift_voltage, sensor_voltage, fda_mode, and monitor_powerup. See CN0540 condition-based monitoring board for the full board-control overview.

API reference

class adi.cn0532.cn0532(*args: str | Context, **kwargs: str | Context)

Bases: cn0540

CN0532 vibration sensor board with an ADXL1002 accelerometer.

This interface inherits CN0540 buffered acquisition and board controls and adds automatic offset calibration for the ADXL1002 signal path.

close()

Close the IIO context

property ctx: Context

IIO Context

property fda_disable_status

Fully differential amplifier disable status.

property fda_mode

Amplifier mode: "low-power" or "full-power".

property input_voltage

Input voltage in mV before the shift voltage is applied.

property monitor_powerup

Monitor power state; the shutdown pin uses active-low inputs.

property red_led_enable

Enable or disable the board’s red LED.

rx()

Receive data from hardware buffers for each channel index in rx_enabled_channels.

returns: type=numpy.array or list of numpy.array

An array or list of arrays when more than one receive channel is enabled containing samples from a channel or set of channels. Data will be complex when using a complex data device.

property rx_annotated: bool

rx_annotated: Set output data from rx() to be annotated

property rx_buffer_size

rx_buffer_size: Size of receive buffer in samples

property rx_channel_names: List[str]

rx_channel_names: List of RX channel names

rx_destroy_buffer()

rx_destroy_buffer: Clears RX buffer

property rx_enabled_channels: List[int] | List[str]

rx_enabled_channels: List of enabled channels (channel 1 is 0)

Either a list of channel numbers or channel names can be used to set rx_enabled_channels. When channel names are used, they will be translated to channel numbers.

property rx_output_type: str

rx_output_type: Set output data type from rx()

property sample_rate

Sample rate in samples per second.

property sensor_voltage

Calculated sensor voltage in mV after bias correction.

property shift_voltage

LTC2606 shift voltage in mV used to bias the sensor data.

property sw_cc

Enable SW_CC and illuminate the blue LED.

property sw_ff_status

Fault-flag status.