Description is confusing. The battery light comes on when the alternator stops charging the battery while driving. Eventually the battery will run down and the engine will stall. A jump-start will get it going again but it won't run very long if you don't recharge the battery. That can take an hour or more. The electric fuel pump and all the computers on the car will drain a fully charged battery in less than an hour of normal driving, much quicker if the headlights are on.
The camshaft position sensor supplies the engine computer with information needed to run the engine. It can also cause the engine to stall, particularly when they become heat-sensitive. They often start to work again when they cool down. If the sensor fails while driving, it should be detected by the engine computer which will memorize a diagnostic fault code and turn on the "Check Engine" light on the dash. An intermittently defective sensor will have to cool down before the engine will start again. This could take as much as a couple of hours.
If your engine runs fine as long as you're moving, but dies when you come to a stop, and restarts right away, I would suspect the issue is the result of your new battery. When the old one was disconnected, the engine computer lost its mind, so to speak. Until it relearns minimum throttle, it doesn't know when you have your foot on the gas pedal and when it has to be in control of idle speed. To relearn minimum throttle, it will take a voltage reading from the throttle position sensor and put it into memory when specific conditions are met. From then on, it will know when your foot is off the gas pedal. To do this relearn procedure, drive at highway speed, then coast for at least seven seconds without touching the brake or gas pedals. The computer will detect the conditions that only occur when coasting.
If the Check Engine light does come on while driving, a diagnostic fault code has been memorized. Don't disconnect the battery or that valuable information will be lost.
Friday, May 29th, 2009 AT 2:56 AM