B. channel calibration, C. general rc information, D. general analog information – Pololu TReX User Manual

Page 15

Advertising
background image

4.b. Channel Calibration

As was covered in

Section 3.e

, you can automatically calibrate your TReX for your RC or analog controller. If this

doesn’t prove sufficient for your needs, you can manually calibrate your TReX for your controller by specifying the
minimum, neutral, maximum, and deadband values for each channel. The TReX can simultaneously store both a
set of RC and a set of analog calibration parameters. The calibration parameters are in the units of the raw channel
values: 0.4 us for RC, 4.89 mV for analog. In general, these parameters affect how the TReX interprets the channel
input values.

Perhaps most noticeably, these parameters help determine how the channel inputs affect the motors. Motor speed
is scaled linearly (or parabolically, if the channel is set as parabolic using the “parabolic channels” configuration
parameter) from 0 at a channel input of neutral+deadband to max speed at a channel input of maximum. In the
other direction, motor speed goes from 0 at neutral-deadband to max speed at minimum. Motor speed is 0 for
channel inputs between neutral-deadband and neutral+deadband, and motor speed is at a maximum for channel
inputs greater than maximum or less than minimum. Motor direction is determined by the side of neutral the channel
input is on, and notions of forward and reverse can be switched on a channel by channel basis using the “reversed
channels” configuration parameter.

4.c. General RC Information

When the channel inputs are RC servo pulses, the update rate of the channel values is determined by the pulse-train
frequency of your RC receiver. Typically this is 50 Hz (each channel updates every 20 ms). The TReX can handle
channel pulse-train frequencies of 10 Hz to 125 Hz.

The TReX measures the width of RC servo pulses with 12-bit resolution and an accuracy of 1 us. The raw channel
value is provided as a 12-bit number in units of 0.4 us, so a raw channel value of 2500 can be physically interpreted
as a pulse width of 2500×0.4 =1500 us. Servo pulse widths typically range from 1 ms to 2 ms, with a neutral value of
1.5 ms. This would correspond to raw channel values of 2500, 5000, and 3750, respectively. The TReX can handle
pulse widths as short as 0.5 ms (raw channel value 1250) and as long as 2.5 ms (raw channel value 6250). If a channel
reading is considered to be an error, the raw channel value will be 0xFFFF (65535 in decimal). Errors result from
pulse widths outside the acceptable range and from pulse trains with frequencies outside of the acceptable range. If a
signal ceases on a channel, that channels value will stop updating until approximately 150 ms elapse, at which point
the channel’s raw value will become 0xFFFF. It will remain as such until valid signals are once again detected on the
line.

As a safety feature, you can designate channels as required using the “required channels” configuration parameter. If
a required channel goes for more than 500 ms without receiving a valid RC servo pulse and the TReX is in RC mode,
the TReX will enter safe-start mode (see

Section 4.e

). By default, the TReX only requires channel one.

If you are not using all five channels, you can optionally ignore unused channels via the “ignored channels”
configuration parameter. Ignored channels are treated as fixed at their neutral values (no matter what signals their
lines receive).

4.d. General Analog Information

When the channel inputs are analog voltages, the update rate of the channel values is approximately 50 Hz (each
channel updates every 20 ms or so). Each channel’s value is the result of a 16-sample average of analog-to-digital
conversions.

The TReX measures analog voltages with 10-bit resolution. The raw channel value is provided as a number ranging
from 0 to 1023, where 0 corresponds 0 V and 1023 corresponds to 5 V. Your channel source can be as simple as the
output of a potentiometer whose inputs are the channel’s associated power (make sure the BEC jumper is in place)
and ground connections.

Pololu TReX User's Guide

© 2001–2013 Pololu Corporation

4. RC/Analog in Detail

Page 15 of 24

Advertising