aref pin

I have an atmega32u4 with a 0-5 reference voltage.
since my experiment data range is 0-2 volts I'm trying to change the reference voltage using the aref pin.

pin out shows the aref pin bu I don't know how to connect the external voltage to it.

see the picture attached.

Read the reference: analogReference() - Arduino Reference
There is a "Notes and Warnings" paragraph, be sure to follow that when applying a voltage to the AREF pin.

Some protect the AREF pin with a resistor of 1k. You can do that during testing, but I don't like to make a good reference voltage weaker.

You can use the internal reference of 2.56V, I think that will be almost just a good as a external reference voltage. The signal has often noise, so the full 10-bits accuracy is hard to reach. Therefor the reference of 2.56V will be almost as accurate as 2.00V.
If you happen to have a better reference of 2.0V, then you can connect the reference voltage to the AREF pin.

Is your signal with certain defined voltages or is it ratiometric to a power supply ?

Tnx.
Honestly I'm a mechanics student and not familiar with the stuff. But let me explain more.

I'm trying to measure the output voltage of a wheatstone bridge with a copper wire as resistance.

The change in wire resistance is small due to small changes in temperature of the wire, hence small values of voltage less than 5 milivolts will be generated and this can't be measured with atmega32u4 so I'm thinking of a change in reference voltage.

Hi,
Have you got your resistance configured in a Wheatstone Bridge?
Then you can use a differential amplifier to amplify the small resistance change.

Just a thought.. Tom.. :slight_smile:
PS You will have to use the electronics resources of your educational institution to give you some hands on help.

see the picture attached.

But nothing was displayed.

pin out shows the aref pin bu I don't know how to connect the external voltage to it.

Well the best way is to connect it with a wire to 2V. Do you actually mean that or do you mean how can you generate 2V to act as a reference voltage.

However, using an Arduino to detect a change in 5mV even at a 2V reference is only going to give you a change of two in the readings which is not enough to make any sort of measurement. You need to add an instrumentation amplifier to the front end. You can make one with four op-amps and a few resistors.