Real Time Injector Pulse Conversion? (and other bits of fun) - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


MEGAsquirt A place to collectively sort out this megasquirt gizmo

Reply
 
 
 
LinkBack Thread Tools
Old 11-11-2008, 11:14 AM   #1
Junior Member
Thread Starter
iTrader: (4)
 
Join Date: Jul 2007
Location: Indianapolis, IN
Posts: 113
Total Cats: 0
Default Real Time Injector Pulse Conversion? (and other bits of fun)

Crazy idea, curious your guys' thoughts on it. Is it possible? Worth the time? Blah?

For the past few years I've been tracking and marginally involved in a rapid prototyping platform known as Arduino. Cheap, easy to use, and fairly capable for small tasks. My recent frustrations in getting the ole megasquirt drivable started to make me wonder if it'd be possible to track, and map the stock injector pulses to the megasquirt's fuel map. This is possible since my car is otherwise stock and the the stock ecu actually means something still and there are already projects out there that track pulse widths, RPMs etc using the Arduino (OBDuino, and MPGduino or instance).

Even better, it'd be great to have the stock ecu drive the parts of the map that it knows and as soon as we hit boost switch over to the Megasquirt map.

One big problem though, as soon as I change the injectors the Stock ECU really doesn't matter any more since it's looking for 265's and there'd be 460s in there. So I'm curious, would it be possible to convert pulses in real time? I don't see how since we never know how long the pulse is going to be until it ends. So we'd always be a pulse behind at best - which is sure to mess things up I would imagine. But then again you see things like the Zoom3 and Xede doing stock ecu pass through and modifying signals so they work on larger injectors. So maybe it's possible some other way?
sotaku is offline   Reply With Quote
Old 11-11-2008, 11:19 AM   #2
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Delicious and Moist.
Posts: 26,330
Total Cats: 1,928
Default

Quote:
Originally Posted by sotaku View Post
would it be possible to convert pulses in real time? I don't see how since we never know how long the pulse is going to be until it ends. So we'd always be a pulse behind at best - which is sure to mess things up I would imagine.
This is exactly how the EMU works. It keeps track of how long the previous input INJ pulse was, calculates a corrected duration off of that, and uses that value to initiate a corrected output pulse on the falling (leading) edge of the next input pulse.

Seems to me that you're looking for complexity here, though. Not only has it proven entirely adequate to let MS generate the fuel pulses for the whole map, but in doing so you gain the ability to do things like lean cruise which, while beneficial from an economy standpoint, were unavailable to Mazda owing to emissions requirements.
Joe Perez is online now   Reply With Quote
Old 11-11-2008, 11:45 AM   #3
Junior Member
Thread Starter
iTrader: (4)
 
Join Date: Jul 2007
Location: Indianapolis, IN
Posts: 113
Total Cats: 0
Default

Quote:
Originally Posted by Joe Perez View Post
This is exactly how the EMU works. It keeps track of how long the previous input INJ pulse was, calculates a corrected duration off of that, and uses that value to initiate a corrected output pulse on the falling (leading) edge of the next input pulse.
Very interesting. So since the time is so small delaying by one pulse isn't even noticeable and won't cause a problem. I imagine you'd want to delay the spark as well? Or is it a matter of once again that a one cycle delay is such a small difference that it doesn't matter of the spark is the right one?

Also how fast does a chip have to be running to record, convert and spit out the next pulse without missing a beat? While the Arduino platform is cheap and handy I don't believe it's terribly fast. It uses the AtMega8 (8mhz?) but can run the 168 (16mhz?). Though I'd think eight million cycles a second would do fine when you need to do something ~117 or ~234 times a second - but my electronics skill is uh, lacking so I could be very wrong there.

Quote:
Originally Posted by Joe Perez View Post
Seems to me that you're looking for complexity here, though.
Yeah, mostly I'm looking to tinker. Would be nice to have a meaningful project on the platform. I've done small electronics projects here and there but never anything with much reason. I think the logging the stock ecu may be a better project to start but my head started to wander to some possibilities. =D

However, that said it would be nice to give some more options with the Megasquirt. I like it as a platform but it seems that it's very difficult to ever get to the drivability of the stock ecu. Would be nice to combine the two and maybe give a different upgrade path for those who aren't quite ready for the MS to run the show but may in the future. (Not to mention Xede is just crazy expensive)
sotaku is offline   Reply With Quote
Old 11-11-2008, 12:59 PM   #4
Elite Member
iTrader: (15)
 
patsmx5's Avatar
 
Join Date: Aug 2007
Location: Houston, TX
Posts: 8,797
Total Cats: 248
Default

I'll admit getting stock driveability is tough. I'm still not there. But doing a parallel install will help as now MS only does fuel and spark, while the stock ECU does fast idle for temp, idle compensations for turning P/S alternator load, A/C compressor, etc. My driveability is probably 96% ok. I have a random "off for .2 seconds" problem that is MS2 specific and I have found a solution to it, just need to fix it. Other than that, it's better than stock in drivability.
patsmx5 is offline   Reply With Quote
Old 11-11-2008, 01:25 PM   #5
Junior Member
Thread Starter
iTrader: (4)
 
Join Date: Jul 2007
Location: Indianapolis, IN
Posts: 113
Total Cats: 0
Default

That's really impressive. I'm quite jealous. Right now Autotune's adjustments put me a little rich or very lean. Each of these are +/- 1% too. Not sure if I can make them smaller. MLV seems to be often worse, though similar. Each logging session seems to swing between A bit too rich to far too lean (18+). That's with it on "Very Hard" too. Surprising.

Not wanting to get off track, but is this common? Things like this is why having something definite like the stock ecu to help dial in my map is very very appealing.
sotaku is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
elesjuan's mediocre 95 Miata adventure (google fiber edition) elesjuan Build Threads 8 02-16-2016 09:36 PM
VE values too low? compuw22c MEGAsquirt 4 09-12-2015 08:42 PM
ME221 Now has Autotune and Long Term Fuel Trim Tables Motorsport-Electronics ECUs and Tuning 0 09-05-2015 09:02 AM
E-Manage Base Maps faviles5566 ECUs and Tuning 0 09-04-2015 12:50 PM
E-Manage Base Maps faviles5566 ECUs and Tuning 0 09-04-2015 12:50 PM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 04:46 PM.