beautypg.com

Motor m0 current limit / 2, Motor m1 current limit / 2, Motor m0 current-limit response – Pololu Qik 2s12v10 User Manual

Page 22: Motor m1 current-limit response

background image

set-motor command sets motor M0 to full brake for 0.5 s before the qik acts on the set-motor command and starts
moving in reverse.

8:

Motor M0 Current Limit / 2

9:

Motor M1 Current Limit / 2

default value: 0 (current-limiting disabled)
allowed values: 0 – 127

When one of these parameters has a value of zero, current limiting is inactive for the associated motor. Otherwise,
the current-limiting behavior is determined by the current-limit response parameters (see their parameter
description below for more details). Please note that these parameters specify one half of the desired current
limit for each motor. For example, if you want the current limit to be 16 (which corresponds to approximately
2.4 A), you should set this parameter to 8. The current limit is compared to the an 8-bit representation of the motor
current; you can request these motor currents by issuing a get-motor-current command (see

Section 5.g

for more

information). To convert this 8-bit current representation to an approximate current, multiply it by 150 mA. To
convert this parameter value to an approximate current, multiply it by 300 mA (since this parameter is multiplied
by two before being compared to the motor current). Please note that the approximate current can differ from the
actual current by as much as 20%.

10:

Motor M0 Current-Limit Response

11:

Motor M1 Current-Limit Response

default value: 4
allowed values: 0 – 127

The qik lets you limit the current motors M0 and M1 are allowed to draw. It does this by decreasing power to
the motors if their currents exceed the current limits that have been set (see the description of the current-limit
parameters above for more information). Specifically, every time the motor speed is updated, which happens
100 times per second, the current being drawn by the motors is compared to the current-limit parameters. The
following current-limiting logic is then performed every 10 ms:

• If current limit = 0, there is no current limit; take no actions based on motor current, and use acceleration
logic only, if applicable.

• Else if current-limit response = 0, generate a motor-over-current error if the motor current exceeds the
current limit.

• Else add the following signed change to the motor speed, making sure the result does not exceed the target
speed or go negative:
min( acceleration, response * ( current limit – current ) ) / 4

If the current-limiting feature for a motor is enabled (i.e. the current limit parameter is not zero), current limiting
can affect that motor’s acceleration. The current-limit response parameters determine how the motors react when
their currents are in the vicinity of their limits. If a motor’s current is just under the limit and its response
parameter is small, the motor speed may not be allowed to increase as much as would be dictated by the
acceleration parameter alone. If the current is over the current limit, the quantity:

• response * ( current limit – current )

becomes negative, and the effect is a reduction in motor speed. The motor speed continues to drop at a rate
proportional to the difference between the current and the limit until the current equals the limit. You will most
likely need to empirically determine the best response parameter for your particular application.

Qik 2s12v10 User's Guide

© 2001–2012 Pololu Corporation

5. Serial Parameters and Commands

Page 22 of 33