Skip to content

ADC

Overview

The i.MX 95 includes a 12-bit analog-to-digital converter (ADC) supporting a sample rate of up to 1 MS/s. DART-MX95 modules ordered with the [ADC] Export ADC lines option expose eight ADC inputs with a 1.8V reference. Raw conversion results range from 0 at 0V to 4095 at 1.8V.

The ADC inputs are available on the DART-MX95 and Sonata-Board connectors as follows:

ADC input DART-MX95 connector Sonata-Board connector Note
ADC_IN0 J1.29 J10.3
ADC_IN1 J2.15 J22.1
ADC_IN2 J2.17 J22.3
ADC_IN3 J2.58 J7.9 Conflicts with U2 (SN74AVC4T245).
ADC_IN4 J3.30 J8.2
ADC_IN5 J3.40 N/A Not exposed on any Sonata-Board connector.
ADC_IN6 J3.60 J8.6
ADC_IN7 J2.05 N/A Not exposed on any Sonata-Board connector.

An unconnected ADC input is floating and may read near mid-scale. Do not use a floating-channel reading as a voltage measurement.

Reading the ADC Inputs

Use the following script to read all eight inputs through the Linux IIO sysfs interface:

#!/bin/sh

D=/sys/bus/iio/devices/iio:device0

echo "== Raw readings =="
echo "ADC_IN0: DART-MX95 J1.29, Sonata J10.3, raw $(cat $D/in_voltage0_raw)"
echo "ADC_IN1: DART-MX95 J2.15, Sonata J22.1, raw $(cat $D/in_voltage1_raw)"
echo "ADC_IN2: DART-MX95 J2.17, Sonata J22.3, raw $(cat $D/in_voltage2_raw)"
echo "ADC_IN3: DART-MX95 J2.58, Sonata J7.9, raw $(cat $D/in_voltage3_raw)"
echo "ADC_IN4: DART-MX95 J3.30, Sonata J8.2, raw $(cat $D/in_voltage4_raw)"
echo "ADC_IN5: DART-MX95 J3.40, not routed, raw $(cat $D/in_voltage5_raw)"
echo "ADC_IN6: DART-MX95 J3.60, Sonata J8.6, raw $(cat $D/in_voltage6_raw)"
echo "ADC_IN7: DART-MX95 J2.05, not routed, raw $(cat $D/in_voltage7_raw)"

The input voltage can be estimated from the raw value:

Vin = raw * 1.8V / 4095

Testing ADC_IN0 on the Sonata-Board

Do not apply more than 1.8V to an ADC input.

Short J10.3 to J7.4 (GND) and run the script. ADC_IN0 should read near 0.

Short J10.3 to J7.3 (1.8V) and run the script. ADC_IN0 should read near 4095.

Remove the jumper wire before using J10.3 for another purpose.