Slow response on digital brake input?

All sensor specific discussions! Temperature, pressure, steering angle, brake and throttle, etc. Post adaptations of OEM-style sensors, and also your clever DIY hacks and custom designs here too!

Moderators: JeffC, rdoherty, stieg

Post Reply
davef_dci
Posts: 39
Joined: Wed Mar 22, 2017 4:57 am

Slow response on digital brake input?

Post by davef_dci »

Hey folks,

I'd assume I'm having a basic electrical engineering brain cramp here but could use some debugging advice.

I have the brake switch input wired through a 10K resistor into GPPIO(1). this is mapped to a virtual channel Brake_stat.

When I press the brake, Brake_stat immediately goes to 1 - but when I release it, it's taking around 5 seconds to reset back to zero. I'm assuming I screwed up on my resistor choice or wiring and have some weird voltage decay but does anyone have an explanation for this phenomena?

Lua code follows:

brake_status = addChannel("Brake_stat", 10, 0)

(inside on tick)


if getGpio(1) == 0 then
setChannel(brake_status,0)
else
setChannel(brake_status,1)
end

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

It doesn't help your situation but I have a similar setup except I just wired the brake switch on my car to an analog input. Anything over zero and I know the pedal is being pressed. The brake switch on my car has a 12 volt signal.

brentp
Site Admin
Posts: 6282
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

You can try a combination of a 10K input resistor and then a 1K pull-down resistor on the RaceCapture side of the 10K resistor. this might help bleed off any residual charge.

Otherwise, connecting to an analog input is a fine idea as well.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply