[FW MOD] ms2extra 3.2.1 beta gslender v2

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by gslender »

Greg G wrote:Upgraded to the latest version 2 release- take note that you may need to check your output window. Idleupcnt was replaced by tpsADC as the trigger value, must be some memory juggling.
Crap! :evil: I'll take a quick look, but may not be able to fix before I go on 1 week leave beach camping... so sorry if that causes issues.
Mazda MX5 + MS3 Pro
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by gslender »

gslender wrote:
Greg G wrote:Upgraded to the latest version 2 release- take note that you may need to check your output window. Idleupcnt was replaced by tpsADC as the trigger value, must be some memory juggling.
Crap! :evil: I'll take a quick look, but may not be able to fix before I go on 1 week leave beach camping... so sorry if that causes issues.
Greg, checked the code and it looks good. Remove the output completely - remove and reburn. Then re-add... it might be confused etc. I can't see how this isn't working as the code is fine and I kinda remember this problem when I moved from status4 to idleupcnt... and it was TS and ECU remembering old values etc
Mazda MX5 + MS3 Pro
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by muythaibxr »

I just took a brief look at your code... what editor did you use? Your indents are all over the place! :P

My recommendation is to use gvim or vim with the following settings:

set shiftwidth=4
set cin
set expandtab

Then highlight all the code you added, and press "=" which will indent it for you.

Also, You should disable your delta-based "adaptive" timing control when CL idle is turned off. I'd put a config error in for it if I were you.

I'll actually review the code itself when I'm done with the MS3 mods I want to make.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
Red_Baron
Experienced MS/Extra'er
Posts: 328
Joined: Wed Mar 05, 2008 2:05 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by Red_Baron »

Out of curiosity, why should Adaptive idle be turned off when not in CL idle??

I would like that left as a choice personally, since for example, on throttle body only cars with no idle valve and hairy cams, this would be an awesome control for idle!
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by gslender »

Red_Baron wrote:Out of curiosity, why should Adaptive idle be turned off when not in CL idle??

I would like that left as a choice personally, since for example, on throttle body only cars with no idle valve and hairy cams, this would be an awesome control for idle!
Because it relies on CL idle rpm target curve to know what target rpm you need at a particular temp.

G
Mazda MX5 + MS3 Pro
robs
Master MS/Extra'er
Posts: 564
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by robs »

93white3400z wrote:Yeah good job gslender and everyone else that worked on this.

I have a question for you that have an ms2 and are developing for it. I'm wondering what is the motivation to develop on ms2 instead of upgrading and develop on ms3 (and use already existing feature w/o having to backport). Is it a $$ issue or there is something else I'm missing ? Please don't take this the wrong way, I can understand if it's a $$ money, but I'm just wondering if I'm missing something :D
I only contributed the tiniest bit to this upgrade, but I'll take any opportunity to waffle on.

I took up MS because it is DIY, not just the wiring and tuning, but (if you choose) soldering and coding too. It was a great opportunity for me to learn interesting things while being able to apply stuff that I already knew. I've learnt plenty, and enjoyed it all the way.

With MS3, Megasquirt has moved away from this, and is converging with off the shelf, closed-box appliances; albeit at the lower priced, more hands-on end of the scale. Taking it down that path isn't wrong, might be more profitable, but it looks less rewarding. There's still plenty of scope for interesting work in MS2.

Have fun,

Rob.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by muythaibxr »

I'm not sure I really agree that MS3 is converging with off-the-shelf options. There is still plenty of DIY opportunity from soldering together your mainboard to taking the 1.0.x code and adding your own stuff to it.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
juansh2385
Master MS/Extra'er
Posts: 612
Joined: Fri Feb 25, 2011 4:28 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by juansh2385 »

muythaibxr wrote:I just took a brief look at your code... what editor did you use? Your indents are all over the place! :P

My recommendation is to use gvim or vim with the following settings:

set shiftwidth=4
set cin
set expandtab

Then highlight all the code you added, and press "=" which will indent it for you.

Also, You should disable your delta-based "adaptive" timing control when CL idle is turned off. I'd put a config error in for it if I were you.

