5

What will happen, if I try to measure voltage higher than ARef? For example, my ref is 3.3V, and I try to measure 4.5V. Will it damage adc?

4

The datasheet of the Atmega328P does not give a direct answer to this, but

Single ended channels that exceed V REF will result in codes close to 0x3FF.

(Datasheet Chapter 24.5.2)

sounds, as it would not destroy the ADC, but only result in a value very close to the maximum. I also found another side, where this is also stated. They linked to the Arduino forum, where a similar question is handled in this thread.

So all in all it should be save to provide more than the reference voltage at the ADC pins, as long as it does not exceed the supply voltage (for the UNO 5V).


As Majenko pointed out in his answer, the datasheet states, that it is safe to provide VCC+0.5V at any pin (except for reset). I just wasn't sure, if this can easily be applied to this special hardware, but it seems, that it can.

3

Contrary to what @chrisl says, the datasheet does give a direct answer to this:

  • Voltage on any Pin except RESET with respect to Ground: -0.5V to VCC+0.5V

So when running at 5V anything up to 5.5V is safe - regardless of what VRef has fed into it.

The VRef just sets the range of the ADC when comparing the incoming voltage to a DAC generated voltage, so anything over the VRef voltage will just read as "max" (1023).

  • As I understand this, the part you quoted does not say anything about the influence of special hardware, that is connected to the pin. For example: If you provide the ADC with the internal reference voltage of 1.1V, you must not connect a different voltage to the pin, or the ADC can be destroyed due to the short. With this reasoning I assumed, that your quote is not a direct answer for this specific case. – chrisl May 27 '18 at 21:05
  • That is incorrect. The VRef is what it says - a reference voltage. That is all. It is compared to the incoming voltage through a comparator. It doesn't care if the incoming voltage is above the reference voltage. – Majenko May 27 '18 at 21:06
  • @chrisl If you have a 30cm ruler and you try and measure a piece of string that's 50cm long it doesn't break the ruler. All you can say is that it's at least 30cm. – Majenko May 27 '18 at 21:08
  • I hang at this sentence from chapter 24.5.2 of the Atmega328P datasheet: "If the user has a fixed voltage source connected to the AREF pin, the user may not use the other reference voltage options in the application, as they will be shorted to the external voltage." Do I misunderstand something here? – chrisl May 27 '18 at 21:10
  • @chrisl Ah, you're talking about something completely different. Nothing to do with anything the OP asked. That's just a warning against a misconfiguration whereby you can select two reference voltages at once, which is bad (and poor design on Atmel's part...). – Majenko May 27 '18 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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