Please read the ‘disclaimer’ at the top of the parent page here.
This documentation is for using the MS1/Extra firmware version 029v or later, MS2/Extra 3.3.1 or later, and MS3 1.2.4 and later.
Tach Input Background: Crank Angle Sensor (CAS) Wheel in the 1G DSM
This article was originally based on the 1st gen DSM with the 4G63 engine, but also works for the 2G models. On a 1G, there are two ‘sets’ or ‘rings’ of holes in the optical CAS. The outer ring of holes is read by an optical sensor and then sent across a wire to the ECU and referred to as the CKP signal. Likewise the inner ring with two holes is also read by an optical sensor, sent across a wire to the ECU and is referred to as the CMP signal.
Outer Ring – Crank Angle Sensor (RPM) – CKP
Inner Ring – Top Dead Center Sensor – CMP
The later 2G motors use a Hall effect CAS that behaves in the same way as a 2G from an electronics standpoint, even though the hardware is different, relocating the CKP signal to the crank while the CMP sensor is on the cam. Some Lancer EVOs also used the same sort of signal, and this CAS showed up on a few other Mitsubishi motors. Even a few non-Mitsubishi products used a version of this CAS, such as the Mazda Miata.
MegaSquirt-I
Getting the Tach Input Signal:
Run MS1/Extra and the “2nd Trigger” Wheel Decoder option (where the missing tooth on the wheel decoder comes from a second sensor, usually cam position). The 1G CAS on a DSM (which bolts up to ALL years of 4G63 7- and 6-bolt engines) has a CMP and CKP signal, so you take the outputs of each and run them into the MegaSquirt. Take the CKP signal (4 holes in the Optical sensor wheel, the “outer” ring of the mitsu CAS), and run it to the primary tach input on the MS with a 12v pullup resistor – then you take the inner ring of the CAS (1 hole in the sensor wheel) and run it to the secondary tach input on MS (it’s pin 11 on the MS-I cpu) with a 5v pullup resistor.
If you follow my documentation for the mods below you’ll externally wire the tach inputs like this:
The Primary tach input (CKP) is connected to pin 24 on the MegaSquirt’s DB37
The Secondary tach input (CMP) is connected to pin 25 on the MegaSquirt’s DB37
If you’re using a relay board: Pin 24 goes through to position 15, Tach/Ignition for the CKP/Primary Tach Input. Pin 25 goes through to position 7, S1 for the CMP/Secondary Tach Input. You’ll need to make sure your relay cable has this wire in place, if so then this will work fine. All of my MS-II ready relay cables have this wire in place. (black loom covered cables are MS-II ready, old MS-I grey cables do not have this wire)
-How to mod a MegaSquirt-I PCB2.2 ECU-
Parts Needed for Input Mod: (1) 1k 1/4w Resistor and (2) 470 ohm 1/4w Resistors (Grab a mk-pullup with your order to get the resistors you need for next to nothing!)
“CMP Signal” — Lay a 1k 1/4watt resistor across the bottom of the PCB with one end at pin 11 of the processor (U1) and the other end at the X11 hole. Bend the resistor leads to raise the resistor just a bit off of the PCB and allow a lead on one end to drop through X11 and solder that end in place (while making sure the other end is in place near pin 11 still, and with the resistor still raised a bit off the board so the leads don’t short against anything). Then use needle-nose to hold the resistor lead to pin 11 and solder it to the pin. Now to get the 5v pullup use a 470 ohm 1/4w resistor and solder one end of it to the first resistor at X11 (just tie them together) and the other leg of it to the small un-labeled hole just above and to the right of D9 (when looking at the PCB from the top that is). Do not connect to the leg of D9 itself – you will be using a small hole in between D9 and R13. Once again raise this just enough off of the PCB to prevent it from shorting with any of the leads sticking out on the board. (Heatshrink tubing over the whole wire/resistor assembly works nicely)
The new “cap mod” turns this into a low pass filter that helps avoid misfires caused by a noisy CMP signal. Solder a length of wire to a 0.1 uF capacitor, and connect this capacitor-on-a-wire between pin 11 on the processor and a ground point. The second hole from the bottom on the JP1 header is a good ground point.
“CKP Signal” — We just need a 12v pullup. Install a 470ohm 1/4w resistor between the right side (non-band) end of D5 and the right hole (banded) end of D9.
-How to mod a MegaSquirt-I PCB3.0 ECU-
First off when you build up the PCB3.0 board configure the tach circuit for Hall/Opto/Points. When you get to optional components that say to only install them if you are triggering from the negative side of the coil; you aren’t – so don’t. Note that normally my pre-assembled MegaSquirt-I ECUs (MS130-C) are assembled and loaded with the standard B&G fuel only firmware, which means they are configured for a fuel only install to trigger from the negative side of the coil. It’s easy to reconfigure them, click here for how.
Parts Needed for Input Mod: (1) 1k 1/4w Resistor and (2) 470 ohm 1/4w Resistors (Grab a mk-pullup with your order to get the resistors you need for next to nothing!)
“CMP Signal” — Lay a 1k 1/4watt resistor across the bottom of the PCB with one end at pin 11 of the processor (U1) and the other end at the IAC1A hole. Bend the resistor leads to raise the resistor just a bit off of the PCB and allow a lead on one end to drop through IAC1A and solder that end in place (while making sure the other end is in place near pin 11 still, and with the resistor still raised a bit off the board so the leads don’t short against anything). Then use needle-nose pliers to hold the resistor lead to pin 11 and solder it to the pin. Now to get the 5v pullup use a 470 ohm 1/4w resistor and solder one end of it to the leg of the first resistor to IAC1A and the other leg of it to the 5v+ hole just above the proto area. (This is a long reach so you’ll need to use a bit of wire to get across the board.) Once again raise this just enough off of the PCB to prevent it from shorting with any of the leads sticking out on the board. (Heatshrink tubing over the whole wire/resistor assembly works nicely)
The new “cap mod” turns this into a low pass filter that helps avoid misfires caused by a noisy CMP signal. Solder a length of wire to a 0.1 uF capacitor, and connect this capacitor-on-a-wire between JS8 and SG or a ground hole in the proto area.
“CKP Signal” — We just need a 12v pullup. Install a 470 ohm 1/4w resistor between the right side (non-band) end of D1 and the left leg (banded end) of D9.
Click for a larger view (does not show cap mod)
Fuel Only InstallationSkip the Spark output section below as well as the ignition and dwell settings. You should be able to share the CMP and CKP CAS signals with the stock ECU to get your TACH signal to trigger the MegaSquirt so you can take control of the fuel injection on your 4G63 and leave ignition control to the stock ECU for now. This is a great way to ‘get your feet wet’. Learn the basics of installing and tuning the MegaSquirt EMS system, and then when you’re ready it will be pretty easy to add in ignition control as well by following the Spark Output section below. For fuel only control though you just need to wire up the rest of the sensors (IAT, CLT, O2, TPS) and make sure you are getting good readings from them and a good TACH signal on the MegaSquirt. At this point you’ve still taken control of nothing, you’ve just hooked all of the MegaSquirt INPUTS. Now comes the fun parts… wire up the injectors! If you use new injector connectors and new wiring from the MegaSquirt it will be easy to swap from factory ECU control of the injectors to MegaSquirt control and back if you need to while you work out your tuning. |
Taking Control of the Ignition —
Decision time– use the stock ignitors or use dual BIP373 coil drivers. I’m going to document both options for you here, but I’d recommend using the stock ignitors as it’s simpler, and they will properly trigger your tachometer.
Only use one method or the other for spark output, don’t try to combine the two!
Option 1: Spark Output to factory DSM ignitors: (Recommended)
Parts Needed for PCBv3 Output Mod using factory ignitors: (2) 1k 1/4w ResistorsNext use two 1k ohm resistors as pictured below, along with two bits of wire to bring the signals out to the DB37. This will condition the board to use the stock ignitors and coil packs. Take each resistor and cut off all but about an inch lead on each side, hook both ends and loop them around the pins that were already soldered. The picture below shows where they go. The resistor goes from the 5v side of each resistor to the negative leg of the respective LED. This is then brought over to the db37 with two lengths of wire (one for each). The top resistor goes to IGN and the bottom resistor goes to IAC2B.When wiring up your ECU later: Spark Output A will come out on pin36, and Spark Output B will come out on pin31.
NOTE– If you’re modding up an MS-I PCBv2.2 ECU you can use the documentation at the coil on plug guide to use your stock ignitors. The above info is for the PCBv3.0 ECU. |
Option 2: Spark Output to MS-internal BIP373 Coil Drivers:
Parts Needed for PCBv3 Output Mod if using BIP373’s: (1) BIP373 & (1) 330ohm 1/4w Resistor (Kit available here)FOLLOW THE 2 Spark Coils Direct Drive Output Mods – that’s all!! (Note that the BIP373 has replaced the now discontinued VB921.) Then take spark output A to the ignitor trigger wire (coming off the Factory ECU) for cylinders 1 & 4, and attach spark output B to the ignitor trigger wire for cylinders 2 & 3. |
Things to be careful of:
IF USING THE STOCK IGNITORS:
When the MS is powered off, it’s spark triggers are grounded. So you MUST make sure the MS is powered on if the coilpacks/ignitors are also powered on! During installation, it’s common to have the MS attached to the ignitors, and have the ignition key “on,” but not have the MS powered up yet. So I make sure I do power and grounds first to the MS, and attach the spark outputs LAST before I am ready to start the car.
You’ll know you’re doing it right if the “power transistor” (a.k.a. the ignitor) is not too hot to the touch.
IF USING THE BIP373 IGNITORS:
In TunerStudio’s Ignition Settings, ‘Spark Output Inverted’ must be set to YES. And you should enable Dwell Control. Skipping either of these will cook your BIP373’s, and possibly your coils. (more info on TunerStudio setup below).
What about everything else???
Most of my ‘how to’ articles focus on the ignition system control, that’s because the rest of the sensors and injectors are pretty much the same for every car out there, with only minor differences that are well covered in the MS1 Manual at MSExtra.com. The tricky part is taking control of the stock ignition system so that’s what we focus on covering for you here. For everything else you’ll find the MS1/Extra manual will cover you very well. Other things the stock ECU controls, and what to do about them, include:
- Idle air control valve: Not supported with MS1. You can add a PWM idle control valve, or run without this.
- Fuel pump relay: Controlled from pin 37 of the MegaSquirt.
- Boost control: Use our boost control mod kit to drive the factory solenoid.
- Fans: These can be run with a relay control circuit.
- Voltage regulator: Not an issue on a 1G, but the 2G had voltage control built into the ECU. You can use an external voltage regulator instead.
- Air condontioning: Control the compressor using a relay.
TunerStudio Configuration
You need to use a timing light to calibrate the MS’s timing to the DSM timing. To do this, run “fixed angle” of 15 degrees and adjust the “trigger angle” until the timing light flashes while the motor is on the X degree mark on the crankshaft. This way, whatever timing megasquirt is commanding is actually happening. Here are my (Dieselgeek’s) usual spark settings:
Ignition Settings:
Trigger Angle: 69 – 76 should be really close– you’ll need to dial this in properly to get your based timing correct as mentioned above
Trigger Angle Addition: 0
Cranking Timing: Time Based
Cranking Advance Angle: 15
Hold Ignition: 0
Spark Output Inverted: (NO if using stock ignitors) (YES if using BIP373s)
Fixed Angle: -10 (set this one to X degrees when calibrating the timing)
Trim Angle: 0
Trigger wheel settings:
Wheel decoder base teeth: 2
2nd trigger enable: 2nd trigger
2nd trigger active edge: rising
2nd trigger and missing teeth: None missing
Trig pos A: 2
Trig pos B: 1
Dual dizzy mode: normal
Wheel decoder: 025 style
Dwell settings:
Dwell Control: Dwell Control
Cranking Dwell: 5.0 ms
Running Dwell: 3.6 – 4.2ms start low, make sure your coils/ignitors are not getting very warm if you increase
Minimum discharge period: 0.7ms
A word about DSM ignitions: With new plugs and wires, these can spark up to 35psi if you set the dwell to 3.8ms. Bad wires and plugs can cause all kinds of running issues, namely spark blowout at low psi.
MegaSquirt-II
MS2/Extra has a dedicated wheel decoder mode for the 4G63, so you won’t be using the generic wheel decoder. There are several ways to make this work – note that our way isn’t the same as the MS2/Extra manual. However, there are several ways to make this work, and if you follow all the steps in one single write-up, you’ll be good to go. The potential trouble spot can happen if you mix and match write-ups.
This article uses a different pinout for the MS2 than the MS1. MS2s normally have the IAC1A through IAC2B jumpers populated by a stepper IAC valve. In this write-up, we’ll leave those where they are in order to control the stock IAC valve. Here’s the pinout we will be using.
Board version | V3.0 | V3.57 |
CKP signal | DB37 pin 24 | DB37 pin 24 |
CMP signal | DB37 pin 5 | DB15 pin 7 |
Spark A | DB37 pin 36 | DB37 pin 36 |
Spark B | DB37 pin 6 | DB15 pin 10 |
-How to mod a MegaSquirt-II PCB3.0 ECU-
Our version will have you use the VR input circuit for the CKP input and a basic logic level input for CMP. Jumper TachSelect to VRIN and TSEL to VROUTINV. Note that it will be easier to add the MAP sensor after adding these mods, as it gets in the way of the SPR3 and SPR4 holes.
Parts Needed for Input Mod: (1) 1k 1/4w Resistor and (2) 470 ohm 1/4w Resistors (Grab a mk-pullup with your order to get the resistors you need for next to nothing!)
“CMP Signal” — Lay a 1k 1/4watt resistor across the bottom of the PCB with one end at JS10 and the other end at the SPR3 hole. Bend the resistor leads to raise the resistor just a bit off of the PCB and allow a lead on one end to drop through SPR3 and solder that end in place (while making sure the other end is in place near JS10 still, and with the resistor still raised a bit off the board so the leads don’t short against anything). Bend the other end to JS10 and solder it in place. Now to get the 5v pullup use a 470 ohm 1/4w resistor and solder one end of it to the leg of the first resistor to SPR3 and the other leg of it to the 5v+ hole just above the proto area. (This is a long reach so you’ll need to use a bit of wire to get across the board.) Once again raise this just enough off of the PCB to prevent it from shorting with any of the leads sticking out on the board. (Heatshrink tubing over the whole wire/resistor assembly works nicely)
The new “cap mod” turns this into a low pass filter that helps avoid misfires caused by a noisy CMP signal. Solder a length of wire to a 0.1 uF capacitor, and connect this capacitor-on-a-wire between JS10 and SG or a ground hole in the proto area.
“CKP Signal” — We just need a 5v pullup. Install a 470 ohm 1/4w resistor between VRIN and the 5V source in the proto area.
When modifying the V3.0 board, you’ll also want to add a TIP120 transistor for IAC control (DIYAutoTune mod kit here)
-How to mod a MegaSquirt-II PCB3.57 ECU-
Our version will have you use the VR input circuit for the CKP input and a basic logic level input for CMP. Put the JP1 jumper in the 1-2 position, and J1 in the 5-6 position.
Parts Needed for Input Mod: (1) 1k 1/4w Resistor and (2) 470 ohm 1/4w Resistors (Grab a mk-pullup with your order to get the resistors you need for next to nothing!)
“CMP Signal” — Lay a 1k 1/4watt resistor across the bottom of the PCB with one end at JS10 and the other end at the PAD7 hole. Bend the resistor leads to raise the resistor just a bit off of the PCB and allow a lead on one end to drop through PAD7 and solder that end in place (while making sure the other end is in place near JS10 still, and with the resistor still raised a bit off the board so the leads don’t short against anything). Bend the other end to JS10 and solder it in place. Now to get the 5v pullup use a 470 ohm 1/4w resistor and solder one end of it to the leg of the first resistor to PAD7 and the other leg of it to the 5v+ hole just above the LED area. Once again raise this just enough off of the PCB to prevent it from shorting with any of the leads sticking out on the board. (Heatshrink tubing over the whole wire/resistor assembly works nicely)
The new “cap mod” turns this into a low pass filter that helps avoid misfires caused by a noisy CMP signal. Solder a length of wire to a 0.1 uF capacitor, and connect this capacitor-on-a-wire between JS10 and SG or a ground hole above the LED area.
“CKP Signal” — We just need a 5v pullup. Solder a 1K resistor in the R57 slot, above JP1.
Taking Control of the Ignition —
Decision time– use the stock ignitors or use dual BIP373 coil drivers. I’m going to document both options for you here, but I’d recommend using the stock ignitors as it’s simpler, and they will properly trigger your tachometer.
Only use one method or the other for spark output, don’t try to combine the two!
Option 1: Spark Output to factory Mitsubishi ignitors: (Recommended)
The mods in this article require the spark output to be set to going low. There are some other output mods floating around out there that use the opposite setting.V3.0 mods:
Parts Needed for PCBv3 Output Mod using factory ignitors : (2) 270 to 330 ohm 1/4w ResistorsNext use two 270 to 330 ohm resistors as pictured below, along with two bits of wire to bring the signals out to the DB37. This will condition the board to use the stock ignitors and coil packs. Take each resistor and cut off all but about an inch lead on each side, hook both ends and loop them around the pins that were already soldered. The picture below shows where they go (Note: In this picture they are marked as 1K resistors). The resistor goes from the 5v side of each resistor to the negative leg of the respective LED. This is then brought over to the db37 with two lengths of wire (one for each). The top resistor goes to IGN and the bottom resistor goes to SPR4.When wiring up your ECU later: Spark Output A will come out on pin 36, and Spark Output B will come out on pin 5. V3.57 mods: This board already has a 1K pull up on the spark outputs. If you need a higher pull up value (such as for running our IGN-1A coils), you can run 330 ohm resistors from a 5V source to PAD1 and PAD3. For spark output A, wire PAD1 to the center hole of Q16. For spark output B, wire PAD3 to PAD15. When wiring up your ECU later: Spark Output A will come out on pin 36 of the DB37, and Spark Output B will come out on pin 10 of the DB15. |
Option 2: Spark Output to MS-internal BIP373 Coil Drivers:
See our Using Bosch BIP373 Ignition Modules with Megasquirt page for details. You will need one MK-BIP373 mod kit for a V3.0 board and two for a V3.57. |
Things to be careful of:
IF USING THE STOCK IGNITORS:
When the MS is powered off, it’s spark triggers are grounded. So you MUST make sure the MS is powered on if the coilpacks/ignitors are also powered on! During installation, it’s common to have the MS attached to the ignitors, and have the ignition key “on,” but not have the MS powered up yet. So I make sure I do power and grounds first to the MS, and attach the spark outputs LAST before I am ready to start the car.
You’ll know you’re doing it right if the “power transistor” (a.k.a. the ignitor) is not too hot to the touch.
Spark output must be set to going low with these mods.
IF USING THE BIP373 IGNITORS:
In TunerStudio’s Ignition Settings, spark output must be set to going high. And you should enable Dwell Control. Skipping either of these will cook your BIP373’s, and possibly your coils. (more info on TunerStudio setup below).
What about everything else???
Most of my ‘how to’ articles focus on the ignition system control, that’s because the rest of the sensors and injectors are pretty much the same for every car out there, with only minor differences that are well covered in the MS2/Extra Manual. The tricky part is taking control of the stock ignition system so that’s what we focus on covering for you here. For everything else you’ll find the MS2/Extra Manual will cover you very well.
- Idle air control valve: Uses the existing stepper IAC outputs.
- Fuel pump relay: Controlled from pin 37 of the MegaSquirt.
- Boost control: Use our boost control mod kit to drive the factory solenoid.
- Fans: These can be run with a relay control circuit.
- Voltage regulator: Not an issue on a 1G, but the 2G had voltage control built into the ECU. You can use an external voltage regulator instead.
- Air condontioning: Control the compressor using a relay. The latest (3.3.1 and later) MS2/Extra codes allow using an idle up input to increase idle speed.
TunerStudio Configuration
You need to use a timing light to calibrate the MS’s timing to the motor’s timing. To do this, run “fixed angle” of 10-15 degrees and adjust the “trigger angle” until the timing light flashes while the motor is on the same 10-15 degree mark on the crankshaft, this needs to be spot-on. This way, whatever timing Megasquirt is commanding is actually happening.
- Spark mode: 4G63
- Trigger Angle / Offset: 0 (adjust as needed if your timing doesn’t line up)
- Ignition input capture: Falling edge
- Spark output: Going Low if using our mods for the stock ignition module, Going High if using BIP373s
- Number of coils: Wasted Spark
- Spark A output pin: D14
- Cam input: JS10
MegaSquirt-III with MS3X
Note: MS3-Pro installation is covered in section 5.3.14 of the MS3-Pro Manual.
This one has much fewer mods required. You will just need to do the following:
- Make sure the main board is set up for VR input. On a V3.0, jumper TachSelect to VRIN and TSEL to VROUT. On a V3.57, put JP1 in the 1-2 position and J1 in the 3-4 position.
- For a pull up on the CMP input, make sure JP7 is in place on the MS3X.
- The CKP input also needs a pull up. You can either put this in place externally or internally.
- For an external pull up, run a 1K resistor from pin 26 to pin 24 on the main board.
- For an internal pull up on a V3.0 board, connect a 1K resistor on a wire from the 5V hole above the proto area to TachSelect.
- For an internal pull up on a V3.57 board, solder a 1K resistor to R57.
That’s it! The MS3X already has outputs for fans, boost, and more.
It is possible to run an MS3 without the MS3X, although you’ll be missing out on most of the MS3’s advanced features. Without the MS3X, you would set it up in the same way as an MS2.
External wiring
You’ll be using the standard MS3 external wiring diagrams here. The ignition control signals use the following pins:
- CKP signal: Main board pin 24
- CMP signal: MS3X pin 32
- Spark output A: MS3X pin 14
- Spark output B: MS3X pin 33
TunerStudio settings
- Spark mode: 4G63
- Trigger Angle / Offset: 0 (adjust as needed if your timing doesn’t line up)
- Ignition input capture: Rising edge
- Spark output: Going High
- Number of coils: Wasted Spark
- Spark hardware in use: MS3X Spark
- Cam input: MS3X Cam In
For more information, see the MS3 manual on 4G63 mode.