ADC

This section refers to the following sample application(s):

  • 02-adc



The 

LTC5800

 features 4 external analog-to-digital converter (ADC) input channels which allow your application to sample an analog voltage.

The voltage applied to the ADC input pins must be between 0V and +1.8V. Applying a voltage outside that range will damage the part.

Two internal channels are also available to sample supply voltage and temperature. These are discussed in the following sections:

 

ADC samples are configured, initiated, and read manually; periodic or triggered-input sampling is not supported. The analog channel has several configurable parameters that determine its behavior.



Analog Inputs

The following table lists the external input channels and the corresponding labels on the on the silkscreen of the 

DC9003

 board:

Input

On-Chip Software Development Kit

DC9003

Analog input 0DN_ADC_AI_0_DEV_IDAI_0
Analog input 1DN_ADC_AI_1_DEV_IDAI_1
Analog input 2DN_ADC_AI_2_DEV_IDAI_2
Analog input 3DN_ADC_AI_3_DEV_IDAI_3

RDAC and VGA

The analog channel on 

LTC5800

 can be configured to provide accurate measurements of an analog input signal. The ADC itself has a scale from 0V to 1.8V, with a 10-bit resolution. Each LSB represents 1.8mV.

The Variable-Gain Amplifier (VGA) and offset Range-DAC (RDAC) provide improved resolution of analog input signals having less than full-scale input swing. Improved resolution is attained by zooming into a user-configured portion of the full 0 to 1.8V input range. To zoom into the desired input-voltage range, the RDAC value is first subtracted from the analog input signal; the result of this subtraction is then amplified by the VGA by a user-settable gain from 1 to 8. Zooming to the range of interest in this fashion allows the dynamic range of the ADC to be matched to the input signal to be digitized.

The RDAC is 4-bits and has sixteen equally-spaced, discrete offset ranges as follows:

On-Chip Software Development Kit

Nominal Center of Analog Input Range (mV)
DN_ADC_RDAC_113mV113
DN_ADC_RDAC_225mV225
DN_ADC_RDAC_338mV338
DN_ADC_RDAC_450mV450
DN_ADC_RDAC_563mV563
DN_ADC_RDAC_675mV675
DN_ADC_RDAC_788mV788
DN_ADC_RDAC_900mV900
DN_ADC_RDAC_1013mV1013
DN_ADC_RDAC_1125mV1125
DN_ADC_RDAC_1238mV1238
DN_ADC_RDAC_1350mV1350
DN_ADC_RDAC_1463mV1463
DN_ADC_RDAC_1575mV1575
DN_ADC_RDAC_1688mV1688
DN_ADC_RDAC_1800mV1800

The VGA has eight discrete gain settings as follows:

On-Chip Software Development Kit

VGA GainNominal Full-Scale Input Swing (mVpp)
DN_ADC_VGA_1800mVpp11800
DN_ADC_VGA_900mVpp2900
DN_ADC_VGA_600mVpp3600
DN_ADC_VGA_450mVpp4450
DN_ADC_VGA_360mVpp5360
DN_ADC_VGA_300mVpp6300
DN_ADC_VGA_257mVpp7257
DN_ADC_VGA_225mVpp8225

Example Use Case

Problem: Use the VGA and RDAC to sample a humidity sensor circuit having an output swing from 500mV (0% RH) to 900mV (100% RH).

Solution: The middle of the sensor output swing is 700mV. The closest RDAC setting is RDAC = 5 which corresponds to a 675mV offset. To handle the full sensor input swing we choose a gain of 3 which provides an input dynamic range of 600mV (+/-300mV) around 675mV. Thus choosing an RDAC setting of 5 and a gain of 3 zooms the range of the analog input to 375mV to 975mV.

If the input signal extends beyond the selected range of interest, the device will return an incorrect value. If it is possible that the analog input signal will exceed the selected range of interest, a preliminary low-gain conversion should be made to allow proper configuration of the RDAC and gain settings.

The 02-adc Sample Application

The 02-adc sample application periodically reads the voltage on analog input 0. This results in the following CLI output when connecting a bench power supply (set to out 1.0V) to the AI_0 pin:

adc app, ver 1.0.0.1
SmartMeshIP stack, ver 1.2.1.3
adcVal=10002
adcVal=9984
adcVal=9984
adcVal=9984
adcVal=10002
adcVal=10002
adcVal=9984
adcVal=9984

The sample application prints the raw values returned by the DN_ADC_AI_0_DEV_ID device, which is expressed in tenths of mV.

Refer to the

SmartMesh On-Chip API html documentation

in the /doc directory of the 

On-Chip SDK repository

for documentation about this feature.