No announcement yet.

S38 on Megasquirt

  • Filter
  • Time
  • Show
Clear All
new posts

    S38 on Megasquirt

    Has anybody run an s38 on megasquirt? I am contemplating it due to the adjustablity it has.

    -IAT sensor
    -60-2 CPS
    - MAF (not AFM)
    -55 pin Bosch motronic 1.2 350 ecu

    The main difference between other applications would be:
    -switch style TPS, either upgrade to vTPS from M50 or use auto e34 TPS
    -tune for alpha n or ITBs
    -double check wiring diagrams for premade ecu (for m20) vs s38 pinout

    Am I missing anything? It seems to me the MS2 would be a worthwhile upgrade of the S38, are M5 owners too much of purists to deviate from the stock ecu?

    Page 135 has the ecu pinout for the s38b36 for future reference

    E30 M1.3 ECU pinout:

    It looks like a few things are different between the ECU pinouts, mainly the following pins related to AFM and an auto trans that came with the m20.

    Pin 7 - Mass air flow vs AFM
    Pin 12 - Not Used vs AFM Reference
    Pin 23 - Air Pump relay vs O2 Sensor Heater
    Pin 25 -Preheat MAF vs Not used
    Pin 26- MAF ground vs AFM ground
    Pin 32 - (maybe) Measuring signal to OBC vs econometer
    pin 43 - MAF vs Not used
    pin 50 -not used vs ABS fuel cut override
    pin 51 - not used vs auto kickdown
    pin 54 - fuel coding signal vs torque converter lockup switch

    I'm guessing pin 23 is the actuator for the intake plenum valve? It would be nice to keep that feature somehow. I would obviously need a widebad to get it tuned but once that was done it could be set it and forget it, right?

    Yup I am running my S38 on megasquirt and love it!
    "Driving anything else would be uncivilised"


      I'm really considering running it on my S38B35, what's holding you back?
      My E30 v1.0 | v2.0 | v3.0 | My E28 |My E34 | My feedback


        Originally posted by Eric View Post
        I'm really considering running it on my S38B35, what's holding you back?
        A couple things:

        - I don't want to lose the midrange torque that the plenum valve provides. Not sure if you could set it to open and close at a certain rpm value but it would have to be wired into the ecu correctly to be used with the correct output voltage. I would assume it could just be an on/off style switch based on rpm though.

        - I would need to either add a full time AFR gauge and tune it myself (not a huge deal, but no place to put the gauge without hacking the interior up), use a temporary gauge and tune it myself, or pay a tuner to tune it for me and not add a gauge. I like the full time gauge but would like it to be hidden, maybe in the glovebox or near the kick panel or something.

        - Not sure what is necessary to use the MAF vs AFM if I went with a prebuilt ECU for an m20. The IAT sensor is already built into the b36, so I assume that could be used. The b35 has it built into the AFM and can be used with the whodwho unit MS2.

        - I haven't looked at the TPS too much, but assuming it is the switched style, it would need to be changed to a vTPS. I'm not sure if the e34 m20 auto TPS would connect on the s38 throttle bodies. The connector looked different than the m20 TPS when I looked at it the yesterday.

        The s38b35 is basically just an m30 with 4 valves per cylinder, it can be made to work with a few mods. I believe the S38B35 uses Motronic 1.0 (35 pin ecu, seen in your miller WAR writeup - ECU 079 I think) it needs the toothed harmonic balancer (60-2) and CPS/bracket on the front of the engine from an m30b35. PF Tuning made an M1.0 to M1.3 adapter but they don't come up for sale often. It would also need a vacuum line from the intake.

        The s38b36 comes with all of that so it should be plug an play with just the vacuum line and making the MAF work properly. It is M1.2 ECU 350 but above shows the pinout differences between M1.3 on an m20. I would of course have to learn how to tune the ITB's on MS2 instead of purely on speed density mode. I'm not sure if the vacuum line is needed. Another member posted this website which supposedly has ecu's preprogrammed for these engines running MS2. I'm really trying to keep from buying one for my m42 track car! (M1.7 75 pin ecu)


          An AFR gauge isn't necessary for tuning. Actually, it's more for show/looks than anything - if you really want to tune effectively, you use datalogging. Tunerpro can analyze your logs in real time and adjust your fuel maps. Ignition should be tuned on a dyno.

          MS2 supports Alpha-N and blended SD/Alpha-N, or you could use a MAF.
          Build thread



            How is it with the oem resonator flap,,, are there standalone options that control the flap,,

            i would really like to know that
            Sveinbj├Ârn Hrafnsson

            E30 CABRIO V12 M70B50 ///
            ALPINA B10 BITURBO 346 @ 507
            E34 550 V12 JML

            Finnish wisdom : If you want to Win,, hire a Finn



              Bumping an old thread. Seems like this is basically the only place on the interwebz that discusses an S38 on MS.

              S38B35 on Megasquirt 3 PRO. It has the front crank pulley and CPS from either an M30B35 or S38B36 (60-2).

              We're trying to figure out the base timing. There is a notch in the timing cover and an O|T mark on the crank pulley. Since this crank pulley wasn't meant for this engine, our question is: is the O|T mark supposed to line up with the notch in the S38B35 timing cover to get our TDC, or is there somewhere else we're supposed to be looking?
              Autobahn Motorsport - Portland, Oregon - restoration + service
              '88 M5 | '89 330is


                Great question and I don't know the answer. I would expect the pulley to line up with the timing cover because the S38 is basically the same engine as the m30, so the harmonic toothed balancer from the m30b35 should tie in directly with the s38b35 smooth harmonic balancer.

                For reference, my '86 325iX came with a 35 pin motronic 1.0 ecu. I retrofitted a later motronic 1.3 55 pin engine harness to the car so I could run megasquirt. The car came with a smooth harmonic balancer and I had to put the later e30 toothed 60-2 wheel on the car. The toothed wheel bolted right up with the centering hole/pin. It was in the exact same orientation as the later motronic 1.3 cars and even had the threaded holes for the CPS bracket to bolt up to. I used a base setup and that has worked great ever since.

                I know my brothers e24 is using motronic 1.0 enginer harness with a db37 adapter to run megasquirt and he had to fit the 60-2 wheel from the m30b35. Here is a good refernce. I believe the base timing (offset etc setttings) were different from the e30's setting but am not 100% sure that the information in this thread is correct. See for more details.



                  I have a S38B36 Euro engine and I will upgrade with VEMS electronics
                  I have questions about where can I buy an intake cam position sensor setup, for my 3.6 ??
                  or it's fits from S38B38 cam cover and sensor??

                  thanks for the reply


                    I got mine from or you can contact magnus racing team (MRT) who is located in Nokia Finland.
                    "Driving anything else would be uncivilised"


                      Thanks ja burna I will contact:)


                        If I remove the distributor cap from B36 and upgrade with the B38 cam sensor, I just buy OEM B38 rotor, cam sensor, cover, drive flange and that's it all?? and Sprocket exhaust??


                          How's this going, any progress with MS2 on S38?

                          My favorite build in your well-stocked stable Ted.
                          1989 332iS AW2 @ 2,342 lbs. m20b31 (JE FSR 10.5:1; 284/280 cam; ST+1 Intakes; RHD 40mm ITB/CF Plenum; Stahl 1.5"/CRMB X/Borla XS Pro; TMS J-Stock suspension (Ver. 2); M3 E3 undertray/VAC CF splitter; exhaust blown difusser; (Teves Mk60 ABS in trunk next)

                          Originally posted by Jb325is
                          Sucks for everyone involved. Lots of guys are just building IG cars these days... Look good on the internet, but in real life they're hacked up piles of shit.
                          Transaction Feedback:


                            Originally posted by TimiMB View Post
                            If I remove the distributor cap from B36 and upgrade with the B38 cam sensor, I just buy OEM B38 rotor, cam sensor, cover, drive flange and that's it all?? and Sprocket exhaust??

                            Judging by this:
                            Yes, it looks like you can just buy the parts.