I am testing my BTS7960 Module with my UNO for bi-directional rotation of DC Motor. I am using a small DC motor as a test (like the one here) and I am powering the UNO via USB cable. The problem is whenever I try to shift it to take power from my MB102 supply instead of USB connector, the DC motor starts shuddering and stalling. But it runs completely fine when connected via USB cable. I think there is something wrong with my connections but I can't figure out where.

The code is fairly straightforward and is attached below

void setup() {  // put your setup code here, to run once:

  pinMode(2,OUTPUT); //R_EN
  pinMode(3,OUTPUT); //L_EN
  pinMode(8,OUTPUT); //L_PWM
  pinMode(12,OUTPUT); // R_PWM

void loop() {
  // put your main code here, to run repeatedly:

I am trying to find a good circuit simulator for the schematics for better visualization, if anyone has any leads it would be really appreciated

The connections are as follows:

DC 12V is provided to BTS7960. The R_EN and L_EN are connected to pins 2 and 3 of the Arduino. the R_PWM and L_PWM are connected to digital pins 8 and 12 of the Arduino. VCC and Ground are connected to +5 and GND pins respectively while another GND pin is connected to the DC12V negative.

When connecting MB102, DC12 is supplied via the Jack while the +5V and GND Headers are used to supply power to Arduino via Vin and GND Pin of Arduino respectively.

  • That's a lot of motor controller for a wee motor! It's unclear what the schematic looks like when you're running off the breadboard power supply, though, or why you'd need both a breadboard power supply and the power off the motor controller module. – Dave Newton May 24 at 1:05
  • 2
    Arduino Vin requires at least 7V to be powered properly, not 5V. It actually accept voltage from 7V to 12V, so connect the DC12V directly to the Arduino Vin which will be used internally to drive the regulator to generate the 5V. – hcheung May 24 at 2:56
  • @DaveNewton Like i said its only a test motor. I plan on using it to power 20A DC Motors for my carrier robot. The motor controller module requires 5V. i was initially giving it via the +5V Arduino pin but now am providing it through the breadboard supply – Khuzaim Khan May 24 at 15:47
  • @hcheung Thanks a ton! That worked like a charm, the only problem is running 2 drivers simultaneously case the 2nd motor to be extremely slow. I guess it's because the DC 12V adapter gives 1.5 A current only which is insufficient for the second motor right? – Khuzaim Khan May 24 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.