Surging and stalling when started

Hello everyone, this is my first post here. Hopefully someone can help. My '04 Nissan Sentra is making me late for things.



I’ll start it up, the engine will turn over and fire normally. It then idles for a couple seconds, revs on it’s own, surges a couple times and then stalls out. I can eventually get it running normally but it takes about 10-15 minutes of restarting it and feeding it gas to get it to stop surging and actually run normally.



It’s been doing this for a while. The check engine light was on and threw a code for a crank position sensor failure. It seemed to be a pretty simple repair/fix so I replaced the sensor. Everything ran great for about 2-3 months and now the same code is back. Plus it’s worse than it was. I used to be able to start it and leave the car running for 10 minutes on its own. It would run normally when I came back out. Now I have to restart it about 3-4 times and play around with it by feeding it gas.



Additional notes: the engine was rebuilt a couple years ago after I was in an accident. My father, very well mechanically inclined but not a modern car mechanic, thinks the timing is off since that accident and subsequent rebuild. However, this model year has a distributor so adjusting timing ourselves isn’t an option.



Also, I have serious budget restrictions and the cheaper I can get this solved, the better.



Thanks in advance for all the help.

What is the actual code? There are quite a few codes that indicate something about the crank sensor. None of them actually mean that you need a new crank sensor.

My initial guess will be a wiring problem.

The code was actually 0314. I think it was P0314 but don’t remember. I’ll try to get it read again.

  • B

Was able to get the code read - I was incorrect before.

The code is P0340

Anyhelp would be great

and another question: when I replaced the Cam Position Sensor, should there have been oil all over it?

  • Brian