MS3 progress

Discuss MegaSquirt, VEMS and other non-free hardware and software here.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: MS3 progress

Post by Fred »

8InchesFlacid wrote:Anyway, just curious what you all think... Does anyone have any idea what the code looks like?
MS2-E based so bets are on that it will contain at least some significant parts of the old code and be in a similar style.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Costa
Banned!
Posts: 92
Joined: Sat Mar 08, 2008 3:57 am
Location: Sydney, NSW, AU

Re: MS3 progress

Post by Costa »

From http://anonym.to/?http://www.ms3efi.com ... rt=10#p348
Just another quick update on the ms3. Here is the planned software roadmap:

MS3 1.0 code:

The MS3 operates in 2 "modes." There is an "upgrade" mode which has the following characteristics:


-Direct plug-in swap for MS2 daughtercard
-Compatible with MS2 wiring

-Same single spark output
-Same injector outputs
-Compatible with MS2/Extra wiring

-Same six spark outputs
-Same injector outputs
-Same switch inputs
-USB connector (USB->serial)
-On-board SD device datalogging (per ignition/injection-event resolution)

There is also an "MS3X" mode:


-Uses expander board for more I/O
-8 channel sequential fuel
-8 channel coil-on-plug (logic level output)
-Trim tables for fuel and spark (6x6)
-Minimal on-board wiring 'mods' (no more wiring mess everywhere)
-Pre-defined outputs for certain features
-Individual injector parameters with opening-time curves
-Hardware PWM outputs for idle, boost, VVT, etc (only supported on PWM outputs via the expander board)...


Both "upgrade" mode and "standard" mode will support everything that ms2/extra supports. In addition, X-tau will be added to make upgrading from ms2-standard easier, and MAF support and fuel perturbation mode will be added as well from the ms2/standard code (although it may not look exactly the same). In addition, due to certain paging limitations in megatune, we will be requiring the use of Phil Tobin's TunerStudio. One point of interest is that due to the organization of RAM and flash, the burn-stumble from ms2/extra is now gone.

MS3 2.0 code:


-Angle clock will be used for timing ignition and fuel events (and other events)

-More accurate at scheduling events (especially in acceleration and deceleration, hoping for 0.1 degree accuracy to 16667 RPM based on a 1 microsecond tick rate on the XGATE)
-Essentially a clock that ticks in degrees instead of time... counts from 0 to 719.9 degrees in tenths of a degree
-Allows for the integration of post-2.0 model-based features (as many as we can add with a CPU of this speed)
-Will incorporate alpha-beta-gamma for predicting the number of microseconds per angle-tick

-Up to ten injector outputs (8 on MS3X, 2 on V3)

-Staged injection, water injection, methanol injection on spare injectors
-Up to 14 spark outputs (8 on MS3X, 6 on V3 board)
-Progressive nitrous control
-Anti-lag (becomes easy to do with the angle clock)
-Knock-windowing (becomes easy to do with the angle clock)
-Special Rotary engine mode with support for sequential-staged injection and FC, FD, Renesis, 3-rotor COP and 4-rotor COP modes

I'm sure there will be many more cool features that having an angle clock will make easier. I have attached a loose flow-chart (could change as I implement the angle clock) for how I plan on having the angle-clock work.

What's left to do before....

Beta?


-Complete work on the monitor
-Make sure all porting from MS2/extra I/O works, including all I/O (both upgrade mode and MS3X mode I/O)
-Make sure all porting from MS2/extra features work (regression testing of the whole firmware basically).
-Upgrade mode only
-Get SD-card datalogging working

-Choice between starting logging as soon as a card is plugged in and using a toggle switch to start it
-SD card must be formatted on PC
-Any existing log files will be skipped.
-All space on the device will be taken by pre-allocated files for logging speed purposes
-Pre-allocated files will be relatively small in order to make them easier to load in a log-viewer
-One of the v3's built-in LEDs can be repurposed to give datalogging status


Hardware Release?
All of the beta features plus full support for the MS3X expander board.

That's all I can come up with for now. Keep in mind that while we've had a few engines running, there is still a lot of work to do. Stay tuned for more info.

Ken
previously: ca7
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: MS3 progress

Post by AbeFM »

I never really got what a "trim table" is.. So, you have a map, and it sucks, so you add a table to tweak what's in the table, instead of just fixing the table? This can't be right... because it's inane. :-)
tobz
TO220 - Visibile
Posts: 14
Joined: Sat Apr 25, 2009 10:28 am
Location: Rhode Island, United States
Contact:

