Code P0420 for two sensor. Change thsi one or Try to clean it will work fine. I have my Experince with my car. Altima 2005.
1- crankshaft code (crankshaft sensor)
2-Camshaft, Crankshaft sensors.
P0507 Idle Control System RPM Higher Than Expected.
Idle speed control system
RPM higher than
expected
The idle speed is more than the target idle
speed by 200 rpm or more.
l Electric throttle control actuator
l Intake air leak
l PCV system
How to solved The codes P0507.
Error code: P0507 Idle speed too high, The reader at AutoZone stated it was the idle speed control valve.
Action: Sprayed throttle body (TB) with TB cleaner. engine off. cleared codes.
Result: still idles high (1700rpm). Once engine reaches normal operating temperature, idle fluctuates from 800-1800rpm approximately every 2 seconds. If AC is on and in gear, idle is ~1000rpm. If AC is off and in gear, idle is ~900rpm. Driving seems mostly normal, but I can tell there is higher than normal engine rpm, engine is less responsive, reduced gas mileage (about 5mpg overall) and slight engine speed increases similar to idling.
Next Action: Replaced with new throttle body, reset code, performed throttle position learn and idle speed learn. The last two actions I did on my own as described in various posts.