No announcement yet.

Bry's Megasquirt Install

  • Filter
  • Time
  • Show
Clear All
new posts

  • Bry's Megasquirt Install

    Howdy guys,

    Over the Holidays I decided it was finally time to build and install my own Megasquirt system. I bought the Megasquirt II V3.0 kit from along with a GM open element air temp sensor, a small 2 foot wiring loom to connect to the stock wiring harness, and an Innovate LC1 wideband O2 sensor. The kit shipped was $507 including shipping, which is a steal for a standalone computer and wideband controller.

    I spent three days building the actual computer from the bare printed circuit board up to the final computer. You can buy the computer assembled if you donít feel confident you can do the soldering yourself. It costs a little extra, but I felt that it was worth it for the experience gained. Here are a few pics of the build

    Next I needed a trigger wheel to be able to read timing. I used the same Ford wheel that Jason (jrm3) used. I cleaned up the OD of my crank pulley on my friends lathe, and also matched the ID of the trigger wheel. We tapped the pulley and put some SS countersunk bolts in to make sure nothing moved around.

    To read the teeth, I bought some long bolts and created a mount where the power steering pump connects to the block. I bought a cheap GM VR sensor and got everything set up from there. Here is a pic of a test fit (I donít have any final pics with me of the mount)

    I had to buy a new TPSensor, so I bought a BMW E46 Ė S54 one from the dealer. I think it was around $70. Along with this, I needed an adapter which Gustave was kind enough to sell me

    To mate the Megasquirt computer with the stock harness, I used a nice 2 foot pigtail from diyautotune that includes labels for each wire. For now I am using crimped spade connectors plugged into the stock connector, but eventually Iím going to pull apart an old ECU (same connector from a lot of different BMW models), and solder the ECU plug side up to my Megasquirt wires for quick interchangeability. Here is a pic of my wiring:

    Iím using Evo Green high impedance injectors right now, but there are provisions for low impedance injectors. However this is what gave Jason some problems.

    Unlike Jason, I am using the stock coil and distributor. I ran into some problems recently that the stock wiring allows the coil to charge when the key is in position two. I burned up a few High Current Ignition Driver transistors until I realized that this was my problem. A simple fix is to take the +12V for the coil, and wire it from the fuel pumps, so the coil can only charge when the fuel pumps are on (when the car is running). So far, I have not looked into getting my tach gauge working. It is on the list next of things to do.

    Hereís a pic of when I first got the car started and running:

    Overall it was a great experience. I can post part numbers and wiring diagrams if you guys are interested. I also have a lot more pics. The car runs extremely well on Megasquirt using an A-N system. Throttle response is amazing, and low end torque has increased tremendously. Iím still working on getting my tuning right. It is a little tough since no one has done it before on Megasquirt with a motor like mine. I wish I had dyno numbers of before and after, but I donít.

    One huge plus too, is that it takes me about 15 minutes max to convert to the stock ecu, stock TPSwitch, and AFM. So if reliability is worrying you, you can carry these parts around with you at first (Iíve got my stuff in the trunk ) just in case.

    Bryan K.
    Texas A&M Formula SAE

  • #2
    Wow, congrats seem really cool and a fun exprience. Welcome to A-N side.
    The A-N really brings the car out of its old shell doesn't it? Its a totally different car.



    • #3
      Very cool!! That looks like a very involved project. Did they have detailed instruction on how to assemble the circuit board? What kind of ingition control do you have?
      "It is needless to say that self-propelling vehicles, like other machines, will never do as much for one who does not understand them as for one who does."


      • #4
        Thanks guys, it is a totally different car, and so much better too!

        Yea Mike, there are extremely detailed instructions for everything. It's all at, but here is the page just for building the board:

        Ignition control is amazing, you can set any sort of advance that you want over the whole range of the map. You can even do things like have a spark retard for a rev limiter, and change your advance/retard for cold start and enrichments.
        Bryan K.
        Texas A&M Formula SAE


        • #5
          Mega questions

          I just picked up a long block with 50,000 miles on it with plans to drop it into my 2002. I am leaning toward mega-ing (new word?) it. How did you get you initial configuration for both fuel and spark? What are the spec for your engine? My long block is dead stock never been cracked open. What stock sensors should i try to grab when I go to pick it up?

          Very cool project you have going there. How long did it take to get it to fire up and how long do you figure you'll be tuning before your reasonably happy with the results. One of my fears is that the perfectionist in me will always feel the need to tweek. Oh well- what else is new.



          • #6
            Originally posted by Bryan View Post
            Thanks guys, it is a totally different car, and so much better too!

            Yea Mike, there are extremely detailed instructions for everything. It's all at, but here is the page just for building the board:

            Ignition control is amazing, you can set any sort of advance that you want over the whole range of the map. You can even do things like have a spark retard for a rev limiter, and change your advance/retard for cold start and enrichments.
            Do you feel that the 12x12 tables offer sufficient resolution compared to the Motronics 16x16 tables?
            How do you make sure youíre ignition timing doesnít cause any knock/ping? Are you using a microphone attached to the block and the sound fed to a pair of headphones when tuning?


            • #7

              For the base map, I initially started with Jason's (jhtm3) fuel map, got my car started and adjusted fuel from there. It wasn't very difficult. The hardest part was working out all the bugs for how to set up the E30 M3 with Megasquirt. It wouldn't take much time at all for someone else to do it with Jason's or my previously set up configs and maps. For spark, I adapted a map from Jeff J's ignition table that he tuned on a dyno. I have had no problems with it.

              As far as getting the car started, it really should have fired up in the first 10 mins of fiddling with it. I had one of my parameters set wrong keeping my car from starting. Once started, I could drive around fine on Jason's fuel map. It took a few days driving around by myself trying to tune it. As soon as I got a passenger in the car, things went really quick. The best part about it is that you can be a perfectionist and get everything to where you want it to. It isn't a set and forget system, as when it gets cold, you'll need to make sure your cold start enrichments are fine, etc...

              My motor has:
              Evo Green Injectors
              Ported head (29.5mm Intake)
              Port matched TBs
              284/276 Schrick Cams
              Motorsport cam gears
              Evo Valve Springs
              95mm pistons
              11.5:1 CR
              Stock 2.3 crank
              Evo 2 Headers

              I'm running the stock plenum currently with the stock airbox (AFM removed).

              For sensors, make sure you have the usual coolant (blue and brown), and the oil pressure/oil temp senders. I didn't use any of the flywheel or crank position sensors. You'll need the temp sender in the thermostat to run the cooling fan (unless you want megasquirt to control it).


              To listen for knock, I strap my brother in the engine bay, and tell him to raise a flag everytime he hears detonation . Seriously, I haven't had any problems with pinging yet. I've kept my AFR's in safe ranges and haven't tuned for max power as of right now. You can make a knock sensor that will retard timing in megasquirt, but I do not know how well it would work with our cars. I haven't looked into that solution yet.

              The 12x12 maps are fine for what I need to do. Megasquirt interpolates between each cell, so it smoothly adjusts from one cell to the other. I find that I have large gaps in the upper load ranges because I'm hardly ever modulating between, say 90 and 100% throttle. Becuase of this, I can have more resolution in the lower ranges for part throttle usage. It works perfect.

              I've tuned before with my cousin's (Jeff J.) Lenz system, and the 16x16 maps seem too large. It is really hard to hit every point, Megasquirt has all that I need. The VE (volumetric efficiency) doesn't change that much from one position to another, so more resolution wouldn't be a huge benefit.

              A few have asked for me to post a list of what I bought. I'll compile something and post it here for everyone to see. I wanted to mention to everyone that I'm not running an Idle Control Valve for simplicity reasons. When its cold out, my car is a little lumpy under idle, but it smooths out once the car warms up. There are solutions if you desire to have an ICV with your setup.
              Last edited by Bryan; 02-27-2007, 11:53 AM.
              Bryan K.
              Texas A&M Formula SAE


              • #8
                Thanks Bryan

                Really good info there. Knowing that there are some maps out there to start with is pushing me in the megasquirt direction. Just curious why you guys don't use MAP? The stock system on the 2002 tii is alpha-n and it works fine but does not compensate for differences in air density in any way (altitude etc)


                • #9
                  I initially started my car on MAP, and felt it was stable enough that I could run it without problems. I switched over to alpha-n because there is so much support here for it. In the future I may switch over to MAP, but for now the car runs great on alpha-n.



                  • #10
                    Originally posted by Bryan View Post
                    For the base map, I initially started with Jason's (jhtm3) fuel map
                    hah...i think you combined mine (jht3) and jason's (jrm3) nick's :rolling:

                    back on topic, really cool project you've got here. thanks for the more detailed writeup!


                    • #11
                      Very nice... Have you tried tuning with the data log yet? I found that was easy to use when I didnt have a passenger.

                      1989 m3


                      • #12
                        thanks for the detailed reply!
                        Now if only i could find the trigger wheel I got about 2 years ago, I can change the ID and mount it before I put the engine back in...

                        should you start tuning your ignition have a look at this:


                        • #13
                          Hah, whoops I did switch both of your names. They are fairly close, so I don't lose too many points...

                          As Jason said, I'm running A-N because of the support and maps from other E30 M3 owners. Another reason is I have fairly large cams, and with individual throttle bodies, some have expressed concern with getting an accurate MAP signal. However, the megasquirt does take a barometric pressure reading when you first start the car up, so you can adjust your fuel accordingly.

                          That detonation device looks really cool. Great idea. I think my cousin made one, but it was getting saturated with the mic that he was using.

                          I have also used datalogs to tune, they are a great resource. You couldn't diagnose problems with out them!


                          Some have asked for a parts list of what I bought. I don't have my receipts with me, but from memory (and looking at websites), this is what I purchased:

                          MegaSquirt-II Programmable EFI System PCB3.0 - Kit w/ BLACK CASE - $253.00
                          I did not purchase this, because my friend let me borrow his. I STRONGLY recommend you get a Stimulator:
                          MegaSquirt Stimulator v2.2 - UnAssembled Kit - $45.00
                          Wire - Shielded 20 Gauge - 10' (For VR Sensor Signal) - $7.50
                          MegaSquirt Wiring Bundle - 2' Long (To interface with stock harness) - $12.00
                          GM Open Element IAT Sensor with Pigtail (For Air Temp Metering) - $21.00
                          Innovate LC-1 Digital Wideband Controller with Sensor - $199.00
                          You'll also need a serial cable, if you don't have one, it is $6.00 from

                          From CarQuest, I bought a generic GM VR sensor along with a connector and wires. I don't remember what part I used. Jason used the following:
                          92 Ford Escrot LX Crank Position Sensor
                          Wells part number SU248

                          My sensor was $30 and the pigtail was like $8.

                          For the Throttle Position Sensor (TPS), I bought the E46 BMW S54 sensor. It is BMW PN 13631402143 and cost me around $70. This sensor works with the stock connector already in place. In order to adapt it to our throttle bodies, I also bought the adapter piece from Gustave at for $45.00

                          I bought some wires, wire strippers, small needle nose pliers, heat shrink, and connectors from Home Depot. Make sure you have a good soldering iron, and I would highly recommend a nice heat gun for heat shrinking.


                          I adapted my wiring from Jason's pinouts, so he deserves some credit for this . Hopefully it is self explanatory.

                          BMW harness Pin/MS use (Megasquirt Pin Location) - goes to
                          1/Ignition Coil Output (36) - goes to Terminal 1 ignition coil
                          2/TPS 5 Vref(26)
                          3/TPS signal(22)
                          5/Ground Going to WBO2 sensor (O2 Blue)
                          13/coolant temp(21)
                          14/Injector bank 1(32 & 33) - goes to Injectors #1 & #2
                          15/Injector bank 2(34 & 35) - Goes to Injectors #3 & #4
                          16/Ground(8 & 9)
                          17/Ground(10 & 11)
                          18/12v power(28)
                          20/fuel pump relay(37)
                          22/Intake air temp(20) - goes to AFM Pin 22
                          35/12v power input Going to WBO2 sensor power (red)

                          wires external to bmw harness (Megasquirt Pin Location)
                          WBO2 Ground to chassis (White and Green)
                          WB02 sensor signal(23)
                          VR Sensor + (24)
                          VR Sensor - (7) (Should be ground)
                          Last edited by Bryan; 03-02-2007, 09:13 AM.
                          Bryan K.
                          Texas A&M Formula SAE


                          • #14
                            Hey guys, I've been getting some requests for my ignition maps, fuel maps, and .msq files. Here is a directory with my most recent maps and settings:

                            The ignition map is pretty good right now, I can't put much more advance at WOT, but I think I could definitely use some more advance in the midrange. The fuel map is a tad lean at cruising speeds and a little rich everywhere else (it could use some leaning out for better fuel efficiency).

                            Keep me updated with all of your progress and let me know if you change any parameters that helps your car out. I'm always tuning and fiddling with things . I'd love to see some success stories on other E30 M3's.

                            Bryan K.
                            Texas A&M Formula SAE


                            • #15
                              Also, Jason had to modify the .ini config files to get Alpha-N to work for our situation. I posted the megasquirt-II.ini file in the same folder for you guys to use if you are planning on using A-N.
                              Bryan K.
                              Texas A&M Formula SAE