This is guide on how to wire up a S13 SR20DET Redtop engine into a BMW E30.
Note that while the colours of wires for the Nissan engine loom in this guide will be correct, the wires that come out of the C101 round plug beside the fuse box in the E30 are different between pre-facelift and facelift. I will provide both versions though. If you have a square plug C101, I'm pretty sure the wire colours are the same as a pre-facelift round plug C101. I did all this with the engine in the car, so a lot of the loom was unravled and shortened to suit. Use solder, solder your crimp connectors, solder every wire join properly. This doesn't cover how to get your tacho working (needs to be reprogrammed) or factory water temp gauge.
So you have the engine all mounted up, you have a complete SR20DET loom and ecu. What you probably don't have is the lower intake-side loom, which goes onto the starter, altenator and oil pressure switch. This doesn't matter, it's easy to make up another one.
First start by either cutting the C101 plug before or after the connector. If you are selling the M20B2x engine on, I advise disconnecting the plug and cutting between the fuse box and the connector. Record what the wire colours are and in which holes they are located. There are tiny numbers on the connector. You need to put another connector here to replace C101 for when you pull the engine out in the future. I used a 6 hole basic square white connector from the autoparts store, and only used 5 of 6 holes (the leftover female pin comes in handy soon) You could get another engine half of the C101 for a very tidy job.
Here is a link which shows what the C101 does for both versions of cars.
Here is a picture of the SR20DET S13 loom.
You pretty much use all of these plugs, connect them to the correct places on the engine. You also need the little black box called an ignitor chip.
There are however some plugs which you have to modify. The 3 plugs at the end of the loom provide power (mainly) and Nissan related check sensors. We only need the ones that provide power. Most are switched 12V, some are constant 12V. On this link is a detailed output of what every wire does, and that site will help if you can't get it running after following this guide. You are only concerned about the 3 plugs labeled Large Grey, Small Grey and Brown.
Starter. There is a tab on the starter motor which activates it. The Main lug on the starter goes straight to the battery, and should actually have a clamp for the terminal on it, with a couple of smaller bolts where you can clamp eye connectors for the fusebox and constant 12V powers where needed. The wire from the E30 which engages the starter is Black/Yellow, on all versions. Run a wire the same thickness as this through the new C101 connector and down to the tab on the starter. I found the leftover female gold pin from the plug I purchased fit perfectly on this tab. Your engine will now crank. But don't do that yet. The pre-facelift cars have an automatic unloader relay set up. This means when you crank the car, all the accessories turn of and you get a strong crank. The facelift cars are different. If you want a strong crank you need to take the Black/Green wire that comes out of the C101 and hook it up to something that gets 12V only when you crank the car. That's right, it's the starter motor tab, or, to save wire, splice it straight into the Black/Yellow cranking wire. I'm not 100% on this, because on the E30 starter motor there is a seperate stud which this wire attatches to, called '30h'. But because my car is a prefacelift, I didn't have to worry about this. The unloader circuit is contained inside the fusebox.
Alternator Exciter The small blue wire in C101 is the Alternator Exciter. There should be a plug in the side of the altenator on the SR with 2 wires coming out of it. Run a wire from this small blue wire, through your new C101 connector to the smaller wire coming out of this plug. The other wire in this plug needs a constant 12V. As does the main stud on the rear side of the altenator, this stud charges your battery. Make sure you use thick wire for this. Solder a 10cm lenght to the other wire coming from the altenator plug, put a eye connector on the end of it and hook it over the stud on the back of the altenator where the main charging wire is connected to. Then use some big wire again and run it from the Postive battery terminal to this stud. You are supposed to run a 75Amp fuse on this wire. But I didn't, no problems thus far. The ground for the altenator is taken from a 8mm bolt (not a stud) above the previous stud, run a nice black wire to the chassis somewhere.
Oil pressure switch, run a wire from the Black/Brown-prefacelift, or Brown/Green-facelift, through your new C101 connector to the oil pressure switch to the left of the oil filter. This will light up your dash oil light when a certain low pressure is reached in the oil system. This works the same as the M20 one did. You need this. Really. When I first started mine this light would not go out. After idleing the car for a 20seconds the most horrible screeching noise came from the engine. The oil pan had been hit from below and was blocking the pickup point, and the engine was getting no oil. A quick pan pull and a rubber mallet solved this. This is most likely a common problem as the engine is shipped from Japan on a pallet while sitting on its oil pan. The pan is very, very easy to pull off and it's well worth checking if it has enough concavity to it. (Put a rag in there and test fit the oil pan again, this will let you feel the clearance)
Coil pack power. From the 3 plugs I mentioned before off the SR loom there is a wire which powers the coils, this is Blue/Red. The wire that powered the coil on the E30 comes out of C101 and is Green-prefacelift and facelift. Connect these 2 wires through your new C101 connector. The green wire is a switched 12V with no fuse. I ran a fuse here in case I screwed it up. But it is not needed.
Power for all sensors/Ecu/Idle control etc needs to be a fused, switched 12V. Oh look, there is a wire which does this already, it is Green/Yellow-prefacelift, or Green/White-facelift. There a a bunch of Nissian wires which need to be connected to this from the 3 plugs you have cut off.
They are:
Brown
Black/Red
Blue/Yellow
Black/White
Cluster these up with a lenght of single wire going towards the new C101 connector, and fill with solder. So 4 wires turn into 1 then go into the plug, then connect to Gr/Yl or Gn/Wt.
Backup ECU power is the red wire from one of the 3 plugs, I just ran this back across to the postive terminal and put an eye connector on it.
EARTH I made up my own earth strap from the turbo side of the engine, using one of the threaded holes where the A/C was (17mm bolt works) and then across to the chassis rail where the stock M20 earth strap goes. Use a fat, fat wire.
This is the part where you need to sort out all the vacuum leaks. There are multiple places where lines tap into the system. 2 on top of the throttle, 1 below. 1 on the rear of the intake manifold for the brake booster (you need a 1 way valve between the brake booster and this hole so you don't fill your booster with pressure) There is another on the pipe going into the turbo. Here is map of how you set up the vacuum hoses.
The Exhaust recirc valve is not needed (EAI valve). Delete it if you can. The boost pressure solenoid needs to tap off a charge pipe before the throttle and after the turbo, and the other side of the solenoid goes onto the pipe leading into the turbo. You can figure out the rest (B.O.V/recirc valve, boost guage, fuel pressure regulator)
The fuel pump on my swap is controlled by a switch I have mounted in the cabin, controlling a relay to turn on the pump. You may want to upgrade the fuel pump, but I'm using a 325i external pump and it's going fine with stock boost. I also have an electric fan controlled by a similar switch. The stock wire which goes to the fuel pump is a big wire, either coloured Violet/Red or Green/Violet in the C101 wires.
Make sure all earths over the engine are tightened, and plug in the ECU. Connect the fuse box power to the positive terminal and there could be another wire from that side that needs to connect up (possible the ABS power) If you have good plugs in it and no vacuum leaks it will fire up great. I recommend a blow off valve that recirculates. It runs like sh*t without it.
To sum up the intake side of the engine.
The goal (Currently untidy, will update)