Controlling 2 Motors with Arduino R3 and L298N Motor Driver - Wiring Issues

Hello,

I'm making this post because I wanted to see if I could get some help with some issues I was having with a DROK 7A / 160W Motor Driver, controlling 2 12v DC Motors. In essence, it seems like after I made all my connections, a small piece of the motor driver seemed to have blown off, from the power of the battery (pictures attached)

I want to preface this post by saying that I am a complete novice when it comes to some of these issues, so I will start by listing every component I am using, and explain what my issue is, in an effort to be as unambiguous as possible.

Components:

1x DROK 7A / 160 W Motor Driver

Link to spec sheet: https://www.handsontec.com/dataspecs/module/7A-160W%20motor%20control.pdf

1x Interstate Batteries - 12v 8Ah SLA Rechargable Battery

Link to purchase (with more info):

2x Andymark 2.5in 12V DC CIM Motors (am-0255)

Link to product / more info:

1x Arduino R3 + Miscellaneous Jumper Wires.

Issues in This Project:

The main issues I am having are as follows:

  1. My wiring is exactly as shown in this picture (CurrentWiringSetup), with the exception of the 20A fuse and me powering my Arduino via my laptop, however, when I made this connection with the DROK 7A Motor Driver, it seemed like one of the components blew (as shown in the picture, BrokenMotorDriver)

Now, I made this exact connection with a regular L298N, dual H-bridge motor driver (rated for 2A), and the motors actually spun how I wanted them to, but the main issue being the H-bridge would get extremely hot after 10s or so.

Since I am fairly clueless about wiring, and electrical components, would anyone here be able to provide any insight as to what I am doing wrong? Is it possible my battery is providing too high of an amperage, that is frying the DROK motor driver (but for some reason, not the smaller motor driver)? And do you have any suggestions to mitigate this issue?

I would really appreciate any help, and I would be happy to provide any additional information, if necessary.

  • Many Thanks

From the motor specs:

Stall Current: 133 AMPs

There's your problem. I don't think that a 7A motor driver will cut it. A motor, briefly, pulls stall current every time that it is started.

Free Current: 2.7 AMPs

That is once the motor gets to speed with no load on it.

Hi,
Why didn't you fit a fuse to such a potential high current supply as your battery?
What sort/spec is the battery?

Tom... :slight_smile:

groundFungus:
From the motor specs:

Stall Current: 133 AMPs

There's your problem. I don't think that a 7A motor driver will cut it. A motor, briefly, pulls stall current every time that it is started.

Free Current: 2.7 AMPs

That is once the motor gets to speed with no load on it.

groundFungus - Thank you for the insight... Are there any solutions you could recommend to mitigate this issue (using resistors, etc). There are a few motor drivers I have seen that are capable of handling this kind of current, but they're fairly expensive. I'm still also failing to understand why my smaller driver is actually able to run this setup somehow

I think you need a large motor driver. As stated, 133A stall current is going to pop those components nearly every time. I am amazed it didn't pop more.

Hi,
This connection doesn't look good or the type of cable.
Tom... :slight_smile:

This is a "process issue". There is no single thing that explains what your problem is.
Your problem is, as you have confessed, you are a complete novice. As such, the process you followed , every step of the way was based on your limited experience.
Let's look at the facts:
Here's the specs on the motor: (THAT MEANS ONE MOTOR, NOT TWO)
Specifications

  • Bolt Pattern: 2 #10-32 Holes on a 2 in. diameter bolt circle
  • Duty Cycle: Intermittent
  • Free Current: 2.7 AMPs
  • Free Speed: 5310 RPM
  • Maximum Power: 337 Watts

Do the math: 2 x 337 = 674 W

Here's the motor driver:
7A/160W Dual H-Bridge Motor Controller

What's wrong with this picture ?

Does this mean the motors ate able to carry the
load ?
"Now, I made this exact connection with a regular L298N, dual H-bridge motor driver (rated for 2A), and the motors actually spun how I wanted them to, but the main issue being the H-bridge would get extremely hot after 10s or so."

Just how long did you run the motors before
stopping ?

Ok, so we know why you made the wrong choices so there's no point in dwelling on that. The question is :
If the PROCESS YOU used was WRONG, WHAT is the RIGHT PROCESS ?
Well it starts with listing , or generating , your Design Criteria. This is always done from the load up. The load is evaluated to select the correct motor, that being one that can carry that load. The motor spec is then used to select the motor driver. The two , take as a whole , are evaluated to select the power source, which , if batteries, means selecting the:
TYPE
NUMBER OF BATTERIES
The mAh rating
DISCHARGE RATING (25C,50C etc) if LIPO, or some other similar spec.
Hindsight is always 20/20 but if you look at the above, it would appear, the problem arose because you did not
consult us at the beginning to help you select the motor driver. Why didn't you consult us ? Well, if you are young , it was probably a case of you seeing it as a challenge and of course we don't know why you thought you were capable of selecting the motor driver when you readily admit to being a novice. On the face of it this doesn't seem a wise choice. I can tell you from experience I was the same way when I first became an electronics technician (about 40 years ago) There were situations that came up where I was faced with a decision to try to do it myself, or to admit to someone I didn't know what to do and as you can imagine I made some bad choices and after several bad choices, I was told in no uncertain terms that if I wanted to keep my job, under NO circumstances was I to take any action unless I was 90% certain (and could explain WHY) that those choices were correct. It is a common expression repeated to people every day in the electronics (and I suppose many other industries) "If you don't know what you are doing , DON'T DO ANYTHING !"
That being said, let's address some of your questions:

And do you have any suggestions to mitigate this issue?

As far as mitigating the issue, yeah, don't order stuff if you don't know how to choose what to order.
Is that harsh ? If you think about it , that's pretty irrelevant. You are not asking us to tell you what you did wrong without telling you what you did wrong. You came here because you are seeking the truth. Can you handle the
truth ? (I don't know . That's for you to decide) The point is , the DROK billed as a 7A driver , and if you take the
motor rating of 337W maximum power and divide it by the battery voltage you get what ? (28.3A/per motor).
Choosing a 7A driver for a motor that could pull 28A is asking for trouble, as you found out. I would guess the
cratered power device made a loud bang when it blew, and propelled small plastic shrapnel outward.
When working with motor drivers not enclosed in boxes, it's best to wear safety glasses to avoid eye damage if
a mosfet fails catastrophically.

Is it possible my battery is providing too high of an amperage, that is frying the DROK motor driver (but for some reason, not the smaller motor driver)?

Yes and NO. The short answer is that if you had used an inadequate battery, it would not have had an internal resistance low enough to blow the driver power devices. That being said, you used the correct battery because it
was able to provide enough power. The problem was not the motors or the battery but the weak link (as already
mentioned by several others I think) being the motor driver. You don't have to be math genius to see that the
math doesn't add up when you compare the motor power rating to the driver power rating. That driver would
have worked just fine with a much smaller motor. My personal feeling is that if you consider worst case and add
a 25% safety margin to the 337W/per motor, that gives you 421W per motor x two motors = 842W. If you then
add a little extra safety margin that puts you at 1000W for both motors or 500W/per motor. Obviously you have
a limited budget so you don't have the luxury of choosing anything so l would recommend something like the
following motor driver , reason being it is billed as a 43A driver and if you power source is 12V, the most common
dc motor voltage, that gives you 43A x 12V =516W per motor which is right in the ball park, with a little margin
to spare. Now, about your battery; you can do the math: 8A x 12V = 96W total (or 48W per motor) which fits right in with the 43A per motor driver.

Why didn't you fit a fuse to such a potential high current supply as your battery?
What sort/spec is the battery?

Some kind of fuse is not a bad idea, under the circumstances.

Did you ever measure the battery current ?

Raschemmel,

I appreciate your constructive criticism and your time, I see all the flaws in my decision making here. Unfortunately, the motors and battery (single battery) were not chosen by me, so I had to work with what little knowledge I had. I should have consulted with the folks on this forum first. I am happy to learn new skills and learn from my wrongdoings.

