Pololu mc33926 always fault

Hello,

I buy a Pololu mc33926 motor driver to recover an old rc car. I use it with an arduino Uno and connected like a shield.

I use a bluetooth HC-06 and an android app called “Bluetooth RC Controller” to move the car.

My code is a modification of the demo code from Pololu library.

[code]#include <SoftwareSerial.h>
#include “DualMC33926MotorShield.h”

const int MAX_VEL = 280;
const int MAX_GIRO = 350;
const int AVANCE = 20;

DualMC33926MotorShield md;
SoftwareSerial BT(3,6); //5 RX, 6 TX.

int velocity = 0;
int giroActual = 0;
float currentVel = 0;
char dataIn = ‘S’;

void setup() {

//Iniciamos el Bluetooth
BT.begin(9600);
Serial.begin(9600);

//Iniciamos el motor drive
md.init();
}

void loop() {

currentVel = md.getM1CurrentMilliamps();
Serial.print("Vel: “);
Serial.print(velocity);
Serial.print(”, I: ");
Serial.println(currentVel);

//Comprobamos si hemos recibido un dato nuevo y actualizamos nuestra variable
if(BT.available())
{
dataIn = BT.read(); //Guarda los datos carácter a carácter en la variable “dato”
Serial.println(dataIn);
} //if BT Available

//Segun el ultimo caracter recibido actuamos de una u otra manera
if (dataIn == ‘F’){ //Forward
goForward();
noTurn();
} else if (dataIn == ‘B’) { //Backward
goBackward();
noTurn();
} else if (dataIn == ‘L’) { //Left
stopCar();
turnLeft();
} else if (dataIn == ‘R’) { //Right
stopCar();
turnRight();
} else if (dataIn == ‘I’) { //Right Forward
goForward();
turnRight();
} else if (dataIn == ‘J’) { //Right Backward
goBackward();
turnRight();
} else if (dataIn == ‘G’) { //Left Forward
goForward();
turnLeft();
} else if (dataIn == ‘H’) { //Left Backward
goBackward();
turnLeft();
} else if (dataIn == ‘S’) { //Stop
stopCar();
noTurn();
}
}

/*** FUNCIONES DE MOTOR ***/
//Gira las ruedas a la derecha
void turnRight() {

//if (giroActual != MAX_GIRO) {
md.setM2Speed(-MAX_GIRO);
giroActual = -MAX_GIRO;
stopIfFault();
//}
}

void turnLeft() {
//if (giroActual != -MAX_GIRO) {
md.setM2Speed(MAX_GIRO);
giroActual = MAX_GIRO;
stopIfFault();
//}
}

void noTurn() {
md.setM2Speed(0);
stopIfFault();
}

void goForward() {
velocity += AVANCE;

if (velocity >= MAX_VEL) {
velocity = MAX_VEL;
}

md.setM1Speed(velocity);
stopIfFault();
}

void goBackward() {
velocity -= AVANCE;

if (velocity <= - MAX_VEL) {
velocity = -MAX_VEL;
}
md.setM1Speed(velocity);
stopIfFault();
}

void stopCar() {
velocity = 0;
md.setM1Speed(velocity);
stopIfFault();
}

//Medida de prevenci´n en caso de fallo del Motor Shield _SF
void stopIfFault()
{
if (md.getFault())
{
Serial.println(“fault”);
velocity = 0;
stopCar();
while(1);
}
}
[/code]

All is fine when the wheels are on the air, but when I put the car on the floor the code always goes to fault.

Someone can help me with this problem? I don’t know if it’s a problem with the dc motor or the battery (Ni-Mh 9,6V 2300mAh).

The circuit is simple with only the motor shield and an Arduino Uno conected to the battery (not visible) and the front and rear motors and in a protoboard is the bluetooth.

I’m new in electronic and I don’t understand how current works. My battery have 2300 mAh that is less than 3A, but I understand that the “hour (h)” in units is important but I don’t know the difference. Can I know how much Amp provide my battery?

I try to limit MAX_VEL to 250 instead 400 but the problem persists.

What can I do? Thanks

Hello.

I am sorry you are having trouble using the MC33926 shield. The nSF pin reads low under several conditions when either of the motor drivers detects a fault. You can learn more about those conditions in a truth table inside the Logic Commands and Registers section of the MC33926 datasheet, which you can find under the Resources tab of the shield’s product page.

In this case, I suspect that placing your RC car right-side-up on the ground causes a brownout, because the increased load from placing your RC car on the ground causes your motors to draw more current than your battery can provide. The battery voltage then drops lower than what is needed for the shield to run, and one or both drivers detect a fault condition. If this is the case, you can probably just get a battery that can provide more current continuously, though it would help if you knew your motor’s stall current.

By the way, in case you have not seen it, you can learn more about battery capacity in this blog post.

-Jon

I am having the same experience. Brand new MN33926 arrived, I soldered the header stacks and screw terminals into place, plugged into an UNO R2, uploaded the test code from the Github repository, and no matter what, I get “fault”.
I ran the test code from the above post with no motors connected, and got “M2 fault”.

Should I send the unit back for replacement?

Hello.

I am sorry you are having trouble with the MC33926 shield. Can you tell me more about your setup? How are you supplying power to the Arduino and shield? Can you post pictures that shows both sides of your shield?

-Jon

I can’t make the mc33926 work, it is still fault.

I change the rc car I use, for another smaller buy I use the battery for the big rc car.

This battery is Ni-Mh with 9,6V and 2300 mAh. I test with a multimeter and the battery have 10V, and I test the amp connecting the battery directly to the rc car motor and is 500 mA aprox (but is very high because the wheels without load are very very fast).

But when I connect the battery to the mc33926 is fault, always, I don’t need to push forward button, the pololu is fault before.

I don’t know what to do.

I need a new battery? But what battery? Because I think the battery I have is more battery that this little rc car needs.

I can’t found tutorial help to use this motor drive and I’m very sad because I spend my money for nothing.

Thanks

EDIT: There are no section in pdf with the conditions of fault, so I don’t know why the drive goes fault.

Hello, marioqn.

It sounds like the fault issue is worse now that you have switched RC car platforms. Since the nSF pin is low as soon as battery power is connected, I suspect it could be because one of the connections is not being made correctly, which might have happened when switching platforms. Can you post pictures that clearly show both sides of the soldering and connections on your MC33926 board?

By the way, I am not entirely sure, but if you could not find that table, it sounds like you might have been looking at a pdf of the MC33926 user’s guide instead of its datasheet. I was referring to Table 5 under the “LOGIC COMMANDS AND REGISTERS” section of the MC33926 datasheet.

-Jon