Page 1 of 3
Spare Output Variables
Posted: Thu Jan 12, 2006 8:13 am
by herkamer
Is it possible (or will it be possible) to add more than 2 variables for the spare outputs? Looking at the code on the
MS2 spare output page it seems possible, but obviously that isn't available in Megatune. I know absolutely nothing about programming in C and really have no idea how to manipulate the code at this point (though it may require learning these things to get it to do what I want it to), but it would appear that another item in the list would take care of that.
Example:
Coolant above 75°F
RPM above a set point (say 1500rpm)
TPS below a set point (say 75%) -OR-
Map above a set point
This is for a future MS2 project to fully automate OD and lockup on the transmission. Apparently this is what Chrysler did/does for control.
Also, what is the current limitations of the LEDs? Could they drive a relay with a 10 or 50ma coil?
Posted: Thu Jan 12, 2006 10:55 am
by efahl
The spare port conditions and their quantity are not detemined by MegaTune, that's purely a function of the MS-II code. In order to add more conditions, you would need to modify the spare port code itself, which would not be an easy task.
But... A much easier solution to your problem would be to modify the MS-II code to produce an output that is one of your conditions. There are extra bytes in the outputs (about 36 right now), which could contain such things as
Code: Select all
outpc.myCondition = rpm > 4000 && clt < 200 && ...
This would be trivial to handle in MegaTune, a couple of lines in the ini file, and then your new output would miraculously appear in the variable lists on the spare port editor.
Eric
Re: Spare Output Variables
Posted: Thu Jan 12, 2006 11:10 am
by jcorsaro
herkamer wrote:Also, what is the current limitations of the LEDs? Could they drive a relay with a 10 or 50ma coil?
The LED transistors can drive a standard automotive relay. You will need to install a protection diode to prevent the flyback voltage from the relay coil from damaging the transistor. Look at the schematics for the v2.2 or v3.0 boards to copy the installation of the diode from the fuel pump relay driver.
Posted: Fri Jan 13, 2006 8:20 am
by herkamer
efahl wrote:The spare port conditions and their quantity are not detemined by MegaTune, that's purely a function of the MS-II code. In order to add more conditions, you would need to modify the spare port code itself, which would not be an easy task.
But... A much easier solution to your problem would be to modify the MS-II code to produce an output that is one of your conditions. There are extra bytes in the outputs (about 36 right now), which could contain such things as
Code: Select all
outpc.myCondition = rpm > 4000 && clt < 200 && ...
This would be trivial to handle in MegaTune, a couple of lines in the ini file, and then your new output would miraculously appear in the variable lists on the spare port editor.
Eric
Eric,
I figured this would require mods to the MS2 code. It looks the above conditional code would fit in the v2.33.c file, and like I said before I have zero experience with C. Is this something a beginner can tackle easily or am I way over my head without C programming experience? I'm computer literate, just never have had a need to program.
Posted: Fri Jan 13, 2006 5:49 pm
by efahl
Your biggest problem with be installing the compilers and getting them to work to produce an s19 file. If you can get that far, then adding the few lines of code you need becomes a pretty trivial exercise. There are some threads on the MS-II forum (I think) on getting either the gcc or codewarrior compilers installed if you decide to chase it down.
Eric
Posted: Fri Jan 13, 2006 6:06 pm
by Bernard Fife
efahl wrote:There are some threads on the MS-II forum (I think) on getting either the gcc or codewarrior compilers installed
Or check this:
http://www.megasquirt.info/ms2/code.htm#gcc
Lance.
Posted: Fri Jan 13, 2006 8:01 pm
by herkamer
Ok, I'm thinking this is WAY more than I'm willing to take on at the moment. I'll see if I can make it work with 2 variables instead of 3. Thanks for all the input!
Posted: Fri Jan 13, 2006 8:15 pm
by Bernard Fife
herkamer,
I have MegaSquirt OD control on my 700R4 overdirve/lock-up trans (GM). Like yours, it is originally controlled by coolant, rpm, and load (tps stock). (As well as a brake control.)
I have run it as rpm and MAP only, and this works fine. There's some info here:
http://www.msefi.com/viewtopic.php?t=12121
However, another possibility is to use two spare outputs controlling two relays to set up to 4 conditions for TCC lock-up. By arranging the relays in series or parallel you can AND or OR the two sets of conditions. It does take some thinking and a bit of hardware, but it is doable.
The remaining possibility is to wait for the GPIO board, for which MegaShift code will be available to do auto-trans control of a variety of functions (including OD control), with a fairly sophisticated control algorithm (this isn't imminent though).
Lance.
Posted: Sun Jan 15, 2006 5:07 am
by el-hardo
And can anybody please design a little circuit, how the DIODE circuite with the flyback diode and the relay (or a diode) have to be wired!
I also need another graph, how i have to wire the other spares which DON'T have a seperate transistor. So how to wire the transistor and the diode as well.
Is it better to use a transistor here, or will a TRIAC also be ok?
Regards Jan
Posted: Tue Jan 17, 2006 5:39 pm
by el-hardo
can nobody paint such a circuit, please?
