Megasquirt
#1
Megasquirt
Thank you Dougs951s for your outstanding write up on megasquirt:
https://rennlist.com/forums/showthre...ferrerid=40696
I went about it a little different than Dougs951s, thought I'd post something about how I did it.
I used megasquirt 2 pcb 3.57 + EDIS. I like how simple it is and how cheap and available new EDIS parts are.
I pulled out the factory engine wire harness. I cut four connectors off of it to reuse. The TPS connnector, O2 sensor connector, the 8 pin flat connector that connects inside the car, and the connector that is against the firewall just in front of the fuse box.
I made my own wire harness starting with the diyautotune's 10' harness. Each wire is color coded and labeled with the pin number and a description of the purpose every few inches. I bought their connectors for everything I could. They are SO much nicer than the factory connectors and don't clog when they get dirty like many connectors on new cars.
The oil pressure and one of the water temperature sensor route through the engine wire harness, they have to be added to what you get with megasquirt. I kept the stock DME relay as the power controller for all the systems.
The following pins were used in the 16 pin connector at the firewall:
Pin 6 - Oil Pressure Sender 'G'
Pin 9 - Oil Pressure Sender 'WK'
Pin 8 - Water Temperature G (spade connector)
Pin 9 - Water Temperature W (spade connector)
Pin 5 - Megasquirt Pin 37 (fuel pump control)
Pin 3 - Megasquirt Pin 28 (power)
Pin 2 - Fuel Injector Power
Pin 4 - O2 Sensor power
I used the power to the spark coil as the control signal for a relay to power the EDIS module, and ran a wire from the battery through a 15 amp fuse to the EDIS system.
I used the factory TPS sensor just didn't do anything with the idle contact.
The rest just follows the wire diagram supplied by DIYAutoTune.
I got a Volvo 2 wire idle air controller which is hanging off the intercooler pipe.
I bought the 'Map Daddy' upgrade to get baro correction and a max measurable boost pressure of 44psi. The stock setup was just good for 21. Not sure if I want to go over 20 but I wanted more margin than 1psi over where I'd like to run.
I got a trigger wheel from goingsuperfast.com, very nice piece.
I got the EDIS stuff from e-bay. They would also be easy to pick from a junk yard or just buy new.
I mounted the EDIS controller against the passenger's side fender right next to the washer tank.
The spark coil is hanging on a bracket that is bolted to the cam box cover.
I made a replacement for the a/c tensioner to give a nice stable mounting for the EDIS crank pickup.
I've got it running and driving. I'm creeping up on the boost, got to 11 psi today. Looking to stay at 12:1 AFR on boost. Still have a number of things to figure out, very happy with the results so far!
https://rennlist.com/forums/showthre...ferrerid=40696
I went about it a little different than Dougs951s, thought I'd post something about how I did it.
I used megasquirt 2 pcb 3.57 + EDIS. I like how simple it is and how cheap and available new EDIS parts are.
I pulled out the factory engine wire harness. I cut four connectors off of it to reuse. The TPS connnector, O2 sensor connector, the 8 pin flat connector that connects inside the car, and the connector that is against the firewall just in front of the fuse box.
I made my own wire harness starting with the diyautotune's 10' harness. Each wire is color coded and labeled with the pin number and a description of the purpose every few inches. I bought their connectors for everything I could. They are SO much nicer than the factory connectors and don't clog when they get dirty like many connectors on new cars.
The oil pressure and one of the water temperature sensor route through the engine wire harness, they have to be added to what you get with megasquirt. I kept the stock DME relay as the power controller for all the systems.
The following pins were used in the 16 pin connector at the firewall:
Pin 6 - Oil Pressure Sender 'G'
Pin 9 - Oil Pressure Sender 'WK'
Pin 8 - Water Temperature G (spade connector)
Pin 9 - Water Temperature W (spade connector)
Pin 5 - Megasquirt Pin 37 (fuel pump control)
Pin 3 - Megasquirt Pin 28 (power)
Pin 2 - Fuel Injector Power
Pin 4 - O2 Sensor power
I used the power to the spark coil as the control signal for a relay to power the EDIS module, and ran a wire from the battery through a 15 amp fuse to the EDIS system.
I used the factory TPS sensor just didn't do anything with the idle contact.
The rest just follows the wire diagram supplied by DIYAutoTune.
I got a Volvo 2 wire idle air controller which is hanging off the intercooler pipe.
I bought the 'Map Daddy' upgrade to get baro correction and a max measurable boost pressure of 44psi. The stock setup was just good for 21. Not sure if I want to go over 20 but I wanted more margin than 1psi over where I'd like to run.
I got a trigger wheel from goingsuperfast.com, very nice piece.
I got the EDIS stuff from e-bay. They would also be easy to pick from a junk yard or just buy new.
I mounted the EDIS controller against the passenger's side fender right next to the washer tank.
The spark coil is hanging on a bracket that is bolted to the cam box cover.
I made a replacement for the a/c tensioner to give a nice stable mounting for the EDIS crank pickup.
I've got it running and driving. I'm creeping up on the boost, got to 11 psi today. Looking to stay at 12:1 AFR on boost. Still have a number of things to figure out, very happy with the results so far!
#4
Could definitely have used the factory idle-valve. I picked the Volvo one because I liked the simpler wiring and the 90 degree turn between connections that made it fit really nicely on the intercooler pipe.
#6
Freedom Enthusiast
Rennlist Member
Rennlist Member
Trending Topics
#9
#10
I added AC idle up input to my megasquirt setup.
Routed a wire from the16 pin connector at the firewall to SPR3 into the megasquirt. I glued a 4 pin reed relay inside the megasquirt case on top of the main connector. I wired SPR3 through the coil side of the reed relay to ground.
I soldered a 1k resistor into a 5v pad on the main board. Ran a wire from JS4 to the other end of the resistor and from there to the reed relay. The last pin on the reed relay goes to ground.
This uses the 12V signal to switch between ground and a 5V pullup on the digital input to JS4.
Now when the AC is on the megasquirt sees it and increases the signal to the idle control valve.
Routed a wire from the16 pin connector at the firewall to SPR3 into the megasquirt. I glued a 4 pin reed relay inside the megasquirt case on top of the main connector. I wired SPR3 through the coil side of the reed relay to ground.
I soldered a 1k resistor into a 5v pad on the main board. Ran a wire from JS4 to the other end of the resistor and from there to the reed relay. The last pin on the reed relay goes to ground.
This uses the 12V signal to switch between ground and a 5V pullup on the digital input to JS4.
Now when the AC is on the megasquirt sees it and increases the signal to the idle control valve.
#11
Rennlist Member
Very cool project, congrats! Does it run off that one toothed gear -- i.e., no cam position sensor?
You should celebrate your success with a new air filter.
Were you able to get the boost gauge to work? I can probably help with that if needed.
You should celebrate your success with a new air filter.
Were you able to get the boost gauge to work? I can probably help with that if needed.
#12
No cam sensor, EDIS is a wasted spark setup. I like how simple it was to set up.
The filter is a K&N, they are good forever aren't they? :O
I have not tried to make the factory boost gauge work. I would be interested in help on how it is done!
The filter is a K&N, they are good forever aren't they? :O
I have not tried to make the factory boost gauge work. I would be interested in help on how it is done!
#13
Rennlist Member
The simplest way to run the boost gauge is to power up a KLR and use it for the sole purpose of running boost gauge. If you want to make a small arduino box to drive it (and remap it however you want), I can walk you through it. If you search here and on OSH Park for speedobooster, you'll get the idea...
#14
Tuning
Getting it running was fairly quick. I fell into the endless desire to tweak on it.
Everywhere I go I plug in my laptop and make some fine adjustment to make something
work just a little better. After a couple months of driving it I'm starting to run
out of things I want to adjust. I wanted to write up a little of the thought process
rather than the very specific parameters.
I started with Dougs951s timing table. In the dangerous areas of high boost the
numbers there were comparable to stock and to the values in my techGT system.
I took the VE table that came in a 'base' map from megasquirt. I adjusted the
injector flow numbers until the car idled and also gave reasonable AFR's (just
under 12) on boost. With a lot of driving around I adjusted the VE table to
give the AFR's I wanted at various loads. I started with low boost and low
red line until I was happy with the AFR's then cranked up each a little. After
that it was safe to flog on now, it's all about making it well behaved.
Slightly more rich than 14.7 AFR helped in the load range seen coming off of
idle. I dropped timing in the range of the desired idle speed so that if the
RPM sagged below idle the timing would tend to push the speed backup up.
Coolant temperature based warmup enrichment required adjustment to keep good
throttle response when cold.
Priming pulse and cranking enrichment parameters required a number of starts
and warm ups to find the right amount to get it to start easily.
I had the throttle response working smooth, startup reliable but idle set high
and changing a lot with A/C, engine hot or cold.
Adjusting idle controls took me the most time. I started out with it not
connected. First the fuel and timing had to be messed with to get idle to be
stable at around 1400rpm knowing it would sag with AC on and when cold.
Lean fuel tends to make it unstable. Timing needs to be a little less than
optimal at the desired RPM for the idle to be stable.
Once I got it to be stable I turned on the idle control in open loop. I
supplied a look up table of idle control duty cycle values as a function
of coolant temperature. Adjusting the values of the idle control valve got
it working reasonably well. 1200 rpm idle cold tapering to 900 rpm hot.
Itterating on this required some additional fine tune to fuel and timing to
stabilize at the lower RPM. Opening up the idle valve a little while
cranking helped it start quickly. What this didn't work for was 'heat soaked'
start.
When I let the car sit a half an hour after running and heat soak the intake the
manifold temeprature would go up enough that the car just wouldn't idle with the
same settings that work when started cold or while driving it.
The next step was to use closed loop idle. The warm up idle duty curve
developed for open loop established good numbers for the initial value table
used to start the PID loop. I increased the numbers just a little so that when
the idle control entered closed loop the idle would be a little above the target
and let the PID loop bring the speed down.
The 'minimum load' number I had to se to '0' to get it to go into closed loop
mode, that didn't make sense to me but it worked. Displaying the idle control
duty cycle on the instrument cluster helped see what was going on to
make adjustments. In general the PID system is mostly needing an 'I' term,
I maxed out the I value and provided a little P term to give it a little more
push in the right direction if it was way off and some D to keep it from
overshooting.
Finally, the idle is working reasonbly smoothly now hot, cold, ac on or
off and heat soaked holding at the target RPM I selected.
Getting it running was fairly quick. I fell into the endless desire to tweak on it.
Everywhere I go I plug in my laptop and make some fine adjustment to make something
work just a little better. After a couple months of driving it I'm starting to run
out of things I want to adjust. I wanted to write up a little of the thought process
rather than the very specific parameters.
I started with Dougs951s timing table. In the dangerous areas of high boost the
numbers there were comparable to stock and to the values in my techGT system.
I took the VE table that came in a 'base' map from megasquirt. I adjusted the
injector flow numbers until the car idled and also gave reasonable AFR's (just
under 12) on boost. With a lot of driving around I adjusted the VE table to
give the AFR's I wanted at various loads. I started with low boost and low
red line until I was happy with the AFR's then cranked up each a little. After
that it was safe to flog on now, it's all about making it well behaved.
Slightly more rich than 14.7 AFR helped in the load range seen coming off of
idle. I dropped timing in the range of the desired idle speed so that if the
RPM sagged below idle the timing would tend to push the speed backup up.
Coolant temperature based warmup enrichment required adjustment to keep good
throttle response when cold.
Priming pulse and cranking enrichment parameters required a number of starts
and warm ups to find the right amount to get it to start easily.
I had the throttle response working smooth, startup reliable but idle set high
and changing a lot with A/C, engine hot or cold.
Adjusting idle controls took me the most time. I started out with it not
connected. First the fuel and timing had to be messed with to get idle to be
stable at around 1400rpm knowing it would sag with AC on and when cold.
Lean fuel tends to make it unstable. Timing needs to be a little less than
optimal at the desired RPM for the idle to be stable.
Once I got it to be stable I turned on the idle control in open loop. I
supplied a look up table of idle control duty cycle values as a function
of coolant temperature. Adjusting the values of the idle control valve got
it working reasonably well. 1200 rpm idle cold tapering to 900 rpm hot.
Itterating on this required some additional fine tune to fuel and timing to
stabilize at the lower RPM. Opening up the idle valve a little while
cranking helped it start quickly. What this didn't work for was 'heat soaked'
start.
When I let the car sit a half an hour after running and heat soak the intake the
manifold temeprature would go up enough that the car just wouldn't idle with the
same settings that work when started cold or while driving it.
The next step was to use closed loop idle. The warm up idle duty curve
developed for open loop established good numbers for the initial value table
used to start the PID loop. I increased the numbers just a little so that when
the idle control entered closed loop the idle would be a little above the target
and let the PID loop bring the speed down.
The 'minimum load' number I had to se to '0' to get it to go into closed loop
mode, that didn't make sense to me but it worked. Displaying the idle control
duty cycle on the instrument cluster helped see what was going on to
make adjustments. In general the PID system is mostly needing an 'I' term,
I maxed out the I value and provided a little P term to give it a little more
push in the right direction if it was way off and some D to keep it from
overshooting.
Finally, the idle is working reasonbly smoothly now hot, cold, ac on or
off and heat soaked holding at the target RPM I selected.
#15
Rennlist Member
I'm really glad to see mega/micro squirt setups popping up all over the place. It really is a testament to how powerful and cheap standalones have gotten.
Looking back, I'm slightly regretting my decision to go with a DIYPNP option but it's heartening to know there's more than a few people who can provide their advice based on actual experience.
A quick question: Did you wind up using any tech support from DIYAutotune?
Looking back, I'm slightly regretting my decision to go with a DIYPNP option but it's heartening to know there's more than a few people who can provide their advice based on actual experience.
A quick question: Did you wind up using any tech support from DIYAutotune?