What Causes Trouble Codes P0300, P0171 and P0507?
The trouble codes you've mentioned are all indicative of a vacuum leak. We suspect somewhere around the engine there is more than likely a vacuum hose that is disconnected, broken or brittle. The break in the vacuum line(s) is allowing unmetered air to enter the intake manifold. If you don't find any problem with vacuum lines, you'll want to check around the PCV (positive crank ventilation) valve and possibly the intake manifold gasket and throttle body. The objective is to find any point where air can enter the engine that is not being accounted for by the engine control computer (ECC).
OBD-II Trouble Codes P0300 through P0304 Engine Missfire Detected
Trouble codes OBD-II trouble codes P0300 through P0304 refer to an engine misfire. P0300 indicates a random misfire. P0301 through P0304 indicate misfires pertaining to individual cylinders, i.e. P0301 Misfire Cylinder #1. Misfires are common when an engine suffers from vacuum leak(s). These trouble codes can be cleared automaticly once the fault which is causing the misfire is repaired. Most often, mechanics will fix the fault, reset the computer, and drive the vehicle to see if the P0300s reappear.
OBD-II Trouble Code P0171 System Too Lean
The most important trouble code here and the real identifier that a vacuum leak exists is OBD-II trouble code P0171. P0171 is pretty straight forward in that it tells us that the engine computer has detected unmetered air. The exact definition of P0171 is System Too Lean. Lean meaning the computer has detected more air in the system than what is required for efficient fuel burning. The engine control computer uses oxygen sensor data to determine whether or not to trigger a OBD-II P0171. When a trouble code P0171 exists by itself, usually a shop technician will suspect a faulty oxygen sensor. When P0171 exists along with any misfire trouble code(s), a mechanical fault is investigated first; which is the reason we are suspecting a vacuum leak in this particular situation.
OBD-II Trouble Code P0507
OBD-II trouble P0507 is described as Idle Control System RPM Higher Than Expected. In a typical slightly lean fuel condition, engine RPM will be higher than normal. The P0507 is triggered when the computer measures data from the throttle position sensor (TPS) and determines engine RPM is higher than normal for particular TPS position. This is a simple trouble code. It doesn't really tell us much about where the problem is, just that there is some sort of trouble causing higher than normal RPM.
How To Fix and Reset P0300, P0171 and P0507?
So as we can see, P0300, P0171, and P0507 are all related, with the culprit being some break in the system allowing for air to enter the intake manifold which the computer has not adjusted fuel delivery for. The next step will be to find where the break (vacuum leak) is.
Mechanic shops and smog repair stations use a variety of techniques to find vacuum leaks, from introducing propane near suspected leak areas to using a mechanic's stethoscope to listen for hissing sounds... which most vacuum leaks usually emit. A stethoscope is used because the diagnosis must be conducted while the engine is running. To pin-point to exact location of the vacuum leak you'll want to be able to listen closely to specific suspect areas. This is the safest method to find a vacuum leak, next to conducting a comprehensive visual inspection.
If you choose to use propane, which we don't advise unless you're a trained technician, you'll want to introduce propane through a narrow hose near all areas of the engine where you suspect a vacuum leak to exist. You will notice an obvious RPM increase when propane is delivered near the leak area. We mention only a trained technician should use this method as obviously propane is a flammable gas and utilizing it near any spark source will cause it to ignite. It's a highly effective tool to find vacuum leaks but must be administered with the utmost care and caution.
Before using either propane or a mechanic's stethoscope it would not be a bad idea to simple look over the engine compartment for loose, disconnected or broken vacuum lines, and while the engine is running slightly wiggle vacuum lines near sensors and the intake manifold to detect any increase in engine RPM. A cracked or damaged vacuum line will almost certainly increase RPM when moved around. All the vacuum line needs is a slightly greater opening (break), and the addition of unmetered air into the engine will raise RPMs. Notice an RPM increase and you've found your leak.
Once you've repaired the fault, remember to clear the computer of the trouble codes. You can use a scan tool to reset the computer. The check engine light should turn off. Drive your vehicle for at least 200-300 miles and over the course of a few days. You'll need to do this for two purposes. One, you'll want to see if you've really fixed the problem, ensuring the check engine light or malfunction indicator lamp no longer illuminates, and second, your vehicle will need to complete a Drive Cycle in order to get the Emission Monitors complete and the vehicle ready for the smog test.