Motor m0 brake duration, Motor m1 brake duration – Pololu Qik 2s12v10 User Manual
Page 21

• If the target direction does not match the current direction, the motor speed is immediately set to zero, and
the qik then proceeds to ramp the motor speed linearly from zero to the target speed by adding the value of
the associated acceleration parameter to the speed every 40 ms.
For example, if the M0 acceleration parameter is 1, it takes a stationary motor M0 5.08 s (127 * 40 ms) to reach
a speed of 127. If the M0 acceleration parameter is 127, it takes a stationary motor M0 40 ms to reach a speed of
127. The qik actually updates the motor speed 100 times per second, so the speed is really being incremented by
a quarter of the acceleration parameter every 10 ms, which results in even smoother acceleration.
The following oscilloscope captures show qik acceleration in action. When the yellow line is low, the motor driver
is in coast mode, and when the yellow line is high, the motor driver is driving with one output at VIN and the
other at ground. The left capture shows the effect of using an acceleration of 127, and the right capture shows a
more gradual acceleration using a parameter value of 28. The captures were taken with a low PWM frequency
(310 Hz) to make it easier to see the effect of the acceleration on the motor driver output.
Qik 2s12v10 motor driving from speed 0 to 127
with acceleration of 127 and PWM frequency of
310 Hz.
Qik 2s12v10 motor driving from speed 0 to 127
with acceleration of 28 and PWM frequency of
310 Hz.
Please note that acceleration does not apply to braking or to a speed decrease that does not also result in a change
of direction. Motor speed can also be influenced by current-limit settings, which impose additional constraints on
the logic detailed above. Please see the current-limit parameters, which are documented later in this section, for
more information.
6:
Motor M0 Brake Duration
7:
Motor M1 Brake Duration
default value: 0 (braking on direction change disabled)
allowed values: 0 – 127
When one of these parameters has a value of zero, requested changes of direction for the associated motor occur
immediately. Otherwise, the M0 and M1 brake duration parameters control the amount of time motors M0 and
M1 spend braking before the motor direction is changed from forward to reverse or vice versa. Along with the
acceleration parameters, these parameters provide a great way to smooth out your motor control and reduce
current spikes caused by changes in motor direction.
These parameters represent a time duration in units of 10 ms, so a value of 127 results in a brake duration of
1.27 s. For example, if the M0 brake duration has a value of 50 and M0 is moving forward, issuing an M0-reverse
Qik 2s12v10 User's Guide
© 2001–2012 Pololu Corporation
5. Serial Parameters and Commands
Page 21 of 33