Announcement

Collapse
No announcement yet.

MegaSquirt2 V3.0 w/ MS2 Extra 3.4.2 Build and Wiring

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MegaSquirt2 V3.0 w/ MS2 Extra 3.4.2 Build and Wiring

    Introduction:

    I’ve been looking around and can’t find answers to a couple of dead ends I’ve been running into, so I figured I’d start this and hopefully help other people with similar issues. This is primarily a MS build thread dedicated to a turbo m20, but applicable to NA builds and/or other engines.

    Goal:

    I want to turbo my m20 to make decent power (250-300whp) that is reliable and streetable. This build will assemble a MegaSquirt-II v3.0 using wasted spark ignition, batch fire injectors, an electronic boost controller, stock ICV, LC-2 Wide-band O2 sensor, and stock crank position sensor.

    Approach:
    1. Get the m20b25 running solid.
    2. Install MegaSquirt with wasted spark and learn how to tune a stock engine
    3. Install and tune turbo
    4. Build an m20b27 and apply boost
    Resources:

    Assembly Instructions: http://www.megamanual.com/ms2/V3assemble.htm
    Mega Manuals: http://www.msextra.com/manuals/ms2manuals/
    E30 Wiring Diagrams (I am using the 1989 325i -325is): http://wedophones.com/BMWManualsLead.htm
    TunerStudio: http://www.tunerstudio.com/
    e30tech archive:
    http://www.e30techarchive.com/
    Wasted Spark info: https://www.r3vlimited.com/board/for...ption?t=399056


    MegaSquirt Components (all from DIYautotune.com):

    MegaSquirt-II Programmable EFI System PCB3.0 - Kit × 1 $324.00
    MegaSquirt PWM IAC Valve Control (TIP120) 'Mod-Kit' × 1 $9.00
    Bosch BIP373 Coil Driver Mod Kit × 3 $30.00 (Wasted Spark)
    GM IAT Sensor with open element & pigtail × 1 $22.49
    Innovate LC-2 Digital Wideband Controller with Sensor - 3877 × 1 $166.00
    Zeal Engineering Daughterboard with Dual VR Conditioners × 1 $42.00 (not needed?)
    MegaSquirt Boost Control Mod Kit × 1 $9.00
    Electronic Boost Control Solenoid Kit × 1 $58.00
    24" MegaSquirt Pigtail Harness (MS1/MS2/MS3 Ready) × 1 $53.00
    JimStim v1.5 MegaSquirt Stimulator with Wheel Simulator - Unassembled × 1 $80.00
    MegaSquirt JimStim Stimulator Power Supply × 1 $17.00
    MegaSquirt Tuning Cable (DB9 Straight Thru) × 1 $5.50
    USB to Serial Adapter -TunerStudio × 1 $22.49
    Subtotal: $838.48

    Soldering Equipment:

    Wild PCS 559 - It's a cheap Chinese unit I borrowed from a friend. I just bought a Baku D602+ off Amazon for $75, which is the same thing, but with a digital soldering iron display. The SMD gun is extremely useful for heat shrink tubing.
    Brass Tip cleaner - using steel wool will destroy the coating on your tip. Brass will clean it and keep it fresh
    Helping Hands Soldering buddy - Has several allagator clips to hold things while you solder. Also has a magnifying glass, because stuff is small.
    Kester 83-7145-0415 Pocket Pack Silver Solder 0.020" 0.35oz. - I cannot recommend this solder highly enough. An old guy at the electronics store suggested it because I said I was building a computer board. This stuff flows well, is clean and shiny, and barely spatters any flux.
    Solder Wick - this is woven copper used to suck up solder. Unless you are perfect, you will need this. Solder suckers don't work well, but this will remove solder from even the smallest PCB holes. Just hold the wick on the solder you want to remove and heat the wick with the soldering iron.
    Flush Cutters - Klein D275-5 are cheap and give a good flush cut. You'll want these if you're a perfectionist.
    Heat Shrink Tubing

    Electrical Connectors:

    This link will open the TE Connectivity Timer Contact System - Junior Power Timer Catalog (Catalog 889759-3 Revised 7-2011)

    - TBD
    Last edited by McGyver; 12-02-2020, 10:56 AM.
    sigpic
    1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
    1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
    1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

    #2
    ****CLEAN EVERYTHING AFTERWARDS WITH 98% ISOPROPYL ALCOHOL TO REMOVE FLUX RESIDUE****

    Soldering Tip - I pre-bent the component leads, then use scotch tape to hold the component in place on the front side while i soldered the leads on the back. This keeps the components uniformly against the board and just looks more professional. Once soldered, snip the leads on the back side.

    JimStim Build:

    Do this first to learn how to solder. JimStim is an essential tool required to test MegaSquirt along the build process and to test your initial tune.



    MegaSquirt Build:

    There are many options for how to build the kit; PWM vs Stepper ICV, 1-4 spark outputs, 1-4 injector outputs, many assignable outputs (boost controller, RPM to cluster, electric fan, etc.). For any wiring diagram, it is critical to know how the board was built before figuring out the wiring diagram.

    One thing that took me a ridiculous amount of time to realize is that there are overlaps in the names used for the pins on the DB37 connector and the pins on the MS2 Processor. Do yourself a favor and keep context in mind when reading the manuals or build threads. For example, DB37 Pin 25 is IAC1A and MS2 Processor Pin 38 is IAC1A. THERE IS NO ELECTRICAL CONNECTION BETWEEN THESE TWO PINS.
    • Page 174/201 of the Hardware Manual depicts the DB37 Pins, it shows that SPR1 (Pin 3), SPR2 (Pin 4), SPR3 (Pin 5), SPR4 (Pin 6), IAC1A (Pin 25), IAC1B (Pin 27), IAC2A (Pin 29), IAC2B (Pin 31), and IGN (Pin 36) have no electrical connections. These DB37 pins go to V3.0 through holes and need a jumper to be connected to anything on the V3.0 board.
    • Page 167/201 of the Hardware Manual depicts the MS2 Processor pins, it shows several outputs including IAC1A (Pin 38), IAC1B (Pin 37), IAC2A (Pin 36), IAC2B (Pin 35). These MS2 Processor pins should always be referred to by their "JSxx" designation, but that is not always followed. This same page indicates IAC1A is JS0, IAC1B is JS1, IAC2A is JS2, IAC2B is JS3. This page also suggests jumpers, but these suggested electrical connections must be soldered in place by the assembler.
    I followed the MS Extra instructions listed above. The assembly instructions allow for options at several points, I chose the following options:
    • Skip Step 22 – I will be using a PWM ICV, not a stepper.
    • Step 50 – I built the Hall tach input, but won’t use it
    • Step 51 – I built the VR tack input and will use it
    • Step 52 – Selected VR Sensor, jumpered VRIN to TACHSELECT and TSEL to VROUT
    • Step 59 – Do not install D8 (See Step 62)
    • Step 62 – Install PWM Kit
    • Step 65 – See below, Wasted Spark
    • Step 69 – Install the PWM flyback circuit
    • Step 70 – Install the standard flyback circuit
    • Step 71 – Install the current limit circuit
    • Step 74 – Do not install Q20 (See Step 62)
    • Step 75 – Do not install R39 (See Step 62)
    Start MegaSquirt:

    Partially Built Board:


    In-Process Tests:


    Main Relay Trigger:

    As explained in a post below, the Main Relay needs to be triggered. Page 1360-6 of the ETM depicts that the switched output of the Main Relay provides power to the ABS system, Injection Electronics, and the Fuel Pump Relay control circuit. The Motronic 1.3 DME always gets power from the Battery Junction Block and then determines when to provide a ground for the Main Relay control circuit. The point of this modification is to power the main relay control, closing the switch, providing power to other systems. The Main Relay control circuit needs a ground, which could be supplied using the MS Fuel Pump trigger (which supplies a ground), but this is a bad idea. Wiring the main relay into the fuel pump relay means you can't isolate injection electronics from the fuel pump (for testing purposes).

    There are two ways to accomplish this: 1) Modify the engine bay wiring, or 2) Build a relay trigger circuit.

    1) Constant power goes into Pin 86 of the Main Relay and needs a ground connection on Pin 85 to complete the control circuit (triggering the relay). MegaSquirt is already providing power out of DB37 Pin 37 to power the fuel pump. This can be used to also power the wire going to Pin 85 on the Main Relay. Now Pin 86 of the Main relay needs to be connected to ground. Once this is done, any time MegaSquirt is powering the Fuel Pump, it will also trigger the Main Relay. The drawback of this method is having to modify your wiring harness.

    2) The other option is to use a Bipolar Junction Transistor to provide an electronically-controlled switched ground. The transistor is triggered by applying voltage to the transistor's Base (middle leg). Power can be supplied either by a MegaSquirt Processor Port or some other voltage source. Applying power to the Base terminal of the transistor is what completes the circuit between the Collector and Emitter. This can be used to close a relay's control circuit, triggering the relay to provide power to something (like a fan). The benefit of this approach is that the low power (<1A) MegaSquirt signal can turn on a high power device (>25A cooling fan).

    One option for providing power is by using one of MegaSquirt's Processor Port Outputs. This allows logic and sensor inputs to control a device. For example, a cooling fan can be turned on when the temp is above 90C and make the fan stay on until the temp is below 85C (preventing the fan from rapidly cycling when the car is hovering just above/below 90C).

    For my application, I am going to use the key in the Start/Run position as the voltage source so that I'm not using any additional MegaSquirt Processor Ports. Sheet 1360-4 shows that when the key is in Start/Run, power is supplied to ECU Pin 27. This is how I wired it:
    • Collector - Main Relay Pin 85 goes to ECU Pin 36. This is connected to DB37 Pin 27 using my adapter harness, which is jumpered to the collector (don't forget the 1.0K resistor)
    • Base - ECU Pin 27 is connected to DB37 Pin 3 (SPR1) using my adapter harness, which is jumpered to the base
    • Emitter - This is jumpered to a power ground in DB37 Pin 17
    Pictures are located below in the Launch Control / Flat Shift Section.

    Here is what you need to order, which costs less than $1:
    • 1x ZTX450-ND, TRANSNPN 45V 1A E-LINE ($0.62)
    • 1x 1N4001-T, DIODE GEN PURP 50V 1A DO41 ($0.19)
    • 1x CFR-24JB-52-1K, RES 1K OHM 1/4W 5% AXIAL ($0.10)

    These links provide additional info about building any sort of relay trigger.
    EFI, Fuel Injection, Auto, automotive, car, TPI, computation, ECU, MegaSquirt, GPIO, MicroSquirt, Sequencer, stim, MegaShift, MShift, DIY, transmission, 4L60E, 4L80E, controller, shifter

    https://www.diyautotune.com/product/...tec-tvis-fans/
    https://www.diyautotune.com/support/...modifications/

    You will need to set a programmable output in Tuner Studio to IAC.



    Tachometer Output:

    Sheet 1360-5 shows that the engine output to the cluster (tachometer control) is driven off of ECU Pin 6. I have wired ECU Pin 6 to DB37 Pin 25 (IAC1A) using my adapter harness to control the tachometer in my cluster. This DB37 Pin has a jumper to JS10.

    You will need to set Tacho Output in Tuner Studio to IGN (JS10).


    Wasted Spark

    I've decided to abandon the stock single coil with cap and rotor ignition and transition to wasted spark. The "wasted" comes from the fact that I will be using 3 coils to provide spark to 6 cylinders (A->1/6, B->2/5, C->3/4). One cylinder will get the needed spark on the compression stroke and the other cylinder will get a "wasted spark" on the exhaust stroke. The advantage to this system on an NA car is eliminating the cap and rotor which wears out and is severely impacted by moisture, debris, and corrosion. The advantage to this system on an FI car is overcoming the increased cylinder pressure, which weakens the spark, causing incomplete burn.

    Use the 3 Bosh BIP373 Coil Driver Mod Kits. I originally routed the 3 BIP373 grounds ground pins on U1 (MS-II Daughtercard) as documented on Page 167/201 of the MS2V30 Hardware Manual. This may have worked, but I was concerned that I may fry the processor. I then combined all of the grounds and routed them to one of the Power Grounds (DB37 Pins 15-19). Note that there is a difference between Power Grounds and Sensor Grounds.
    • Jumper IGBTOUT to IGN
    • Remove R57 if installed
    • Spark A: Lead 1 – Top of R26, Lead 2 – IGN (DB37 Pin 36), Lead 3 – Combine all grounds and connect to Power Ground DB37 Pin 15
    • Spark B: Lead 1 – Top of R29, Lead 2 – IAC2B (DB37 Pin 31), Lead 3 – Combine all grounds and connect to Power Ground DB37 Pin 15
    • Spark C: Lead 1 – Top of R27, Lead 2 – IAC2A (DB37 Pin29), Lead 3 – Combine all grounds and connect to Power Ground DB37 Pin 15
    You will need to set the Spark Output in Tuner Studio to D14.

    Partially Built Wasted Spark:

    Electronic Boost Control:

    Use the Boost Control Mod Kit. Wiring info can be found here: https://www.diyautotune.com/product/...al_509_3&pid=1

    Lead 1 – JS11 & Power Ground DB37 Pin 16, Lead 2 – SPR3 (DB37 Pin 5), Lead 3 – Power Ground DB37 Pin 16



    You will need to set the Electronic Boost Control output in Tuner Studio to JS11.


    Launch Control / Flat Shift:

    MegaSquirt has the ability to set a temporary lower rev limit, providing a crude method of launch control and allowing for flat shifting. Generally, a switch is used to determine when the clutch pedal is pressed, sending either a ground signal or a power signal to MegaSquirt. For launch control, this allows the driver to keep the gas pedal fully pressed and prevents excessive tire spin when the clutch is dumped. For flat shift, the driver can keep the gas pedal fully pressed while shifting gears. This may provide better launches and faster shifts for a naturally aspirated or supercharged car. For a turbo car, launch control allows boost to be built before launching and flat shift maintains boost pressure while shifting. RPM can be limited by cutting fuel, spark, or both. Cutting spark only will make the car shoot flames, so there's all the reason you need for this mod.
    • Launch Control - when the car is below a certain speed and MegaSquirt sees a ground signal on the designated processor pin, the launch control rev limit is activated (maybe ~2500 rpm)
    • Flat Shit - when the car is above a certain speed and MegaSquirt sees a ground signal on the designated processor pin, the flat shift rev limit is activated (maybe ~5000 rpm)
    To enable this function, MegaSquirt needs to see a ground signal on the designated processor pin. The easiest way is to build the Ground Switch Input, which used a clutch switch to send a ground signal right to the processor pin. The other option is the 12V Switch Input using a transistor to ground (emitter) the processor pin (collector) by having the clutch switch provide power to the transistor's base (see Main Relay Trigger for more info). I don't want to run more power wires, so I'm going to find a way to make the Ground Switch Input work.



    Any manual transition car with cruise control has a switch on the clutch pedal. Unfortunately, the circuit is grounded when the pedal is up and the circuit is open when the pedal is pressed (the opposite of how MegaSquirt needs it). I'm looking into the following options:
    • Switch to a single pole dual throw (SPDT) switch: cruise control gets grounded until I press the clutch, then MegaSquirt gets grounded.
    • Add a second switch that closes the circuit when the pedal is pressed
    • something else?
    I am also putting a toggle switch in between the ground source and MegaSquirt. Having launch control enabled prevents revving the engine while stationary and having flat shift enabled prevents rev matching while driving. Using a switch to prevent MegaSquirt from getting the ground signal allows the features to always be on, but will only be enabled when I feel like making noise.

    Front Wiring:


    Front Proto Area Closeup:


    Back Proto Area Closeup:





    Completed Board:

    Completed Front:


    Completed Back:


    DB37 Side Closeup:


    DB12 Side Closeup:
    Last edited by McGyver; 08-20-2020, 11:16 AM.
    sigpic
    1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
    1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
    1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

    Comment


      #3
      Wiring Diagram:

      The goal is to tear apart an old Motronic 1.1 ECU and solder the MS Pigtail Harness to the plug leads in the old housing. This is essentially making an adapter to plug the stock harness into MS. A Motronic 1.3 ECU would also have the correct 55-pin plug, but my local junk yards only had some e28 super etas.

      I used the 1989 325i-325is ETM (listed above in the Resources section) to verify the wire color, size, and pin in a spare wiring harness. The Engine Harness section (in green) identifies the Pin, Wire Size, Color, Function, and Source page in the ETM. I had a brown wire on pin 33, but could not verify its function.

      I used the MS2V30_Hardware-3.4 (available under the MegaManual link) to verify all the wires on the MS Pigtail. The MegaSquirt Plug section (white/grey) identifies the Pin, Color, In/Out, Function, Source, and Notes.

      Here is the link to my current wiring diagram:



      Bosch 55-Pin Connector Donor ECU Open:


      Bosch 55-Pin Connector Donor ECU Partially Removed:


      Bosch 55-Pin Connector Donor ECU Fully Removed:


      Bosch 55-Pin to DB37 Adapter Start:


      Bosch 55-Pin to DB37 Adapter Closer:


      Bosch 55-Pin to DB37 Adapter Complete:


      Bosch 55-Pin to DB37 Adapter Case Closed:


      Bosch 55-Pin to DB37 Adapter Case Closed:


      Throttle Position Sensor Adapter:

      The stock e30 Throttle Position Sensor (TPS) is only capable of signaling that the throttle is at Idle, Wide Open Throttle (WOT), or somewhere in between. Although a TPS is not required for MegaSquirt, it allows for much better tuning (acceleration enrichment, etc.). Since the stock e30 TPS in not capable to indicating the throttle position through the entire range of motion, it's necessary to use a different TPS. The most common solution is to use an m50 TPS (P/N 13631721456).

      The m50 sensor's bolt holes are closer together than the stock e30 TPS and the m50 sensor requires a spacer, so an adapter is required to mount the sensor. I designed and fabricated my own, but they are available from several places.

      The wiring for the stock e30 TPS and the variable TPS is also different. You can use a depining tool to move the pins on the stock plug (almost impossible to do without damaging the connector). You could also cut and re-solder the wires going into the plug. The last option is to make an adapter harness.

      The M20 Sensor section gives the stock harness pin number and function, which is based on the wiring diagram from Sheet 1360-8. These functions correlate to the pins listed in the M50 Pin No. column, which come from a 1995 325i wiring diagram on Sheet 1210.10-05. The ECU Pin No. column indicates stock sensor wiring on the 55-Pin connector. The bottom section provides the TE Connectivity part numbers and quantities to assemble the adapter harness connector. So 1-962581-2 plugs into the stock wiring harness plug. 1-827578-1 plugs into the m50 TPS.



      Throttle Position Sensor In Progress:


      Throttle Position Sensor Complete:


      Idle Control Valve Adapter:

      The stock m20 Idle Control Valve (ICV) is a Pulse Width Modulated (PWM) 3-wire design. Per Sheet 1360-7, the center pin is a ground and the other two are power to open and close. This design has one motor to open the valve and another to close the valve. These motors are powered by may pulses to hold the valve the desired amount open. The PWM mod allows MegaSquirt to supply PWM voltage output on a single pin. THIS WILL NOT WORK FOR A 3-WIRE PWM ICV WITHOUT ADDITIONAL MODS.

      Stock m20 ICV Options:
      • The easiest is to provide constant power to the center pin (normally the ground), connect the Close pin to ground through a large resistor (34-40 Ohm at 50 Watts), MegaSquirt provides a PWM ground to the open pin. This normally powers the Close motor through the resistor, but MS provides an easier path the ground the voltage supply through the Open motor. Although this approach works, it's a little janky and is not how the ICV is designed to operate.
      • You can hack a Zeal Daughterboard.
      • Build your own circuit per the instructions from Glen's Garage (no longer making boards).
      Stock m42 ICV Option:

      The easier option is to switch to an m42 T-shaped ICV (P/N 13411433627). This is a 2-wire PWM ICV which is available on some e30 and e36 m42 cars (some m42 cars use an L-shaped valve). You can also find Bosch 2-wire L-shaped valves on many old Volvos. A spring keeps the valve normally closed and voltage to the motor opens the valve. This valve will work with the MegaSquirt PWM mod without additional modifications. Again, you have several wiring options. I chose to make another adapter harness.

      The M20 Sensor section (table below) gives the stock harness pin number and function, which is based on the wiring diagram from Sheet 1360-7. These functions correlate to the pins listed in the M42 Pin No. column. The ECU Pin No. column indicates stock sensor wiring on the 55-Pin connector. The bottom section provides the TE Connectivity part numbers and quantities to assemble the adapter harness connector. So 1-962581-2 plugs into the stock wiring harness plug. 1-827551-3 plugs into the m42 ICV. NOTE: Part of the PWM mod is to solder a flyback diode (1N4001) between the voltage and ground. Per page 38/201 of the Hardware Manual, the banded end of the diode connects to the 12v power supply. I soldered this diode in the adapter harness, as seen in the picture.

      Power, Ground, and Flyback Diode Orientation:

      The ICV can be bench tested by powering MegaSquirt with your JimStim and connecting to MegaSquirt using TunerStudio. The ground pin of the ICV should be jumpered to JimStim Pin-30 (FIDLE), the power pin of the ICV should be jumpred to on of the JimStim 12v power supplies. After setting the correct Valve Frequency (~92Hz) from the Idle Control menu, open the 'Output Test Mode - Idle Valve' menu from Can Bus/Test Modes. Set the PWM Duty Frequency and hit 'Enable Test Mode'. NOTE: Powering the ICV without the flyback diode creates a loud buzz. Using the diode makes the valve super quiet. It's really cool to see the difference $0.10 and proper circuit design makes.




      Idle Control Valve In Process:


      Idle Control Valve Diode:


      Idle Control Valve Complete:



      Intake Air Temp Sensor Adapter:

      The stock Air Flow Meter (AFM) has a built-in Intake Air Temp (IAT) sensor; when you remove the AFM, you loose your IAT. MegaSquirt suggests using a fast (open element) GM IAT Sensor (P/N 25036751). As always, there are several ways to connect this sensor to your stock wiring. Again, I chose to make an adapter harness.

      The M20 Sensor section gives the stock harness pin number and function, which is based on the wiring diagram from Sheet 1360-5. These functions correlate to the pins listed in the Plug Pin No. column. The ECU Pin No. column indicates stock sensor wiring on the 55-Pin connector. The bottom section provides the TE Connectivity part numbers and quantities to assemble the adapter harness connector. So 444208-1 plugs into the stock wiring harness plug. Per a conversation with TE Connectivity customer service, there is no 5-position boot. I took several off of cars in junkyards.



      Intake Air Temp Sensor Complete:


      Oxygen Sensor Adapter (TBD):

      The stock e30 Oxygen Sensor (O2 Sensor) is a narrow-band sensor, meaning it is only capable of reading close to the desired Air-to-Fuel Ratio (AFR). This type of sensor is adequate for running MegaSquirt once tuned, but does not have a wide enough range to be useful for tuning. The obvious choice is to switch to a wide-band oxygen sensor. There are many on the market, but I chose to use an Innovate LC-2 since that's what DIYAutoTune sells.

      I'd like to mount the LC-2 controller under the battery tray in the engine compartment, but am slightly concerned about heat, electrical interference (the coil pack is mounted on top of the battery tray), and water. I've decided to mount it next to the MegaSquirt ECU. Again, I am going to make an adapter to plug into the stock harness.

      I am going cut the sensor off of an old stock sensor, leaving the plug and long wire pigtails. This will be soldered to the LC-2 controller per the table below, which is based on the wiring diagram from Sheet 1360-7. The M20 Sensor section gives the stock harness pin number and function. These pin numbers and/or functions correlate to the LC-2 section Wire Color/Function.



      Wasted Spark Adapter: (TBD)

      As stated above, I am transitioning to wasted spark. I will be using a Bosch Coil 0221503002 mounted to a custom bracket on my battery tray. I will run 3 new wires from the coil to the stock 55-pin connector and will use the existing coil's 12V power supply for the new coil's power supply.

      The wiring diagram for the existing ignition coil is documented on Sheets 1360-4 & 1360-5.


      Last edited by McGyver; 09-09-2020, 08:15 PM.
      sigpic
      1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
      1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
      1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

      Comment


        #4
        My Questions:

        1. Was it OK to ground the wasted spark BIP373s to the MS-II Daughterboard, or do they need be soldered to dedicated grounds on the DB37?
        2. Do I need to wire additional MegaSquirt grounds to ground through the Engine Harness?
        3. How does the ICV get wired?
        4. Have I done anything dumb, or should I change anything to make my life easier?

        I'll update the wiring diagram picture to make sure I only post the correct pin-out for my build.
        Last edited by McGyver; 04-14-2020, 04:39 PM.
        sigpic
        1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
        1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
        1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

        Comment


          #5
          Nice work so far. Since I've built a couple of these for M20s I have similar data laying around on how to do it but never bothered to organize it in a way that is useful to others.

          1. You should join the 3 BIP373 ground wires together in a heat shrunk splice and solder the single resulting wire to an empty ground plane hole or a DB37 ground pin.
          2. There are multiple ground pins available in the OE harness, I believe I use them all. The more little wires and pins on the MS board/adapter pigtail carrying all of that current the better.
          3. I wouldn't bother with the 3 pin ICV. It's easier to depin the connector, put a 2 pin housing on it and use a 2 pin ICV from an M42 car or some non-bmw car that uses a 2 pin bosch PWM ICV. A flyback diode is a must.
          4. You seem to be on the right track, just fix those BIP grounds and the number of ground pins before you put power to them and make sure you have spark A to 1/6, B to 5/2 and C to 3/4

          This is my excel sheet for the M20 and M42 adapters I've made. There is no wasted spark provision on the M20 side because when I did this I did not have wasted spark on my M20. Upon converting to wasted spark I used spare pins on the DB37 pigtail wired to a separate connector and subharness running to my Bosch 0221503002. I repurposed the stock O2 sensor wiring and connector for a wideband setup, it's easier that way.

          The Join 27 and 36 thing is part of the main relay wiring mod. What you do is join harness pin 27 (start/run hot from ignition switch) to harness pin 36 (ground for the main relay hold in coil), snip the 86 wire (always hot) and ground the 86 terminal, then swap the places of the 85 and 86 terminals in the connector body.

          Click image for larger version  Name:	Annotation 2020-04-14 233459.png Views:	0 Size:	45.9 KB ID:	9917804




          Last edited by varg; 04-15-2020, 07:51 AM.

          IG @turbovarg
          '91 318is, M20 turbo
          [CoTM: 4-18]
          '94 525iT slicktop, M50B30 + S362SX-E, 600WHP DD or bust
          - updated 1-26

          Comment


            #6
            Originally posted by varg View Post
            The Join 27 and 36 thing is part of the main relay wiring mod. What you do is join harness pin 27 (start/run hot from ignition switch) to harness pin 36 (ground for the main relay hold in coil), snip the 86 wire (always hot) and ground the 86 terminal, then swap the places of the 85 and 86 terminals in the connector body.
            Thanks, its been a long process and I appreciate you helping out.

            - I plan to use the Power Grounds on the DB37 for the Spark (Pin 15) and Electronic Boost Controller (Pin 16).
            - The 4 engine harness grounds will go to the MegaSquirt Power grounds (Pins 15-18)
            - I'm going to switch to a 2-wire ICV from an m42 and cap off the spare power wire.

            Questions:

            5) Why are you modding the main relay? I had planned to get power to MegaSquirt Pin 28 from the Engine Harness on Pin 18.

            Answer: I just realized this is constant power, so MegaSquirt would never turn off. The Engine Harness Pin 27 gets 12v when the key is in Start or Run, this should be used to power MegaSquirt Pin 28. Per 1360-6, the Main Relay is responsible for powering ABS, the Fuel Pump Relay, and the Injectors. Main Relay Pin 86 is power in, Pin 85 is a path to ground that power. The idea is to also have the Main Relay powered when the key is in Start or Run. Engine Harness Pin 36 goes to the Main Relay Pin 85. Soldering Engine Harness Pin 27 to Pin 36 gets power to the Main Relay, but the power needs to be on Relay Pin 86. So Relay Pins 85 is moved to Pin 86. Now power is going to the relay in the correct spot when the key is in Start or Run. To close the circuit, the empty Relay Pin 85 must be grounded.



            Other Option: Although this would work, I am going to look into using a spare output to control the main relay like this.

            6) I plan to cut an old O2 sensor off its wires. This leaves me with something to solder my LC-2 onto. I plan to use the existing Signal wire, 12V (from heater relay), and Ground (from heater circuit). This leaves me with two simple options, either (a) use the MS fuel pump power to also trigger the O2 sensor heater relay, or (b) use fuel pump relay to power the O2 sensor heater wire. I like Option (a) because it is cleaner, but would powering two relays from the same MS output cause a problem? Option (b) can work, but requires splices that are visibly different from factory.

            7) Why are you powering the Injectors 1,3,5 on the Engine Harness Pin 16 from MegaSquirt Pins 32 & 33, and also Injectors 2,4,6 on the Engine Harness Pin 17 from MegaSquirt Pins 34 & 35? Why can't you power injectors 1,3,5 from MS Pin 32 and 2,4,6 from MS Pin 33?
            Last edited by McGyver; 04-29-2020, 10:43 AM.
            sigpic
            1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
            1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
            1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

            Comment


              #7
              My O2 sensor relay is triggered whenever the fuel pump is on. I probably joined Motronic pins 3 and 23 at the adapter harness, why it isn't in my notes I don't know. As for the injector wiring, that's just how it's done on the megasquirt board to divide the injector current over two pins. The below is from the MS V3.0 schematics, which I have a PDF of. You can access them here: http://www.msextra.com/doc/general/ms1v3schems.html I don't remember where the V3.0 PDF download is.
              Click image for larger version

