I hooked up my oscilloscope and had a look at the charging noise. My scope is rather geriatric, and the calibration is poor, but for what it's worth, it was set at 200mV/division and 10ms/devision. If we trust this, we see about 250mV of noise at 50Hz (the AC mains frequency here in New Zealand). My previous attempt at filtering the noise out involved taking 10 samples and averaging them and it seems very likely that it failed because it was averaging a different part of a 20ms pulse each time. I don't actually know how long each ADC reading takes (I recall I chose the slowest ADC speed available but what that might be, I don't know).
I think the easiest solution is to continuously measure the voltage in the main loop and store a moving average of many many ADC readings. When a request for the voltage arrives or the internal cell management program needs the voltage, the current value of the average calculation is returned. This reduces latency on the RS485 bus as we don't have to wait a few hundred milliseconds to average out the noise. I will have to be careful that the main loop doesn't run at some factor of 20ms as this would cause aliasing.
You can also see a faint shadow below the main line, this isn't a camera artefact, but whether it's real, I do not know. It's not really obvious in the picture, but it almost looks like a mirror image of the main line. I haven't tried to filter out the 50Hz noise to see if this is some other higher frequency component.