Why do I need to do a drive cycle?
If you have recently changed the battery on your BMW or done a major repair for the engine or emission system, the on board computer has mostly been reset. This makes the car not ready for a smog check. In order for your car to pass the smog check, you need to do a drive cycle to get the OBC ready.
This process can be either cost consuming or time consuming. You could either drive a whole 200 miles hopefully the OBC is ready or do as BMW dealership had suggested to drive 30 miles, park the car in idle for 30 minutes, and repeat this process for at least 3-4 times. Both of these methods are extremely time consuming but there is another way to get the OBC ready to pass the smog check.
OBD-II Driving Cycle:
If you have a 1996-up BMW, you have the OBD-II diagnostic system that constantly monitors the sensors and solenoids on the engine. You will need to do a Driving Cycle if you have replaced the battery, disconnected the battery, or cleared the codes after a repair. The Driving Cycle performs a diagnostic test on all the systems that the computer monitors. Fortunately, this cycle can be completed in at least 15 minutes if done correctly.
Do this at night, around 10pm-12am when there's less traffic (also police) on the road
Choose a freeway that's generally empty around this time and drive on the
most right lane
Bring all necessary documents in case you are pulled over by the police
Make sure the car has a full tank of gas
Allow the car to cool down for at least 3 hours so the engine bay
temperature is less than 50°C/122°F
If you are doing this in the winter, wear extra layers - you cannot turn on
Step 1: Cold Start
The engine coolant temperature must be below 50°C/122°F and above 6°C/11°F of the ambient air temperature during startup.
Don't leave the key on before the cold start or there is a possibility that the heated oxygen sensor may not run.
Step 2: Idle
Run the engine for 2.5 minutes with the rear defroster on and the AC on maximum. The more electrical load, the better.
This tests the Passive Air, O2 heater, Purge "No Flow", and Misfire. If you can achieve a closed loop, then the Fuel Trim will also be tested.
Step 3: Accelerate
Turn off air conditioner, radio, and other loads. Apply a half throttle until you reach 55mph. Make sure to drive on the right most lane.
This tests the Misfire, Fuel Trim, and Purge Flow.
Step 4: Maintain Steady Speed
You must maintain a steady speed of 55mph for 3 minutes.
This tests the Air Intrusive, Misfire, EGT, Purge, O2 Response, and Fuel Trim.
Step 5: Decelerate
Release your foot from the accelerator pedal. You must not shift or touch the brake/clutch. The vehicle must gradually coast down to 20mph. Now is a good idea to turn on your hazard warning lights to let other cars behind you be alert on what's going on. They may even high beam you in the process. This is why you need to already be in the most right lane.
This tests the Purge, EGR, and Fuel Trim.
Step 6: Accelerate Again
Accelerate at 3/4 throttle until you reach 55mph again.
This tests the Misfire, Fuel Trim, and Purge Flow again.
Step 7: Maintain Steady Speed Again
You will now maintain a steady speed of 55mph for 5 minutes.
This performs additional diagnostics as well as the catalyst monitor. However, if the battery has been disconnected or the catalyst is marginal, it might take you 5 entire driving cycles to complete.
Step 8: Decelerate
Once again, don't brake, shift gears, or press the clutch.
This performs the same tests as step 5.
Step 9: Good Luck
If at any time you have to speed up, change lanes, or break steps 3-8, you must start the driving over. If the process goes well, you will only have to attempt this once, but it shouldn't take more than a few times to complete the Driving Cycle. Good luck!