MembersPage/Andrey/SpeedSensor

Another (Kevin's) solution for dragracing gearboost is use simple boostDC vs undriven wheel speed table. Allow to use one sensor for launch/traction and boostcontrol. It was added to latest svn (after 1.1.54) and to my experimentals FWs, if you want to use it choose AltBoost, Simple Openloop and Use BoostDC vs Speed for openloop, do not forget disable 3208 input if it isn't neede.





** the speed-sensing input is same as PS2 CLOCK (INT6) signal (easy to access with removing only endplate). PS2 CLOCK (INT6) is on the 4pin PS2 header at the AVR processor, the 4th pin counted from PCB-edge (endplate).
  • If you want the speed input available on your assembled controller: Ask in order note: choose PS2 option and ask for a FREE cable with overmolded PS2-connector, or instruct PS2/CLK available eg, on EC18/pin2 (or your choice), . This pin is a direct processor pin. It is very sensitive''' (like the mcp3208 inputs). Anything above 5V (eg +12V) or below 0V applied will damage the controller.

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.

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 and/or antirev.

There are 6 config vars for 6gears, speed for each gear at 5000rpm (it can be easy scaled fron any rpm). For unused gears select 255.

Some notes about my gear boost (it is different from default). Each row in boostdc(rpm,kpa) table is reused for gears, bottom row is first gear. Pid use the same rows as reference value. Five gear mults used for pid target downscale. So first tune DC rows in openloop simple mode (disable adc input too) for each gear, after set targetVSrpm table (for last gear - max boost) and target downscale for gears and tune pid coeff. targetVStps could not work, because it is not affect to DC, only to target, and we have small pid coeff.

SpeedConfig.JPG

SpeedGears.JPG