CREDITS to ROARF from Bimmerforums http://www.bimmerforums.com/forum/sh...-factory-alarm
What you need:
1 automotive relay (avail. at Radio Shack, I used 30-amp auto relay)
2 diodes (also avail. at Radio Shack, I used 50 V, 1 A)
Wire (get a couple diff. colors so you know what’s what)
Wire terminals (to fit on prongs of relay)
Electrical tape and/or some liquid elec. tape if you want
Phillips head screwdriver
Flat head screwdriver
Stubby or right angle Phillips screwdriver
10 mm socket
Soldering iron and solder
1. Remove glove box. Start by removing the six screws indicated by the yellow arrows. You may need to pry a couple of plastic caps off of the two middle screws first. I used a flat head screwdriver for this (see photo). The lower screws can be a bit tough to remove using a normal or even a stubby screwdriver. This is where the right-angle Phillips driver will come in handy (right inset). I didn’t have one so I used a Phillips socket bit in combination with an open ended wrench. With the screws removed, pop out the glove box lamp (left inset) by prying from the sides. Slide it backwards (toward front of car) and down and out, disconnecting the wiring harness once removed. With the lamp removed, you should be able to remove the 10-millimeter bolt that attaches the glove box to the frame of the car (green arrow). This bolt is above where the glove box lamp was.
2. Pull the glove box straight out, you may need to loosen two more screws at the very bottom of the glove box that hold the lower dash panel in. Don’t yank it out too fast though, the flashlight charger is still connected to a wire harness, it should have a decent amount of slack though. Once you have the glove box out a ways, pry the two metal tabs inward on the left and right part of the flashlight charger socket (yellow arrows in photo below) and pull the charger out the back of the glove box. Now you can set the glove box aside out of the car and out of your way.
3. Remove the two screws indicated by yellow arrows in the photo below from the lower dash panel. Slide the panel out slowly, disconnecting the wire harness to the foot well light. Be sure to get a hand on the alarm module (next picture, yellow circle) as this may fall down from above when you remove the panel.
4. Now we’ll wire up the relay and come back to the car in a minute. Ground will be hooked up to two of the prongs on the relay. Take some wire (it’s a good idea to use brown or black to denote ground wire) and crimp a wire terminal to one end. Splice a short length of wire to this wire and crimp another wire terminal to the end of it as shown in the photo below.
For all splicing connections in this DIY I used wire strippers and cut the insulation on the wire in two places about a half inch apart, then used a utility knife to cut a slit down that short section of wire and peeled the insulation off. I then separated the strands of the wire on that section a bit and sticking the wire to be spliced through the other wire I twisted them together and soldered the connection. It is not required but I brushed some liquid electrical tape over all my soldered connections before taping them up. Tape gets old and sometimes falls off, leaving exposed wires.
Next take the diodes out. Connect a wire from the end of the diode with the silver band (cathode) to another wire terminal. Repeat for the other diode but splice this wire to the one you just did ahead of the end with the silver band, instead of adding another wire terminal. (See photo below) Solder a length of wire to the other ends of the diodes.
The reason for the diodes is that one wire will go to the unlock circuit, and the other to the lock circuit. The diodes only allow current to flow into the relay along these wires when oriented the way we have. If you did not put these diodes in, the first time you used the alarm you would double lock the car, and there is no way to unlock it after that without getting at the wiring and undoing what you did.
Take another length of wire and add a wire terminal to one end.
Finally, attach these wires to the relay as shown below. Ignore the pin numbers on the left for now, these are on the 12-pin connector in the car. This signifies a diode. *-------|>|-------*
Wire from pin 3 (ground, brown)----------------------------------------------> Terminal 87 & Terminal 85 on relay
Wire from pin 9 (12V+ unlock, blue/green)--------* -------|>|-------*---------> Terminal 86 on relay
Wire from pin 10 (12V+ lock, black/yellow)--------* -------|>|-------*--------> Terminal 86 on relay
Wire from pin 11 (hazards, green)---------------------------------------------> Terminal 30 on relay
Here is the list of the wires in each of the twelve pins and their function. This was the arrangement in my car, the pin numbers may be slightly different in your car but the wire colors should be the same regardless.
Pin # Function
1 +12V Constant (from battery) – Yellow
2 Ignition – Purple
3 -12V Ground – Brown
4 Door Switch Sensor 2 – Black/white
5 Door Switch Sensor 3 – Black/red
6 Door Switch Sensor 1 – Black/green
7 Horn/siren – Red
8 Trunk switch – Blue
9 +12V Unlock – Blue/green
10 +12V Lock – Black/yellow
11 Hazard lights – Green
12 Dome lights – White
5. Now back to the car. Note the position of the 12-pin central locking connector in the car (see yellow arrows in earlier photo, and also yellow circle in photo below). This is very difficult to reach from the front of the car unless you have very small hands. Wrapped up in this bundle of wires is the hood switch wire (white/red) which plugs into something else that is not part of the 12-pin connector (red arrows in photo below). You could unplug these and splice the wires from the relay to the wires in the car close to the 12-pin connector but I chose to use the other end of this bundle of wires which plugs into the BMW alarm module because this was more easily accessible in my car.
So what I did was I unplugged the green 30-pin connector from the BMW alarm module on the other end of the bundle of wires running to the 12-pin central locking connector. (See photo below) Cut and peel back any electrical tape or heat shrink as necessary. Use the wire strippers to prepare the four wires which will be spliced into, ground, 12V+ lock, 12V+ unlock, and hazards. Refer to earlier diagrams above to verify which color wires you are tapping into.
I recommend putting something on the floor to protect the carpet in case of solder drips or anything like that. Splice the wires from the relay as shown in the diagrams earlier and solder the connections. At this point you may wish to attach the wires but not solder just yet, so you can test to see if it works. Reattach the green connector to the alarm module and close the car doors. Now test your work by locking the car with the remote. If everything works and the hazards flash, great! If not, you need to check your connections and verify that you are using the right wires from the 12-pin connector. Make sure you attached the diodes in the right orientation and that the wires are attached to the correct prongs on the relay.
If all is good, solder these connections if you haven’t already and tape them up. Peel any heat shrink back down around the bundle of wires if necessary and tape it up.