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 Jr 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.
Unlike with RC signals, the TReX Jr has no way of telling if a channel is receiving a valid analog signal. A disconnected channel will still produce a result when run through the analog-to-digital converter. This poses two potential problems:
- If your analog signal source gets disconnected from your TReX Jr, the TReX Jr could drive the motors in unexpected and potentially dangerous ways. Because of this, please be very careful when operating the TReX Jr in analog mode.
- Unused channels can impact behavior of the TReX Jr in undesirable ways. You may not plan on using the flip or override channels, but leaving them disconnected could result in their floating to a value that would enable flipped mode or serial override. One solution to this problem is to use the “ignored channels” configuration parameter to set unused analog channels as ignored. The TReX Jr considers ignored channels to be fixed at their neutral positions. An alternate, purely hardware-based solution would be to short any unused motor channels to a used one and to tie any unused “enable” channels (4 or 5) to Vcc (the 5-volt line). By shorting unused motor channels to a used one, you should be able to get past the safe-start portion of the TReX’s start-up routine.