Spare Output Variables

This forum is for discussion of MicroSquirt (TM) from Bowling and Grippo. The MicroSquirt information site is at www.usEasyDocs.com
Forum rules
Read the manual to see if your question is answered there before posting. If you have questions about MS1/Extra or MS2/Extra or other non-B&G code configuration or tuning, please post them at http://www.msextra.com The full forum rules are here: Forum Rules, be sure to read them all regularly.
herkamer
MegaSquirt Newbie
Posts: 12
Joined: Tue Nov 01, 2005 8:01 pm
Location: Lakewood, Colorado

Spare Output Variables

Post 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?
efahl
Site Admin
Posts: 232
Joined: Mon Feb 16, 2004 3:15 pm
Location: San Clemente, California, USA
Contact:

Post 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
jcorsaro
MegaSquirt Newbie
Posts: 18
Joined: Fri May 07, 2004 1:09 am
Location: San Diego, CA USA

Re: Spare Output Variables

Post 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.
Jeff in San Diego
herkamer
MegaSquirt Newbie
Posts: 12
Joined: Tue Nov 01, 2005 8:01 pm
Location: Lakewood, Colorado

Post 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.
efahl
Site Admin
Posts: 232
Joined: Mon Feb 16, 2004 3:15 pm
Location: San Clemente, California, USA
Contact:

Post 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
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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.
herkamer
MegaSquirt Newbie
Posts: 12
Joined: Tue Nov 01, 2005 8:01 pm
Location: Lakewood, Colorado

Post 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!
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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.
el-hardo
MegaSquirt Newbie
Posts: 15
Joined: Tue Nov 01, 2005 7:16 pm

Post 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
el-hardo
MegaSquirt Newbie
Posts: 15
Joined: Tue Nov 01, 2005 7:16 pm

Post by el-hardo »

can nobody paint such a circuit, please? :(
Post Reply