Iac valve troubleshooting

I have a 2001 mustang with a 3.8L V6. I’m having some trouble that seems to be coming from the IAC (idle air control) valve but I need to know how to troubleshoot if it is the valve itself or an electrical problem.
I hooked up my code reader and it output code P1504 which directs to an idling problem.
Any tips are greatly appreciated.

Get the engine up to operating temperature.

While the engine is idling, take the handle of a screwdriver and rap on the IAC valve.

If the idle speed changes or the engine stalls, replace the IAC valve.

Tester

It doesn’t. So far what happens is I’ll start the car and it will run fine for about 10 minutes and then the engine shuts off and won’t start again for a while. Tapping the valve does nothing.
If I try to start the car again after it stalls the engine just turns over but does not crank.

Turning over and cranking are the same thing.

You mean the engine doesn’t start.

One thing that can cause that problem is a faulty crankshaft position sensor.

Tester

Any idea how I can test that theory without taking the car to a repair shop or dealership?

The next time the engine won’t start, remove a plug wire from a spark plug and insert an extra spark plug into the plug wire.

Lay the spark plug on the engine to ground it.

Now have someone crank the engine over while watching the end of the spark plug. If there’s no spark at the spark plug, the crankshaft position sensor is probably faulty.

Tester

Does it have to be done that way or can I just pull a wire from the distributor and check to see if it arcs to the wire?

Doing that may cause too large of a gap which can fry the ignition module.

That’s why a spark plug is used, or a tool like this.

Tester

start the car and physically disconnect the IAC - if you wont see difference than next step check if there is power comes to the valve by using voltmeter if no power check the fuse, you also can check the valve itself by connecting 12v and you should hear a click and check the resistance. if nothing happens your valve toasted.
another way to check is simply connect another valve to see if there is any difference.
good luck