Got a P0335 code (Crankshaft Position Sensor)

I got a 2004 Nissan Sentra and a p0335 (Crankshaft Position Sensor) popped up on it after the car stalled out sitting in a parked position for 2 mins. The car also stalled out again 20 mins later while I was driving. When the car stalled out in park I had to wait 3 mins because it was just cranking over, when it stalled while driving it started 30 secs later with 1st turn of the key. This car has been having start up issues after the car been driven and sat for 40 mins but when the key is cycled 3 times it starts up fine. I also was going to eventually make a post of this, the car been making clicking or rattling noise at times, off and on mainly when the car been warmed up and at idle more noticeably heard , hear the noise better from inside the car, forgot what side of the engine where the noise is coming from. Also I did a search in the past about recalls on this car and there was a recall on the CRANK ANGLE SENSOR on the 2.5L engines, the car I have is a 1.8L. Stated on this link 3rd one down. www.autoblog.com/buy/2004-Nissan-Sentra/recalls/ . Does it sound like the Crankshaft Position Sensor needs to get replaced?

Offhand, it sounds like the CPS is bad and that can cause random stalling, failure to start, etc.

The rattling is likely another problem. A rattle can mean a number of things but assuming rattle means a somewhat tinny sound that could point to a lash adjuster rattle or timing chain and/or chain tensioner.

The CPS (alternately, “CKP”) sensor is a common failure item, not just on your car, but most cars. And the most common way it starts to fail is when the engine heats up. So it is a pretty good bet yours needs replacement.

I don’t see how cycling the key from off to on three times would have any effect on the CKP, other than it allows some more time for the sensor to cool off. I’m not aware of a method to test the sensor, but ask at your auto parts store, they might provide that service. If you do replace it, and the problem remains, the key cycling solution points to a fuel pressure problem. Bad pump check valve, leaking injector, faulty pressure regulator. A mechanic would diagnose with a fuel pressure test.

Suggest you focus on the ckp and the fuel pressure first. Once those are resolved, post again about the rattling noise.

I agree with the others

Replace the crankshaft position sensor

You have all the symptoms

Be grateful you actually have the fault code

I’ve diagnosed and replaced many sensors that did NOT generate a fault code

I forgot to mention in this post that the car came up with 2 P0335 codes, I don’t know if one was a solid code and other was a pending because I got a cheap Autel scanner. Just looking to see if I have 2 of the same codes could mean 2 separate problems?
So i was about to change the crank sensor out but couldn’t, I am able to spin it but it won’t budge outward, it’s in a tough spot under the car. Is there a certain way or tool to pull it out? So since I couldn’t pull it out I put the screw back, reconnected it, erased the codes and going to see if the light comes back on.
I did have a engine light come on another car in the past, some type of cam sensor or something, couldn’t take it out also, so all I did was spray some electric clean spray in the connect and the engine light never came back on afterwards, I’ll probably spray some electric clean spray in this old crank sensor connection also.

The P0335 is a cpk malfunction code from what I can see. It’s a three terminal gadget, right? Isn’t it just held on w/a bolt? You probably have to remove the electrical connector first, then you’ll have access to unscrew the bolt. Are you saying you’ve removed the connector & removed the bolt, but it still won’t come off? It spins in place? hmmm … well, don’t know what to tell you, no experience with removing that sensor. You have the 1.8 L engine, right? I’m not aware of any special tools needed to remove them, but sometimes there’s a special alignment tool needed when you install one.

When you get it out and on the work bench, if you like to try an experiment, measure the resistance between all three combinations of the pins, 1-2, 2-3, 1-3. What resistance does each read? From what I can tell, when you do this, you are supposed to use the + probe on the higher number of the combo. For example when you measure 1-3, put the + probe on 3.

Shops often have a lab o’scope and can use it to see if there’s a square wave coming from the sensor as the crankshaft turns. That’s the best test probably.

No harm done to clean up the connections. Might work. That part is in a very tough location, gets lots of heat and stuff kicked up and wind driven from the road.

Other things that can cause a cpk malfunction include faulty wiring from the sensor to the PCM, PCM on the fritz, or a damaged reluctance ring, that’s the gadget bolted on the crankshaft that the cpk senses.

