Quote:
One important thing about throttle calculation (taken from wiki):
Throttle = throttle_input * t-pos-gain / 8 - PWM * t-pwm-gain / 8
throttle_input is raw throttle. t-pos-gain and t-pwm-gain are variables one can set. PWM is ?
|
PWM is the actual PWM output ratio from the controller as a value from 0-511. 0 is full off and 511 is full on.
the PWM ratio is analogous to the voltage that the controller is outputting. The output voltage is also roughly correlated to the rpms of the motor. So, if t-pwm-gain is greater than zero, the equation above will subtract more and more from the throttle input as the vehicle speeds up.
When testing the software, I was able to use this feature to make it easier to maintain a constant current draw from the batteries while accelerating. It'll probably vary widely on the motor/gearing selection though.
Quote:
pwm-filter -
Possible values: 0-3
|
There's a low pass filter for the value of PWM in the throttle equation above. This sets the level of filtering. Most likely, the default value is fine.
Quote:
t-max-rc - Throttle max count (pedal all the way up)
Possible values: 0-1023
t-min-rc - Throttle min count (pedal all the way down)
Possible values: 0-1023
|
These adjust the throttle position limits in case you have a weird pot that doesn't close or open all the way. Mine worked with the default settings...
Quote:
motor-os-ft - Motor overspeed fault time
Possible values: 0-9999
motor-os-dt - Motor overspeed detection time (in ms)
Possible values: 0-99
motor-sc-amps - Motor speed calc amps
Possible values: 0-??
pwm-deadzone - How many PWM counts the mosfets begin to conduct
Possible values: 0-99
|
motor-os-ft: the number of ms for which the controller will cut out if it detects overspeed. (all the overspeed stuff works only on series-wound motors, btw).
motor-os-dt: number of ms for which a fault has to be detected before the fault causes a shutdown - prevents nuisance faults
motor-sc-amps: sets the motor amps limit below which overspeed sensing is disabled. There was a problem where it would trip if you released the pedal quickly and throttle would be lost for a quarter second or whatever the fault time is. This solved it. For a first guess at a value, place the car in neutral. Depress the pedal until the motor just starts to turn (just enough to overcome friction). Set motor-sc-amps to half the current required to get the motor to just start turning.
pwm-deadzone: as decribed above - the default should work for most people - this makes the overspeed trip more reliable.