Failed Smc05a Motor Controller

Hi, I was recently using my Smc05a motor controller over xbee to drive two motors on my robot.

The motor controller had been working perfectly for the last five months until today when it failed unexpectedly during typical use.
I’ve had no issue with the motor controller before, and I haven’t changed the wiring nor the code in the time since then.

The code supplied is the exact code that was working and in use before the motor controller failed. It runs on the receiving Arduino Uno on the back of the robot and communicates with the transmitter (Arduino Uno + Xbee + Xbee shield + joystick shield) over serial.

I’ve already double-checked the Xbees in case they were the source of the problem but they’re still working properly.
Besides the Xbees, they’re are no other additional parts besides a switch, an indicator LED and of course, the motors.

It’s unlikely both motors failed at the exact same time and I’ve also inspected that they still work.
Furthermore I’ve swapped the batteries and replaced them with fully charged batteries to see if that was the issue.

The motor controller is powered by 4 AA batteries and so never exceeds 7V at any time.
The Serial Input pin of the motor controller is connected to the Arduino and doesn’t exceed 5.5V.
The reset pin is connected to pin 8 of the Arduino and I have a function in my code that takes it LOW and then HIGH with a 100ms delay before any serial data is sent as recommended.

I also have a safety switch in place so no data is transmitted to the motor controller when I upload code to the Arduino.

Again, I would like to say that I haven’t changed the wiring in some time and the motor controller was in use when it failed. The fault wasn’t with accidentally uploading code to the motor controller, overheating, lose wiring or drawing too much power. It failed in use when it stopped responding to serial commands over the Xbees.

Since the motor controller failed I’ve tried to run it without the Xbees and every other inessential component but to no avail.
I haven’t had any of the LEDs on the motor controller light since it broke down. As well as that there’s no evidence that the motor controller burned out or signs of damage on the chip.

Below is the code for the Arduino Receiver and Arduino Transmitter that was running when the motor controller was in use.

Transmitter:

const byte PIN_ANALOG_X = 0;
const byte PIN_ANALOG_Y = 1;

void setup()
{
  Serial.begin(9600);  
}
void loop()
{
  int throttle = 0;
  throttle = analogRead(PIN_ANALOG_Y);
  throttle = map(throttle, 0, 1023, -127, 127);
  int Direct = 0;
  Direct = analogRead(PIN_ANALOG_X);
  Direct = map(Direct, 0, 1023, -127, 127);

  if(throttle>0 && (Direct >= -50 && Direct <= 50))  /*FORWARDS*/
  {  
    Serial.println("F"); 
  }
  else if(throttle<0 && (Direct >= -50 && Direct <= 50))  /*BACKWARDS*/
  {
    Serial.println("B");
  }
  else if (Direct<-50 && throttle>=0)  /*LEFT*/ 
  {
    Serial.println("L");
  }
  else if (Direct>50 && throttle>=0)  /*RIGHT*/ 
  {
    Serial.println("R");
  }
  else if (Direct<-50 && throttle<0) /*LEFT BACKWARDS*/
  {
    Serial.println("A");
  }
  else if (Direct>50 && throttle<0) /*RIGHT BACKWARDS*/
  {
    Serial.println("D");
  }
  else  /*STATIONARY*/
  {
    Serial.println("S");
  }
  delay(250);
}

Receiver:

int rst = 8; //reset pin of motor controller connected to digital pin 8
char msg = ' '; //contains the message from the arduino transmitter
int ledPin = 13;

void setup()
{
  Serial.begin(9600);
  
  pinMode(ledPin, OUTPUT);
  
  pinMode(rst, OUTPUT);

  digitalWrite(rst, LOW); 
  delay(100); 
  digitalWrite(rst, HIGH); //reset pin must be kept high to operate
  delay(100); 
  
}

void loop()
{
  
  //Note: 0x05 - BACK LEFT, 0x07 - BACK RIGHT
  
  while(Serial.available() > 0) {
    
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin, LOW);
    delay(500);
    
    msg = Serial.read();
    
    if(msg == 'F'){        /*FORWARDS*/
      //motor_left 0x05 & 0x04
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x04); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      //motor_right 0x07 & 0x06
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x06); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      
      Serial.println("Received:" + msg);
    }
    if(msg == 'B'){                              /*Backwards*/
      //motor_left 0x05 & 0x04
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x05); //motor # and direction, binary: 101
      Serial.write(127); //motor speed  
      //motor_right 0x07 & 0x06
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x07); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      
      Serial.println("Received:" + msg);
    }
    if(msg == 'L'){                                  /*LEFT*/
      
      //motor_left 0x05 & 0x04
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x05); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      
      //motor_right 0x07 & 0x06
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x06); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      
      Serial.println("Received:" + msg);
    }
    if(msg == 'R'){                                  /*RIGHT*/
    
      //motor_left 0x05 & 0x04
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x04); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      
      //motor_right 0x07 & 0x06
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x07); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      
      Serial.println("Received:" + msg);
    }
        if(msg == 'A'){                        /*LEFT BACKWARDS*/
      
      //motor_left 0x05 & 0x04
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x04); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      //motor_right 0x07 & 0x06
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x07); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      
      Serial.println("Received:" + msg);
    }
    if(msg == 'D'){                        /*RIGHT BACKWARDS*/
      
      //motor_left 0x05 & 0x04
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x05); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      //motor_right 0x07 & 0x06
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x06); //motor # and direction, binary: 101
      Serial.write(127); //motor speed
      
      Serial.println("Received:" + msg);
    }
    else if(msg == 'S'){                          /*STATIONARY*/
      //motor_left 0x05 & 0x04
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x05); //motor # and direction, binary: 101
      Serial.write(0); //motor speed
      //motor_right 0x07 & 0x06
      Serial.write(0x80); //start byte
      Serial.write(0x00); //device byte
      Serial.write(0x07); //motor # and direction, binary: 101
      Serial.write(0); //motor speed
      
      Serial.println("Received:" + msg);
    }
  }
}

