Support » Pololu TReX User’s Guide » 3. Getting Started »
3.e. Automatic Calibration for Your RC/Analog Controller
The TReX has the ability to automatically calibrate itself for your particular RC or analog controller. We strongly recommend you use this feature to calibrate your TReX as it can result in a substantial increase in performance. You only need to perform the calibration once, but you should recalibrate if you ever change controllers. The TReX can simultaneously store a set of analog calibration values and a set of RC calibration values; the calibration values used depends on the mode of operation (or on the value of the “channel input source” parameter if the TReX is running in serial mode).
The TReX calibrates itself by first learning the neutral values of all the channels and then learning the extremes. You can enter learning mode via the secret handshake:
- Power off your TReX.
- Connect your RC receiver or analog controller to your TReX’s channel inputs.
- Turn on your RC transmitter/analog controller. Set the sticks to the positions you would like to consider “neutral” and, if desired, zero your trim settings.
- Attach the channel-mix jumper.
- Attach the learning-mode jumper (i.e. short the serial out pin, SO, to ground, G). You must never attach this jumper while the board is powered!
- Place the mode jumper to select for either RC or analog (whichever type of controller you’re trying to calibrate for).
- Restore power to your TReX. You should see the red and green status LEDs blinking in unison around once per second.
- Remove the channel-mix jumper. If you now see the red and green status LEDs blinking together around four times per second, the TReX is unable to detect a valid RC pulse signal on any of its input channels. If instead you see the red LED turn on solid, you are now in learning mode, which proceeds in the following four phases:
Learning mode phase 1: learning neutrals
While the red LED is on solid, the TReX is attempting to learn the neutral values of all five channels. Do NOT move the control sticks at all while the red LED is on. It should only take around two seconds for this first phase, though it could be much shorter if the TReX encounters problems learning the neutrals for all five channels. If any RC pulse errors occur during the learning process or if the channel variance is too large, the TReX will not learn the channel.
Learning mode phase 2: neutral learning report
Once phase one is through, the TReX will flash its status LEDs five times to indicate neutral-learning success or failure for each channel. A green flash means that the neutral value was successfully learned for the corresponding channel. A red flash means there was a problem and that channel will not be learned. For example, a flash pattern of “red, red, green, red, green” means that neutrals were learned successfully for channels 3 and 5; channels 1, 2, and 4 will not be learned. If all five flashes are red, the learning process terminates here.
Learning mode phase 3: learning the extremes
This phase begins when both the red and green status LEDs light simultaneously and lasts approximately ten seconds. During this time, the TReX is attempting to determine the maximum and minimum values for each of the five channels. You should try to hold each channel at each of its two extremes for at least half a second. Move the control sticks around slowly and steadily. If you jerk them around very rapidly the TReX may reject the channel inputs as unreliable. If any RC pulse errors occur or if the channel variance isn’t large enough, the TReX will not learn the channel.
Learning mode phase 4: final learning report
This phase is identical to phase 2, except here the green flashes represent channels that were fully learned. The flashing pattern will repeat until the TReX is reset. Now every time the TReX starts up, it will quickly flash the LEDs in this pattern to indicate which channels are calibrated and which are not.
Note: Once learning is complete, you should remove the learning-mode jumper and reset your TReX.