George: Yes it is a three terminal gadget. Yes it’s held on by a bolt. Right I’m able to take out the bolt and connector, and the sensor spins freely like 30 degrees because where it bolts into and where it connects bumps against metal.
So it’s in a pretty tough spot, I can’t get two hands on it, barely get a screwdriver in there, hard to pry out because I don’t have a good angle with the screwdriver. The other thing it’s plastic so I’m a little scared of breaking it. It won’t budge outward just spins. I wish I can get some separation between the sensor and where it butts up against because then I can slip a screwdriver in there and it would be easier to pry out. Also I’m not looking to remove all kinds of parts for better access and who knows still if I would be able to take it out with parts out of the way
It happened again with the car, it stalls out but worse this time. The car stalls out after like an hour of driving but this time it stalled out every minute after the 1st time.

Yeah, a bear to get to:

I can’t imagine why it doesn’t come out. I would hesitate to pry it with any force; there’s something else going on.

After looking at some videos about replacing the sensor it looks to me that there is an O-ring seal on the sensor that may be holding it in place. I would wrap one end of some twine around the body of the sensor then wrap the other end around a socket wrench drive handle, then tug on the handle as straight out as you can to pull the sensor out of the hole.

The error code you have shows there is a circuit problem so it may be there is a wiring problem causing the issue. Though the symptoms you stated about the problem seem to indicate that replacing the sensor will indeed fix the problem. I would just purchase another sensor to have on hand when you pull the original one out.

If this happened to me, the part is nearly inaccessible and won’t come out, first I’d say some bad words. Words I usually say when working on home plumbing … lol … Next, in line with the o-ring idea presented by @Cougar above (if his method didn’t work), I’d experiment with making a special purpose tool. By bending a screwdriver, near the tip, enough and at the right angle so I could possibly pry the part out. I have a bunch of inexpensive screwdrivers of various sizes and lengths I keep on hand for this purpose, to bend as needed so they are configured to do the job. I also have a a handy tool I use for removing nails. It’s called a monkey’s cat’s paw I think. It might be configured to do that job too.

So I was able to take the sensor out but it was insanely tight coming out, had to pry with a screwdriver like crazy, this sensor is not like what you see people on youtube take out by hand or put in. I was about to give up at one point. But when I was having such a hard time taking the old sensor out, I was thinking, am I going to be able to put the new sensor in. And the answer is no. It is so tight I can’t even start it to go in. I slicked the O ring with oil and used the bolt to help it go in but it just goes crooked. It just insanely tight.
Looking to see what the next best thing. Should I clean the hole where the sensor goes into and slick it with oil? Try it with the old O ring? Or I might have to buy a thinner O ring? Last option would be shaving the O ring down? Because there almost no way it’s going in without some kind of modification What’s a good way to do this?

By all means clean up the hole for the sensor and use some oil on the surfaces of the hole and the O-ring. I would use the bolt to help push the sensor into the hole with a slight force. Then place a socket just large to go over the connector of the sensor and then tap lightly on the socket using a rubber mallet to push the sensor into the hole.

OK so cleaning the hole with a rag with a little gas on it, is a good way to clean the hole. Then slick up the hole and O ring with oil and try to put it in?
I did stick my finger in the hole it did feel slick but there might be some gunk there too.

@jspe8437 lubricate the new o ring with engine oil . . . just a little bit

Clean out the sensor hole with some sandpaper, if you’re able to, then blow out the debris, as best you can

If you’re able to chase the female threads for the bolt, even better

Clean out the sensor hole with some sandpaper, if you're able to, then blow out the debris, as best you can

Wouldn’t that be blowing debris into the crankcase?

@insightful That amount of debris is almost certainly not enough to cause damage

But it’s apparently enough to prevent proper installation of the new sensor

That’s how I see it

It’s the sandpaper grit in the engine I would worry about.

But that’s just me…

@insightful I hear what you’re saying

But if somebody wanted to be perfect 100% of the time, he shouldn’t even bother getting out of bed in the morning

So I ended up getting a new O- ring for the sensor. I spoke to Nissan about the O-ring size and the parts guy matched up a separate O-ring to the O-ring on there sensor and he told me the thickness was 2.5mm. They only make a 16mm by 2.5mm and a 19mm which was to loose on the sensor but the 16mm O-ring did fit on the sensor a little snug, probably needed a 17 or 18mm . So the sensor was able to go in with the new O-ring, thought it should go in a little tighter than it did, but thought it had good enough tension going in for it to not be a problem. So it’s been 2 weeks since I put the sensor in, drove it for a bit, I went underneath twice to check for leaks and it’s been no problem…

Congratulations!