EDIT: I only replaced the whole valve cover as I had repeated leaks that were not fixed by 2 trips to a garage and I just decided to do it myself in the end and go "belts and braces" and change the cover as well. For most oil leaks I suspect just changing the gasket is enough.
There are plenty of how-to's for other cars with the N52 engine, but it I found it a lot more straightforward on the Z4 as there is so much less plastic trim to remove!
Tools I used were as follows:
- 8mm allen key (vanity cover bolts)
- 4mm allen key (to wind back valvetronic eccentric shaft)
- E8 (star) socket (valvetronic bolts)
- E10 (star) socket (valve cover bolts)
- E18 (star) socket (diagonal strut brace bolts)
- 8mm socket (earth wires to valve cover)
- 10mm deep socket (valve cover bolts)
- 16mm spark plug socket (spark plugs)
- small screwdriver (useful for prying up trim clips etc)
- Extension bars and 2 way socket joint (for getting to those hard to reach places)
- Torque wrench (capable of 9Nm - 35Nm)
- High temp gasket sealant
- Zip ties
The parts that I required are as follows:
- New valve cover (Part No. 11127552281)
- 6x Spark plug tubes (Part No. 11127575422)
- New valve cover gasket (Part No. 11127582245)
- New valvetronic gasket (Part No. 11127552280)
- New eccentric shaft sensor gasket (Part No. 11127559699)
I also took the opportunity to replace my spark plugs and coil packs as these were the original items and after nearly 60K miles I thought it was a good point to do so.
Conventional wisdom will suggest that the first job is to disconnect the battery to ensure there are no shorts or electrical issues. I actually forgot to do this and suffered no ill effects, but recommendation is that you do this.
Next on the list is to remove the diagonal brace bar on the left of the engine bay as you look at the car head on. This requires loosening the E18 nut at the rear of the engine bay (number 1 on the pic below) and completely removing the E18 nut on the left by the suspension strut (number 2 on the pic below).
The plastic trim holding the wires that are attached to the two braces can then be removed. You can use a small screwdriver to help you prise up the inner part of the trim clips (circled in red) and then remove the clips to release the plastic trim. Be careful not to lose the trim clips down the back of the engine!
After that, you can completely remove the left strut brace. I put the nut that was complete removed loosely back on the thread so I didn't loose it.
Next job is to remove the vanity cover. There are 4 x 8mm allen screws (shown by red arrows in the pic below). Remove these and be careful not to lose them. The cover should come out fairly easily put you may just have to lift the wiring harness out the way as it will be flopping about a bit now.
Another job that can be done now is to uncouple the coolant hose (number 3 on the pic below). There is a metal clip that can be prised up with a screwdriver int he top of the retaining clip. I found this helpful in order to give a bit more room when you come to remove the valve cover itself. Be careful as some coolant will probably come out, especially if the engine is still a bit warm. I found that removing the coolant expansion tank cap helped to reduce this.
Freeing up the wiring harness:
WIth the valve cover now visible there are quite a lot of ancillary parts to remove to free it up so you can take it out.
NOTE: Be very careful with all things plastic under the bonnet....it tends to go very brittle with age and heat.
First you can unplug the wires from the coil packs on the left of the engine. This is just a case of lifting the plastic tabs on the top of the coils and the plug should be ejected. I did have one that didn't want to eject, so I had to gently prise it out with a screwdriver. I don't have a picture of these in place, but once removed there is a bit of plastic that all the wires are strapped to. This is clipped to the valve cover in 3 places along it's length. The clips just need compressing and it should lift out. It helps to have about 10 hands at this point, but you just need to unclip, lift and move to the next one.
Unplug the connector at the front of the valve cover (circled in the pic below) - this is the valvetronic eccentric shaft sensor plug. Again, be careful with the plug. There are retaining lugs on the sensor itself which you do not want to break!
Unplug the connector at the back of the valvetronic motor - circled in purple in the pic below.
There are 2 earth wires bolted to the centre of the valve cover. These need to be removed with an M8 socket. Keep hold of the nuts as they do not come with the new valve cover.
There are 3 other plugs that you can remove to give you a bit more play with the wiring harness - these are circled in yellow in the pic below. It is just a case of compressing the wire clip on top of the plugs and gently pulling the plugs out.
Next you can work on the injector wiring on the right of the valve cover. This is a bit more tricky as there is not much space the the connectors are a little tricky. On the plugs there is a thin wire clip that retains them in place. With a small screwdriver you just need to get one side of the clip prised back to the side of the plug. This should be enough to release the plug.
Move all the way along releasing the 6 plugs and then gently lift the square plastic housing up and away from the injectors.
The whole wiring harness can now be "peeled" back to move it out of the way. I did find that there was no "perfect" position for the wiring to sit in so you may need to move it round a bit depending on where you need to work
At the back of the valve cover there is a crankcase ventilation pipe that plugs in to the cover. BE VERY CAREFUL when unclipping this as breaking it will mean a much larger job to replace the part (I did read that the alternator would need to come off to get to the other end of the pipe, and the alternator has single use bolts).
To unclip the pipe you just need to depress the plastic collar where the groves are (these are only on two sides of the retaining clip). Press gently and slowly retract the pipe. It may help to use a nylon tie to help keep the pipe safely out of the way.
Remove the coil packs from the valve cover. Again, unless you are replacing these items, be careful when pulling them out, but a tug and a twist should see them pop out.
At this point leave the spark plugs in to avoid anything going down inside the engine. (I was replacing my spark plugs, but if you are not then I don't see any need to remove them at all)
Removing the valvetronic motor:
I did a lot of reading on this as there was a suggestion that after removing the motor it would be necessary to have access to INPA/ISTA software in order to allow the motor to relearn it's stop limits.
I can categorically say that this is not the case as I managed to remove and refit the motor with no ill effects and no dash warning lights. Below I will explain exactly what I did.
In the rear of the motor there is a small hole that you can fit a 4mm allen key in. Insert the allen key (I did it so the long end was inserted and the short end was sticking up in order to avoid putting too much pressure on the motor) and rotate it clockwise slowly until you feel some pressure. I kept a note of how many rotations I was able to turn it which helps when reinstallilng it.
This is basically retracting the eccentric shaft back in to the motor and taking the pressure off the motor.
There are 3 E8 bolts that hold the motor in place - One underneath, facing rearwards towards the windscreen and two that screw through the valve cover in to the head.
Start with the one underneath and completely remove it.
Loosen the other two a little. Check to see if the motor is free, or if there is still some pressure on it. If there is then using the allen key in the back of the motor, rotate it clockwise some more. Loosen the 2 bolts some more and check again. Repeat until the bolts are out.
Once all the bolts are out the vavletronic motor can be removed. It does take a bit of wiggling, and be careful as some oil can escape from here are well.
Place the motor and bolts safely to one side.
Removing the valve cover:
Removing the valve cover itself is quite a simple process from this point.
Remove the oil filler cap.
Then undo all perimeter bolts around the valve cover using an E10 socket. There are 2 different versions of valve cover on the N52 engines. I understand the earlier ones have a magnesium cover, but not sure if these ever made it on to the Z4's. The difference is that these older style have aluminium bolts that are not reusable. Mine is a plastic cover and uses steel bolts that are retained in collars in the cover itself (very useful as it means they will not fall out when trying to remove the cover!).
You will probably need the socket extension and 2 way joint for getting the ones at the rear left (where the cover usually leaks from) as the heat shield there makes it a little awkward.
Be careful as any oil that pools against the lip will probably leak out at this point, so uses rags or cloth to try and avoid that.
There are a couple of bolts that you need to keep as they do not come with the new valve cover and also are not retained by collars in the cover. There are 2 beneath the valvetronic motor that should be completely removed and placed to one side.
Now undo the 3 bolts in the centre of the valve cover with an M10 socket. The two outer ones will definitely require a deep socket. The middle one needs to be kept as it does not come with the new valve cover either.
Once all of these bolts are undone the valve cover is free and can be removed. You have to lift the cover quite high as there are metal spark plug tubes that are retained in the valve cover and you will need to lift these high enough to clear the valvetronic system.
You can easily hold the valve cover using the hole where the valvetronic motor goes with ones hand and use the other hand to manoeuvre the wiring harness out of the way.
Be careful as it will drip oil everywhere so try and get it upside down as quickly as possible.
You should end up with the engine looking like the pic below. You can move the wiring harness around in order to clean up the valve cover mating surfaces and ensure they are free from oil and dirt. This is essential for getting a good seal when putting the new cover back on.
New valve cover:
The new valve cover should come with all of the perimeter bolts already in place (minus the 2 below the valvetronic motor) and the two centre outer bolts that end up with the earth straps on them. Mine also came with the new valvetronic gasket and eccentric shaft sensor gasket already installed. It also came with a new valve cover gasket already in place, although this does fall out quite easily!
I read that the spark plug tubes that are in place in the old cover are single use items, however, the ones on mine were in perfect condition and I did not damage them when removing them. Therefore, I decided to use them again, but as stated, I believe the advice is that they should be replaced.
The new gasket can be held in place quite nicely using a little bit of gasket sealant around the perimeter of the valve cover, particularly by the bolt holes.
Refitting the valve cover:
Refitting the valve cover is another pretty straightforward job. With one hand you can hold the wiring up and out of the way and with the other you can hold the cover through the valvetronic motor hole and slide it in to place. Just be careful not to catch the perimeter bolts on any of the valve springs etc.
Lower the cover in to place and now you can gently tighten some of the perimeter bolts. I did this by hand using just the extension bar to start with to ensure that none of them were cross threaded. Once you are happy they are seated properly you can torque them down to 9Nm.
There was a leaflet with my new valve cover that showed the tightening sequence, but I forgot to take a picture, but it was basically tightening a bolt on one corner, then going to the diagonally opposite corner. I found the pic below which is not the exact same valve cover, but it gives you an idea:
Once that is done you can reinsert the spark plug tubes. These just push in and you should hear/feel a little click when they are seated properly.
Refitting the valvetronic motor:
This is basically just the reverse of the removal process. Wiggle the motor in to place and gently screw in the 2 bolts that go through the valve cover in to the head so they are hand tight.
With the 4mm allen key in the back of the motor, gently rotate it anti-clockwise and you should notice the motor being pulled in slightly. I just rotated it the number of turns that I used to take it out.
Once you have done that you should see that the bolt hole on the underside of the motor has now lined up and you can screw in the bolt there as well.
Torque all three bolts to 10Nm.
Read below regarding reinitialising the motor.
You can now just reinstall everything by reversing the process above.
Particular points to watch out for are ensuring that all pipes are reattached (rear crankcase ventilation pipe (be extra careful again!) and front coolant hose.
Ensure all electrical connectors are reattached. (especially the ones on the front of the engine/oil filter housing.
Torque the strut brace bolts down to 35Nm.
Reinitialising the valvetronic motor: Once it is all back together jump in to the car. with your foot OFF the brake, turn the ignition on to "position 1" so the dash lights up. You should hear the valvetronic motor go through a limit stop check. Again, I have read that this is just the motor checking that there are no obstructions, and it does this everytime, however, to my mind it definitely made a slightly different sound this time.
I then turned the ignition off and removed the key and repeated the procedure for good measure.
After that you can start the car. Mine started first time and ran as she did before with no roughness or issues (and no warning lights!).
After about 50-100 miles recheck all of the torques.