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.

Slope ADC voltage measurement

It is obvious to us how to use a slope ADC to measure a resistance, but we have not figured out how to do it for a voltage, i.e. the voltage of a battery. Can you refer me to something that shows how?

  • Hello,

    Sounds like you would liek to know more about the technique rather than how it is acheived on the 430?

    Slope ADC techniques to measure voltage can be implemented using a comparator and a timer. The basic theory is to charge a capacitor and measure the time it takes for discharge. The longer it takes to discharge the larger the input voltage.

    Here are a few articles that discuss this technique:

    http://www.faqs.org/docs/electric/Digital/DIGI_13.html

    http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv25.pdf

    This application report is a little old (based on the MSP's 3xx family) but the concepts for voltage measurement remain the same.

    Regards,

    Priya

  • Measuring resistance with a slope ADC is the very same as measuring voltage. Only that in the first case the voltage applied to the resistor is known and the resistacne is unknown, in the other case the resistance must be known and the voltage is the unknown factor. The Formula to get the final result then is just an 1/x of the other.

    There are, however, different aproaches to implement a slope ADC depending on the exact circumstances. The easiest case is to apply a known voltage to a constant capacitor through a constant resistor and compare the voltage at the capacitor with the signal to measure. If the comparator switches from low to high, the time it took is taken and equals the measured voltage. Then discharge the capacitor though low resistance (maybe you can just configure the comparator input to low output) and start over.

    Unfortunately the voltage change is not linear.

    It's better to charge the capacitor with a constant current. Then the voltage change on the capacitor is linear and the time required to charge it is equal to the measured voltage (with a constant factor based on the charge current and the capacitance).

    Another approach can be used if the voltage you measure always is above a trigger level (comparator with internal reference, or digital input with schmitt trigger). It requires a resistor and a capacitor. Charge the capacitor through the resistor by the voltage you want to measure and count the time until it exceeds the reference level. THen discharge by switching the comparator input to low output for some time. The measured time corresponds to the voltage, but too is not linear. And it only works as long as the voltage you measure is above the reference (which would be in case of a low-batt sensor). It is, however, the cheapest of all options and works even if there's no 'real' comparator available.

    The classical 'charge to voltage and then count the time to discharge' approach is the worst one when it comes to hardware requirements. You'll need to disconnect the sampling voltage while discharging. You'll need to make a controlled discharge and you'll need a comparator that compares to zero voltage.

  • Hello,
    how accuracy can you measure the voltage with the slope compensator?

    Regards
    Holger

  • Holger S said:

    how accuracy can you measure the voltage with the slope compensator?

    Actually quite high. Using hi-quality (low leakage/noise) components you can achieve 18 bits, check ALD500 front-end specs. Most low-end 3 1/2 digit multimeters uses slope ADC approach, so 10 bits is virtually piece of cake.

  • Holger S said:
    how accuracy can you measure the voltage with the slope compensator?

    A slope compensator would always give the same output, as it compensates the slope. So its precision depends on implementation and can reach 100% if it fully compensates any slope :)

    (sorry, couldn’t resist)

    Otherwise, OCY is right. For a slope converter.

    Well, precision depends ion linearity of the slope and the time resolution of the delay counter.

**Attention** This is a public forum