Hi,
Now
since the supply voltage is considered for reference voltage for adc conversion so obviously the difference.
You could also use mains voltage as reference or an RC oscillator as frequency reference, but this is no good design.
There are dedicated voltage reference ICs. They guarantee a precise low noise voltage: over time, over temperature, over load, over mechanical stress...
But a voltage regulator is not made for this precision.
For sure you can calibrate the error to get a precise voltage reading, but it is not sure, that tomorrow it shows the same result.
**********
you need to clarify what you want to calibrate.
* you could just do a gain calibration for 24V
* or offset, then gain
* or additionallly linearity
* or additionally temperature compensation.
with a voltage meter a usefull calibration could be like this: (offset and gain calibration)
* switch device on and wait at least for one minute
* use two measurements. one at a known low voltage (maybe 5% FS) and one at a known high voltage (maybe 95% FS)
* with this calculate the offset and gain calibration values.
val_calibrated = (val_uncalib - offset) * gain
...is a simple math for any microcontroller.
Klaus