There is a TSB on it. Maybe clean the throttle body and check for vacuum leaks first. Here's some information on it too.
P0506 Idle Air Control System RPM Lower Than Expected - DTC Code
Here's the TSB on it,
TSB 08-18-2
09/15/08
MIL ON - P0506 AND/OR P0505 - HESITATION/LOSS
OF RPM/DIFFICULTY STARTING/LOW IDLE RPM
FORD:
2005-2007 Crown Victoria
2006 Mustang, Mustang
2004-2006 F-150, F-150
2005-2006 E-350, E-450, F-Super Duty
2006 F-53 Motorhome Chassis
2006-2007 Explorer Sport Trac, Explorer
LINCOLN:
2005-2007 Town Car
2006 Mark LT
MERCURY:
2005-2007 Grand Marquis
2006-2007 Mountaineer, Mountaineer
This article supersedes TSB(s) 08-5-13, 07-23-12 and 06-25-8 to update the Service Procedure.
ISSUE
Some 2004-2006 4.6L and 5.4L F-150 (excluding F-150 Heritage), 2006 5.4L Mark LT, 2005-2006 6.8L E-350 / E-450, 2005-2006 6.8L F-Super Duty (F-250 to F-550), 2006 6.8L F-53 Motorhome Chassis, 2006-2007 4.0L Explorer 4 dr, 2007 4.0L Explorer Sport Trac, 2006-2007 4.0L Mountaineer, 2006 4.0L Mustang, 2006 - 2007 4.6L 3V Explorer / Explorer Sport Trac / Mountaineer, 2006 4.6L 3V Mustang, and 2005-2007 Crown Vic / Grand Marquis / Towncar vehicles may exhibit one or more of the following symptoms: drive-away hesitation, loss of RPM on deceleration, difficulty starting, and/or idle RPM less than desired. Malfunction indicator lamp (MIL) may be illuminated with diagnostic trouble codes (DTCs) P0506 and/or P0505. These conditions may appear after battery disconnect, dead battery condition, or keep alive memory (KAM) reset. The symptoms may be due to engine deposits in the throttle leading to air[low less than desired.
ACTION
Follow the Service Procedure steps to correct the condition.
SERVICE PROCEDURE
1. Reprogram the powertrain control module (PCM) to the latest calibration using IDS release 53.9 and higher or 54.1 and higher. This new calibration is not included in the VCM 2008.1 DVD. Calibration files may also be obtained at the website. The calibration contains a sludge compensation strategy for the throttle body.
2. Turn the key off to re-initialize the PCM. This will allow the sludge compensation strategy to learn.
3. With the vehicle in park or neutral and A/C off, start vehicle and allow engine to reach normal operating temperature(greater than 170 °F (77 °C) coolant temperature). Run an additional 5 minutes to allow sufficient learning time.
4. While the engine is running, using IDS datalogger or equivalent, check the PID value of ETC_TRIM.
a. If ETC_TRIM value is 3.5 degrees, and/or DTC PuSE is present, then replace the electronic throttle body (ETB), following Workshop Manual (WSM), Section 303-04B.
b. If ETC_TRIM value is less than 3.5 degrees and DTC PuSE is not present, but driveability concerns persist, the ETB is not the likely cause of the concern and replacement is not necessary. Continue with normal PC/ED diagnostics.
NOTE VEHICLES EQUIPPED WITH A PCM AND TCM REQUIRE COORDINATED REPROGRAMMING.
THIS COORDINATED REPROGRAMMING PROCEDURE MUST BE FOLLOWED EXACTLY AS OUTLINED BY THE IDS. FAILURE TO FOLLOW THE KEY CYCLE PROCEDURE WITHOUT WAITING FOR THE IDS PROMPTS, WILL CAUSE THE COORDINATED REPROGRAMMING TO FAIL. THE PCM WILL BE UPDATED BUT THE 1CM WILL NOT BE UPDATED AND NEW FILES WILL NOT BE INSTALLED. IT IS CRITICAL TO FOLLOW THE IDS PROMPTS. SOME VEHICLES MAY REQUIRE SEVERAL DAYS OF DRIVING FOR THE TRANSMISSION TO FULLY ADAPT.
REPROGRAMMING CONCERNS/ERRORS MAY BE CAUSED BY THE DATA LINK CONNECTOR (DLC) OR VEHICLE COMMUNICATION MODULE (VCM) BECOMING DISCONNECTED, LOW BATTERIES ON THE INTEGRATED DIAGNOSTIC SYSTEM (IDS) OR THE IDS GOING INTO ANY TYPE OF SLEEP MODE, OR LOW VEHICLE BATTERY VOLTAGE. IF THERE WAS AN INTERRUPTION DURING REPROGRAMMING, MAKE SURE THE ORIGINAL IDS SESSION THAT WAS CREATED FOR THE VEHICLE IS NOT DELETED. IF THE ORIGINAL VEHICLE SESSION IS NOT USED OR DELETED BEFORE THE MODULES ARE COMPLETELY REPROGRAMMED, FURTHER REPROGRAMMING ERRORS CAN OCCUR. THE MODULE RECOVERY PROCEDURE IS NO LONGER AVAILABLE AND IT IS CRITICAL THAT MODULE SWAPPING IS NOT PERFORMED FROM VEHICLE TO VEHICLE. TO REGAIN COMMUNICATION WITH A MODULE THAT HAS BEEN ERASED DURING REPROGRAMMING, RESUME THE ORIGINAL SESSION ONCE THE IDS IS RE-BOOTED.