Sounds like your IAC (Idle Air Control) valve may not be functioning properly, although not at all related to a battery change.
Are you getting a check engine light? If yes, then take it to any auto-parts store for a free scan to determine any fault.
×