SWRA679 January   2021 CC3200 , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235S , CC3235SF

 

  1.   Trademarks
  2. 1Introduction
    1. 1.1 Basics of the SAR ADC Architecture
    2. 1.2 Introduction to the CC32XX ADC
      1. 1.2.1 Main Features
      2. 1.2.2 ADC Sampling Operation
      3. 1.2.3 ADC Additional Information
  3. 2ADC Application Examples
    1. 2.1 Battery Voltage Measurements
      1. 2.1.1 Important Considerations
        1. 2.1.1.1 Extra Current Draw
        2. 2.1.1.2 Droop Correction
        3. 2.1.1.3 Offset Adjustment
        4. 2.1.1.4 Least Squares Fit
        5. 2.1.1.5 Choosing the Capacitor (for droop correction)
        6. 2.1.1.6 First Measurement
        7. 2.1.1.7 Time Between Measurements
  4. 3AC Measurements
  5. 4Useful References
    1. 4.1 Smart Thermostat
    2. 4.2 Measuring Air Quality With the Winsen MP503 Analog Sensor
    3. 4.3 Touch Position Detection With HMI Through Resistive Touchscreen
  6. 5References

Droop Correction

Note that the internal ADC is continuously running and if the ADC is connected to the external pin, continuous current will be drawn from the external capacitor. This will cause the external capacitor to drop down the voltage with time. Each sample causes a charge re-distribution between the external capacitor Cext and the internal Cin, which causes the Cext to discharge. This will cause a measurement error.

Hence, for the DC measurement, the ADC pin should be disconnected immediately after the measurement is completed to allow the Cext to recover. This can be done by calling APIs (ADCChannelEnable() / Disable()) or changing pix-mux to GPIO. The above graph shows an example measurement using the ADC pin 58. The resistors are used as mentioned in the above sections with 0.1 μF capacitor.

Assuming the Cext is fully charged to V1 = R2/(R1+R2) x Vcc, each sample draws approximately Q = Cin x V1 charge from Cext. Assuming N samples are taken, the Cext loses NxCin x V1 charge. The voltage drop in the Cext can be calculated by the formula shown in Equation 1:

Equation 1. GUID-20201021-CA0I-6PRG-CTZS-XPHTJBNLWRSN-low.gif

In this example, by taking 128 samples, the Cext capacitor will drop by about 20 mV.

If a simple averaging function is used in the measurement, the measurement error would be Vdrop/2 = 10 mV. While this may be acceptable for most applications, it can be improved further by using the methods shown in the following sections.