Pages: [1]   Go Down
Author Topic: Power issues with my SN75441ONE h-bridge chip?  (Read 3651 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 212
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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.
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 212
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 618
Posts: 33945
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Full Member
***
Karma: 0
Posts: 212
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your power source is not sufficient to drive the new motors.  Do you know the voltage rating of the new motors?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 212
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well because they have come out an old R/C car I can't be sure but the car was powered by 5 AA batteries meaning 7.5v for the entire thing. So the motors couldn't be much?
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

NiMh AA cells have 1800-2500 mAhr of energy nowadays, 9V batteries more
like 150 mAhr or maybe a little more. Not a good choice to run motors,
unless the job only needs to go for 15-minutes or so.
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Id suggest trying just the 9v supply from the mains,
the bes bet would be to try a 12v lead acid battery, that will give you plenty of amperage ad 12v should be more tha. Enough for the motors,
and if they get hot, stop running them,
that means 12v is too much
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
12v lead acid battery

12V is probably a little high for the typical toy motor, especially if the ones in the
diagram are any indication. 6V is probably more in the proper range. With AA cells,
you can add cells in series to get the ideal voltage range.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know this is an old post but it looks like you might be trying to analogWrite to pin 12 which doesn't support pwm on some arduino's.

http://arduino.cc/en/Reference/analogWrite
Logged

Pages: [1]   Go Up
Jump to: