suggestions for power transistor for a 200w 12v DC motor

79 views
Skip to first unread message

Des Quilty

unread,
Jun 4, 2018, 5:40:37 PM6/4/18
to London Hackspace
Hi, I want to repair a golf bag buggy which has two 12v 200W motors, but the controller unit is broken. 

Could somebody help me choose a suitable (presume) mosfet transistor for each motor, I want to use an arduino for PWM.

Ideally something which can be bought at RS would be good.

Thanks in advance.


Peter Turpin

unread,
Jun 4, 2018, 9:06:59 PM6/4/18
to London Hackspace
If I were you I'd just grab a BTS7960B H-bridge module off ebay. You can run two motors from one if you're only looking to drive them in one direction, which it sounds like if you were aiming for single MOSFET control.

You'll end up paying less for whole units there that you would with RS in parts alone.

Des Quilty

unread,
Jun 5, 2018, 3:43:12 AM6/5/18
to London Hackspace
Looks perfect! Have ordered one to try out, will report back...

Cheers 

Des Quilty

unread,
Jun 21, 2018, 3:55:20 PM6/21/18
to London Hackspace
And the following code

/*........................
BTS7960 Motor Driver Test
Written By : Mohannad Rawashdeh
Code for :
*/
int RPWM=5;
int LPWM=6;
int L_EN=7;
int R_EN=8;

void setup() {
  // put your setup code here, to run once:
  for(int i=5;i<9;i++){
   pinMode(i,OUTPUT);
  }
   for(int i=5;i<9;i++){
   digitalWrite(i,LOW);
  }
   delay(1000);
    Serial.begin(9600);
  }

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("EN High");
  digitalWrite(R_EN,HIGH);
  digitalWrite(L_EN,HIGH);
delay(500);
for(int i=0;i<50;i++){
  analogWrite(RPWM,i);
  Serial.println(i);
//  analogWrite(LPWM,100-i);
  delay(100);
}
delay(1000);
for(int i=50;i>0;i--){
  analogWrite(RPWM,i);
  Serial.println(i);
  delay(100);
}


In this configuration both motors will spin forward, but they don't stop, accelerate and stop like they do in the single motor configuration. 

If I comment out 

  digitalWrite(L_EN,HIGH); 

then only the right motor rotates.

Any ideas where I'm going wrong with getting the motors responding correctly to the changing RPWM values?

I looked for example code and wiring set up for 2 motor config but couldn't see anything..

Thx


Des Quilty

unread,
Jun 21, 2018, 4:46:41 PM6/21/18
to London Hackspace
Don't worry, 

Realised that I needed to put both left and right channels in and 255 is slow and 0 is high, got it working correctly with this script

/*........................
BTS7960 Motor Driver Test
Written By : Mohannad Rawashdeh
Code for :
*/
int RPWM=5;
int LPWM=6;
int L_EN=7;
int R_EN=8;

void setup() {
  // put your setup code here, to run once:
  for(int i=5;i<9;i++){
   pinMode(i,OUTPUT);
  }
   for(int i=5;i<9;i++){
   digitalWrite(i,LOW);
  }
   delay(1000);
    Serial.begin(9600);
  }

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("EN High");
  digitalWrite(R_EN,HIGH);
  digitalWrite(L_EN,HIGH);
delay(500);
for(int i=0;i<255;i++){
  analogWrite(RPWM,i);
  analogWrite(LPWM,i);
  Serial.println(i);
//  analogWrite(LPWM,100-i);
  delay(100);
}
delay(1000);
for(int i=255;i>0;i--){
  analogWrite(RPWM,i);
  analogWrite(LPWM,i);
  Serial.println(i);
  delay(100);
}

delay(10000);
}


Thanks 
Reply all
Reply to author
Forward
0 new messages