2
\$\begingroup\$

The AT32UC3C ADC can be set up using either internal or external references as seen in Table 36-8. For any type of voltage reference used, the datasheet suggests that the ADC is capable of converting negative and positive voltage levels. However, Table 40-30 mentions that the ADC input voltage range is 0V to VDDANA, and the absolute maximum rating in section 40.1 mentions that the absolute minimum on ANY pin should be -0.3V. It appears I shouldn't really be feeding in a negative voltage.

So my question is, how does one read a negative ADC value given the electrical ratings on the pins? Wouldn't the pin just blow up because it can't accept negative voltage values?

EDIT: I realized I phrased the question more as how to measure negative ADC values in general. However, my real question is really about why UC3C specifies negative voltage for its ADC conversion range, so Spehro's answer is the one I am looking for.

FIGURE 1FIGURE 2

\$\endgroup\$
1
  • \$\begingroup\$ Get an external ADC that is capable of operating at negative voltages. Or you could use an Inverting Amplifier to feed the pin. Another method is to use a resistor-divider but I would go with the inverting amplifier due to a more predictable response regardless of the impedance on the input lines or noise on the supply lines. \$\endgroup\$
    – Ron Beyer
    Oct 16, 2017 at 5:25

2 Answers 2

2
\$\begingroup\$

The ADC is capable of operating in differential mode.

In differential mode, two inputs are used, each of which must remain within the power supply range. The ADC reads the difference between the two inputs, which may be positive or negative, even though both inputs must always be (more or or less) positive with respect to ground.

\$\endgroup\$
0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. You can handle negative inputs by making a voltage divider on the input.

The Ain voltage will be given by $$ V_{Ain} = V_{ref+} - ({V_{ref+} - V_{IN}}) \frac {R1}{R1 + R2}$$

This means that your ADC will have an offset from zero when Vin is zero. You will have to subtract that in the code.

So my question is, how does one read a negative ADC value given the electrical ratings on the pins?

There are several methods, including getting a bi-polar ADC chip - but the solution above is the simplest.

Wouldn't the pin just blow up because it can't accept negative voltage values?

No, it won't blow up. It is more likely that the input protection diode will silently burn out followed by the ADC circuitry.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.