Megasquirt Update

The stuff arrived today.
Scary!
I have the Hyundai TPS and today ordered a Nissan Q45 style MAF. I've got my head around it mostly I think but will probably be screaming for help once I tread deeply into the maze. Impressed by the loom with every wire printed with it's designation.
Dilemma is which car gets it first.
Will it be the 5 speed manual Series 2 GTI or the Auto Series 1 STI with the stupid Kjetronic injection?
I have a couple of GTI manifolds with injectors and fuel rail /fp regs so it's easy to go that way and I'm leaning towards it, though changing the whole setup is a little more work but no big deal.
Thing is the STI is a more together car with cruise control and aircon and a remote central locking button and superior body and upholstery and it would show a dramatic improvement with a managed electronic injection system while the GTI would just be a refinement on what's already there. I would expect an improvement in the way the GTI goes though and that would be a buzz. It's the hoon machine.
Any opinions? I'm a swinging voter right now.
 
I don't know Graham. Why not? You are saying the MAF isn't necessary? I thought it would be more info for the tune, but till I get the thing hooked up I have no idea.
The Nissan version is listed in the MicoS info and they show how to hook it up.
But happy not to use it if it's not required. It's going to be a small hassle to install in the air intake.
 
As Graham says, you didn't need the MAF. The MAP isn't on board on the Microsquirt, but you did order one.

On your dilemma, I'd lean towards the Series 2 on the basis that most of the wires and sensors are already there. You can pull the existing ECU, take the garden shears to the loom and splice in the Microsquirt's wires. Worth putting a bit of tapered pipe in in place of the AFM, and that means you can't use its air temperature sensor. But its wire, along with TPS, CLT, injectors, ignition all come to the standard ECU. I left the fuel pump control to the original tachymetric relay. Are you going with toothed wheel for tach input?

I like the fact that you put the question as which car should get it first. Right atitude! I did my 505 GTI first, then the 604. Both cars are hugely better as a result.

Have fun,

Rob.
 
Thanks Rob,
I didn't understand there being no need for the MAF as I thought it could use both. OK I'll leave that out.
With the fuel relay did you hook that into the MS unit or just leave it entirely alone? If you did hook it in which wire did you use?
I wonder if you did, whether you still would with the STI? Probably I think.
I got the MAT sensor as well, which came with an aluminium bung that is supposed to be welded on the inlet manifold. I'm planning to just drill and tap somewhere but not sure where is the best place? I think maybe on top of the common section on an angle , not pointing straight up?
I'm leaning towards doing the STI [Cecil] first because it doesn't have the computer to patch into so the MS could stand alone alongside the electronic ignition and the only thing I need is an inlet manifold transplant. I know I could probably just swap the injectors but having had bad experience with injector seals I prefer to transplant the whole unit without disturbing the seals.
The main reason I'd like to do Cecil first is it is quite gutless and very thirsty with the stupid Kjetronic system so I think the difference would be amazing whereas the GTI[Delarue] should be improved but not so much.
Plus I like driving Cecil more as it has cruise control, air and central locking from a keyfob and has a better body and interior. Being a 3 speed auto seems to add to the slugomatic feel but if it went like my first Series 1 Executive there'd be an end to that slug feel. It's only got 180K's on it too.
Delarue is a hoon car which inspires a different driving style. It's fun but a bit edgy. The car has over 400K on it while the engine and box have about 260K so it's an older car than Cecil. Before it goes harder I want to fit 205/60 tyres [michelins I think] as that's what I ran on my executive which was the best handling 505 I've driven.
 
I left the fuel relay stuff standard and that pin unconnected on the MS2.

I had trouble with "heat soak" when my MAT sensor was in the intake ducting. It was fine for the first drive of the day, but after parking for half an hour at the shops, the heat from the exhaust would get into the intake tract and the idle was woeful for the first five minutes or so of the next drive. When I read that James Murray (one of the programmers) just stuck the MAT thermistor behind his front bumper, I gave that a go. Has been there ever since. MAT is critical for forced induction cars, but not so much of a worry for NA.

