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.

Reference issues on adc10

Hello,

I'm trying to use the msp430 rf-2500 as a high speed high accuracy voltmeter. I'm currently taking 272 samples/sec (136 on each of 2 channels) and transmitting the data at 10 samples per packet, 27.2 packets per second.

The problem I have is that the most range I can get in my signal is about 0-450mV, and this is only when I disable the reference entirely. When using the internal or external reference, I get either ~240mV range with 1.5V reference, or ~390mV range with 2.5V reference. The signal clips above or below this range.

My question is:

What registers are indirectly responsible for the reference voltage? I started with the program to measure battery voltage, so I'm not sure how the reference is not working correctly. I've tried every sref value and various timing adjustments without changing the problem. I want the signal to be in the 0-Vcc range or 0-2.5V range.

  • Insufficient input data :)

    Please show/tell how your ADC input circuit look like. Also specify voltage range you want to measure, describe voltage source too, especially internal resistance of it.

  • I'm not sure how this relates to my question, since I was just asking for register info, but there are multiple different input circuits that show similar behavior. Two are a pure signal generator with positive to pins 4 and 5 and negative to ground. The third is a signal generator into an amplifier and then the positives into pin 4 and 5 with negative to ground. The fourth is a non-signal generator source into an amplifier and then into pins 4 and 5 with negative to ground. Ground has been tested at multiple locations with the same result.

    I'm only interested in what tertiary registers might cause the reference to be truncated as it is, and still display the changing property when switched from 1.5V to 2.5V.

  • David Schriebman1 said:
    I'm only interested in what tertiary registers might cause the reference to be truncated

    In case of truncated reference you will get higher than expected readings. If you are sure that you are not messed-up your inputs - fine! Then perhaps your ADC settings (like improper clock) are wrong. Please show your ADC-related code so we can check.

  • David Schriebman1 said:
    ......

    My question is:

    What registers are indirectly responsible for the reference voltage? I started with the program to measure battery voltage, so I'm not sure how the reference is not working correctly. I've tried every sref value and various timing adjustments without changing the problem. I want the signal to be in the 0-Vcc range or 0-2.5V range.

    .......

    To use AVcc and AVss as ADC10 reference, all you need to do is set all three bits of SREF2,1,0 to 0,0,0. Since this reference is embedded inside the chip and cannot be measured directly, you must have used some indirect method in an attempt to check the reference voltage. If that indirect method is incorrect, or if you failed to execute that method correctly, you might have drawn the wrong conclusion that the reference voltage is not AVcc and AVss.

    To generate 2.5V and use that together with AVss as reference is slightly more complicated. You should defer trying that until you managed using AVcc and AVss successfully.

  • David Schriebman1 said:
    ~240mV range with 1.5V reference, or ~390mV range with 2.5V reference.

    At least the relation of the two fits. :)

    However, the ADC won't give you 240mV, it will give you a number. What is this number. It may be that your formula is wrong, the calculation clips due to datatype range limitations or whatever.

    Also, if your sampling time is short and/or the input impedance is high, the sampling capacitor has no time to charge fully, leading to low results. However, it should charge to the same voltage then.

    What about the ADC initialization? The reference needs some settling time. YOu cannot switch it on and off to preserve power if you need a high sampling rate. (but then, the readings should be higher an dnort lower or clip).

    So I suspect the conversion code from ADC value to voltage.

**Attention** This is a public forum