Here is how I swapped M54B30(or M54B25) into 1986 E30, I will only cover information that is different than M50 installation.
M54b30 is a great engine, its not all about peak power. This engine is nice and smooth running with original MS43 engine management. They are made from 2001 to 2006.
Best is to get M54 from 2001/2002 530i or X5, they will be less abused and engine harness will be long enough for the DME to fit above the glove box in E30. If you get one from 330ci/I then you will have to get engine harness from 5 series. I was able to get one from 2001 X5, complete for cheap but it had a missing DISA valve, that is expensive and you want to get one with good DISA valve and alternator.
#1 Oil pan. E34 oil pan fits, same as M50 on that. The M50 oil pump does not fit. You must use your M54 oil pan then mod the M54 pickup tube. I prefer the 1995 E34 oil pan, the baffle is separate, you will have to use the M54 oil baffle then brake off the oil pickup tube mounts. If you get older E34 oil pan, you will have to remove the integrated oil baffle. M54 oil pickup tube is easy to mod, cut the tube right where it comes out the oil pump just to give you enough room for weld, then cut the tube right before it starts making a bend towards snorkel, remove the tube when cutting, then clean it, install then make measurements so that the snorkel fits properly inside the E34 oil pan. UPDATE 2015: You don'
t have to manufacture those parts. The pickup tube for engines made beginning January 2000 is part number 11417503261. The pickup tube for engines made before January 2000 is part number 11411432735. (They are not interchangeable without modification due to different oil pump & deflector designs.) For January 2000 and newer engines the oil deflector (or windage tray) is also required unless you want to modify your existing one like jjt did. It's part number 11137502669.

#2 Oil pan dipstick tube. E34 dipstick with added nipple that you will have to remove from your M54 dipstick, then make a proper measurement then weld it. It is a drain for the oil separator. Similar procedure is done for S52 OBD2 swap. Scroll down to another post where I got better solution for this.

#3 Fuel pressure regulator and filter. On M54 fuel filter has integrated fuel pressure regulator. Charcoal canister will have to be moved. I moved mine where ABS pump sat, but I don't have ABS so you will have to find room for it. The the vacuum hose from the oil separator goes to pressure regulator. And fuel line from the fuel filter goes to fuel rail. It is quick connect but you don't need that, you can force the 8mm pressure fuel hose on to the rail line then above the notch put a clamp. Fuel filter can be secured with a bmw thin hose clamp, just loops around.

#4 Heater lines. There is only one heater line in the back of the M54 engine, the other line comes from a T on the E46 radiator. You would have to make to install a T and then route it to the heater core. I did not use the heater option, I live in hot climate. I just plugged up the rear plastic heater line. You can use quick connect, just cut the clamp and remove the hose, then install what ever length you need to what ever radiator option you want to use. I am using 318i radiator with one inch trimmed E30 mechanical fan.
#5 Radiator hoses. Use gates 21900, then cut to fit, you get lower and upper hose. Use the quick connects from the E46 thermostat hoses, then cut the clamps and remove the E46 hose from them.

#6 Power steering tank. E46 location can be used, so that it fits on the oil filter housing, then run the lines down. You will have to buy some oil resistant hoses there, I don't use power steering, I manualised my E30 rack, and I am happy that I did. Steering feel is great, little stiff at stand still. I use thin 185 tires.
#7 Brake power booster. It barely does not clear. E21 booster will clear but the master cylinder will touch the intake boot. So I ended up going with this:
-Brake booster donor car: 1997 VW Jetta. 96-99 all work
-Brake booster part number: W01331598294ATE
-Brake booster manufacturer and manufacturer PN or identifying marks: Stock VW, ATE brand
-Modifications needed: Rod must be cut to size then rethreaded or to me it was more easy to just cut it and weld on the E30 adjustable end to it. Had to mod the rod that pushes master cylinder, I had to extend it, welded 7mm rod so that is at same height as E30. Plastic clip that holds the brake line behind the booster had to be trimmed down.
Hakentt spec modded booster:


Installed:

