Analog Refence

Hi, I'm new to Arduino and I just want to ask about AREF

Basicly, this is what I trying to do. However, I owned a Arduino Mega. And I can set internal AREF to 2.56V.

Question is: If i do set AREF to 2.56V, can I do like this without damage the arduino?

http://imgur.com/Ncedyhj

kazumihypono: Question is: If i do set AREF to 2.56V, can I do like this without damage the arduino?

No you can't, there will damage the arduino cause the input can not more then -0.5V

The circuit shown had shift the mid point of the AC voltage above ground level.

I wonder what would happen to Arduino before C1 charges to 2.56 volts? jolphil

You don't want to shift your analog reference for the circuit shown because the maximum voltage is still close to 5VDC. Thus, if you were to use the above circuit with the internal reference set at 2.56VDC, you'd potentially damage the ADC. Remember, the AREF needs to be higher than the maximum voltage the ADC is likely to encounter. Even then, it's a good idea to put in a tolerance for overshoot (i.e. inductive kickback from a motor being disconnected, for example) and to pay close attention to the maximum currents developed under those conditions (so that the protection diodes in the Atmel can perhaps save your bacon if your calculation was off a bit).

The reason to shift AREF to a lower voltage such as 2.56VDC is to accomodate lower input voltages on the ADC with better resolution. The AREF can be set internally (with limited voltages, dependent on the processor) and externally (with no such limit) within a range of about 1-5VDC on a 8-bit Atmel MCU. Other processors like the ARM on the DUE have a maximum AREF of approximately 3.3VDC.

Using an external voltage reference for AREF can bring several benefits, such as better voltage stability vs. temperature and other electrical issues and hence lead to more accurate ADC measurements. However, the gains of putting on a dedicated and accurate external reference on a 10-bit ADC like the one found in the 8-bit Arduinos are usually pretty small. IMO, it makes more sense to just use a voltage divider and smoothing capacitor based on VDD for AREF as a starting point, then move on to an external voltage source when you see a big potential benefit.

I have used such references for 16-bit ADCs, for example, where even a little ripple on the reference pin can mak a big difference regarding the stability of your measurements. However, the cost of high-stability series references like the LM4132A, for example, can reach several dollars, so I reserve them for 16+ bit applications. Many external AREF applications can also be well-served with relatively inexpensive but precise zener diodes. So, yes, by all means changing the AREF can have benefits but try your best make sure that the ADC never sees a voltage above AREF or you may smoke the ADC.