....for some reason when the motor heats up the engine stops sparking. ....
Crank Position Sensors can have intermittent “thermal failure”. The CPS fails when engine gets hot, but works again when it cools back down
CPS
The most likely cause of it cranks and cranks but won't start up is the Crank Position Sensor (CPS). CPS failure is very common. The CPS can stop working with no warning or symptoms and the engine will not run or the engine may randomly stall for no apparent reason. A failed CPS may or may not throw a CEL trouble code.
Symptoms –
-Starter cranks and cranks but engine won't start up
-Fuel gauge and voltage gauges may not work or display properly.
-You sometimes will have No Bus on the odometer after 30-60 seconds.
-
No spark at the spark plugs.
-Fuel pressure is OK at the fuel rail.
If the CPS is failed sometimes the OBDII code reader cannot make a connection to the computer or cannot read Check Engine Light/MIL codes because the CPS has failed.
Crank sensors can have intermittent “thermal failure”. This means that the sensor fails when engine gets hot, but works again when it cools back down.
Diagnostic steps to confirm the CPS is the cause of your no-start
You should be able to verify a bad cps, by unplugging it, and turning the ignition key to on. If the voltage gauge and/or the fuel gauge now displays correctly, replace the CPS.
Unplugging and reconnecting the CPS sensor where it connect to the main harness near the back of the intake manifold usually resets the ECU and if the jeep fires right up after doing this you can bet that the CPS is the culprit and needs to be replaced.
Exchange the fuel pump relay and the ASD relay with one of the other similar ones in the PDC to eliminate the relays as the cause of the no-start Confirm that the fuel pump to runs for 3-5 seconds when you turn the ignition key to ON.
Eliminate the NSS as a cause of no start. Wiggle the shift lever at the same time you try to start. Put the transmission in Neutral and do the same. Do the reverse lights come on when the shifter is in Reverse?
Begin with basic trouble shooting of the start and charge systems. Remove, clean, and firmly reconnect all the wires and cables to the battery, starter, and alternator. Look for corroded or damaged cables and replace as needed. Do the same for the grounding wires from the battery and engine to the Cherokee's frame/body. Jeeps do not tolerate low voltage or poor grounds and the ECM/ECU will behave oddly until you remedy this.
CPS Testing
Crankshaft Position Sensor Connector
TESTING PROCEDURE 1991 – 2001 4.0L H.O. engines
1. Near the rear of intake manifold, disconnect sensor pigtail harness connector from main wiring harness.
2. Place an ohmmeter across terminals B and C (See Image). Ohmmeter should be set to 1K-to-1OK scale for this test.
3. The meter reading should be open (infinite resistance). Replace sensor if a low resistance is indicated.
TESTING PROCECURE for 1987 – 1990 4.0 L engines
Test # 1
· Get a volt/ohm meter and set it to read 0 - 500 ohms. Unplug the CPS and measure across the CPS connector's A & B leads. Your meter should show a CPS resistance of between 125 - 275 ohms. If the CPS is out of that range by much, replace it.
Test # 2
· You'll need a helper for this one. Set the volt/ohm meter to read 0 - 5 AC volts or the closest AC Volts scale your meter has to this range. Measure across the CPS leads for voltage generated as your helper cranks the engine. (The engine can't fire up without the CPS connected but watch for moving parts just the same!) The meter should show .5 - .8 VAC when cranking. (That's between 1/2 and 1 volt AC.) If it's below .5vac, replace it.