Analog input, also known as Analog to Digital Converter (ADC), is a hardware peripheral that can read an analog voltage value and convert it to a digital value that can be used by the processor.
ADCs have different configurations and parameters, sometimes you will need to use a specialized IC on the carrier board to fit your specific needs, and at other times you will be able to rely on the ADC inputs provided by our SoMs. This article focuses mostly on the ADC inputs provided by the Toradex SoMs, but a section in the end also briefly talks about external ADC.
The Apalis/Colibri modules have 4 dedicated analog inputs. See the table for modules with restrictions or missing ADC feature.
As there are different chips implementing the ADC functionality on the different modules, there are slightly different attributes which need to be considered for compatibility amongst the full range of Apalis/Colibri modules:
Module | Revision | Converter Chip | ADC Resolution | Input Voltage Range |
---|---|---|---|---|
Apalis iMX6 | all | 12bits | 0..3.3V |
Apalis T30 | all | 12bits | 0..3.3V |
Apalis TK1 | all | 12bits | 0..3.3V |
Module | Revision | Converter Chip | ADC Resolution | Input Voltage Range |
---|---|---|---|---|
Colibri iMX6 | all | 12bits | 0..3.3V |
Colibri iMX6ULL | all | 12bits | 0..3.3V |
Colibri iMX7 | all | 12bits | 0..1.8V |
Colibri PXA270 | older than V2.0 | 10bits | 0..7.5V |
Colibri PXA270 | V2.0 and newer | 12bits | 0..3.3V (Channel AD2: 5V) |
|
Colibri PXA300 | all | none | N/A | N/A |
Colibri PXA300 XT | all | 12bits | 0..3.3V (Channel AD2: 5V) |
|
Colibri PXA310 | all | 12bits | 0..3.3V (Channel AD2: 5V) |
|
Colibri PXA320 Colibri PXA320IT | older than V2.0 | 10bits | 0..7.5V | |
Colibri PXA320 Colibri PXA320IT | V2.0 and newer | 12bits | 0..3.3V (Channel AD2: 5V) |
|
Colibri T20 | all | 12bits | 0..3.3V (Channel AD2: 5V) |
Colibri T30 | all | 12bits | 0..3.3V |
Colibri VF50/VF61 | all | 12bits | 0..3.3V |
We provide a library to access the ADC channels from WinCE. For Linux the ADC subsystem is abstracted through the sysfs interface.
One sample measurement on one channel takes about 450-550us for codec types UCB1400 and WM9715.
The analog inputs are implemented with the resistive touch H/W. Touch events can lead to increased ADC channel sampling intervals.
If you need a faster (high sampling rate) or more precise ADC (higher resolution) or ADC with more channels, you can add another external ADC chip.
The Colibri module has different interfaces(I2C, SPI, etc.) to connect an ADC, a very common one is the SPI interface.
Example of ADCs: