The Outback recently died while driving. After a few minutes on the side of the road, it started up & I limped it home with just a couple hiccups. I now had a check engine light which my code reader revealed as P0335 "crankshaft position sensor."
Thankfully I did a thorough visual examination under the hood, rather than running out to spend $100+ on a replacement sensor. On my H6 there is a big wire harness emanating from the firewall & routing under the intake runners on the passenger side, around the front, & back under the runners on the driver's side. I was able to see in under the AC compressor that rodents had chewed into the harness, grrrr.
Accessing this harness required removal of the serpentine belt, so I could remove the alternator, set aside the power steering pump to the left, & lift the AC compressor out of the way to the right.
While this granted some access to the harness, there was very little slack to pull it forward, even with downstream sensors unplugged & the hold-downs released. In these photos I had already picked off the damaged loom cover.
Getting closer...
Here you can just make out the exposed corroded copper strands of the crank sensor's wiring. This is a shielded sub-harness that carries voltage input, sensor output, & harness ground, wrapped in shielding, wrapped in vinyl. I speculate that the signal to the ECU finally touched the shielding or otherwise jumped to ground, resulting in the ECU thinking the engine had instantly stopped turning, hence the stall. Fortunately all those other wires were just dirty from being exposed, & were fully intact. Whee!
To try to create some slack in the harness, I unplugged several sensors from the throttle body & its air chamber.
On my H6, the crank sensor is at the back of the engine & reads a toothed wheel inside the bellhousing. A rubber cover prevents debris from falling inside.
The CPS itself didn't need to be removed, but I found I couldn't detach its connector due to the tight quarters, so I did pull the cover & extract the CPS. That cover was probably pliable when new, but 8 years of heat cycling have made it brittle.
I pulled the sensor connector back through, cut it off, cut out the damaged wire, peeled back the shielding & insulation, & prepared for soldering.
A little closer...
I soldered in several inches of replacement wires. Good thing black & white are common wire colors, they matched :-) Not the cleanest prettiest solder joints, but given the difficult access I was satisfied. I tape wrapped each solder joint...
...then proceeded to achieve shielding with aluminum foil, cut in strips & folded over a few times, then wrapped around my repaired wires. I re-attached the original shielding as best as possible to preserve continuity...
...then wrapped the whole mess in electrical tape. I fished the entire harness back into place & re-wrapped it with some black flexi loom, but I guess I didn't take photos of the completed repair. The entire task was pretty miserable, since every place I needed to reach was just not quite big enough for a hand, blah. I suppose the "official" repair method would involve removing the entire intake manifold and maybe even replacing, rather than repairing, the harness.
As long as I had the accessory serpentine drive torn apart, I replaced the bearings in the idler & tensioner pulley. As widely reported, these bearings seize starting around 80k miles, so now I'm good for another ~ 8 years. This is NAPA's bearing, they're about $10 apiece.
I figure that a shop would have read the code & replaced the CPS at a parts & labor price north of $200. Then when sporadic stalling returned, assuming they found the root cause, we would have been looking at $100's more in labor. I'm nothing if not cheap! The Outback is running good as new.