Jump to content

Latching GP Outputs for Motorsports Features


castillaricardo

Recommended Posts

Hi all,

I've wanted to setup a hidden switch to enable launch control and gear shift control. I decided on holding the brake and clutch for 5 seconds with the engine off as the switch in a GP Output and the next step was to make it latch. My latching solution was to use a math channel with the pk function, and another GP Output that watches this math channel and the clutch switch, which then feeds the state to the motorsports features. This seems to work well but I wonder if there is a more elegant solution that uses less GP Outputs and no math channel? Maybe using the CAN bus somehow? I played with feeding a CAN DI set to latching but had no luck transmitting and receiving a message in CAN to do this. If someone has a different method or can tell me what I did wrong with CAN I would appreciate the lesson.

Thanks,

Ricardo

Current settings:

vIHE4Kt.png

These are the CAN settings I tried to feed a CAN DI from a CAN AUX. Channel 4 and Channel 5 are using the same CAN ID. There were no errors in the runtime values but CAN DI 1 didn't get a status change. I also tried width of 1, 2, and 8 bits:

7wcxxk1.png

Stream 2:

LMrsABg.png

 

Stream 3:

7m6hSVT.png

Link to comment
Share on other sites

I've setup a hidden momentary switch as a latch function too. Will share the example when I get home.

But just looking at what you've done currently - how do you disable the latch other than cycling power?
Because once you've held the brake and clutch pedal with the engine off your mathblock puts you in this "armed" mode that will activate launch control anytime you clutch?

Link to comment
Share on other sites

Yes, power cycling is the only way to disable it at this time. I’m using the input for Launch Control and Gear Shift Control. This is something I would only use at the racetrack, so it would be ok for now. If you see a way I could disable it without cycling power then that would be sweet! I will eventually purchase a keypad or a CAN switchboard where I can wire buttons to but wanted something simple like this in the meantime.
 

To clarify, LC only activates when I’m stationary and hold the clutch because of the disarming speed lockout. Without the switch GSC would trip on me sometimes in spirited drives which is why I wanted this switch.

Link to comment
Share on other sites

I think Adam's approach is certainly the most elegent here since you're utilizing your brake and clutch to do this.

But if you do put in a dedicated momentary push button this is how I've done mine:

image.png.ed6243b25cb52b7b64a6b01d96198cb1.png

To explain; I ran out of digital inputs so am using an analog input with a pullup resistor and a switch to ground.
So 12v when switch is open, gnd/low when switch is pressed.

I then output the switch to a GP PWM to allow it to be multipurpose. This lets me have different functions when the engine is in a kill state vs running and different TPS levels. This could be tweaked to whatever use case you want. I'm using engine kill because this forms part of my anti-theft.

Then for the latching logic; if the the GP PWM is in the "100%" range for more than 2s the virtual aux goes active.
Then if the switch is inactive AND the virtual aux is already active - meaning you can let the switch go and it'll stay active.
This means as soon as you touch the switch again it breaks the AND logic instantly and unlatches it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...