I appreciate in advance any help offered, thank you.

P.S I wasn’t able to upload any photos besides the invoice because I kept getting the error - “This attachment is invalid”


Hello.

The only LEDs on the board are connected to the motor channels, so if the motor channels are not outputting anything, the LEDs will not light up.

Photos of your setup would be helpful. Your photos might have been rejected if they were too large (above 1 MB). If they were too large, could you try compressing the photos to under 1 MB and uploading them again? Alternatively, you could try uploading them on image-hosting sites like Photobucket or ImageShack and use the “IMG” tags to post them.

- Jeremy

Thanks for your response. I had already compressed the images and even tried converting to pngs but neither way worked so here’s a link to a flickr gallery instead:

flickr.com/photos/68350700@ … 439530226/

Like I said I’ve been using this motor controller for quite some time and I’m aware the LEDs won’t light unless the motor channels are outputting.
I’ve also removed the Xbees and unnecessary parts to seek the root of the problem although to no avail. So far as I’ve discovered, it doesn’t seem to be a problem with the other components.

I do not see anything obvious from the photos. If you already tried removing all the other components and could not drive your motors by sending serial commands directly from your Arduino, it sounds like the dual serial motor controller is broken. If you contact us directly at support@pololu.com referencing this forum post, we might be able to help you with a discount on a replacement.

- Jeremy

JeremyT,
you have been assisting my son in diagnosing an issue with the Smc05a motor controller and I believe arrived at a conclusion that the item faulty. This item was purchased originally by me on behalf of my university and was in fact a replacement for the same part which was also diagnosed as faulty (by Jeremy).
I have again contacted Robotshop who supplied the part (and its replacement) with a view to arranging a refund given the disappointing performance of the item. I have provided this transcript as evidence of the fault to Robotshop and would ask that you assist them to arrange a refund for the item.

Sincerely,
John Kelleher
IT Sligo.
kelleher.john@itsligo.ie

Hello, John.

I did not conclude the unit was “faulty”. The word “faulty” suggests a pre-existing flaw, which is not likely given that the unit “had been working perfectly for the last five months”. We do not think a refund is appropriate.

- Jeremy

Dear JeremyT,
perhaps you can advise me therefore on your warranty. Though my office has been in receipt of this item for perhaps 5 months, it has only been ‘in use’ for a couple of weeks. What warranty or mtbf should I expect from Pololu products? Under EU Consumer Law the item you provide into the EU has to be ‘fit for purpose’ and clearly the performance of this product falls patently short of this standard.
I am looking at significant procurement to kit out an electronics lab next semester and this research is in preparation for that order. I trust that you can appreciate that it is important that good customer relations are paramount and in this instance would ask that you revisit the situation and conclude that my dept is in receipt of an item that, despite our best efforts, has failed to perform and that a refund is the right course of action.

Sincerely
John Kelleher

John,

I had another reply for you yesterday, but I wrote this new one after others here thought my original proposal might come off as angry or that it insufficiently justified those tenets that are self-evident to some of us but in opposition to what many others believe.

First off, we have no warranties. However, we take quality seriously (we do 100% automated inspection of our assemblies and functionally test every unit we manufacture) and stand behind our products. We agree that good customer relations are important, and we generally work very hard with our customers to resolve any issues and to take responsibility for any failings on our part. However, we expect our customers to appreciate that our products can be damaged in a myriad of ways and to take responsibility for their own mistakes.

Good vendor-customer relations are a two-way concern for us, and just as you should come down hard on vendors that try to outright cheat you, we come down hard on customers who abuse us. By “come down hard”, I mean not tolerate, and by not tolerate, I mean avoid interacting with and openly, publicly repudiate the actions of the other party as I am doing here.

I do not want to throw around terms like “customers who abuse us” lightly. There are two things in your posts that I see as particularly vile and worthy of denunciation.

First, it strains credulity to think your son, who is apparently the one actually using the motor controller, would accidentally say “the motor controller had been working perfectly for the last five months” if it’s only been a few weeks as you later claim. You have given us further reason to doubt your honesty and integrity in our discussions by repeatedly changing statements of ours like “sounds like it’s broken” into claims along the lines of “you acknowledged yourselves that it was defective”.

The second reprehensible thing you are doing is more subtle, but that is what makes it so insidious: you are basically threatening us with force by appealing to some government regulations (which do not even apply to us) while still pretending we might be friends that can do business together. That clumsy attempt at carrot-and-stick manipulation will not work here because we see it for what it is: no different in principle than coming to our office with a gangster and threatening to break our windows while still wanting to continue engaging our services. If you think we have wronged you so much that you must appeal to a third party to resolve this by force, do not expect us to put any stock in your dangling a “significant procurement” in front of us.

It is fine to have different expectations and to negotiate toward different agreements. You might choose to buy eggs only from a store that apologizes to you and gives you another one if you drop one or to buy strawberries only from a farmer who will return the money you paid if a strawberry does not taste as good as you expected. I am not that farmer, but I happily grant you the right to find such farmers and to conduct business with them on the terms you mutually agree upon. However, I will forever fight the notion that you or any government has any right to force your preferred terms of business upon me and my voluntary customer.

I suggest you take your business elsewhere and then treat that other business with more honesty and respect.

- Jan