TRex Question

We are using a TRex to power two small motors in non-mixing mode and RC signal source. The motors have limit switches at both ends of travel. When we move from full forward to full reverse (particularly when the motor has triggered one of the limit switches) the TRex flashes status lights green twice, red twice and then enters safe mode until the controls are brought back to neutral (center). We have been able to deliberately cause the condition by flipping directions rapidly one direction to the other on channel 2, but only irregularly and with concious effort.

What does that status blinking sequence mean?
Can the controller be set to avoid the shutdown or will rewiring our limit switches be necessary?

BTW the TRex has been working very well with all our robots and we have not seen this issue in any standard wiring configuration.


It sounds like you are having a power supply issue. I suspect the input voltage is dropping below some acceptable threshold when motors rapidly change direction, which in turn is causing the TReX to reset itself. If you have an oscilloscope, you can monitor your power line and see if this is indeed the problem. The LED sequence you describe is the startup sequence: it tells you which channels are learned and then the TReX enters safe-start mode.

There are a few things you might try to avoid this problem:

  1. Improve your power supply (e.g. get a new power source that can better deliver the current your motors are trying to pull and/or add a few large capacitors between power and ground).

  2. Configure the TReX so that your motors change directions more gradually. If you have a USB-to-serial adapter or a computer with a serial port, you can use our TReX Configurator program to adjust the the TReX’s acceleration and brake duration parameters. Acceleration affects how long it takes the TReX to speed up a motor and brake duration specifies how long (in hundredths of a second) the motors should first spend braking when they receive an acceleration command that causes them to change direction.

The default acceleration for the TReX is 80, which means the TReX will accelerate a motor from 0 to full speed (127) in approximately 160ms. The default brake duration for the TReX is 0, which means the TReX will not brake the motors at all when the direction changes. If you change the brake duration to be something like 20, an acceleration command that changes the motor’s direction will cause the motor to brake full for 200ms before it begins accelerating in the new direction. By adding in a brake duration parameter and decreasing your acceleration, you can lessen the affect the motors are having on your power supply voltage.

Please let me know if you want me to explain the TReX’s configuration parameters further, or if you need any help using the TReX Configurator software.

- Ben

We are powering a 12V, 1A motor with a 33Ah SLA battery and a test with the oscilloscope indicated that the power supply was good - very very little fluctuation when the load was switched in.

The braking programming sounds possible, however during testing under the oscilloscope we found that the reset occurs whenever the load is abruptly switched in while the speed controller is above about a setting of 50%. Below that setting there is no reset when the load is switched in. Even above 50%, if the load is switched in slowly there is no reset. Unfortunately we need to switch the controller output to one of several different loads as part of our application.

This would seem to indicate power is indeed pulled away from somewhere rather than a acceleration/braking issue or some kind of current limitation kicking in for some kind of high amperage but low duration surge when the load is switched in.

Any thoughts? We’ve tried a different Trex and we know that other speed controllers using the same H-bridge chip can handle the switching, but we’re really looking forward to using the built in mixing, aux switch and everything else that comes with the Trex in place of the older speed controllers.


If the problem is occuring as a result of abruptly switching loads, the second suggestion I made involving configuration parameters will probably not be so helpful. The only thing I can think of suggesting at this point is putting some big capacitors across your power lines, or possibly wiring things differently. This definitely sounds like a noise issue on the power line.

Could you provide us with some detail about how you are switching your loads? Which speed controllers have you used successfully under these same conditions?

- Ben

The other speed controller was the Parallax HB-25. Good controller, but it locks into a reset if you power it on before the receiver is fully powered up. Pain in the you-know-what that. It uses the same H-bridge chip but includes a big heatsink and fan. We add a fan to pretty much all of our T-Rex installs.

We are switching the loads using the time honored swiches pressed by servos controlled by a stick on an RC controller. Move the stick forward and the speed controller provides power, move the stick to the left or right and a servo presses a lever switch which connects either the left or right motor. Since the user could select the motor after giving the controller power an acceleration adjustment on the speed controller wouldn’t help. We’re going to solve this issue by changing the wiring on the motors to have the speed controller drive both motors when the user advances the stick and either the left or right when they move it to one side or the other. Although the user will rarely want to move both motors at once the setup will encourage them to move the controller to the left or right before advancing it and solve the issue through ‘social engineering.’

The other issue with the same speed controller (we have yet another servo switch which directs the controller to power a third and fourth motor) is related to limit switches. These motors are set up such that one is driven by each side of the speed controller so moving the stick forward drives one of the motors to forward until it hits a limit switch which swiches the current through a diode. The diode will only allow current to flow such that movement is away from the limit switch. When the user flips from moving forward to moving backward while the limit switch is engaged the controller resets. Again it seems to be related to suddenly going from a forward no load condition (diode is preventing current from flowing but the voltage is there) to a 1 amp load the opposite direction. We’ve solved the issue with a workaround. Now rather than switching in a diode and having the speed controller to provide voltage but zero amps the switch switches in a 50 ohm resistor at the same time as the diode engages so there is a continous load on the controller. Seems to work fine and we won’t even lose too much power to heat because the user is unlikely to hold the motor against the limit switch for extended periods.

So - thats it. I guess we solved the issue via workarounds, but the reprogramming might have helped with the second condition if we had attempted it. Thank you for your help - looks like we’ll be using the Trexes in another 10 or so robots next month.

I’m very glad to hear you were able to get things working!

- Ben