Gear position switch sensor

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
neoraptor
Posts: 43
Joined: Thu May 16, 2013 3:08 pm
Location: Alsace, France

Gear position switch sensor

Post by neoraptor »

Hello,

I would like to retrieve gear position from the standard harness of my Kawasaki ZX6R.
This sensor is available and has the following characteristics :

Code: Select all

Output Voltage at 1 ∼ 6 Gear Positions
Standard:
1st About 3.0 V
2nd About 2.5 V
3rd About 2.0 V
4th About 1.5 V
5th About 1.1 V
6th About 0.7 V
How should I configure my analog input in order to record a gear position from 1 to 6?
How to display it in Race Analyzer?

Thanks !!

GameboyRMH
Posts: 55
Joined: Mon Jan 07, 2013 10:45 pm

Post by GameboyRMH »

It might be possible through analog input scaling:

http://www.autosportlabs.org/viewtopic.php?t=3688

Otherwise you'll have to do some custom scripting. To display it in RaceAnalyzer you could add the gear channel as a digital gauge.

dimondjack
Posts: 101
Joined: Tue Jan 15, 2013 1:37 pm

Post by dimondjack »

Figure out the analog input scaling so that the rounded (precision 0) value always equals the gear that you want! Setting precision to 0 cuts off all of the decimals, so so long as you have it "close enough" it will give you your correct gear.

neoraptor
Posts: 43
Joined: Thu May 16, 2013 3:08 pm
Location: Alsace, France

Post by neoraptor »

The problem is that I can't give a negative slew rate + offset.
The 3rd option (mapped value) is also not usable as there is only 5 steps (I got 6 speed gearbox), and it doesn't look like it is working with negative slew rate (at least the preview doesn't work).

GameboyRMH
Posts: 55
Joined: Mon Jan 07, 2013 10:45 pm

Post by GameboyRMH »

Looks like you'll have to custom-script it:

http://www.autosportlabs.net/RaceCaptur ... aScripting

Shouldn't be too hard if you have any programming experience. I'd first log the raw values from the gear position sensor with the getAnalogRaw function, then add code to translate raw values into a gear number. I'd use 1/3 of the smallest gap between raw values for different gears on each side of the target raw value as a margin for error.

BUT you can only do this once virtual channel support is in the firmware...until then, I'd say you should log the raw values from the gear position sensor and then use a spreadsheet app to translate them into gear numbers in "post-production."

neoraptor
Posts: 43
Joined: Thu May 16, 2013 3:08 pm
Location: Alsace, France

Post by neoraptor »

Thank you for your answer.
It looks like a nice solution ;)
I will use a post prod script first.

Post Reply