Feature request. Rev limit based on sensors.

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Feature request. Rev limit based on sensors.

Post by elaw »

Reverant wrote:Shutting down the engine before the damage happens will still allow you to use the brakes and steering, etc.
And except in crazy outlying cases like where a rod is thrown and severs a brake line, not having the computer shut down the engine, and instead waiting for it to stop by itself, will allow you to use the brakes and steering for a longer period of time. That period could be milliseconds longer, or it could be minutes. But it'll always be longer.
Last edited by elaw on Wed Nov 11, 2015 7:16 am, edited 1 time in total.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Feature request. Rev limit based on sensors.

Post by jsmcortina »

I have to say that if the ECU shuts down the engine for any sensor fault I think it would cause more problems than it solves. I most certainly do not want the engine to immediately shut down if the CLT reads out of range. Having a warning light come on is great and lets me as the driver choose what to do.

Even in the case of low oil pressure, if I've just pulled out in front of a lorry or was approaching a level crossing or something, screw the engine!

In the case of something like drag racing though, I'd likely be happy for low oil pressure or low fuel pressure to shut the engine down immediately. There is an extremely low chance of it causing a risk of injury and a very high chance of it reducing engine damage.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Feature request. Rev limit based on sensors.

Post by elaw »

I think you pretty much hit the nail on the head! The best response when a failure is detected is going to depend on circumstances. In many circumstances having the engine stop by itself would be dangerous, but at other times it may make sense.

It looks to me like by using the existing "limp mode" feature, automatic shutdown is already possible. If you set the limp mode RPM limit to 0, any condition that triggers limp mode will stop the engine... correct?

So it seems like most of what's being asked for here could be accommodated with a few changes to limp mode. An option could be added to have it turn off nitrous. And limp mode could be able to be triggered by fuel pressure (actually fuel pressure - MAP would probably be best) and oil pressure.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Feature request. Rev limit based on sensors.

Post by aidandj »

So would adding generic sensors to limp mode allow for this?

You could also have a switch to turn it on at the track.

I guess my main point is having more safety features and easy ways to implement them is never a bad thing IMO.
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Feature request. Rev limit based on sensors.

Post by Reverant »

jsmcortina wrote:In the case of something like drag racing though, I'd likely be happy for low oil pressure or low fuel pressure to shut the engine down immediately. There is an extremely low chance of it causing a risk of injury and a very high chance of it reducing engine damage.

James
Yes, please.

Add the option of a rev limiter based on sensor, and don't allow (via the ini) a "lower than 1500rpm" etc setting. If the user REALLY needs to, he can change the ini file and drop the min allowed value to 0.
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
jsimmons
Experienced MS/Extra'er
Posts: 207
Joined: Wed Jun 10, 2015 10:12 pm

Re: Feature request. Rev limit based on sensors.

Post by jsimmons »

Fuel pressure, oil pressure, egt,afr ect..

Maybe for egt code it to cut whatever cyl is the culprit.

Im my case im looking for low 5's high 4's in the 1/8. I would rather the ecu shut it down and save my 20k engine
Speedy_G
Experienced MS/Extra'er
Posts: 195
Joined: Fri Aug 01, 2014 8:30 am

Re: Feature request. Rev limit based on sensors.

Post by Speedy_G »

thats a good idea.
Maybe its also possible to include a user input to the limp mode.
For example: then i could use my lean angle sensor on the bike to stop the engine in case of a crash. Instead of a tilt sensor somewhere in the wiring harness.
Then it is in the limp mode -> rpm_max = 1 for example
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Feature request. Rev limit based on sensors.

Post by dontz125 »

Speedy_G wrote:then i could use my lean angle sensor on the bike to stop the engine in case of a crash.
I'm all for adding the generic sensors etc to the limp / response list, but I have to respond to that comment.

You have to very careful with using a lean-angle / tilt sensor to kill the engine. Certain types of tilt sensor can be overwhelmed by the back end stepping out and flicking in a mid-corner slide / partial high-side; if the sensor immediately cuts the engine, this can lead to a collision in the middle of the corner as following bikes pile into a suddenly stalled bike. This happened several times in US racing; the GSXR sensor was particularly bad for this, and it became standard procedure to defeat the sensor by filling the sensor body with hot clue or other gunk, fixing the sliding element.

I sell (or rather, will once again sell once I restart the business) a tip-over sensor with an integral delay timer that waits ~ 1.5 seconds before interrupting the fuel pump relay signal. No mid-corner stalls, but the engine is cut very quickly in the event of an actual crash.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
krisr
Master MS/Extra'er
Posts: 799
Joined: Wed Aug 17, 2005 1:17 am
Location: Sydney, Australia

Re: Feature request. Rev limit based on sensors.

Post by krisr »

Reverant wrote:
jsmcortina wrote:In the case of something like drag racing though, I'd likely be happy for low oil pressure or low fuel pressure to shut the engine down immediately. There is an extremely low chance of it causing a risk of injury and a very high chance of it reducing engine damage.

James
Yes, please.

