I think my TReX Jr just died, what did I do wrong?

I just started testing out my TReX Jr on my Arduino this evening. Everything was working fine until I increased the motor speed from 50 to 120. It ran fine for a few seconds, then just died. No lights come on and it’s definitely got a burnt smell coming from it. I’m sure it’s dead, but I’ll need one ASAP and want to know what I might have done wrong as to not repeat it.

Not sure where to begin describing my setup, so I’ll start with my Arduino code:

#include <SoftwareSerial.h>
#define txPin 4
#define rxPin 5

SoftwareSerial pololu(rxPin, txPin);   // Setup TReX communication

const int Fwd    = 217;   // 0xDA Forward both motors
const int Rev    = 214;   // 0xD5 Reverse both motors
const int Brake  = 208;   // 0xD0 Brake both motors
const int rLeft  = 218;   // 0xD9 Motor1 reverse, Motor2 forward
const int rRight = 213;   // 0xD6 Motor1 forward, Motor2 reverse
const int tLeft  = 216;   // 0xD8 Motor1 brake, Motor2 forward
const int tRight = 209;   // 0xD2 Motor1 forward, Motor2 brake

void setup(){
   Serial.begin(9600);
   pololu.begin(19200);
}

void loop(){

   Drive(Fwd,120,120);
   Serial.println("Forward");
   delay(5000);
   
   Drive(Brake,0,0);
   delay(1000);
   
   Drive(Rev,120,120);
   Serial.println("Reverse");
   delay(5000);
   
   Drive(Brake,0,0);
   delay(1000);

}

void Drive(int dir, int motor1, int motor2){
   
   pololu.write(dir); 
   pololu.write(motor1);
   pololu.write(motor2);
   
   Serial.print("Direction: ");
   Serial.print(dir);
   Serial.print("  Command: ");
   Serial.println(dir);
   
   Serial.print("Motor 1: ");
   Serial.print(motor1);
   Serial.print("  Motor 2: ");
   Serial.println(motor2);  
   
}

The motors I’m driving are the 50:1 Metal Gearmotor 37Dx54L mm with 64 CPR Encoder ([url]Pololu - 50:1 Metal Gearmotor 37Dx54L mm 12V with 64 CPR Encoder (No End Cap)).

  • M1 A/B & M2 A/B connected to the red/black wires on the motors.
  • Vin/Gnd to 11.1v Li-Ion battery pack.
  • Arduino Pins 4/5 to the TReX Jr Rx/Tx, respectively
  • Tx/Rx Gnd to Arudino and battery pack ground
  • The motors were not connected to anything (no load)

As I said, initially I was running the motors at speed 50 very well for about 15-20 min while I was testing out the different motor commands.

   Drive(Fwd,50,50);
   Serial.println("Forward");
   delay(5000);
   
   Drive(Brake,0,0);
   delay(1000);
   
   Drive(Rev,50,50);
   Serial.println("Reverse");
   delay(5000);
   
   Drive(Brake,0,0);
   delay(1000);

But shortly after changing the speed to 120 (as in my original code) the TReX’s lights went out and began smelling burnt. I left it to cool for an hour or so (until it was room temp to the touch), then connected it back as described above with no luck. Instantly it started heating up again and the burning smell came back.

Per the TReX and motor’s specs, the TReX should handle 2.5A per channel and the motors only have a free-run current draw of 300 mA, so I don’t see how I could have overloaded it, even just increasing the speeds, but it seems that’s what happened.

Not sure what I did wrong here, any ideas/suggestions?

Hello.

It sounds like that motor might have drawn enough current to damage the board. When accelerating quickly, motors can draw up to their stall current. In addition, a fully charged Lipo can have a voltage above 12V, which would increase the current the motor draws. One way of to reduce the inrush current is to implement acceleration limiting. The TReX Jr has a feature called the acceleration parameter that can be used to limit the motor’s acceleration. You can read more about it in the TReX Jr configuration parameter documentation.

If you tell me more about your setup, I might be able to better determine what might have caused the damage. Could you post pictures of your setup that show all connections and closeups of the board that show the damage?

- Grant

That make sense about the current load on immediate take offs. Since I used the set motors and not accelerate, that might have done it. Especially when it worked at speed 50, but speed 120 seemed to trigger it.

Unfortunately I took everything down already. There wasn’t much to it, just the two power connections to the motors, power in from the battery pack, the Tx/Rx/Gnd connections to arduino…I think that’s it. I can post pictures of the board, though there really isn’t a “burnt” spot. I suppose if I left it on for a while it might, it heats up almost instantly supplying power to it. But I don’t leave it plugged in for more than 10-15s at a time.

I don’t suppose there’s a over-current shutdown that triggered? Something I might need to like jumper something or reset somehow?

Drawing to much current is one possible way the TReX Jr was damaged. However, I am not entirely convinced that was what happened because the motor driver on the TReX Jr is pretty robust and has many features to protect it, such as over current protection. If you have the ability to take some high resolution close up pictures of the board, I can check to see if there are any signs of damage that might provide more insight into what happened.

Separately, if you would like to try again, you can email us at support@pololu.com with a reference to this post and your order information, and I might be able to help you with a discount on a new TReX Jr.

- Grant

FWIW, motors are large inductors, and may work as boost converters. You can achieve spikes of twice the input voltage, so your controller needs to be able to deal with that. Having burned a 18V25CS controller with 4S LiPo and the same motor, I know this is not just theoretical :slight_smile:

Sorry it’s taken me so long to reply. I hope it’s proper etiquette to reply here as opposed to opening a new thread. We ended up getting the regular TReX as a replacement and moving forward, so figuring out the issues with the Jr was kind of forgot about, but finally started revisiting the issue this week. Linked below are images of the board. I tried to get every piece, but if there’s something I missed, or you’d like more detail on anything specific, let me know. These were taking with my phone through a viewfinder, but I have access to a digital microscope.

When supplying power just the board (tried 5-12v w/ 200mA current limit) with no motors attached, the actual voltage across the Vin and GND remains at a constant 3v (+/- 0.05v), supply current is maxed out, and none of the LED indicators turn on. This sounds like it’s a short somewhere, possibly a blown capacitor? I have access to decent test equipment, if there’s anything I can check out just let me know.

I’m hoping it’s just a few bad parts that I can replace ILO scraping the entire board.

Images: imgur.com/a/2CMPI#0

Thanks for the update and pictures. I am glad that the TReX is working for you. I don’t see any obvious signs of damage in those pictures of the TReX Jr. I am also not sure of any specific part that would be good to test. In general, if there is a short on the board, there could be multiple components damaged, so it might not be practical to repair.

- Grant

There’s definitely a short between the In/Out on the LDO. Got a new one on order. What are the three components off the output of the LDO? Are they inductors? I don’t suppose there’s a schematic I can get?

We do not make the schematic available for that board. At the point that one of the components on the board is breaking, it is likely that other components might be damaged anyway and is probably not worth trying to fix.

- Grant