# Suspicious camshaft sensor wiring



## manoweb (Jan 27, 2014)

Hi! I just bought a 1999.5 Jetta MK4 2.0L AEG with 160k miles.

I opened up the engine yesterday to work on the camshaft sensor as it was throwing code P0341.

I removed the old one and I am waiting to day to receive a new sensor. In any case, I noticed the wiring that goes to the sensor:










I noticed the connector on the left has three wires. On the right, the wires run to the ECM but you can notice the violet/yellow (it's hard to properly see colors, sorry) seem to have been cut and connected to a black one. Is this what I should expect? Or somebody made a mess trying to fix things before? What would you advice - if somebody has a AEG and could check the wiring/take a picture of it...

The connector is located not too far from the spark plug of cylinder 1:


----------



## Anony00GT (Mar 6, 2002)

Why are you replacing the cam sensor to begin with? Did you diagnose it or just have a code and assume a bad sensor?

Verify that there is continuity between the cam sensor connector and the appropriate pins on the ECU. If there is, the wiring is good. That splicing method is questionable though.


----------



## manoweb (Jan 27, 2014)

Hi Anony00GT.
I am replacing the sensor as I got a P0341 code. I can clean the code, drive a bit - I do not get the code again - but next time I start the engine the code comes back. After some research on the forums, it seems that some people fixed the issue just by replacing the sensor.

I have found the page on the "Bentley" manual that shows the electric connections. Last night I have followed that spliced black wire and it goes all the way close to the wipers motor, just under the windshield. I'll have to open that part to check for continuity. Thanks for the advice!

As you say that splicing is questionable, assuming it was done because the original wiring was damaged, what kind of technique would you have used to repair it properly?

Thanks!!!


----------



## Anony00GT (Mar 6, 2002)

W-crimps are the best way. Soldering is good as well, provided you know how to solder. A bad soldering job can be just as bad as a broken wire. Either way it should be covered up with heat shrink. Butt connectors are a big no-no (looks like that's what was done to yours). But then again, if it works, leave well enough alone I guess.

You shouldn't have to physically follow the wires. Disconnect the cam sensor and ECU connector, use wiring diagrams and an ohmmeter at both ends to check wire integrity.

Your symptoms (P0341 returning on the second start every time) is actually indicative of the timing belt being off a tooth moreso than a bad sensor. Either way it should be fixed now when you get it all back together


----------



## manoweb (Jan 27, 2014)

Yes... I know how to solder  I will fix that connection and apply proper insulation.

My point about following the wire is that it goes in an area under the windshield where I can see other wires and connectors. I will have to open it up to check continuity.

About the timing belt being off one tooth: how can I check that? Of course I have placed my own marks on the timing belt/sprocket but how can I know if the previous owner - that told me he's changed the timing belt himself - skipped a tooth?


----------



## Anony00GT (Mar 6, 2002)

Just unplug the ECU connector, no need to open up the wiring harness more than that if you've got a service manual with diagrams.

Now that the timing belt is off, you can't tell. But you should be using the factory marks, not marks you made, to line it back up. There's a mark on the flywheel and a mark on the cam gear.


----------



## manoweb (Jan 27, 2014)

OK, I will have to find the ECU - I do not know its position now.

As per the timing belt: I will reinstall it with my marks on the camshaft sprocket (I made it sure it could not slip on the crankshaft), then align the marks to see if they are off. Most guides and DIY on the forums use the nailpolish mark technique instead of using the factory marks... I'm learning!


----------



## Anony00GT (Mar 6, 2002)

That's the problem with reading DIY's on the internet vs the proper procedure in the service manual. People in the know wrote the manual. People working under an oak tree while drinking beer wrote the internet DIY's 

I'd recommend you just bring #1 to TDC and start over, disregard your marks. You can turn the crankshaft all you want with the cam removed.


----------



## manoweb (Jan 27, 2014)

Oh true, the valves will stay closed without the camshaft installed. Scary!


----------



## manoweb (Jan 27, 2014)

So just to make sure... I will likely perform the procedure tomorrow. I rotate the crankshaft so cylinder 1 is on TDC by checking the mark on the flywheel. At the point, I will carefully reinstall the camshaft so it has the notch aligned to the mark on the engine. Once it is in, I will reinstall the timing belt; the nailpolish marks I have made should match or be off one tooth maximum. If they do not, something is wrong...


----------



## Anony00GT (Mar 6, 2002)

Well, was the engine at TDC when you made the marks? If not, your marks will never line up.

You are correct. Bring #1 to TDC, then install the cam so the valves on cylinders 1 and 4 are not open. Then re-install the valve cover and line up the mark for the cam.

If you're paranoid, rotate the crankshaft backward 45* before installing the cam, that'll bring all the pistons off TDC so nothing will hit and you can turn the cam as necessary to align it once installed.


----------



## manoweb (Jan 27, 2014)

I cannot assume #1 was at TDC when I made the marks, but I made sure the belt has not slipped from the crankshaft, so I expect to turn the crankshaft and then install the camshaft in a position that won't be too far off the original markings I made...

Good idea to carefully rotate the cylinders away when installing the camshaft, I'll see if that makes it easier.


----------



## manoweb (Jan 27, 2014)

So... it happens that I cannot find where the inspection hole is on the manual transmission to see the notch on the flywheel. What do I have to take apart to access it?


----------



## manoweb (Jan 27, 2014)

OK nevermind I removed the air filter box and now I can see it... let's see if I can find the mark now...


----------



## manoweb (Jan 27, 2014)

OK I think I have aligned it... I'll check through the spark plug hole too, but do you think this is correct?


----------



## Anony00GT (Mar 6, 2002)

Looks right. Some flywheels have a "-0" though. Verify through the spark plug hole that #1 is at TDC.


----------



## manoweb (Jan 27, 2014)

I verified through the spark plug hole and I am at TDC indeed. So I started trying to put the camshaft back on but I've probably been careless... and I broke the new camshaft sensor. It's made of plastic and I have applied the wrong leverage with the sprocket and I broke it. 

Now, I'm looking for advice; first of all, it would be much easier if I could install the camshaft without the sprocket, but I do not have the tool to hold the sprocket and prevent it to rotate when applying the substantial torque required for its bolt. How should I proceed?

Second, should I rush order a new camshaft sensor or is there a way to test the original one, that maybe is not broken, and the code P0341 came up because the timing was wrong?

By the way, I have tested the electric continuity for that wire that was repaired, camshaft sensor connector to ECU connector, and it's good.

Thanks


----------



## Anony00GT (Mar 6, 2002)

I've never removed the entire camshaft to service the sensor, always just removed the gear from the cam, I've never even touched an intake of valvecover to do it. Don't know what to tell you there, except be more careful, and if you're going to do a job, you need the correct tools to do it.

Why not try the old sensor, since you're in a bind anyway? Worst case scenario is you have to order a new sensor and pull the gear off again, it's not that hard to do.


----------



## manoweb (Jan 27, 2014)

OK but which tool do you use to hold the gear while working on the bolt? Do you have the special VW tool?


----------



## Anony00GT (Mar 6, 2002)

I have an air gun and swivel socket


----------



## manoweb (Jan 27, 2014)

Oh in that case you do not need to hold on to the sprocket? Won't an air gun make the sprocket rotate anyway?


----------



## Anony00GT (Mar 6, 2002)

No. An impact gun won't make anything rotate except the bolt.


----------



## manoweb (Jan 27, 2014)

So I got a new sensor, installed it, and installed the camshaft too. I build a tool to hold the sprocket and tighten its bolt to 74ft*lbs. All has been very smooth. I installed the new valve cover gasket with the required sealant. I used three different torque wrenches to tighten all bolts correctly. Very nice.

I then moved the crankshaft to TDC (as you suggested, I moved it away a little when installing the camshaft) and mounted the timing belt on the sprocket. I had to remove it and move it forward a tooth as the camshaft alignment was slightly off. Am I correct to say that when the timing belt tensioner is set it "pulls" the camshaft sprocket a little counterclockwise, so when I put the timing belt on I have to keep the mark about one tooth to the right? In other words, what matters is the alignment of the sprocket when the timing belt is tensioned, not before?

This said, I am having a very hard time to fully set the tensioner. I can tension it about half way through but more than that the tensioner itself rotates !?!? So far I tried with a 45deg long reach pliers and a small tool I've built myself with two pins about 16 mm apart. Advice?


----------



## manoweb (Jan 27, 2014)

So I removed the engine mount to have better access to the tensioner. It's now much easier to work on it... can I set it and make sure the timing belt is OK (rotating several times the cranckshaft) without the engine mounts and then close everything? I am still not 100% sure this tensioner is perfectly good, maybe I should replace it, but I'd rather do that without the engine mounts if possible...


----------



## Anony00GT (Mar 6, 2002)

The engine mount has nothing to do with the timing. Yes you have to remove it to change the belt, but that's as far as the relationship goes.


----------



## manoweb (Jan 27, 2014)

Well it makes much easier to set the tensioner. I will set everything, turn the crankshaft several times to see that everything stays aligned, and then put the mount back on.
I asked because the Bentley document shows to reinstall the engine mount before setting the tensioner when changing the timing belt.


----------



## manoweb (Jan 27, 2014)

Great, so my wife drove over the timing belt cover with her other car, broke it, and silently threw it in the garbage. I found a piece under my other car, and confronter her 
I looked up online and they are not very cheap. How important is it to get a proper timing belt cover?


----------



## manoweb (Jan 27, 2014)

Installed everything, it lines up pretty well etc. I made several rotations of the crankshaft and the marks stay well aligned.

Unfortunately, the tensioner looses the tension after a couple of turns, even if its bolt is torqued pretty tight. Should I replace it or am I doing something wrong?


----------



## Anony00GT (Mar 6, 2002)

You've probably got it installed wrong. Make sure the tab is set properly in the freeze plug.


----------



## manoweb (Jan 27, 2014)

The tab is inside. I tension it by rotating counter-clockwise, like indicated by the arrow on it...


----------



## manoweb (Jan 27, 2014)

I've re-set the tensioner after several rotations of the crankshaft and now it stays put. I'm concerned about the alignment of the timing belt now;

is the following OK or should I move it a tooth to the right?


----------



## Anony00GT (Mar 6, 2002)

Need a corresponding picture of the crankshaft to help there.


----------



## manoweb (Jan 27, 2014)

You mean the mark on the flywheel? It's exactly like this:


----------



## Anony00GT (Mar 6, 2002)

Cam is one tooth advanced.


----------



## manoweb (Jan 27, 2014)

OK as I suspected; I moved it, I did not take any picture unfortunately but now the mark is in between these teeth:


----------



## manoweb (Jan 27, 2014)

OK the actual alignment (the flywheel is perfectly on the mark) looks like this now:










Can I close everything and try to start the engine?


----------



## Anony00GT (Mar 6, 2002)

Yes, that's good. Fire it up.


----------



## manoweb (Jan 27, 2014)

Nice  I'll let you know what happens


----------



## manoweb (Jan 27, 2014)

So I started it - at first I forgot to plug a couple of hoses but then it was fine 
It seems it's running fine (it's still on jackstands unfortunately, I am waiting for new caliper pins). Unfortunately when I stopped the engine and I started it again, the code P0341 came back again. At this point:

- timing should be correct, as per the pictures I posted above. The tensioner stayed set correctly.
- the sensor is brand new

Advice? Would it make sense, for a test, to unplug the camshaft sensor and run the engine without it, to see if it throws a different code? 


bye!


----------



## Anony00GT (Mar 6, 2002)

Did you re-install the old sensor or is this a new sensor?


----------



## manoweb (Jan 27, 2014)

The sensor is brand new


----------



## manoweb (Jan 27, 2014)

I think I will re-check all the wiring and make sure it connects properly. There isn't much else I can do.
Also, when I had the camshaft sprocket off, I noticed that the metal part that goes into the sensor has a minor imperfection, like a small ding. Could that be the source of the problem?


----------



## Anony00GT (Mar 6, 2002)

It could be. Hard to say without seeing it.

Is the new sensor a good one or a Chinese knockoff? Are you sure the crankshaft mark on the flywheel was properly aligned when you took that last pic of the cam gear?


----------



## manoweb (Jan 27, 2014)

Yeah the flywheel was aligned perfectly, I always had my wife keep it checked with a light, and she's very accurate in aligning things.
The replacement sensor is surely Chinese; but now, I can understand it might not be as durable, but to throw the exact code that the old OEM one did... I will take some more pictures after I check the wiring again. Thanks for the help so far!


----------



## Anony00GT (Mar 6, 2002)

Yeah definitely triple check the wiring.


----------



## manoweb (Jan 27, 2014)

So I tried to find any fault in the wiring. The Bentley says, at page 28a-10, "Ignition system components (2.0L AEG engine)":

10. Harness connector, 3-pin black
• Check for voltage between ter-
minals 1 and 3 with ignition on;
specification: minimum 4.5
volts
• For camshaft position sensor
(G40)

I checked and I get 4.99V.

I have followed terminal 2 to the ECU connector and I get a perfect continuity.
So far, I see no reason for the camshaft sensor wiring to be bad.

Anyway, there is something I do not quite understand from the Bentley; page 24b-6, "Fuel injection system components, overview (AEG engine)":

3. ECM harness connector, 52-pin
• Only disconnect or connect with
ignition switched OFF
4. Engine Control Module (ECM)
(J220)
5. ECM harness connector, 28-pin

I verified and counted the pins, and I confirm I have a 52-pin connector where, among others, the camshaft sensor is connected. However, later in the electric schematics on the Bentley, 97-67, "2.0L - Engine - Motronic Multiport Fuel(without cruise control), code AEG," G40 (the camshaft sensor) is connected to J220 (the ECM) using a T80 (defined as "Connector, 80 point"). Pin 1 goes to T80/62, pin 2 goes to T80/76, pin 3 goes to ground (I checked it and there is perfect continuity to GND). The ECU has a total of 80 pins, but on two separate connectors, this is very confusing. Here the scanned manual page:


----------



## manoweb (Jan 27, 2014)

I also run the wire from pin 2 to pin 76 in a way that is very far from the spark plug wires to mitigate interference, but the result is the same: engine code each second time I start the car since I clear it.


----------



## manoweb (Jan 27, 2014)

So at the end I checked the wiring and fixed the issue. A previous repair attempt routed the camshaft sensor to the wrong pin in the ECU. The P0341 is now gone.


----------