I'll actually review the code itself when I'm done with the MS3 mods I want to make.

Ken
Actually ken in a 1.8t aeb audi that i am using ms2 and the stock ecu to control idle the fact that it was still active help me I turned on cl idle put the targets that I wanted for the audi then turn it off as I am not using ms to control the idle directly I manage to get good result with the adaptive controlling spark and the stock ecu controlling the throttle idle solenoid.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by muythaibxr »

However, the feature uses the CL idle targets to do what it does. The fact that it works at all with CL idle disabled is a bug. Work could be done to separate the targets from the CL idle feature, but as it is now, it should be a config error since you could potentially be using targets that are uneditable due to CL idle being turned off.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
Greg G
Experienced MS/Extra'er
Posts: 311
Joined: Thu Mar 10, 2011 11:33 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by Greg G »

Sounds like a good bug :)
1996 Mazda MX-5 1.6L NA6/ Mazdaspeed M45 SC/ BSP AW Intercooler/ Maruha F-cams/ 425cc RX-8 injectors/ DIYPNP

MS2/Extra test mule :)
GintsK
Experienced MS/Extra'er
Posts: 274
Joined: Sat Aug 07, 2004 11:15 am
Location: Riga, Latvia

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by GintsK »

I suggest to keep advance CL entering rules separate to IAC CL entering rules. It should help reach IAC CL window without any hangs or freezes.
Some of my instalations:
VW TBI, VW 16V 60-2,
BMW M50 COPs 60-2, BMW M20 and M50 ITBs as Alpha-N, BMW M20 turbo Wasted spark
Opel 20XE Wasted Alpha-N with ITBs
Audi 10VT Audi20V
MR2 3S-GE.............
and over 100 tuned
Red_Baron
Experienced MS/Extra'er
Posts: 328
Joined: Wed Mar 05, 2008 2:05 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by Red_Baron »

Please leave the bug in! It's briliant my idle valve barely moves anymore and I would not like to have to choose to stay with an old code version :(
Greg G
Experienced MS/Extra'er
Posts: 311
Joined: Thu Mar 10, 2011 11:33 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by Greg G »

GintsK wrote:I suggest to keep advance CL entering rules separate to IAC CL entering rules. It should help reach IAC CL window without any hangs or freezes.
They are separate-- and it is brilliant that way! The AIA 'conditions' the RPMs just before CL idle entry. There is a bit of tuning to be done though- if the AIA is too early, it can accelerate the dropping RPM. I currently have it set to come on at 1075 RPM.
1996 Mazda MX-5 1.6L NA6/ Mazdaspeed M45 SC/ BSP AW Intercooler/ Maruha F-cams/ 425cc RX-8 injectors/ DIYPNP

MS2/Extra test mule :)
Red_Baron
Experienced MS/Extra'er
Posts: 328
Joined: Wed Mar 05, 2008 2:05 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by Red_Baron »

