Time ago I had a Roomba 560 with an Error 5.
The problem was the power supply used to charge the battery.
Time to try to fix it.
It is a classic switch power supply and I did some measurement.
The voltage expected was supposed to be around 22V, but it was around 19V when I measured it.
Even worse, the voltage was slowly decreasing after few minutes.
There are many things that can go bad in a switching power supply, but the symptoms made me think about a bad capacitor.
So I opened it and started to look for damages on the PCB.
Particularly I was looking for discolorations around the capacitors, usually caused by the heat.
A bad capacitor can generate a lot of heat and thus be damaged.
I didn't notice anything apparent, so I checked out the two main capacitors in the circuit.
A 47uF 200V and a 680uF 35V.
Both seemed OK to a visual inspection. Since I had around only the 47uF capacitor (but 400V) I decided to change it. Quite unlikely to be that one the problem since is used as main filter on the 110V but better to try.
And in fact it was not that the cause of the problem.
So I ordered from Mouser some 680uF 35V capacitors and, just in case, a mosfet 500V N-channel to eventually replace the one used in the power supply.
When the component arrived I immediately changed the 680uF capacitor and ... voila' !
I was lucky this time. A damaged capacitor on the output.
Reassembled the power supply, it worked perfectly to charge the "just fixed" Roomba 510.