I want to go ahead and order (2) of the motor drivers you have suggested, as it looks like each of these drivers is capable of driving a single motor. I am just curious as to how the wiring would occur
I am assuming the logic board will have to be powered externally, but given that my battery has two leads, I am not too sure how both the 2 motor drivers would be connected to the battery and logic.

TomGeorge:
Hi,
This connection doesn't look good or the type of cable.
Tom... :slight_smile:

Tom,
Thank you for your time :slight_smile: I have since corrected this connection. For the wires, what do you recommend I use for this kind of setup?

Look CLOSELY at the description. This is a STEPPER MOTOR DRIVER. That's why it has 4 terminals instead of 2.
But it should ok to use for two dc motors because the H-bridges are independent of each other , (the left side
knoweth not what the right side doeth).
There are four signals required for driving each motor.

It has an active High ENable for each motor which disables the motor if pulled LOW.
Each motor has a PWM input in addition to the EN.
Pull EN HIGH,
There is an Instructables tutorial here..
Read this first to see if it is what you want.
Note. It has Current sense which has a current sense OUTPUT called _IS (for Isense)
Read Page -13 (Section 4.3)
& page-18 (Fig-10) of the datasheet linked in the instructables for information on how to connect the current sense
OUTput "IS" (These are labeled L_IS nd R_IS for Left coil & Right Coil. A stepper motor has 2 coils , each is equivilent
to a single dc motor coil, but the coils must be driven in a specific sequence for a stepper motor, but are electrically
separate but share the same supply.) Fig-10 on page 18 shows that the current is converted to a voltage which can
be read on the "IS" pin. The output voltage on that pin represents the motor current unless there is a shutdown condition.

4.4.4 Status Flag Diagnosis With Current Sense Capability The status pin IS is used as a combined current sense and error flag output. In normal operation (current sense mode), a current source is connected to the status pin, which delivers a current proportional to the forward load current flowing through the active high side switch. If the high side switch is inactive or the current is flowing in the reverse direction no current will be driven except for a marginal leakage current IIS(LK). The external resistor RIS determines the voltage per output current. E.g. with the nominal value of 8500 for the current sense ratio kILIS = IL / IIS,

a resistor value of RIS = 1kΩ leads to VIS = (IL / 8.5 A)V. (see page 4 of datasheet for IL (output current)

In case of a fault condition the status output is connected to a current source which is independent of the load current and provides IIS(lim). The maximum voltage at the IS pin is determined by the choice of the external resistor and the supply voltage. In case of current limitation the IIS(lim) is activated for 2 * tCLS

I'm reading it now.
Page 13

Specification:
Double BTS7960 large current (43 A) H bridge driver;
5V isolate with MCU, and effectively protect MCU; &
5V power indicator on board;
voltage indication of motor driver output end;
can solder heat sink;
Just need four lines from MCU to driver module (GND. 5V. PWM1. PWM2);
isolation chip 5 V power supply (can share with MCU 5 V);
Size: 4 * 5 * 1.2 cm;
Able to reverse the motor forward, two PWM input frequency up to 25kHZ;
two heat flow passing through an error signal output;
isolated chip 5V power supply (can be shared with the MCU 5V), can also use the on-board 5V supply;
the supply voltage 5.5V to 27V

Package Included:
1PCS Double BTS7960B DC 43A Stepper Motor Driver H-Bridge PWM For Arduino Smart Car

To summarize, connect IS pin to an analog input and convert the analog count values to Voltage by multiplying the
count value by (5V/1023). Connect the EN pin to an MCU OUTPUT pin to use as yout ENABLE control signal (active H)
Connect your PWM output pin to the PWM input (1 or 2) The inputs are labeled L or R for Left coil or Right coil.
You don't have a stepper motor so this is meaningless for your application so mentally relabel them L=Motor-1
R= Motor-2, which makes L_IS the Motor-1 Current Sense output voltage and R_IS the Motor-2 current sense
output voltage. Likewise L_EN is Motor-1 Enable and R_EN is Motor-2 Enable. And finally LPWM is Motor-1 PWM
input and RPWM is Motor-2 PWM input.