Default set the ADC reference to Vcc : precision will depends of the Vcc board value.
The 1.1 V internal reference is more apropriate to your 500 mV and will improve the accuracy of your measurements by 5/1.1 times.
Please note the following :
- The value of 1.1 V is given + / - 10%, but his value is only depending of the fab batch you can measure his exact value with a voltmeter connected to the Aref pin and the ground.
- If you use the internal Reference it is important not to apply any voltage to Aref (see microcontroler datasheet for more information).
Important notice :
Whatever the reference (Vcc, external, Internal) you use, on the UNO and Mega arduino boards the track between the Aref board pin and the aref microcontroler input is too noisy to give accurate measurements.
To get accurate measurements it is essential to solder a capacitor (100 nF) between the ground and the microcontroler Aref pin as close as possible from the microcontroler.
It is very easy with UNO to sold a capacitor dirrectly to the through hole dip socket (back side).
It is extremely difficult with a Mega due to the SMD package.