RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Slow response on digital brake input?
Author Message
Reply with quote
Post Slow response on digital brake input? 
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

View user's profile Send private message
Reply with quote
Post  
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.

View user's profile Send private message
Reply with quote
Post  
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
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum