View Single Post
Old 01-25-2011, 05:48 PM   #1 (permalink)
EcoModding Apprentice
Join Date: Oct 2009
Location: Jyvaskyla, Finland
Posts: 143

Golfwagen - '89 Volkswagen Golf mk2
90 day: 107.14 mpg (US)
Thanks: 47
Thanked 34 Times in 28 Posts
ReVolt control parameters


I thought I'd start this thread because I'm feeling a bit confused about some parameters you can set to ReVolt controller. When setting up/tuning the controller one would like to know what each of these codes do. There might be other ways to set parameters but I'm using RTD Explorer for that purpose.

Let's try explaining all the options available. These settings apply to Cougar controller using ATmega chip, revision 2C.

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 the actual PWM output ratio from the controller. Values range from 0 to 511. 0 is full off and 511 is full on.

Current parameters one can set using RTD Explorer:

kp - KP loop value
ki - KI loop value
possible values: 0-500
Default values: kp 2 and ki 160
adjust how quickly the motor current matches what you are inputting via the accelerator. Different values will affect the response and will cause oscillations and a feeling of jerkiness if they don't match the motor and system voltage. (taken from wiki pages)

t-max-rc - Throttle max count (pedal all the way up)
t-min-rc - Throttle min count (pedal all the way down)
Possible values: 0-1023
Default values: t-max-rc 683 and t-min-rc 413
These adjust the throttle position limits. You should set these so you always get zero throttle and full throttle when needed.

t-pos-gain -
t-pwm-gain -
Possible values: 0-128
Default values: t-pos-gain 8 and t-pwm-gain 0
Variables in throttle equation.

Increasing the value of t-pwm-gain will cause the throttle to decrease as the vehicle speeds up and has the effect of making the throttle less sensitive at higher speeds. This is useful for applications that require high amps at low speed and less sensitive throttle at higher speeds. Settings of 16 and 8 would make the throttle twice as sensitive at low speeds; the throttle will become less sensitive as the vehicle speed (and PWM) increase. If PWM were to go to its max, the throttle would return to normal sensitivity. A setting of 16 and 12 would have a similar effect, but the throttle would be at normal sensitivity at 66% PWM and only half sensitivity at 100% PWM. (taken from wiki)

t-fault-rc - Throttle fault raw counts
Possible values: 0-1023
Default value: 100
Raw ADC counts for throttle fault. Time window is 200ms, so these counts must accumulate within 200ms for throttle fault to latch.

c-rr - Current ramp rate (in amps per millisecond)
Possible values: 0-100
Default value: 6
Defines how quickly the throttle responds to controller input. Higher values create a more responsive feel while lower values are smoother and more gradual. (taken from wiki).

pwm-filter - PWM filter for t-pwm-gain
Possible values: 0-3
Default value: 0
There's a low pass filter for the value of PWM in the throttle equation. This sets the level (speed) of filtering. 0 is slowest and 3 is fastest. Most likely, the default value is fine.

motor-os-th - Motor overspeed threshold
Possible values: 0-9999
Default value: 0
RPM equation used in controller software is RPM = c*pwm_duty/current. C is a constant, which is different for each motor/voltage. So setting motor-os-th to 1000 doesn't mean RPM is limited to 1000. It is good idea to start experimenting with low values and gradually increase this value until satisfying RPM limit is reached. Motor load affects RPM limit, so under load RPM limit is a bit higher.

motor-os-ft - Motor overspeed fault time (ms)
Possible values: 0-9999
Default value: 1000
Time (in ms) for which the controller will cut out if it detects overspeed. Overspeed stuff works only on series-wound motors.

motor-os-dt - Motor overspeed detection time (in ms)
Possible values: 0-99
Default value: 10
Time (in ms) for which a fault has to be detected before causing a overspeed fault - prevents nuisance faults

motor-sc-amps - Motor speed calc amps
Possible values: 0-511
Default value: 0
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 - How many PWM counts the mosfets begin to conduct
Possible values: 0-99
Default value: 5
The default should work for most people - this makes the overspeed trip more reliable. Value is estimate of the minimum PWM setting where the drivers start to turn on. It's only used in the overspeed calculation.

bat-amps-lim - Battery amp limit
Possible values: 0-511
Default value: 0
If you want to limit amp draw from your batteries you can set this parameter. Setting value to 0 means there is no limit for maximum battery amps drawn. However there is a hardware amp limiter on control board. This hardware limit controls max motor amps which can't be lower than battery amps. So it essentially limits battery amps too. Hardware amp limiter is adjustable but not via software. Hardware amp limit defaults at around 500A.

pc-time - Pre-charge delay time (1/10th second)
Possible values: 0-999
Default value: 0
Controller's pre-charge circuit starts outputting +12V to J1 connector pin #3 after this time passes. Setting this value to 20 will result in +12V coming out of pin #3 after 2 seconds. 30 means 3 seconds etc. Zero value means no +12V to pin #3 at all.

Last edited by mora; 05-29-2013 at 09:51 AM..
  Reply With Quote
The Following User Says Thank You to mora For This Useful Post:
Brose (09-09-2011)