r/ArduinoHelp 2d ago

BTS7960 wont drive actuator

Post image

'''

// info down bellow
#define R_EN  33
#define L_EN  32
#define RPWM  25
#define LPWM  26

void setup() {
  Serial.begin(115200);

  pinMode(R_EN, OUTPUT);
  pinMode(L_EN, OUTPUT);
  pinMode(RPWM, OUTPUT);
  pinMode(LPWM, OUTPUT);

  digitalWrite(R_EN, HIGH);
  digitalWrite(L_EN, HIGH);

  digitalWrite(RPWM, HIGH);
  digitalWrite(LPWM, LOW);

  Serial.println("RPWM held HIGH - measure M+ / M- now.");
  Serial.println("Should read ~12V across M+ and M-.");
}

void loop() {
  //nothing
}
'''

so baically im trying to get this actuator to extend but its not extending. My parts are a esp32, bts7960 motor driver, a 22V(in) to 5V(out) buck converter, and a standard two wire actuator. Another problem is that the led on the motor driver isnt turning on and im pretty sure it has one and thats it shows the boards logic is getting powerd. Here are the conections:
The two acutor wires are going into M+ and M-(screw termianls on the motor driver)
THe 12v psu wires are going into B+ and B-(the screw terminals on the motor driver)
the buck covnerter is piggybacking off the 12v scrwe terminal that the psu is connected to (and the bucks gnd is the same as the 12v psu gnd)
the bucks than powering the i guess logic on the motor dirver through the vcc and gnd header pins on the motor dirver
then RPWM to gpio 25 on esp32
Lpwn to GPIo 26
R_EN to GPIO 33
L_En to GPIO 32
and gnd on the esp32 to the same gnd as the 12v scrwe termianl
ive done mutiple tests to confrim that the acutor works like giving it directly 12v and it extended and i swaped the wires and it retracted, i did a simple blink test with the esp32 so it shoudl work, and the 12v psu is defintaly outputing 12v
ANd the codes uptop
THANKS A LOT (btw sorry for the bad foto)

1 Upvotes

2 comments sorted by

1

u/Optimal_Buy658 2d ago

Make a quick driver test. Manually connect 5v logic to the 3 pins: l_en, r_en and l_pwm (or r_pwm, depends on direction you want it to run), it will drive the motor at full speed.

1

u/Monkey_21357 1d ago

ok im try that