2006 Nissan Altima Idle Relearn (You need to watch this if you can't get relearn to work)
You need to do a relearn of the Idle on your Nissan if you are experiencing idle surges between 800 to 1000 and 1800 to 2000 RPM and/or have a P0507 error code.
There are many videos talking about how to do the idle re-learn on Nissan cars, but none explain that the check engine light should flash slowly then quickly if the re-learn steps are done correctly. This video first shows you what happens when a re-learn fails, then it shows you what to look for if a re-learn is initiated correctly. I hope this helps everybody save $100+ by doing it yourself rather than paying a Nissan dealership. BTW, I cleaned the throttle body as a step to try and fix this problem; I did not have the key on or the battery disconnected when I shoved a screwdriver in to hold the valve open, and some say that will damage the TB. Do not assume that cleaning the TB will damage it; it didn't in my case.
Before doing the re-learn, you need to do the following:
1) Confirm battery is good (voltage 12.9V or higher at idle).
2) Drive the car for 15 minutes to warm up both the engine and transmission. (It may be adequate to just idle the engine till fully warm)
3) Turn off as many electrical items in car as possible. Make sure
lights are off and doors are shut (dome lights not on). You do not have to unplug the radio like some suggest; basically if your battery is good, the electrical items being on is not critical.
4) Center your steering wheel.