MembersPage/Andrey/SpeedSensor (2008-07-24 11:30:15)

I found that speed sensor option more useful for me than PS2 keyboard.

I have made same RC filter as for hall sensor on triggers (R48 R91 D27 C33), but for INT6 MCU pin. It is possible to use stock hall sensor.

There is one config variable - signal frequency (Hz) for 100kph.

Interrupt disabled every time after sample captured for save cpu time (calc freq 10Hz but sensor freq may be 200Hz)

Speed calc routine is calls from main loop every 100ms and contains division 32/16.

SpeedLogScreen.JPG

Also gear detection possible, but with some notes: sensor should measure driven wheel and gear incorrect while clutch pressed or neutral. Plan to use for boostcontroller.

There are 5 config vars for 6gears. Speed threshold for each gear for 5000rpm point (it can be easy scaled fron any rpm). For example i found on my car 5000rpm points: 1-41kph, 2-77, 3-114, 4-164, 5-200. So threshold points are middlepoints beetwen gears: 2-59, 3-96, 4-139, 5-182. For unused gears select 255.

SpeedConfig.JPG

SpeedGears.JPG