Go Down

Topic: Power issues with my SN75441ONE h-bridge chip? (Read 3 times) previous topic - next topic

SamuelCB

Hi everybody!

Ok so recently I received my SN75441ONE h-bridge chip (http://html.alldatasheet.com/html-pdf/28616/TI/SN754410NE/24/1/SN754410NE.html) and so begun to immanently play with it. At first I wired it to my Arduino and powered a small motor off it using the Arduinos +5v, then I added to small motors and they worked fine. Then I added 2 push buttons and some more complicated code as shown below:

Code: [Select]

int leftEnable = 12;
int out1 = 11;
int out2 = 10;
int button1 = 9;
int button2 = 8;
int rightEnable = 7;
int out3 = 6;
int out4 = 5;
int val1;
int val2;

void setup(){
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  pinMode(leftEnable, OUTPUT);
  pinMode(rightEnable, OUTPUT);
  pinMode(out1, OUTPUT);
  pinMode(out2, OUTPUT);
  pinMode(out3, OUTPUT);
  pinMode(out4, OUTPUT);
}

void loop(){
 
val1 = digitalRead(button1);
val2 = digitalRead(button2);

if (val1 == HIGH && val2 != HIGH){
   leftForward();
   rightForward();
}
else
{
   leftDisable();
   rightDisable();
}

if (val2 == HIGH && val1 != HIGH){
   leftReverse();
   rightReverse();
}
else
{
   leftDisable();
   rightDisable();
}

if (val1 == HIGH && val2 == HIGH){
   leftReverse();
   rightForward();
}
else
{
   leftDisable();
   rightDisable();
}
}

void leftReverse(){
  digitalWrite(leftEnable, HIGH);
  digitalWrite(out1, HIGH);
  digitalWrite(out2, LOW);
}

void rightReverse(){
  digitalWrite(rightEnable, HIGH);
  digitalWrite(out4, HIGH);
  digitalWrite(out3, LOW);
}

void leftForward(){
  digitalWrite(leftEnable, HIGH);
  digitalWrite(out1, LOW);
  digitalWrite(out2, HIGH);
}

void rightForward(){
  digitalWrite(rightEnable, HIGH);
  digitalWrite(out4, LOW);
  digitalWrite(out3, HIGH);
}

void leftDisable(){
  digitalWrite(leftEnable, LOW);
}

void rightDisable(){
  digitalWrite(rightEnable, LOW);
}


This code is made so that when one of the push buttons in pressed both motors drive forward, when the other is pushed they both drive backwards and finally if are both pushed then one motor drives forward and the other backwards. I uploaded the code and added the 2 small motors and it all went well now being externally powered with a +9v battery. Anyways I decided the motors where not powerful enough for what I wanted so I took 2 out an old R/C car which was powered by 5 AA batteries. I simply replaced the older smaller motors with the new bigger ones and added another +9v battery in serial to get 12v as shown in my picture.



My problem is that the motors no longer run unless spun at first by hand, also the left seems to run better than the right? Could somebody please tell me where I am going wrong? Amps? volts? wiring? coding?

Thanks, Sam.

winner10920

My guess is the 9v battery supply, you need better batterie or a real supply, those can't handle the amoint of current it takes to start the motor

SamuelCB

Well I've tried it with 1 mains powered plug with a 9v and 300ma output and still had the same problem but when I'm home tomorrow I will try with 2 9v 300ma power supply's in serial if that's safe? I've never linked mains power in serial before only batteries.

Grumpy_Mike

That diagram shows the batteries connected in parallel not in seriese.
Two 9V in seriese gives 18V not 12V.
Never connect batteries in parallel.

SamuelCB

I'm almost certain that my picture shows the batteries in series not parallel as the neg of one goes to the pos of the other then the spare neg and pos of the batteries goes to the breadboard? Also yea my mostake I meant 18v not 12v?

Go Up