#8 Exhaust manifolds. You won't be able to use M54 manifolds, even if you could, they are very restrictive. Use 96-99 M52/S52 tubular manifolds, some euro models came with these on their M54. I would not recommend any china headers on M54, that is because M54 lacks all of the studs.
#9 Intake hoses. 330i hoses will work. Don't use 530I/X5 hoses they have less of an angle and won't clear the brake master.
#10 Coolant temperature sensor for the gauge. It will fit in the block drain plug, but aftermarket sensor with shorter sensing element has to be used and use two washers. Original one is too long.
#11 Electronic accelerator pedal. Very simple install. The mounting bracket will not fit properly. I did not want to remove the carpet to make proper modifications so that mounting bracket just snaps on. But that can be done if you were to remove the carpet for cleaning. The upper mounting on E30 where pedal stop is located will have to be moved up half of an inch then rewelded. The bottom part will just have to be cut to shape. But I kept the carpet so installed the top part with a bolt, then bottom part of the bracket down in the carpet, then I drilled a small hole and installed sheet metal screw to secure the bracket, then trimmed some of the plastic from the pedal to clear the sheet metal screw head when slid on there. You must be careful with the bracket it can crack easy and they cost about $12. You can use any E46 gas pedal, mine is actually a pedal from Mini. Update jan 2014: I did not like the way the gas pedal sits, it is level with brake pedal. I removed the holding bracket and moved the pedal more in to provide more depth, small section of the carpet would have to be cut for the pedal to sit like E30 stock one does.

#12 Engine harness and engine management(MS43) installation and wiring. It all fits and routs fine. I used E30 harness bracket to mount M54 harness loom on the blower motor cover. Then the relays and DME can fit inside above glove box. I decided to install the relays outside then just the DME inside for proper fit. I will post more detailed information about the wiring later. But it is very simple. I coded the MS43 DME so that none of the emissions component are required, no EWS. Basically the MS43 works same as OBD1 DME. With minimal wiring it works great. I am also working on MS45.1. This was the only obstacle for people to start using these great engine in their E30.
#13. Engine installation. Install the long block first, then the harness, then the intake manifold, then install the nut that secures the manifold to the block, then install the throttle body. There is no need to remove brake booster, it can stay there.
#14. A/C compressor from same engine can be used, E46 compressor is better than E36, it creates great pressure with less load on the engine. No need to wire anything special, just use the E30 original compressor trigger wire. MS43 dme is so good that it detects the extra load on the engine and quickly adjusts the idle. Custom adaptors must be made from E46 ac lines to E30 as you can see in my photo it is home made.

#15 Wiring harness. You will be only working with wire section that have 02 sensor plugs on it like you see in the photo. Simply remove the automatic transmission wiring from that harness, it has blue plug. Main ground wire is brown in color and it goes to chassis, it will have black sleeve on it. Direct 12 volt wires are 4 red wires that are in pairs on a black plug, simply strip them and install banjo connector and install them on 12+ from battery. The 12 pin black plug goes to main engine harness and 12 pin clear plug goes to chassis, that's where the starter and alternator wiring is at. I will cover the specific wiring in another thread.
Photo of the harness that you will be working with the most:

You will have to use E39 temperature sensor on the cylinder head.
Clear 12 pin connector:
1.empty
2.empty
3.to starter black
4.empty
5.empty
6.alternator -15 white/green
7.red/white wire do not use
8.empty
9.A-OLD don't use
10.F-OLN don't use
11.unknown
12.empty
The dual 2 pin connectors with red wires are all 12+ constant battery
You will have to wire fuel pump relay the same way it is on E36, it is just basic 5 pin light green relay. The DME and Injectors relay is already integrated into MS42/MS43 harness.
on green 4 pin relay(61368366600) 85-86 is a coil, so pin 10 will go to one of them and other one goes to bat+ then Pin 30 is bat+ and 87 goes to power fuel pump.
40 pin X60004 plug wiring:
1: alternator charge indicator signal, [run this wire to inctrument cluster battery light]
7: ground wire for electronic pedal to pin 1 [MS43 only]
8: electronic pedal signal to pin 4 [MS43]
9: voltage supply for pedal pin 5 [MS43]
10: fuel pump relay activation ground wire [wire this to fuel pump relay, sends ground signal to activate fuel pump relay coil]
11: oil pressure warning light [wire to instrument cluster oil pressure light]
12: ground pedal sensor to pin 2 [MS43]
13: signal pedal sensor to pin 6 [MS43]
14: voltage supply for pedal to pin 3 [MS43]
17: RPM signal to instrument cluster
22: Speed signal [gets speed signal from E30 cluster]
23: Clutch switch signal [gets negative ground signal from clutch switch]
26: switched +12 from ignition switch
32: K-line to pin 7 of OBD2 connector
That is it for X60004 connector, no need to connect any other wires
HakenTT swap stand alone MS43 engine management unit. No emulator. I offer this work for cheap, contact me via PM.

New video of the swap: https://www.youtube.com/watch?v=c_cTBdNC0Vc
To be continued...
M54b30 is a great engine, its not all about peak power. This engine is nice and smooth running with original MS43 engine management. They are made from 2001 to 2006.
Best is to get M54 from 2001/2002 530i or X5, they will be less abused and engine harness will be long enough for the DME to fit above the glove box in E30. If you get one from 330ci/I then you will have to get engine harness from 5 series. I was able to get one from 2001 X5, complete for cheap but it had a missing DISA valve, that is expensive and you want to get one with good DISA valve and alternator.
#1 Oil pan. E34 oil pan fits, same as M50 on that. The M50 oil pump does not fit. You must use your M54 oil pan then mod the M54 pickup tube. I prefer the 1995 E34 oil pan, the baffle is separate, you will have to use the M54 oil baffle then brake off the oil pickup tube mounts. If you get older E34 oil pan, you will have to remove the integrated oil baffle. M54 oil pickup tube is easy to mod, cut the tube right where it comes out the oil pump just to give you enough room for weld, then cut the tube right before it starts making a bend towards snorkel, remove the tube when cutting, then clean it, install then make measurements so that the snorkel fits properly inside the E34 oil pan. UPDATE 2015: You don'
t have to manufacture those parts. The pickup tube for engines made beginning January 2000 is part number 11417503261. The pickup tube for engines made before January 2000 is part number 11411432735. (They are not interchangeable without modification due to different oil pump & deflector designs.) For January 2000 and newer engines the oil deflector (or windage tray) is also required unless you want to modify your existing one like jjt did. It's part number 11137502669.

#2 Oil pan dipstick tube. E34 dipstick with added nipple that you will have to remove from your M54 dipstick, then make a proper measurement then weld it. It is a drain for the oil separator. Similar procedure is done for S52 OBD2 swap. Scroll down to another post where I got better solution for this.

#3 Fuel pressure regulator and filter. On M54 fuel filter has integrated fuel pressure regulator. Charcoal canister will have to be moved. I moved mine where ABS pump sat, but I don't have ABS so you will have to find room for it. The the vacuum hose from the oil separator goes to pressure regulator. And fuel line from the fuel filter goes to fuel rail. It is quick connect but you don't need that, you can force the 8mm pressure fuel hose on to the rail line then above the notch put a clamp. Fuel filter can be secured with a bmw thin hose clamp, just loops around.

#4 Heater lines. There is only one heater line in the back of the M54 engine, the other line comes from a T on the E46 radiator. You would have to make to install a T and then route it to the heater core. I did not use the heater option, I live in hot climate. I just plugged up the rear plastic heater line. You can use quick connect, just cut the clamp and remove the hose, then install what ever length you need to what ever radiator option you want to use. I am using 318i radiator with one inch trimmed E30 mechanical fan.
#5 Radiator hoses. Use gates 21900, then cut to fit, you get lower and upper hose. Use the quick connects from the E46 thermostat hoses, then cut the clamps and remove the E46 hose from them.

#6 Power steering tank. E46 location can be used, so that it fits on the oil filter housing, then run the lines down. You will have to buy some oil resistant hoses there, I don't use power steering, I manualised my E30 rack, and I am happy that I did. Steering feel is great, little stiff at stand still. I use thin 185 tires.
#7 Brake power booster. It barely does not clear. E21 booster will clear but the master cylinder will touch the intake boot. So I ended up going with this:
-Brake booster donor car: 1997 VW Jetta. 96-99 all work
-Brake booster part number: W01331598294ATE
-Brake booster manufacturer and manufacturer PN or identifying marks: Stock VW, ATE brand
-Modifications needed: Rod must be cut to size then rethreaded or to me it was more easy to just cut it and weld on the E30 adjustable end to it. Had to mod the rod that pushes master cylinder, I had to extend it, welded 7mm rod so that is at same height as E30. Plastic clip that holds the brake line behind the booster had to be trimmed down.
Hakentt spec modded booster:


Installed:

#8 Exhaust manifolds. You won't be able to use M54 manifolds, even if you could, they are very restrictive. Use 96-99 M52/S52 tubular manifolds, some euro models came with these on their M54. I would not recommend any china headers on M54, that is because M54 lacks all of the studs.
#9 Intake hoses. 330i hoses will work. Don't use 530I/X5 hoses they have less of an angle and won't clear the brake master.
#10 Coolant temperature sensor for the gauge. It will fit in the block drain plug, but aftermarket sensor with shorter sensing element has to be used and use two washers. Original one is too long.

#11 Electronic accelerator pedal. Very simple install. The mounting bracket will not fit properly. I did not want to remove the carpet to make proper modifications so that mounting bracket just snaps on. But that can be done if you were to remove the carpet for cleaning. The upper mounting on E30 where pedal stop is located will have to be moved up half of an inch then rewelded. The bottom part will just have to be cut to shape. But I kept the carpet so installed the top part with a bolt, then bottom part of the bracket down in the carpet, then I drilled a small hole and installed sheet metal screw to secure the bracket, then trimmed some of the plastic from the pedal to clear the sheet metal screw head when slid on there. You must be careful with the bracket it can crack easy and they cost about $12. You can use any E46 gas pedal, mine is actually a pedal from Mini. Update jan 2014: I did not like the way the gas pedal sits, it is level with brake pedal. I removed the holding bracket and moved the pedal more in to provide more depth, small section of the carpet would have to be cut for the pedal to sit like E30 stock one does.

#12 Engine harness and engine management(MS43) installation and wiring. It all fits and routs fine. I used E30 harness bracket to mount M54 harness loom on the blower motor cover. Then the relays and DME can fit inside above glove box. I decided to install the relays outside then just the DME inside for proper fit. I will post more detailed information about the wiring later. But it is very simple. I coded the MS43 DME so that none of the emissions component are required, no EWS. Basically the MS43 works same as OBD1 DME. With minimal wiring it works great. I am also working on MS45.1. This was the only obstacle for people to start using these great engine in their E30.
#13. Engine installation. Install the long block first, then the harness, then the intake manifold, then install the nut that secures the manifold to the block, then install the throttle body. There is no need to remove brake booster, it can stay there.
#14. A/C compressor from same engine can be used, E46 compressor is better than E36, it creates great pressure with less load on the engine. No need to wire anything special, just use the E30 original compressor trigger wire. MS43 dme is so good that it detects the extra load on the engine and quickly adjusts the idle. Custom adaptors must be made from E46 ac lines to E30 as you can see in my photo it is home made.

#15 Wiring harness. You will be only working with wire section that have 02 sensor plugs on it like you see in the photo. Simply remove the automatic transmission wiring from that harness, it has blue plug. Main ground wire is brown in color and it goes to chassis, it will have black sleeve on it. Direct 12 volt wires are 4 red wires that are in pairs on a black plug, simply strip them and install banjo connector and install them on 12+ from battery. The 12 pin black plug goes to main engine harness and 12 pin clear plug goes to chassis, that's where the starter and alternator wiring is at. I will cover the specific wiring in another thread.
Photo of the harness that you will be working with the most:

You will have to use E39 temperature sensor on the cylinder head.
Clear 12 pin connector:
1.empty
2.empty
3.to starter black
4.empty
5.empty
6.alternator -15 white/green
7.red/white wire do not use
8.empty
9.A-OLD don't use
10.F-OLN don't use
11.unknown
12.empty
The dual 2 pin connectors with red wires are all 12+ constant battery
You will have to wire fuel pump relay the same way it is on E36, it is just basic 5 pin light green relay. The DME and Injectors relay is already integrated into MS42/MS43 harness.
on green 4 pin relay(61368366600) 85-86 is a coil, so pin 10 will go to one of them and other one goes to bat+ then Pin 30 is bat+ and 87 goes to power fuel pump.
40 pin X60004 plug wiring:
1: alternator charge indicator signal, [run this wire to inctrument cluster battery light]
7: ground wire for electronic pedal to pin 1 [MS43 only]
8: electronic pedal signal to pin 4 [MS43]
9: voltage supply for pedal pin 5 [MS43]
10: fuel pump relay activation ground wire [wire this to fuel pump relay, sends ground signal to activate fuel pump relay coil]
11: oil pressure warning light [wire to instrument cluster oil pressure light]
12: ground pedal sensor to pin 2 [MS43]
13: signal pedal sensor to pin 6 [MS43]
14: voltage supply for pedal to pin 3 [MS43]
17: RPM signal to instrument cluster
22: Speed signal [gets speed signal from E30 cluster]
23: Clutch switch signal [gets negative ground signal from clutch switch]
26: switched +12 from ignition switch
32: K-line to pin 7 of OBD2 connector
That is it for X60004 connector, no need to connect any other wires
HakenTT swap stand alone MS43 engine management unit. No emulator. I offer this work for cheap, contact me via PM.

New video of the swap: https://www.youtube.com/watch?v=c_cTBdNC0Vc
To be continued...
Comment