This is almost always a MAF (Mass Air Flow) sensor problem. Sometimes cleaning out the MAF works, but most often it's necessary to replace the MAF sensor. We want to make sure your Ford F-150's Mass Air Flow sensor has a good 12v coming to it from the battery, a good ground, and also ensure that it is producing the correct voltage output.
At idle and with your Ford F-150 engine at normal operating temperature, the MAF sensor should produce a signal voltage of .09 to 1.6 volts. The MAF sensor's entire operating range should be between .0 to 5 volts. After conducting some tests you may notice the MAF is producing above normal voltage, and this will indicate the MAF is defective.
The MAF should be tested while the engine is both at idle and 2500rpm, and without removing the MAF harness. Below we indicate which wires should be tested using a voltmeter. Your Ford F-150 MAF sensor should be imprinted with the following letters; indicating the wire functions.
Wire A: 12 Volts.
Wire B: Ground.
Wire C: Ground from PCM.
Wire D: MAF Signal.
Wire E: Air Temp. sensor circuit (N/A on 4-wire MAF sensor).
Wire F: Air Temp. sensor circuit (N/A on 4-wire MAF sensor).
Check and cross check for voltage and ground, both between the battery terminals, and the PCM. If all checks out, test the signal wire. While the engine is idling check for voltage from the MAF signal wire and a good known ground. Ensure as engine speed increase, so does voltage; and the increase (or drop) is smooth and steady. With a rich fuel condition, you should see high signal voltage at all engine speeds.