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.

ADC10 Error

Other Parts Discussed in Thread: MSP430F2232, MSP430F2252

Hi,

I am using an MSP430F2232 in a project that has to sample a 4-20mA loop using the ADC channel A0.  To provide accurate measurements, an external reference voltage is connected across Veref+ and Veref- (pins P2.4 and P2.3).  The reference negative pin (and therefore also the uP pin Veref-) are tied to ground - i.e. VeREF- = AVss. 

I have setup the ADC10 to sample the relevant channel 5 times: the first sample is discarded, the following 4 are averaged in an effort to reduce any noise that may be present.  I have selected tsample as 8xMCLK with DCO of approx 1.1MHz which should provide a hold time far greater than required.  The SREF setting used is SREF_6 (VR+ = VeREF+ and VR− = VREF−/ VeREF-).  The reference is allowed >100us to stabilise before samples are taken.

The error I have noticed is that when the input channel is tied to ground the ADC reads +4bits (equivalent to almost 5mV).  The PCB is well laid-out with good ground planes.  Using a DMM shows no voltage present at the uP VeREF- pin, and applying extra links to pull the uP pin to gnd does not make any difference.  Applying currents to the cct or voltages directly to the uP A0 pin appears to show a fairly constant error of +4bits across the operating range.  The problem also appears on the A1 input.  This problem has presented itself on both of the prototypes built so far so does not appear to be a faulty component.

 

I have tried adjusting various settings, and found two independant ways of improving the result:

  1. Select the ADC setting SREF_2 (VR+ = VeREF+ and VR− = Vss).  The 4bits error is removed.
  2. Increase the sample time to 16 or 64 MCLK pulses.  The error is reduced to approx +2 bits.

 

I am not sure why these changes make any difference. 

  1. The VR- pin is connected to Vss and has been measured at Vss, extra links to Vss have made no difference so why does changing SREF have any effect?
  2. When no input current is applied and the pin is tied to gnd the source resistance Rs is negligible therefore the value for tsample calculated from the equation in the datasheet is <0.5us - 8MCLKs should be more than sufficient; increasing the sample time should have no effect.

 

I have tried disabling my voltage reference and using the internal reference against either Vss or VeREF-.  This also show some error when VeREF- is used.  I have tried sampling VeREF- as a source (INCH9) against internal ref 1.5V and Vss (SREF_1); this gives a reading of 0bits (as expected).  I then tried sampling VeREF- as a source (INCH9) against internal ref 1.5V and VeREF- (SREF_5); this gives a reading of 2bits (not as expected).

 

All this leads me to question the use of VeREF- as a reference input - there appears to be something going on in the processor that causes a reading <Vss thus increasing the ADC output. 

 

Can anyone explain what is causing this behaviour? 

Is there a "preferred" configuration using the ADC (using VR- = Vss seems to give "better" results)?

Is this behaviour a quirk of the MSP430F2232 or is it also applicable to other devices?

 

 

Thanks,

Chris.

  • Hi Chris,

     

    Sometimes this behavior can be explained by a ground loop but the tests you performed lead me to believe that there's something else involved in this case. I actually performed the same tests and saw a similar behavior.

    The issue seems to tell us that there's a voltage drop in VREF- input vs the ADC core. I have raised a flag and we will investigate this issue.

    In the meantime, I can tell you that it would be better just to use AVSS/VSS

     

    Regards,

    Luis

  • Hi Luis,

    Thanks for your reply.  We will use VREF- = VSS.  I assume this problem will also be present in the MSP430F2252?  Do you think other devices may be similarly affected?

     

    Regards,

    Chris.

  • Is this an issue for all the MSP430 MCUs or just those in the MSP430F2xx series?

  • I have also experienced the same problem, while using the internal voltage reference set to 2.5 V.  It was used to the measure the voltage in range of 1.5 to 2.4 but most of the time the voltage was less than 2volts. Proper supply voltage was used, but it will still have some error in the samples value. We tried to change the value of  Vref in our code and it seemed to offset it correctly but it was not a good solution for our application.

**Attention** This is a public forum