Re: MS3 progress

Post by tobz »

Sounds like something Bosch does in their ECUs. The Motronic 2.9 in my 1998 Jetta had short/long-term "fuel trim" to compensate for bad MAF/O2, based on what people said. Have a short-term for say.. each time the car was on, and then average it into the long-term I guess.
User avatar
jbelanger
LQFP144 - On Top Of The Game
Posts: 387
Joined: Sat Feb 23, 2008 8:58 pm
Contact:

Re: MS3 progress

Post by jbelanger »

In this context, I think that the trim tables are adjustment to the VE and ignition with one table per injector channel and per ignition channel. This allows a correction for differences in fueling and timing between cylinders for fine tuning what is in the base table. At least that's what I have as trim tables in my sequential code for MS2/Extra where there are 4 VE trim tables in addition to the standard VE table.

Jean
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: MS3 progress

Post by Fred »

8InchesFlacid wrote:I never really got what a "trim table" is.. So, you have a map, and it sucks, so you add a table to tweak what's in the table, instead of just fixing the table? This can't be right... because it's inane. :-)
You must be thinking of Mazda engines and other modern designs that aren't old V8's and siamese A series engines ;-)

I've read B&G's discussions on this and for once I agree, 99/100 you don't need it (and can't tune it) in reality. 1/100 are siamese A series and strange V8 intake designs that exhibit similar behaviours.

Jean, when are you going to do a write up on the logic behind your code? Keeping in mind that you own that code, of course. :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jbelanger
LQFP144 - On Top Of The Game
Posts: 387
Joined: Sat Feb 23, 2008 8:58 pm
Contact:

Re: MS3 progress

Post by jbelanger »

Fred wrote:Jean, when are you going to do a write up on the logic behind your code? Keeping in mind that you own that code, of course. :-)
There's actually not much to say on it because it's actually quite simple (in principle).

The general idea is that I use the same computations as the ones done for ignition to transform degrees into time to know when to fire the injector after a specific tooth interrupt (which tooth is established from the required timing and the wheel pattern). I also use the same computations as the dwell to transform the injector pulse width into an angle if the injection is timed with respect to the end of pulse instead of the start of pulse (optional). This angle is then added to the injection timing. Those computations are simply a conversion of angle to time (and vice versa) based on the most current RPM.

Once I have this time, I simply use the timer associated to the pin for the injector I want to fire as an output compare going from low to high and I activate it in the tooth interrupt mentioned above. Once this time has passed, the timer interrupt is called and I simply use the timer as an output compare again but this time with the pulse width and going from high to low. Since I have one timer (and one pin, of course) per injector driver, it's quite simple. Of course, that's all dependent on the wheel decoder and there's a need to adjust the timing of each injector channel according to the injection sequence and the actual engine cycle but again this is the same as for ignition (and I didn't have to do this part but just "borrowed" it :) ).

There's a bunch of additional little details but that's the general idea. The siamese-port engine part was quite a bit more complex in term of multiplexing the correct injection pulse width of the 4 cylinders with the 2 primary injector channels and the 2 secondary injector channels but the same underlying building blocks were used (which is why I chose to implement sequential injection for "regular" engines when I did the siamese port code).

Jean
User avatar
jbelanger
LQFP144 - On Top Of The Game
Posts: 387
Joined: Sat Feb 23, 2008 8:58 pm
Contact:

Re: MS3 progress

Post by jbelanger »

By the way, if you find this useful and want to move it somewhere else, go ahead.

Jean
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: MS3 progress

Post by Fred »

Wow, good to see some code re-use in there! Is that a first for ms? :-) Thanks for the explanation, appreciated.

I won't move it unless you want me to. It seems OK here.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: MS3 progress

Post by AbeFM »

Ah, ok, I get it. Thanks jean, I just hadn't followed the per-cylinder trim. It's also useful if you get back your injectors and find they don't flow the same. Well, ok, that would be much better taken care of with a flow rate and opening properties struct.

I still think it might be useful, especially for some of these home-brew manifolds - often people will find a horepower limit of X with the OEM part, and Y with a variety of custom ones - with Y > X. Even if it's not as even, the extra flow means more power - hence trim. Most of these things, you're right, you'd need 500 hours on a steady state dyno to get ANYTHING meaningful out of - to me the flexibility is good - just don't put in a "correction" unless you know what you're correcting and how big to make it - otherwise, leave the tables at zero! (I mean, the effective tables, not a table which is zero and a built in correction that you can't see behind the scenes...)
-Abe.
Post Reply