For some reason, I can't seem to get the images to load directly - maybe Flickr doesn't allow it?!? It gives you a link to "share" which is below, but if I put it in the image tags, nothing shows up - just a white space. So, I had to do it ghetto and just give a clickable link.
My car is an '02 quattro w/ the 3.0 & tip trans - I believe there is a similar (if not identical) switch on A4s, but I don't think CVT equipped cars will have it (nor manual ones). This write-up pertains to my particular car, but can probably be used as a guide for other engine combinations, A4s, etc.
I had to replace it b/c I was getting this code:
17090 - transmission range sensor (f125): Implausible signal
P0706 - 003 - mechanical failure - intermittent - MIL on
which was causing my trans to go into limp mode - VERY annoying. Anyway, here we go....
6mm hex - range sensor harness clip bracket
8mm hex - trans bracket bolts
10mm socket - heat shield bolts
13mm socket - bottom outside mount bolts
15mm socket - bottom center mount bolt
17mm socket - lugnuts
17mm wrench - top of center mount bolt
T27 torx - range sensor bolts
various 1/4", 3/8" extensions & ratchets
Flex socket joints (swivel joints, elbow joints, whatever you want to call them)
zip ties & scissors or razor
The dealer needed my VIN# for part lookup, so there might be other variations of the switch. It ran me $230 w/ tax.
To start off, if you don't know where the switch is located, it is bolted to the driver's side of the transmission BEHIND the transmission mount. From underneath, you can just barely make it out - just look for the black wiring harness that is clamped alongside the transmission pan.
I drove my car up onto ramps b/c I find it easier to get a jack under it that way. You have to use a jack b/c you have to remove the driver's front tire. I then proceeded to jack the car up and support it w/ jackstands. I placed the jackstands on the "frame" and not the subframe b/c I later loosened the subframe (not yet though) in hopes of gaining a little more room - probably not necessary, but it worked a lil for me. Here is subframe bracket so you know what to avoid if you want to do the same (ignore the yellow substance - it's some sort of wax - there is a ton of it under my car for some reason - it's a southern car too)
Once jacked up, take off the tire. I then placed my jack w/ a 2x4 under the transmission pan. There are probably better ways to do this, but it's just helping to support some weight - you still have motor mounts and other trans mount in place. I forgot to get a pic of this, but pretty self-explanatory.
You then take a 13mm socket to take out the outer two trans mount bolts from the bottom. Here's a pic of the bolts and you can also see the sensor's harness running along trans pan
Then from above, remove the heat shield that surrounds the trans mount. There are three 10mm bolts that hold it on. Once that's out, use a 17mm wrench to hold the top of the center mount bolt and a 15mm socket for the nut underneath. Here's a pic of the bottom two heat shield bolts and top of the center mount bolt
You can now take out the three 8mm hex bolts on the mount bracket. Here is a pic of the bracket so that you get an idea of the bolt locations (the 3 most outside bolt holes - the inner 3 are from the heat shield). The bottom two are obvious and very easy - the top one took me hours - LITERALLY!! It might be easy if you have smaller hands or can come up w/ a good extension / swivel socket combination. I used a cut-down hex w/ flex joint, 10" extension and another 3" extension and came in from the bottom back. I couldn't get it in from the wheelwell area - maybe you'll have better luck. The bolts also have loctite on them, so they'll all "pop" loose.
If I were to do it all over again - I'd remove the driver's exhaust bank. It would take some extra time (and possibly hassle if your studs are seized), but it would afford a TON of room. Instead, I ended up cutting my hex bit down about 1/3"-1/2" for the extra room - ANY room you can gain is a HUGE help - it really is that awkward of a position. I also loosened the subframe at this time for extra room. I completely removed the small two bolts (on both sides of the car) and then loosened the large bolt (one on each side) enough for subframe to drop 1/3" or so - I'm not sure how long that bolt is, so I didn't want to overdo it.
Okay, if you've figured out a way to remove the bracket, you'll see the sensor. Remove the two T27 torx bolts and disconnect the harness at it's clip. Take note of how the little brackets that the harness clips in go on so that you can reinstall them properly. I also unbolted the bracket that holds the harness clip on - it's a 6mm hex - just made it easier to slide the clip out and put the new one in. You obviously have to cut the zip tie that holds harness. (In the pic, the section of the mount you see lifts right out so it's a clear shot for both bolts)
You can now lightly pull STRAIGHT out on the sensor. Do not turn it b/c you don't want to turn the gear drive in the center. Mine easily came out. You are now ready for reinstall. Note the position of the gear drive and match your new sensor the same way. There is a little notch cut into it as seen here
Everything goes back in the way it came out. The torque value for the sensor bolts is 8 ft/lbs. I'm not sure on the bracket bolts or mount bolts. I thoroughly cleaned the three 8mm bracket bolts and reapplied loctite. Also, don't forget that one zip tie for the harness.
Enjoy not having to accelerate from a traffic light in 3rd gear anymore!!!