Hi,

You may want to try using a different voltage reference than VCC.
If you have an ADC pin that you're not using, you can configure it as Vref+. Then you simply connect the output of a stable voltage reference IC to it. You can probably even connect the input of the voltage reference IC to your 24V battery. These voltage reference IC's are generally very accurate and very stable. They can't source much current though (they're not designed to) so don't try and use them as a regulator.

I think that this will significantly reduce the noise you're seeing on your ADC inputs.


Cheers!