The STI will be a fun car to convert. A bit more work and a lot more wire is all, and you already have plenty to do! Should be rewarding and my experience with the 604 suggests that an automatic helps a lot with smoothing out a not-yet-ideal tune.

You should set up fuses and a relay energised by the ignition (make sure it's still on when START is engaged, like the coil wire), and use that relay to power the Microsquirt and the injectors. You could power the oxygen sensor from the fuel pump relay. Probably best because then the sensor's heater won't be on if you leave the ignition on while testing things. Can be a cause of sensor failure.

I don't think the STI has the temperature sensor (as distinct from the gauge sensor). Perhaps it has a blanking plug in the same spot behind the thermostat? Compare with your GTI -- the proper sensor has a two-wire Bosch plug on it.

I gather you're planning to go fuel-only with tach input from the dizzy for starters. Not 100% sure with the Microsquirt, but the MS2 had two choices for this. You could either take the coil primary as the signal, or take the reluctor pattern from the bottom of the dizzy. I went with the reluctor, having read that the coil primary tended to come with noise problems. Unfortunately, the MS2 added enough load to the reluctor signal that the Bosch ignition module no longer saw enough signal to spark. Pushed me to going fuel+ignition all together. I have a feeling that the Microsquirt has improved on the reluctor input, and I'd say it's still what you should try first.

Have fun,

Rob.
 
Great, thanks Rob.
Yes fuel only and there's a pair of connections from each side of the coil into the MS for signal.
They are called OPTO+ and OPTO- and interestingly the neg side of the coil goes to OPTO+. I haven't seen the reluctor option but will cross that bridge if I need to.

Interesting tip on the MAT. And great tip on powering the O2 sensor.

Yes a nice relay/fuse box is the go, a bit of biz for Autobarn and I also need an adapter from the weird plug provided to connect the computer , so maybe a USB to the tiny stereo jack. I'll take it in and show them. They have a few young nerds who are quite knowledgeable.

Thanks for all your help. Just waiting for a clear workshop to make a start but with all this knowledge I should hit the ground running. We're doing a huge drainage system all around the back of the workshop so can't get in there till it's finished. [Northern Rivers rainforest area needs extra good drainage.]
Cheers,
Dan
 
Microsquirt has two reluctor inputs available, VR1 and VR2, for crank and cam sensors. Not intuitive that the OPTO+ goes to the coil negative, but if you think about what happens when the "points" open, the coil- terminal goes a whole lot more positive than the coil+, and that's what they're triggering on.

Didn't your Microsquirt come with a serial cable (a DB9 female to stereo plug)? If you want to make your own from Jaycar bits the cable connects the stereo plug, in tip to base order, to pins 3, 2 and 5 respectively on the DB9 plug. That's good for a serial port, and then you'll almost certainly need a USB-serial adaptor for your laptop.

Doing the STI with its Series 1 dash means you could copy my custom dashboard mod. Gives some worthwhile info while you're driving along. That web page is pretty old and there have been quite a few improvements. Here's a more recent configuration:

dash.jpg

(camera didn't get those warning lights right. What you actually see is the top green, middle red and bottom LHS orange, with the others very dim)

As it happens, I'm in the middle of a complete redo of the dashboard. The new version has more pixels (320x240), and a choice of various screen sizes (2.2", 2.4", 2.8" and 3.2"). Most importantly, it communicates with the Megasquirt using CANBUS, which leaves the serial port free. Means you can use the dashboard while tuning with TunerStudio.

Something to consider once you have the Microsquirt in and squirting.

Have fun,

Rob.
 
Amazing work Rob. Are you still willing to sell pre-programmed units for the software challenged amongst us?

I would be very interested in such a setup but have no clue about writing code in any language other than simple html.

It occurs to me that you might be able to use a raspberrypi for your purposes but again I have no idea how to go about that either.
I run a couple of them for my sound systems in the house and workshop because it's small and very easy to set up.
I know some people have done lots of work getting them to do automotive tasks, so there's probably already some code for the purpose. There was some optimism that they could be used for engine management but that was quashed fairly early on. But for a monitor I think they could work. However your way is likely cheaper and simpler. Just thinking aloud.
 
I've been aware of the geekiness factor and have only shipped ones custom-configured for the buyer's setup (MS2, MS3 or uSquirt and their choice of what's displayed). That gives them a starting point to tweak the config to their liking.

That version of the hardware was a bit optimistic in its approach to noise. A real electronics person in NZ did his own redesign of the power circuit and it has a bunch of capacitors, couple of inductors and a TVS (transient voltage suppressor). That should make it pretty stable (not that mine has been unstable). We'll be working together on the CANBUS version and you should probably hold off for that (I'd guess around the end of this year). But if you're really keen, I'll happily send you a board all set up. You just need the display. Added bonus: I can provide a template for the tacho blanking plate (I think I posted it here years ago).

Raspberry Pi would be serious overkill for a dashboard, though the chip I'm using is arguably underpowered. A bit like the cars we're driving, there's a better sense of achievement in getting it to perform versus just throwing muscle at the problem. Pi hardware would be easily up to ECU duties too, but not while running Raspian. Life becomes a lot harder when you have to do your own OS.

Have fun,

Rob.
 
Heh. Might need a bit of boosting if it's going to do justice to that speedo range.

Glad they saw the value in the econoscope, and the loss of the odometer could save some money on servicing costs.
 
Hi Rob,
After looking hard at the STI I decided to do the GTI first. Things like the auto kickdown and the fuel supply are the obvious first stumbling blocks. I'll need to gather a few more parts before embarking on that journey.

I see that both the MAP and the TPS use the TPS VREF connection on Microsquirt. Does this mean they both get plugged in together on that terminal or that the TPS is not required when running the MAP?

Also is there a diagram anywhere of the connections to the Bosch injection computer? I could trace them all through if not.

There's also a second smaller box in there near the main computer. Any idea what the function of that is? Heater controls?
 
The ZDJL ECU testing manual includes the pinouts in its schematic form wiring diagram. I didn't have it when wiring mine up. Would have been handy, but tracing the wires wasn't too bad.

On top of what speaksgeek said about VREF, I'd recommend bringing the vacuum line into the cabin rather than putting the MAP sensor in the engine bay. While you didn't ask, one of the most important things with Megasquirt is to ground ALL your sensors through the sensors ground wire. Don't ground them straight to the engine or anywhere else. They have to come back to the Megasquirt and then get grounded through its ground path, otherwise they'll be noisy.

I'm not sure about the other box -- mine is Series 1. In it there is a boxy electrical thing above the glovebox. It is the accessories power supply and provides standard connections for ground, +12V and accessory power. Things like power windows and central locking plug into them. But the S2 could well be different.

Have fun,

Rob.
 
  • Like
Reactions: COL
Just wondering if you fitted an idle valve Rob?
And is there a polarity for the injectors? The consensus is no.
Also why is the power feed from the ignition shielded?
I'm committed, with the ECU out and the plug cut off. Relays and fuse box is in place though still needs a bit more fixing.
Time is consumed tracing wires from the megasquirt plug to their termination before cutting them short to join behind the glovebox.
The MAP is installed under there with a clear plastic tube connected to the manifold.
The Hyundai TPS is mounted with the adapter plate. Just having uncertainties about which connector goes where with that. Measuring resistance isn't the way to evaluate it. It needs to be powered to see the way it works. I'm assuming the centre is the signal but not sure which side takes the power and which is earth. Probably I'll copy the Pug wiring for that.
I have a spare partial loom for injectors and TPS which I have traced through. The only unknown is one side of the coolant temp sensor which I assume must be earth. I further assume that this earth must go back to the MS unit as with all other sensors.
Hoping to get it going without the O2 sensor installed as it would be nice to drive it to a place with a hoist and get them to weld the bung. Also assuming that the inside of the bung needs to be drilled out to allow the sensor to breathe the exhaust. Just haven't seen any mention of this.
It would be nice to document every wire so others might easily follow but it all gets a bit too hectic for photos as you stumble through each tiny step.
But as I go I have notes showing colours of wire and numbers so perhaps when it's all hooked up I'll have a build guide for those who are too afraid/sensible to go cutting through their looms..

PS, despite warnings to the contrary I am hooking straight into the old loom and thus using old connectors but it seems unnecessary to run wires and then have to cut and solder to keep old connectors for the TPS and injectors so why not also keep those multiple plug connectors as long as they work? I'm sure it could be done so much better but a good soldered join or a crimping is really all you need for a contact.
 
Last edited:
I didn't fit an idle valve and am still relying on the Bosch warmup device, idle air adjustment and aircon throttle-up. I occasionally do stall the engine when the steering is at full lock, but otherwise it behaves ok. Member wadehilts, who I helped with his MS2 installation, did fit a PWM idle valve and was happy with the result. It was a Bosch 0 280 140 516, and required some sort of kit fitted to the MS2 main board. Microsquirt might be all set to go. Something for you to investigate.

No polarity on the injectors. In fact, if you look at the schematic in the ECU testing manual you'll see that two injectors are wired one way, and two the other. Kooky.

I'm a bit vague on the TPS wiring. Here are my notes from the time (12 years ago):

1. Cut main conn pin 3 wire 18 and take it to sensor ground
2. Wire MS TPS +5V to ECU pin 2
3. Wire MS TPS Sig to ECU pin 3
4. Swap wires 2 & 18 at TPS connector

That looks like it tallies with the wiring diagram in the testing manual.

That manual indicates the temperature sensor is grounded at the common grounding point. On the S1, this is a daisy wheel type connector near the back of the LHS inner-guard. Tachy relay is mounted there too (definitely not on S2). You'll want to identify the sensors ground wire and pull it from the daisy wheel and connect it to the Microsquirt's sensor ground.

As you see, I made notes about the process, but I'm afraid they weren't comprehensive. Like you say, you want to get on with the job, and documenting it afterwards suffers from memory gaps.

Should be fine without the O2 sensor. Next time I have my laptop out I'll set up a tune file for you: Microsquirt, standard trigger, fuel only, complete with my VE and AFR Target tables, but expecting no O2 feedback. Install that, calibrate CLT and MAT thermistors and TPS and it should be plenty good enough to get you to an exhaust place.

I think you made the right decision to reuse the standard loom. One warning: I had a few problems with poor connections at the "main connector" mentioned above. It's the larger of the two plugs connecting the injection loom into the main harness. I nipped up some of the spade connectors. A little DeoxIT wouldn't go astray either. The problem showed up in erratic temperature readings and the like. No doubt this quietly causes problems with the L-Jetronic too.

Have fun,

Rob.
 
  • Like
Reactions: COL
Whittling it down by identifying all wires required versus all wires definitely not required and cutting those off near the plug but with enough length to later join if it is required.
There's one just called 82 which I don't know about.
I found the MS sensor earth wires are electrically connected which is a good thing. One stays in the cab and the other goes to the engine bay.
I found the MS earth out are not but get connected at the terminal on the engine.
I'm now separating the wires that connect to MS inside the cabin from the ones that need to go into the engine bay. The ones to the MAP stay inside and probably the one for the fuel pump.
Since I have been having a great deal of trouble identifying original loom wires in the cabin I've decided to remove uncertainty and take wires directly from MS to the various connectors in the engine bay. Then I can solder to the wires cut off from the large and small plugs that go to the injector loom and the TPS and the Coolant temp sensor. This will alleviate any connection problems. It will also avoid the wrong earth connections.
I'm still wondering about the Idle valve, would that be the thing that sits on top of the thermostat housing with the other connector that's just above the Coolant sensor? Maybe I could connect that to FIDLE?
Also since I have installed a pair of relays and one is specifically a fuel pump relay I am thinking I can bypass the tachyometric relay.
It appears that MS has the fuel pump setup under control and it should still have the same safety device as the Tachy relay affords, of cutting fuel when there's no ignition?
I'll have to mount that MAT somewhere near the grill right?
Later I see it will be a nuisance running the O2 cable into the cab so probably need to work that out now.
 
Good timing. I was just about to point you at the TunerStudio files. It's a whole project (called delarue), so unpack it into your TunerStudioProjects directory. As well as the VE, AFR Target and advance tables it includes a working startup pulsewidth and acceleration enrichment. Fuel table is rich above 4000 rpm, but I really don't go there very often and it still runs cleanly enough when I do.

Have you downloaded that manual I pointed you at? It says wire 82 is on component M861, and the key (page before) says M861 is the "30 degree thermocontact". I don't even know what that is. Sounds like something that might activate an emissions control -- maybe it enables the oxygen sensor when there's a little warmth.

That diagram also ought to help you with identifying the loom wires since it shows the wire numbers, which pins they connect to at the plug, and what they go to in the engine bay.

Yes, hooking up the fuel pump as per MS will cut the fuel for safety if the engine's not turning.

There is no electronic idle valve on this engine.

The thing on the thermostat housing is the Bosch "auxiliary air device". It lets extra air in when the engine's cold, giving a faster idle. You *don't* want to hook FIDLE up to that. If you get a PWM idle valve like Wade did you can throw out the the aux air device and the little thumbwheel idle adjuster and the aircon idle-up valve, and some of the ugly plumbing too. And you might then be able to use the wires that did power the aux air device to control the PWM valve.

I mounted my MAT sensor in a drilled out medicine bottle cable-tied behind the front bumper.

Have fun,

Rob.
 
I can't find a reference to a MS manual anywhere Rob. I downloaded the ZDJL one but that's just Peugeot. I have the MS8 manual from DIY if that's the one you mean. I've been using a printout of their wiring diagram but even with that I had to trace a few things to make sure. For instance the Fuel Pump input isn't labelled presumably because they expect you to realise that's the one because it's coming from the fuel pump relay. Once traced it was a 'doh' moment, but it wouldn't have hurt them to label it better.
Yes I thought it would not be a good idea to hook up the Aux air device so there are a couple of spare wires there if I need the PWM unit.
Thanks for the map , which I downloaded, but which it said was somehow not valid, maybe it'll play once I'm plugged in to the powered up MS.
I'm a few connections away from power up . Tomorrow will be the day. Just have to unearth the Tachy relay and work out how to run power over to the new relay, connect engine earth, the opto to the coil and the IAT and the way it mounts.
Due to not knowing which way to hook the TPS I fitted bullet connectors that can reverse the polarity. I hope it won't be damaged if hooked up the wrong way till I can see the readings.
It's getting to that high blood pressure moment.
Cheers.
 
You don't have a MS reference manual? Go to msextra and grab the latest Microsquirt hardware manual (the TunerStudio reference is there too, though I don't find it very useful). That manual gives you the key to all the Microsquirt wires on p16, so there should be no need to trace them back to the connector (unless they've supplied a harness with different colour coding).

The ZDJL manual should have been really useful to you. The diagram on the 5th page shows you the existing wire numbers and what they connect. Key to the diagram is on the 4th page.

Those notes I provided on the TPS were meant to tell you what you needed to know for hooking it up. Same points in less brief form:
1. the ground wire from the TPS goes to the "main connector" (larger harness connector), wire #18. You want to cut this wire and connect it to your sensor ground.
2. the wire that connected to pin #2 at the original ECU should be connected to the Microsquirt's VREF wire
3. the wire that connected to pin #3 at the original ECU goes to the Microsquirt's TPS wire.
4. peel back the shroud on the connector at the TPS. Identify wires #2 and #18. Poke in a stiff wire to release the detent, extract each connector and swap their positions in the plug.

Not sure why the TS project wasn't valid. Should have been ok offline. As a fallback, you could:
1. create a new TS project in TS
2. use File->Load tune (msq) to import the delarue/CurrentTune.msq file from the project you downloaded from me.
If that doesn't work, let me know the exact error message. I guess it'll be that we have different versions of TunerStudio or the Microsquirt firmware.
 
Top