Name:	MS DB37.png
Views:	4017
Size:	180.9 KB
ID:	9921665

              IG @turbovarg
              '91 318is, M20 turbo
              [CoTM: 4-18]
              '94 525iT slicktop, M50B30 + S362SX-E, 600WHP DD or bust
              - updated 1-26

              Comment


                #8
                I have everything figured out, except how to add a relay control circuit. The relay Control Mod Kit provides directions for installing it on a v3 pcb. I've bench tested the circuit and know it'll work. I plan to have the main relay ground (relay pin 85, ECU pin 36) come into MegaSquirt on Pin 6 (SPR4), which is connected to the Collector of my ZTX450 transistor. The Emitter of my transistor will be connected to MegaSquirt Pin 17 (GND - Power).

                - Where do I connect the transistor Base to get a programmed I/O?!? (If MegaSquirt is on, Output has power)
                - Obviously I can't use some of the outputs in the list below (FIDLE, JS11 for Boost Control, etc)
                - If I use D14, D15, or D16, will that make the LED stay lit while the programmable output is on? (I think the 3 LEDs default to flashing for the 3 ignition channels)
                - I want to use IAC1A as the output for my Tach, when I try to select my Tacho Output it only gives me IAC1 or IAC2, why doesn't it give an option on A/B?

                I am so confused on the outputs. I've read the hardware manual many time, still don't get it.

                The Hardware Manual specifies several available outputs for relay control:



                My output options from TunerStudio:
                Last edited by McGyver; 05-07-2020, 10:43 PM.
                sigpic
                1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
                1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
                1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

                Comment


                  #9
                  Originally posted by McGyver View Post
                  I am so confused on the outputs. I've read the hardware manual many time, still don't get it.
                  I think I finally get it. I have been confusing the naming convention of the DB37 pins with the MS2 processor output pins. Several of the DB37 pins have no connection to the rest of MegaSquirt (Spare 1, Spare 2, Spare 3, Spare 4, IAC1A, IAC1B, IAC2A, IAC2B). These pins can be jumpered to a processor output, which is what gives these pins a function.

                  For example, I wanted to use IAC1A as my Cluster Tachometer output. I thought that I would just wire DB37 Pin 25 to my cluster, and pick the "IAC1A setting" in Tuner Studio. It is correct that I can use DB37 Pin 25 as an output to my cluster, but "IAC1A" is not an option. If you go into Tuner Studio, you get the choices shown in the image below for Tacho Output (Not Shown are AD06/JS5 & AD07/JS4). In order to make DB37 Pin 25 do anything, I need to connect a jumper from one of the processor ports to DB37 Pin 37. The image below gives me a list of all of my available processor ports. In my case, I will choose IGN (JS10). I can choose this port because I am using R26, R27, and R29 to power my Spark A, Spark C, and Spark B (respectively). These resistors count as using the associated Diodes 14, 16, & 15 (so these are not available as processor outputs).

                  Available Tacho Ouputs (Not Shown are AD06/JS5 & AD07/JS4):


                  Finally getting this also clears up another bit of confusion from the Hardware Manual Section 3.6 on Page 44/201, "The IAC1A & B pins are complementary push/pull outputs; while one is connected to +12v, the other is grounded. IAC2 is the same." I know that my Spark B is connected to DB37 Pin 31 (IAC2B) and Spark C is connected to DB37 Pin 29 (IAC2A). I'm not great with circuits, but I had no idea how these sparks would work if one always has to be +12v while the other is grounded. Again, I was confusing the DB37 pins with the MS2 processor output pins. I have the Spark A/B/C connected to the MS2 processor outputs as described above (R26, R27, R29 aka D14, D15, D16).

                  Now that I have that cleared up, I can be pissed off that they decided to duplicate MS2 processor pin names for the DB37 Pins. That's several hours of my life I'll never get back. For reference, here is the post that made me understand.
                  Last edited by McGyver; 05-09-2020, 11:27 PM.
                  sigpic
                  1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
                  1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
                  1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

                  Comment


                    #10
                    You seem to have come to the correct understanding. In the schematics you see everything on the CPU pins referred to in JS nomenclature, then there is a note at the bottom that states some pin assignment details related to the IAC1A etc nomenclature. A similar note is at the top of the db37 page of the schematics. There's also this page. I'll admit I don't quite understand why the output pin options for tach point to IAC1 and IAC2 instead of being labeled JS0 and JS2 in tunerstudio, you'll also encounter this in the boost control page. It is a little confusing. Maybe the programmer who writes the tunerstudio code is unaware of it after all of this time, sometimes what makes sense to you after being exposed to it over time won't make sense to others. If you have the above linked page memorized it makes more sense, but how hard would it be to make it say JS0 then IAC1 parenthesized instead of just IAC1 in menus where this is encountered? For reference, here is the stepper IAC page of the manual which may clear up the nomenclature of IAC1A itself.

                    IG @turbovarg
                    '91 318is, M20 turbo
                    [CoTM: 4-18]
                    '94 525iT slicktop, M50B30 + S362SX-E, 600WHP DD or bust
                    - updated 1-26

                    Comment


                      #11
                      Ok, probably a dumb question, but how do I bench test a Bosch 2-wire ICV (IAC) from an m42?

                      Last night I used my JimStim to powered MegaSquirt, which was connected to TunerStudio. TunerStudio shows everything working as I would assume it should. I connected the ICV's negative terminal to ground on the JimStim and it's positive terminal to Pin 30 (FIDLE). This connection included the the diode. I also tried connecting it directly with jumpers. I tried using the test mode to move the valve, but nothing. My multi-meter showed some voltage across pin 30 to ground (~2.5v), but I would assume the sample rate would't be able to read the PWM power supply.

                      I applied 12v and ground to the ICV, which triggered movement, so I'm guessing the valve is good.







                      What am I doing wrong?
                      Last edited by McGyver; 07-14-2020, 07:55 PM.
                      sigpic
                      1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
                      1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
                      1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

                      Comment


                        #12
                        The valve frequency is awfully high. I run 92Hz.

                        IG @turbovarg
                        '91 318is, M20 turbo
                        [CoTM: 4-18]
                        '94 525iT slicktop, M50B30 + S362SX-E, 600WHP DD or bust
                        - updated 1-26

                        Comment


                          #13
                          Originally posted by varg View Post
                          The valve frequency is awfully high. I run 92Hz.
                          I originally had it at 92hz, without any luck. Then I changed it based on some m42 thread.

                          Should I be able to test using the JimStim, or does it need to be on the car?

                          Also, does the test mode override any other required conditions for the ICV to work? (Coolant temp, tps, rpm, etc)
                          sigpic
                          1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
                          1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
                          1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

                          Comment


                            #14
                            Test mode is fully manual. Jimstim doesn't have any way of providing you with feedback on what the output is doing so it really isn't of much help other than to get the MS running. How is the flyback diode installed?

                            IG @turbovarg
                            '91 318is, M20 turbo
                            [CoTM: 4-18]
                            '94 525iT slicktop, M50B30 + S362SX-E, 600WHP DD or bust
                            - updated 1-26

                            Comment


                              #15
                              Originally posted by varg View Post
                              Test mode is fully manual. Jimstim doesn't have any way of providing you with feedback on what the output is doing so it really isn't of much help other than to get the MS running. How is the flyback diode installed?
                              My flyback diode is installed in my harness adapter (now pictures are uploaded).

                              If I took to the time to look at the Hardware Manual, I would have realized that FIDLE is providing a PWM ground. I had both sides hooked to ground, no wonder it didn't work. I jumpred the power side to a 12v source and the ICV worked flawlessly, go figure. I also updated the writeup to document how to do it correctly.
                              sigpic
                              1987 - 325i Convertible Delphin Auto [SOLD], 325i Convertible Delphin Manual [SOLD]
                              1989 - 325i Convertible Bronzit m30b35 swapped [SCRAPPED], 325i Sedan Alpine Auto[DD]
                              1991 - 325i Coupe Laguna Manual [Project], 535i Sedan Alpine [SCRAPPED]

                              Comment

                              Working...
                              X