Getting a new trigger wheel added to the code
Moderators: jsmcortina, muythaibxr
-
- Site Admin
- Posts: 39621
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Getting a new trigger wheel added to the code
If you have an engine setup that is not presently support by Megasquirt, you might not be out of luck.
One of the key design objectives we have with the MS2/Extra code is to support plenty of engines natively. i.e. original wheels and sensors.
Any of these "special" engines requires a custom wheel decoder to be written.
Before that process can start, the following need to be satisfied.
- compatible sensors (hall, opto or standard VR)
- accurate degree timing diagram of crank and cam wheels (see attached template)
- ability, time and commitment to test the code
So, if you pass the test, start a new topic with all those details and get me motivated to write the code!
James
One of the key design objectives we have with the MS2/Extra code is to support plenty of engines natively. i.e. original wheels and sensors.
Any of these "special" engines requires a custom wheel decoder to be written.
Before that process can start, the following need to be satisfied.
- compatible sensors (hall, opto or standard VR)
- accurate degree timing diagram of crank and cam wheels (see attached template)
- ability, time and commitment to test the code
So, if you pass the test, start a new topic with all those details and get me motivated to write the code!
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".
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".
-
- Site Admin
- Posts: 39621
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Getting a new trigger wheel added to the code
Here's an example timing chart - this one for Subaru 6/7. We don't need all this detail to get the code written though and this chart doesn't have the full 0-720 degress drawn out.
James
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".
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".
-
- Super MS/Extra'er
- Posts: 1933
- Joined: Fri May 07, 2004 12:59 pm
- Location: Tacoma, WA
- Contact:
Re: Getting a new trigger wheel added to the code
Loving the Chrysler 2.2/2.5 turbo wheel decoder you added. And there are at least 3 other guys that I've spoken with that are also running it, probably a handful more that I haven't spoken with, and tons more out there in the wings that'll run it someday.. Thank you so much for adding it.
Brian
'84 Dodge Rampage
'84 Dodge Rampage
-
- Master MS/Extra'er
- Posts: 393
- Joined: Sat Mar 03, 2007 9:27 am
- Location: Denmark, Fyn
- Contact:
Re: Getting a new trigger wheel added to the code
You are gold for the community.. ;-)
-
- Master MS/Extra'er
- Posts: 601
- Joined: Fri Apr 13, 2007 10:50 am
- Location: Paderborn, Germany
- Contact:
Re: Getting a new trigger wheel added to the code
Guess I was stressing his nerves lately with my Nissan CAS mod. Sorry James
Patrick
--------------------
Formula Student Cars MS1/MS2:
Suzuki SV650S, Suzuki GSR600K3,
http://msruns.com/viewtopic.php?f=93&t=22782
--------------------
Projects:
Nissan Primera P11 with SR20DE (SR20VE 20V) MS2
--------------------
Formula Student Cars MS1/MS2:
Suzuki SV650S, Suzuki GSR600K3,
http://msruns.com/viewtopic.php?f=93&t=22782
--------------------
Projects:
Nissan Primera P11 with SR20DE (SR20VE 20V) MS2
Re: Getting a new trigger wheel added to the code
Hmm, well if he's ready for a new challenge, i've put my request here: http://www.msextra.com/viewtopic.php?f=91&t=30423
-
- Site Admin
- Posts: 39621
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Getting a new trigger wheel added to the code
I've split off the Jeep and Nissan 25 wheel discussions into their own topics.
James
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".
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".
Re: Getting a new trigger wheel added to the code
For the future releases of msextra 3.0 it might be usefull to add the dizzy patern of "Magneti Marelli 1avp / 1avb". This ecu uses a single coil and a dizzy with a single hall efect sensor. The nice feature about it is that is capable of doing fully sequential injetion thanks to an un even gap patern.
The dizzy has 3 gaps corresponding to cylinder 2, 3 and 4. Those gaps begin at 72 degrees BTDC and end at 6 degrees BTDC . A fourth Bigger gap corresponds to cylinder number one, this one also begins at 72degree BTDC but ends later, at 0 degrees BTDC.
When the engine first starts the injectors fire simulstaniusly. A soon as the ecu detects cylinder number one it switch to fully sequential.
I best thing about this setup is that almost any hall or optic dizzy can be transformed into a fully sequential setup by making the gap corresponding to cyl 1 some degrees bigger..
Here´s a diagram of the dizzy in question..
APMS mean BTDC
PMS means TDC
The dizzy has 3 gaps corresponding to cylinder 2, 3 and 4. Those gaps begin at 72 degrees BTDC and end at 6 degrees BTDC . A fourth Bigger gap corresponds to cylinder number one, this one also begins at 72degree BTDC but ends later, at 0 degrees BTDC.
When the engine first starts the injectors fire simulstaniusly. A soon as the ecu detects cylinder number one it switch to fully sequential.
I best thing about this setup is that almost any hall or optic dizzy can be transformed into a fully sequential setup by making the gap corresponding to cyl 1 some degrees bigger..
Here´s a diagram of the dizzy in question..
APMS mean BTDC
PMS means TDC
Re: Getting a new trigger wheel added to the code
K here's another one. No fancy graphics or scope patterns yet, but they will follow later this week if time permits.
KTM 990 superduke 2cyl 75degree V twin, also super moto and RC8 sport bike, possibly quite a few others.......
24-2 tooth crank wheel, front cyl is at TDC at aprox tooth 19, 285degr. teeth after the skipped teeth. ( will have to verify this, going off memory...). I will have to check the rear cyl., if it is actually #1 then its TDC would be aprox 210degees or 14 teeth after skipped teeth ( i think ). there is no cam sensor, and I know that the current code probably has no way of supporting this motor, but it would be nice!
One oddball thing i did notice with this motor is that somehow it DOES NOT seem to fire in wasted spark! I have had it running on both microsquirt and MS2E-2.0.1 (fuel only and only firing one coil for the MS2E), and while both MS codes fire the coil(s) in waisted spark, the factory ECU somehow is able to determine the compression stroke ,possibly its an input to the CPU tied to a sensing resistor on the coil ground, could see a higher flyback voltage spike on the compression stroke compared to the exhaust stroke, or possibly it logs and stores the time differential between tach ( toothed wheel triggers ) during cranking or idling conditions to determine what stroke? I had it hooked to a 4 channel lab scope, and logging both stock coil signals and MS coil signals, the stock signals were 1 per cycle while the MS was 2/cycle (720degr). it ran the same regardless of witch ECU was actually controlling the spark, as it should, but I was a bit perplexed when i saw the factory ECU was only firing at 1/2 the rate of the MS.
I don't know for sure, but I do know that the stock ECU is able to do it. I bring this up as it may be a useful feature if we (by "we" i mean the smart guys that can actually write code and do math and stuff, not me) could implement something similar in the MS2 or MS2E code. this could potentially lead to no need for a cam sync, as well as ( if it is time/trigger activated ) to fun stuff like cyl contribution and misfire features.
With the current A-B-G ( alpha beta gamma.... i think i have that right) prediction already in the MS code, it may be as simple as looking at one particular error factor compared to the next,on a given tooth spread, then taking the greater of the two and setting up a pseudo "sync".
Ok, that got a bit off topic, but it is food for thought.
Joe
KTM 990 superduke 2cyl 75degree V twin, also super moto and RC8 sport bike, possibly quite a few others.......
24-2 tooth crank wheel, front cyl is at TDC at aprox tooth 19, 285degr. teeth after the skipped teeth. ( will have to verify this, going off memory...). I will have to check the rear cyl., if it is actually #1 then its TDC would be aprox 210degees or 14 teeth after skipped teeth ( i think ). there is no cam sensor, and I know that the current code probably has no way of supporting this motor, but it would be nice!
One oddball thing i did notice with this motor is that somehow it DOES NOT seem to fire in wasted spark! I have had it running on both microsquirt and MS2E-2.0.1 (fuel only and only firing one coil for the MS2E), and while both MS codes fire the coil(s) in waisted spark, the factory ECU somehow is able to determine the compression stroke ,possibly its an input to the CPU tied to a sensing resistor on the coil ground, could see a higher flyback voltage spike on the compression stroke compared to the exhaust stroke, or possibly it logs and stores the time differential between tach ( toothed wheel triggers ) during cranking or idling conditions to determine what stroke? I had it hooked to a 4 channel lab scope, and logging both stock coil signals and MS coil signals, the stock signals were 1 per cycle while the MS was 2/cycle (720degr). it ran the same regardless of witch ECU was actually controlling the spark, as it should, but I was a bit perplexed when i saw the factory ECU was only firing at 1/2 the rate of the MS.
I don't know for sure, but I do know that the stock ECU is able to do it. I bring this up as it may be a useful feature if we (by "we" i mean the smart guys that can actually write code and do math and stuff, not me) could implement something similar in the MS2 or MS2E code. this could potentially lead to no need for a cam sync, as well as ( if it is time/trigger activated ) to fun stuff like cyl contribution and misfire features.
With the current A-B-G ( alpha beta gamma.... i think i have that right) prediction already in the MS code, it may be as simple as looking at one particular error factor compared to the next,on a given tooth spread, then taking the greater of the two and setting up a pseudo "sync".
Ok, that got a bit off topic, but it is food for thought.
Joe
-
- Super MS/Extra'er
- Posts: 17507
- Joined: Thu Apr 16, 2009 8:08 pm
Re: Getting a new trigger wheel added to the code
The crank wheel itself is fairly normal, besides it being an odd fire engine. The not running in wasted spark is a pretty neat trick, but I have a guess how it's done: Is there a MAP sensor installed in a single runner on this engine? A lot of motorcycle engines use this for cylinder identification by reading the pressure dip on the intake stroke.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
Re: Getting a new trigger wheel added to the code
yea, that could be it, it has one MAP per cyl. defiantly could be how its done. has the MAP widowing been ported over to MS2E? that might be a neat but seldom used addition.
-
- Master MS/Extra'er
- Posts: 601
- Joined: Fri Apr 13, 2007 10:50 am
- Location: Paderborn, Germany
- Contact:
Re: Getting a new trigger wheel added to the code
That would be quite complicated with the current concept. You would need to start in wasted spark mode, then look at idle where there occurs pressure drop in one cylinder (even without a second sensor) and then switch to sequential ignition.
BTW: You can run it wasted spark with the oddfire wheel code.
BTW: You can run it wasted spark with the oddfire wheel code.
Patrick
--------------------
Formula Student Cars MS1/MS2:
Suzuki SV650S, Suzuki GSR600K3,
http://msruns.com/viewtopic.php?f=93&t=22782
--------------------
Projects:
Nissan Primera P11 with SR20DE (SR20VE 20V) MS2
--------------------
Formula Student Cars MS1/MS2:
Suzuki SV650S, Suzuki GSR600K3,
http://msruns.com/viewtopic.php?f=93&t=22782
--------------------
Projects:
Nissan Primera P11 with SR20DE (SR20VE 20V) MS2
Re: Getting a new trigger wheel added to the code
What about a comparator circuit, joining the dedicated MAP to the 2nd trigger? Treat it as a dual wheel, but instead of a cam signal, 'sudden drop in MAP in this tract' = next TDC is #1 power. No new code required, just an adaptor / filter circuit?
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: Getting a new trigger wheel added to the code
The problem is that the "just" part might not be that simple. Since the MAP signal varies a lot, this needs a dynamic threshold.
Jean
Jean
Re: Getting a new trigger wheel added to the code
Heh - my post was 'just' too simple, obviously, missing thoughts and idea. I thought about it some more, and I had meant to note that there would be 2 MAP sensors. For a 1243 arrangment, (just to pull an example out of the air), the main MAP signal 'M' could be on cyl #3; with the trigger sensor 'T' on #2, so the next firing cyl would be #1. If a filtered T value suddenly drops below a filtered M value by a threshold amount amount, trigger.
I know OpAmps can be used for straight Boolean operation (if V(T) < V(M) then ON); can they be used for offset comparisons - (if V(T)+0.5 < V(M) then ON)? Would it be a simple offset, or - as you said - a dynamic offset? How can that offset be provided? Could something like an LM2907 F-to-V converter (Vout = Vcc x Fin x R1 x C1) be used to provide that dynamic offset?
Could it be done with an analog circuit, or are we talking a significant code mod?
1p2c4i3x 1x2p43i 1i2x4p3c 1c2i4x3p
I know OpAmps can be used for straight Boolean operation (if V(T) < V(M) then ON); can they be used for offset comparisons - (if V(T)+0.5 < V(M) then ON)? Would it be a simple offset, or - as you said - a dynamic offset? How can that offset be provided? Could something like an LM2907 F-to-V converter (Vout = Vcc x Fin x R1 x C1) be used to provide that dynamic offset?
Could it be done with an analog circuit, or are we talking a significant code mod?
1p2c4i3x 1x2p43i 1i2x4p3c 1c2i4x3p
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
-
- Master MS/Extra'er
- Posts: 606
- Joined: Sat Apr 11, 2009 12:54 pm
- Location: Aalsmeer the netherlands
- Contact:
Re: Getting a new trigger wheel added to the code
would it be an idea to have a user defineble wheel in the code
maybe something like 0 to 360 drg with a setting high or low per drg
in this way new wheels would not have to be programmed just user defined
maybe something like 0 to 360 drg with a setting high or low per drg
in this way new wheels would not have to be programmed just user defined
-
- Site Admin
- Posts: 39621
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Getting a new trigger wheel added to the code
Defining the wheel like that is ok and the code presently does it like that internally. However, how do you synchronise to the wheel? That is the difficult part.MS2tester wrote:would it be an idea to have a user defineble wheel in the code
maybe something like 0 to 360 drg with a setting high or low per drg
in this way new wheels would not have to be programmed just user defined
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".
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".
-
- Master MS/Extra'er
- Posts: 606
- Joined: Sat Apr 11, 2009 12:54 pm
- Location: Aalsmeer the netherlands
- Contact:
Re: Getting a new trigger wheel added to the code
i assume you mean where to start reading for top dead cilinder 1
assuming a missing tooth wheel a gap would be present somewhere in the 360 sequence
or even a single drg tooth as a reference then start counting in teeth or crank dgr
could you explain how the code now reads
a fixed amount of dgr after reference point being either a missing tooth or a cam signal
or is it counting teeth
assuming a missing tooth wheel a gap would be present somewhere in the 360 sequence
or even a single drg tooth as a reference then start counting in teeth or crank dgr
could you explain how the code now reads
a fixed amount of dgr after reference point being either a missing tooth or a cam signal
or is it counting teeth
-
- Master MS/Extra'er
- Posts: 601
- Joined: Fri Apr 13, 2007 10:50 am
- Location: Paderborn, Germany
- Contact:
Re: Getting a new trigger wheel added to the code
The code is counting flanks or signal edges, be it either rising or falling edge. Every edge is defined a tooth and every tooth knows how much degree it is until the next tooth shows up. Now's the trick, every wheel definition must present it's own sync algorithm while cranking and a control loop if it's still synced. And that's non-trivial, I did it myself with the Nissan.MS2tester wrote:i assume you mean where to start reading for top dead cilinder 1
assuming a missing tooth wheel a gap would be present somewhere in the 360 sequence
or even a single drg tooth as a reference then start counting in teeth or crank dgr
could you explain how the code now reads
a fixed amount of dgr after reference point being either a missing tooth or a cam signal
or is it counting teeth
Patrick
--------------------
Formula Student Cars MS1/MS2:
Suzuki SV650S, Suzuki GSR600K3,
http://msruns.com/viewtopic.php?f=93&t=22782
--------------------
Projects:
Nissan Primera P11 with SR20DE (SR20VE 20V) MS2
--------------------
Formula Student Cars MS1/MS2:
Suzuki SV650S, Suzuki GSR600K3,
http://msruns.com/viewtopic.php?f=93&t=22782
--------------------
Projects:
Nissan Primera P11 with SR20DE (SR20VE 20V) MS2
-
- Helpful MS/Extra'er
- Posts: 88
- Joined: Sun Aug 21, 2005 2:42 am
Re: Getting a new trigger wheel added to the code
The file for the trigger format is no longer availible. I have a trigger I would like to see supported.
It's identical to this trigger : http://www.msextra.com/doc/ms2extra/MS2 ... -2-2-2.htm
aside from the fact that the tooth count is changed to reflect the H6's needs.
Instead of 11 and 14 teeth in between the larger slots we have 8 and 16 as per this photo here:
http://www.romraider.com/forum/viewtopi ... =25&t=5746.
Would that be a difficut code swap? I have paypal beer money in hand!
It's identical to this trigger : http://www.msextra.com/doc/ms2extra/MS2 ... -2-2-2.htm
aside from the fact that the tooth count is changed to reflect the H6's needs.
Instead of 11 and 14 teeth in between the larger slots we have 8 and 16 as per this photo here:
http://www.romraider.com/forum/viewtopi ... =25&t=5746.
Would that be a difficut code swap? I have paypal beer money in hand!