Leave the closed-loop-target table editable irrespective of the Idle control config, so we can have no idle control set (iTB's) yet we can have AIA helping the hairy cams target a smooth idle!!

Andy
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by gslender »

Greg G wrote:
GintsK wrote:I suggest to keep advance CL entering rules separate to IAC CL entering rules. It should help reach IAC CL window without any hangs or freezes.
They are separate-- and it is brilliant that way! The AIA 'conditions' the RPMs just before CL idle entry. There is a bit of tuning to be done though- if the AIA is too early, it can accelerate the dropping RPM. I currently have it set to come on at 1075 RPM.
I would be easy to do a ramp or taper to AIA that would soften and blend the into idle. Thoughs?

G
Mazda MX5 + MS3 Pro
dontz125
Super MS/Extra'er
Posts: 4186
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by dontz125 »

Another thought as to why MS2/Extra development should continue - in addition to the base "MS2" V3.0 DIY box, there are also the MicroSquirt and MicroSquirt Module products, both of which can use the MS2/Extra code (to greater or lesser extents). To the best of my (extremely limited) knowledge, there is no MS3-equivalent of these products on the horizon, so continuing to support these products with improved firmware makes good sense.

This advance-based idle control should be interesting for the bike side, as the vast majority (especially the upgraded carb designs) have no real idle control. While they similarly have no AC ( :lol: ), this will still likely contribute to a nice smooth idle.
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Red_Baron
Experienced MS/Extra'er
Posts: 328
Joined: Wed Mar 05, 2008 2:05 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by Red_Baron »

Anything that limits, delays, blends, smooths, removes, or in some other way slows or stops AIA doing what it does today is going to be voted against by me, and I expect any other French car driver, because they idle like pigs, the plenum is a poor buffeting design which hunts like a trampoline. AIA quite simply fixes it.

It's not a tuning issue at all, since iTB's fix the problem, but stock plenum is rubbish. Blame the french for designing the TU5J4 engine!

After Xmas, I'll post my .msq and a log file with AIA on and off and you'll se ewhat I mean. Before AIA I 'coped' with high idle, stalling, hunting, oscillation and now that is removed, I think I'll have to keep this firmware in my back pocket in case the 'bugs' that help me get 'fixed' LOL :mrgreen: :mrgreen:
Greg G
Experienced MS/Extra'er
Posts: 311
Joined: Thu Mar 10, 2011 11:33 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by Greg G »

gslender wrote:
Greg G wrote:
GintsK wrote:I suggest to keep advance CL entering rules separate to IAC CL entering rules. It should help reach IAC CL window without any hangs or freezes.
They are separate-- and it is brilliant that way! The AIA 'conditions' the RPMs just before CL idle entry. There is a bit of tuning to be done though- if the AIA is too early, it can accelerate the dropping RPM. I currently have it set to come on at 1075 RPM.
I would be easy to do a ramp or taper to AIA that would soften and blend the into idle. Thoughs?

G
I think at the rate of RPM drop in the throttle lift area, the real improvement will be in revamping the dashpot value. The single value dashpot kind of reminds me of Last Known Good- it's 'good enough', and let PID sort it out. I think a single dashpot value can't account for the varying ways one can enter the throttle lift zone.

The goal is to control the RPMdot to within a certain range prior to CL entry (on my car, roughly -700 RPMDot @ 1200RPM) to ensure there is no overshoot. There has to be some way for the dashpot to actively react. Perhaps instead of a single value, a curve against RPMDot, but it has to be sampled at a certain RPM (maybe the RPM adder for CL entry). Or an active dashpot duty which has an exponential decay.

A simple way would be to just have a 2nd dashpot value from a duty vs RPMdot curve (5x2) sampled at the CL entry (RPM target + adder) RPM. The original dashpot would then be just a primer which sets the general speed of RPM drop, and the secondary dashpot the "parachute". Maybe it could just be a dashpot adder to 'correct' for excess negative RPMdot.
1996 Mazda MX-5 1.6L NA6/ Mazdaspeed M45 SC/ BSP AW Intercooler/ Maruha F-cams/ 425cc RX-8 injectors/ DIYPNP

MS2/Extra test mule :)
tpsretard2
Master MS/Extra'er
Posts: 662
Joined: Thu Feb 14, 2008 4:59 am

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by tpsretard2 »

i would like it to be user selectable also.

i do not reach close enough to the idle target for CL to activate with out the retard.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: [FW MOD] ms2extra 3.2.1 beta gslender v2

Post by muythaibxr »

OK, separating the CL targets from CL idle and making them independent should not be a problem. I will do it in MS3 and backport. Right now the lookup is only active if CL idle is active.

As far as the dashpot goes, I feel it doesn't work like a real dashpot, so perhaps making it do so is the right way to go? I really don't want yet another table or curve associated with the idle feature, I want to remove some of the tunables while retaining or improving the functionality.

As such, my proposal is that the dashpot work like a real one and open the valve extra like it does now on throttle lift and then close back to the last good or table value over a specified time period. This is how the 2 or 3 OEMs I have seen work (mainly for emissions but with other benefits too). The initial position table can then be used to set the initial RPM going into PID with the dashpot doig what a dashpot should.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
Post Reply