This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28069: ADC calibration issue

Part Number: TMS320F28069

Tool/software: Code Composer Studio

Hello,

I am using TMS320f28069 control card . I have taken the "Example_2806XAdcSoc" example code . ADC is of 12 bit resolution (ie 4095 at 3.3 v).

1. Whenever I am connecting the ADC input pin to Ground  pin of the docking station i am getting 0 in the result register , but when i am connection the input pin of ADC to 3.3 v the output count is fluctuating  from 4095 to sometimes 4093 .  I am not sure why is this happening ?? P.S I have used the ground and 3.3 v pin from the docking station.

2. Also  if I am not using the ADC offsert calibiration function the output register fluctuates for both ground as well as 3.3 V . So plz let me know if the  use the offset calibration function is necessary ??

3. Also why is it needed to calibrate the ADC each time we run the code . Accoding to me if once we did the calibration next time it should not be required to calibrate the ADC again .

Please let me know reasons for this strange behaviour , if any other steps is needed to be done.

I have  read the post "e2e.ti.com/.../587441 " but it is still not clear why the value is fluctuating . Also i cannot under the nned of calibration every time .

Thank you

Rohit Sawa

  • Rohit,

    The behavior that you are seeing is normal.  All ADCs are subject to noise and error.  You should expect to see a Gaussian distribution when you collect multiple samples of a static signal.  A common practice is to average multiple samples.  You can learn more about ADC parameters in this training series.  The architecture described is not the same as what is used in F2806x, but the concepts are the same.  The performance specifications are published in the datasheet.

    The offset calibration register is described in the TRM.  You will find that the register is cleared at reset and initialized with a static value by Device_cal() on boot.  The recommendation to periodically calibrate for offset error is in the Errata.

    All of the documents can be found from the F28069 product page.

    -Tommy

  • Thank you Tommy, but I still have few doubts . 

    1. If ADC calibiration is needed periodically then how can it be deployed in the field.

    2. Also why is it so that even after calibrating the ADC with the calculated offset value , ADC count is not constant .  I have previously worked with MSP430 and i havent faced this issue in there.

    Thank you

    Rohit Sawa

     

  • rohit sawa said:
    1. If ADC calibiration is needed periodically then how can it be deployed in the field.

    The primary factor affecting offset drift is temperature change so the calibration can be executed at a relatively low frequency. Systems deployed in a temperature controlled environment might be fine with calibrating once every 15 minutes. Systems that will be exposed to thermal shocks would need more frequent calibration like once every 5 seconds.

    Also, once the initial calibration has been completed, the offset drift should be expected to be fairly small.  For example, instead of adding an offset count of 80 to ADCOFFTRIM, an offset count of 5 can be used on subsequent executions.

    rohit sawa said:
    2. Also why is it so that even after calibrating the ADC with the calculated offset value , ADC count is not constant .  I have previously worked with MSP430 and i havent faced this issue in there.

    There are a lot of variables that factor into this. For example, the ADC performance specs may be different between devices. Different signal sources and conditioning will have different noise profiles. Different acquisition windows may also introduce some variation.

    How much variation are you seeing? What is your system requirement?

  • Hello,
    Thanks for the response . Yes as you told i observed the offset variable used in Calibration , it seems to be reducing after certain takes.
    The frequency ADC is running is 1 KHz .
    The fluctuation i am seeing is of arounf 2 to 3 count i.e 2 .5 mv(12 bit ADC and 3.3 v).

    Thank you
    Rohit
  • Rohit,

    As I had mentioned in my original reply, you should expect to see some codespread from the ADC results.  +/- 1 LSB is not uncommon from a large sample set.  You can see some guidance on performance here:

    The noise can typically be decreased by conditioning the source signal (for example by buffering with an op-amp and/or low-pass filtering).  The LaunchPad does not include any on-board filtering components so this will need to be handled off-board.

    -Tommy

  • Rohit,

    Sorry, it looks like you are using the controlCARD, which does have on-board filtering components.  You can repopulate the C2 - C9 capacitors as needed to adjust the cutoff frequency.  Do note that only some ADC channels have filtering capacitors.

    -Tommy