If you have a Dell and the stops charging, you might want to try getting a new lead. My laptop ran find when plugged in, but it wouldnt charge the battery which was brand new. I suspected a loose connection but it was something completely different.

Apparently when you the machine the power supply is detected using some low level protocol and if the voltages are slighly off then it put the machine into a slower speed and non-charging mode to protect its self.

Anyway, one quick look on saved the day.