Add the option of a rev limiter based on sensor, and don't allow (via the ini) a "lower than 1500rpm" etc setting. If the user REALLY needs to, he can change the ini file and drop the min allowed value to 0.
I think this would be a good compromise as I was thinking a "racing" type safety switch vs a "daily driver" safety switch is essentially what we're trying to work out here as "safety" has a few different meanings. For those street/strip guys, I guess most of us take the laptops to the track so being able to go from a limiter type reduction in power to a hard cut with a simple checkbox or something in the tune is useful if oil pressure tanks, last thing we want is to pickup the pieces of an engine (I think I have about $15k in mine...) at half track. And generic inputs being able to limit to me would be great especially if the transmission pressures go out of the normal boundaries, it would be good to put a rev limit on the motor so the trans doesnt get lunched either.
Sydney, Australia
1971 Holden Monaro HQ
MS3X Sequentially fuelled 400 Pontiac
Speedy_G
Experienced MS/Extra'er
Posts: 195
Joined: Fri Aug 01, 2014 8:30 am

Re: Feature request. Rev limit based on sensors.

Post by Speedy_G »

the tooltip says, that the oil pressure (flashs 14x) is already included in the check engine light.
So i guess it gets its information from the "Oil pressure" setting.
so when i enter here for example 0.6bar minimum pressure, then the check engine light would flash 14 times.
With activated "Sensor checking" the limp mode comes on, and then i can enter "limp rev limit" = 1.

So is this already working for the oil pressure to kill the engine?
Or is the limp mode just for the sensors, which are directly shown in the "check engine light" window?

and @dontz125 concerning the tip-over switch. I see that your system is a improvement to the stock ones.
But maybe i could use "Loop 1" activated for lean angle > x.
Then my problem is to get a timer. Sadly there is no direct timer for the loop functions.
But perhaps i can use "Loop 1" to trigger the nitrous system. There i use a unused output and deactivate all that stuff (additional fuel, ignition retard..).
The good thing is, that there seems to be a nitrous timer. Then i could use "Loop 2", which is activated when "Loop 1= 1 AND nitrous timer > 1.5s.
And then "Loop 2" is the input switch for "Req Fuel Switching" to 0ms. I guess with 0ms the megasquirt will stop the injections.
I think it could work. (if you dont have to use the nitrous system :D )
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Feature request. Rev limit based on sensors.

Post by dontz125 »

If you aren't using nitrous, and don't mind giving up the 3 nitrous pins, what might work very well is (as you say) connect the tip-over switch to Nitrous In, Nitrous1 is wasted, and Nitrous 2 triggers an interposing Mosfet that blocks the FP Relay signal. Set the Nitrous Stage 2 "Delay after Stage 1" setting to ~ 1.5s, set "Enable Stage 2 Above (RPM)" to 1, and set "Max RPM" to whatever your max RPM setting is. Then, when the bike falls over, everything magically shuts off. (We may be getting just a little OT here)

Perhaps we could whine at James for a tip-over delay function? The rally car guys and rock-crawler guys would probably appreciate it too!

(Or just buy my toy, once I'm back up and running again ... :D )
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Feature request. Rev limit based on sensors.

Post by dontz125 »

Even better - the AC Idle-up function! Not many bikes, ATVs, or rock crawlers have AC in the first place, so it's not a heavily used application. Play with the settings (most things go to zero or max values); set the delay to 1500ms - you'll need to adjust ac_idleup_delay in the .ini to allow this.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Feature request. Rev limit based on sensors.

Post by aidandj »

There are probably 100 different ways to do it in hardware. I still think software is the best way.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Feature request. Rev limit based on sensors.

Post by aidandj »

Something that would go along with this is allowing the oil temperature sensor to dictate rev limit instead of CLT. Because in reality oil temp is a better representative of how warmed up the engine is.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Feature request. Rev limit based on sensors.

Post by aidandj »

aidandj wrote:Something that would go along with this is allowing the oil temperature sensor to dictate rev limit instead of CLT. Because in reality oil temp is a better representative of how warmed up the engine is.
Even just a simple addition of a "Use Oil Temp Sensor" under the Rev Limit CLT option. It could use the same curve and everything. Would be a few line addition to the code I assume.

Ken, James? Any input? Or should I start looking into hardware solutions.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Feature request. Rev limit based on sensors.

Post by aidandj »

Ken/James. Is this idea going to be considered? If not I need to plan some hardware alternatives that were discussed. But if its in the mixing pot I can wait.
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Feature request. Rev limit based on sensors.

Post by aidandj »

The limp mode looks like it would work perfectly for this feature. If we could enable it based on oil pressure/afr and mostly generic sensors. I'm going to be adding fuel pressure, oil pressure, and oil temperature and being able to enter limp mode based on these sensors would be amazing.
Raymond_B
Super MS/Extra'er
Posts: 1399
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Feature request. Rev limit based on sensors.

Post by Raymond_B »

I'd like to second the request for limp mode based on oil pressure sensor input, perhaps trans temp and or trans line pressure as well. Or maybe just selectable inputs, that way we could trigger limp mode off any sensor input we wish.
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
aidandj
Experienced MS/Extra'er
Posts: 255
Joined: Fri Sep 26, 2014 1:38 am

Re: Feature request. Rev limit based on sensors.

Post by aidandj »

Don't think it will happen. I haven't heard a peep out of James or Ken about this request.
Raymond_B
Super MS/Extra'er
Posts: 1399
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Feature request. Rev limit based on sensors.

Post by Raymond_B »

aidandj wrote:Don't think it will happen. I haven't heard a peep out of James or Ken about this request.
They are busy, or maybe the few of us that have asked are not enough of a demand to put in the effort.
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Post Reply