Arduino ATMEGA1280 Controller ADC Voltage Reference

Hi to all.

I am going to use the Arduino's analogue to digital converter with the ATMEGA1280 processor. As you may already know the voltage reference of this ADC is 2.5V or 1.1V selectable. But reading the datasheet i have found that there is an extra pin called AREF which as i understood is given 5V from the power pin the VREF is 5V now.

Is that correct?

And if it is correct the only thing to do so that i increase the voltage reference swing is that i connect the AREF with a 5V supply and talking about programming in the void setup () i should write:


Is this all i need to to do? Correct me if I'm wrong.

Thanks & Regards Combinu

The atmega1280 as used in the arduino mega board uses the Avcc voltage (+5vdc) as it's default internal reference voltage for the A/D function. You have the option with the 1280 chip to select two other internal reference voltages, 1.1 or 2.5 volts. Finally you have an option to wire an external DC voltage, up to 5vdc max and select it as an external voltage reference.

Bottom line is that the default voltage reference is 5vdc without having to setup or change any reference options. So no requirement to wire +5vdc to the Aref pin.


Ok so to be perfectly clear i have an opamp and the output voltage will be at a dc ofset of 2.5V. The analogue signal will be swinging from 2.5V up to 5V and from 2.5V down to 0V but never exceeding them.

I have to setup nothing just the output of the opamp goes in one of the analogue pins of the arduino. And ofcourse than normal programming as if you are connected a normal analogue sensor like a temperature sensor

Is this ok?

Thanks for your fast reply and Regards Combinu

Is this ok?

Yes, that is OK. You also have to make sure the ground of the opamp circuit is wired to the arduino ground if the opamp is using an external voltage source.


Yes i know about the grounds... I am using a common arduino ground throughout the whole circuit.

Thanks for your help!

Regards Combinu