Engine Codes?

My check engine light came on and I am getting codes (23 and 31) and I was wondering what they were and how to fix them. My car is a cali car so it has the factory mass air flow if that makes a difference. Thanks everyone.
 
Code 23 is: "TP out of Self-Test range"

Code 31 is: "EVP or PFE circuit below minimum voltage"

So for 23 you need to check/adjust your throttle position sensor to be within 0.8 - 0.98 volts.

Code 31 relates to the EGR valve, but cannot help you on that one...
 
Code 23 - Throttle sensor out of range or throttle set too high - TPS needs to be reset to below 1.2 volts at idle. Keep in mind that when you turn the idle screw to set the idle speed, you change the TPS setting.
You'll need a Digital Voltmeter (DVM) to do the job.

Wire colors & functions:
Orange/white = 5 volt VREF from the computer
Dark Green/lt green = TPS output to computer
Black/white = Signal ground from computer

Always use the Dark Green/lt green & Black/white wires to set the TPS base voltage.

Do the test with the ignition switch in the Run position without the engine running.

Use the Orange/white & Black white wires to verify the TPS has the correct 5 volts source from the computer.

Setting the TPS: you'll need a good Digital Voltmeter (DVM) to do the job. Set the TPS voltage at .5- 1.1 range. Because of the variables involved with the tolerances of both computer and DVM, I would shoot for somewhere between .6 and 1.0 volts. Unless you have a Fluke or other high grade DVM, the second digit past the decimal point on cheap DVM’s is probably fantasy.

Since the computer zeros out the TPS voltage every time it powers up, playing with the settings isn't an effective aid to performance or drivability. The main purpose of checking the TPS is to make sure it isn't way out of range and causing problems.

The Orange/White wire is the VREF 5 volts from the computer. You use the Dark Green/Lt green wire (TPS signal) and the Black/White wire (TPS ground) to set the TPS. Use a pair of safety pins to probe the TPS connector from the rear of the connector. You may find it a little difficult to make a good connection, but keep trying. Put the safety pins in the Dark Green/Lt green wire and Black/White wire. Make sure the ignition switch is in the Run position but the engine isn't running.

Here’s a TPS tip I got from NoGo50

When you installed the sensor make sure you place it on the peg right and then tighten it down properly. Loosen the back screw a tiny bit so the sensor can pivot and loosen the front screw enough so you can move it just a little in very small increments. I wouldn’t try to adjust it using marks.

(copied from MustangMax, Glendale AZ)

A.) Always adjust the TPS and Idle with the engine at operating temp. Dive it around for a bit if you can and get it nice and warm.

B.) When you probe the leads of the TPS, do not use an engine ground, put the ground probe into the lead of the TPS. You should be connecting both meter probes to the TPS and not one to the TPS and the other to ground.

C.) Always reset the computer whenever you adjust the TPS or clean/change any sensors. I just pull the battery lead for 10 minutes.

D.) The key is to adjust the TPS voltage and reset the computer whenever the idle screw is changed.

The TPS is a variable resistor, must like the volume control knob on a cheap radio. We have all heard them crackle and pop when the volume is adjusted. The TPS sensor has the same problem: wear on the resistor element makes places that create electrical noise. This electrical noise confuses the computer, because it expects to see a smooth increase or decrease as the throttle is opened or closed.

TPS testing: most of the time a failed TPS will set code 23 or 63, but not always. Use either an analog meter or a DVM with an analog bar graph and connect the leads as instructed above. Turn the ignition switch to the Run position, but do not start the engine. Note the voltage with the throttle closed. Slowly open the throttle and watch the voltage increase smoothly, slowly close the throttle and watch the voltage decrease smoothly. If the voltage jumps around and isn’t smooth, the TPS has some worn places in the resistor element. When the throttle is closed, make sure that the voltage is the same as what it was when you started. If it varies more than 10%, the TPS is suspect of being worn in the idle range of its travel.

See Ford Fuel Injection Wiring Harnesses for more wiring help & 10 pin connector diagrams

CODE: 31 (KOEO) - EVP circuit below minimum voltage. Vref (5 volt reference voltage supplied by the computer) missing or broken wire or bad connection in circuit. Use a DVM to check for 5 volts on the orange/white wire. If it is missing, look for +5 volts at the orange/white wire on the TPS or MAP sensor located on the firewall near the center of the car. Use the black/white wire for the ground for the DVM.
With the sensor removed from the EGR and still connected, press the plunger and watch the voltage change on the brown/lt green wire. Pull the passenger side kick panel and measure the voltage at the computer. You will need to remove the plastic cover over the wires and probe them from the backside. A safety pin may prove very useful for this task. Use pin 27, EVR input (brown/lt green wire) and pin 46, signal ground (black/white wire) to measure the voltage. The orange/white wire is Vref and should always be 5 volts -/+ .25 volt. Be sure to measure Vref at the EGR sensor to rule out any broken wires or bad connections.
Measuring the voltage at the computer helps you spot broken wiring and intermittent connections.
 
I got the 23 code to disappear, TPS was at 2.4V adjusted to .85. The EGR was measuring 5V and adjusted when the plunger went in and 5V at the EEC. The check engine went off but will go off for awhile and then come on and then go off. I am think that there a short somewhere. Any suggest on places to check first?