I've seen that a lot actually. It'll report no battery connected when there is one... It'll run fine and then suddenly die while running on battery... (When there's obviously enough juice left) The MB PMUs are reset via dead-flash so reset the PMU -- but instead of putting the battery back in and reconnecting the power adapter, let it sit overnight. See if that helps.

Intermittent behavior however, usually points to Logic board. smirk