castillaricardo Posted September 14, 2023 Report Share Posted September 14, 2023 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: 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: Stream 2: Stream 3: Quote Link to comment Share on other sites More sharing options...
DerekAE86 Posted September 14, 2023 Report Share Posted September 14, 2023 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? Quote Link to comment Share on other sites More sharing options...
castillaricardo Posted September 14, 2023 Author Report Share Posted September 14, 2023 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. Quote Link to comment Share on other sites More sharing options...
Adamw Posted September 14, 2023 Report Share Posted September 14, 2023 To do it via CAN you would have to wire CAN 1 & 2 together, send it out on one to receive on the other. You could simplify your logic a little, something like this would do it: TTP and castillaricardo 1 1 Quote Link to comment Share on other sites More sharing options...
castillaricardo Posted September 14, 2023 Author Report Share Posted September 14, 2023 Noted about the CAN. I’ll have to pass on this option because I want to use CAN 2 for OBD. Ah that’s great! Will do that. Thanks Adam Quote Link to comment Share on other sites More sharing options...
DerekAE86 Posted September 15, 2023 Report Share Posted September 15, 2023 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: 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. castillaricardo 1 Quote Link to comment Share on other sites More sharing options...
castillaricardo Posted September 15, 2023 Author Report Share Posted September 15, 2023 You approach is nifty and I could use the PWM table portion for some other switches too. Thank you for sharing it! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.