beautypg.com

Input scaling, Input analog to digital conversion, Serial interface – Pololu Jrk USB User Manual

Page 17: Manually set target (serial mode only)

background image

Input scaling

The scaling options in this tab determine how the raw input values map to target values, which determine the output
of the system. The parameters Maximum and Minimum should be set to the maximum and minimum possible values
of the input device; these will be scaled to the target values specified in the right column. For input devices with a
clearly defined neutral position, such as joysticks, parameters Neutral Max and Neutral Min are provided. Any input
between Neutral Max and Neutral Min will be scaled to the neutral value specified in the right column. Setting the
two neutral values to be different allows for a “dead zone”, which is especially desirable in speed control mode. If
the input leaves the range specified by the Absolute Max and Absolute Min parameters, an Input disconnect error will
occur. For convenience, the Invert input direction option is provided. Select this option to switch the positive and
negative input directions.

By default, the scaling is linear, but you can change the Degree parameter to use a higher-degree polynomial function,
which gives you better control near the neutral point.

Clicking the button labeled “Learn…” allows scaling values to be determined automatically: with the motor off,
the program will request that the input be set to its minimum, maximum, and neutral positions, and the resulting
values will be recorded. After learning, if the neutral position is not important for your system, you may uncheck
“Asymmetric” to automatically center the neutral values between minimum and maximum.

Input analog to digital conversion

In analog mode, the analog to digital conversion panel lets you specify the number of analog samples to average
together each PID cycle, which determines the precision and speed of the analog to digitial conversions. The indicator
labeled “PID period exceeded” at the top of the window is provided as a warning for when the analog sampling takes
more time than the specified PID period.

Selecting the Detect disconnect with AUX option activates an extra feature that allows the jrk to detect if the RX pin
becomes disconnected from the analog voltage input device or shorted to 5 V. This option is intended for use in analog
voltage input mode with a potentiometer connected between AUX and ground. When the option is selected, the jrk
will periodically drive the AUX pin low, verifying that this results in a 0 V signal at RX. If the line does not respond
as expected, the Input disconnect error will occur.

Serial interface

This panel allows the serial ports of the jrk to be configured, including specifying a fixed baud rate and enabling or
disabling a CRC byte for all commands. The Device Number setting is useful when using the jrk with other devices in
a daisy-chained configuration, and the Timeout specifies the duration before which a Serial timeout error will occur
(a Timeout of 0.00 disables the serial timeout feature).

For more details on the serial interface, especially for selecting the appropriate mode for your system, see

Section

4.a

.

Manually set target (serial mode only)

This section is provided for debugging and testing systems without using an input device. The target may be specified
directly with the scrollbar or numerical input.

Pololu Jrk USB Motor Controller User's Guide

© 2001–2014 Pololu Corporation

3. Configuring the Motor Controller

Page 17 of 45