1

I have an Arduino Nano controlling a BTS7960 that is 10 meters away.

I have one 24V power supply.

Both the Arduino and the BTS7960 get 5V through a an LM2596 step down converter.

The BTS7960 "Enable" pins are hooked up to 5V output of the step down converter.

schematic

My problem is that this setup burnt the BTS7960 Before replacing it, I want to identify what made it burn.

I suspecting that either the RPWM and LPWM became both HIGH (from parasites + long wire ) and burnt the driver so I should add pull down resistors, or there is something wrong with this configuration and using buck converters with common GND is what caused problems.

When I turn on the power supply the motor rotates for few seconds even though the Arduino didn't give orders to turn the motor on yet.

Update :

I changed the setup by adding a second 24V power supply that power the Arduino and the motor driver only, now it's been running for 15 days without any sign of noise signals triggering the motor driver. This may not be the best solution but it seems like it work

Snaier
  • 11
  • 3
  • 1
    Could well be a ground loop. Is the 24V supply coming from the Arduino side, or the motor side (yes, it matters). – TimWescott Apr 13 '21 at 14:56
  • I am also playing with BTN7971B, which is almost identical to BTS7970 in architecture. I also use LM2596 based step down 5V PSU (common ground with my 12V motor PSU) as logical power supply for BTN7971B. But I don't understand why you have two PWM signals. I only give High/Low signals to IN1/IN2, and ***only one PWM signal for INH***. But I am not sure, because it's bed time, and I am feeling dizzy. :) Perhaps I can check out and let you know tomorrow. – tlfong01 Apr 13 '21 at 15:02
  • One more thing. Your motor seems taking huge current. If when power is on, and you casually disconnect the inductive motor, the back EMF might be huge and the BTS7970 flyback diodes cannot stand and therefore fired. – tlfong01 Apr 13 '21 at 15:10
  • 1
    @tlfong01 Two PWM for the two Direction clockwise and anticlockwise and speed, i'm afraid that my setup and long wires can generate voltages in both PWM pins at same time this will surely burn the driver – Snaier Apr 13 '21 at 20:38
  • 1
    @TimWescott the 24V start from the Arduino side then goes to the Driver and the motor. – Snaier Apr 13 '21 at 20:39
  • 1
    I would consider placing transceivers or line drivers between the arduino and the BTS7960. 10 m is a fairly long distance for the fairly weak arduino outputs. – Math Keeps Me Busy Apr 13 '21 at 21:47
  • 1
    How fast are you driving the PWM? It makes a difference as to whether what you're trying is ever going to be feasible without an Arduino right at the motor. – TimWescott Apr 13 '21 at 23:56
  • #Snaier, I am sorry, but I think your ***using two PWM signals to drive one motor is simply all wrong***. Please read my answer below. Cheers – tlfong01 Apr 14 '21 at 01:30
  • 1
    @tlfong01 i didn't choose to use **two PWM** the Driver need to have two signals one for each direction clockwise and anticlockwise. – Snaier Apr 14 '21 at 09:04
  • @TimWescott i'm using pins 5 and 6 980 Hz PWM, with Duty cycle Variable between 20% - 70%, i need to run the motor for 15 seconds each time then stop run it again after an hour or so (until button on 1st Arduino is pressed again) – Snaier Apr 14 '21 at 09:11
  • @Snaier. Ah there is seems some confusion. Let me try again. (1) For L298N, which has two full H-bridges, you can control two motors, each with In1, In2 and Inh. In other words, there are 6 signals, 3 for one motor, another three for another motor. (2) Now for BTS7976, there is only one full H-bridge, form by its two half H-bride. So BTS7960 can control only one motor. Now for only one motor, you use three signals, In1, In2, InH. (3) In1 H, In2 L for CW, In1 L, In2 H for CCW (or vice versa). / to continue, ... – tlfong01 Apr 14 '21 at 09:22
  • InH is to enable and disable the motor, H to enable, L to enable, and PWM to switch between enable and disable very quickly, say 1kHz, or 1,000 times per second. So you start and stop the motor repeatedly quickly, and the result is that the motor reduces speed, approx half the speed, if duty cycle is 50%. This is an over simplified picture. Ah. locking down supper time. I need to go and see you later, perhaps this late evening, or tomorrow. You might like to give me comments. No hurry though. – tlfong01 Apr 14 '21 at 09:26
  • By the way, have you played with L298N or other motor drivers before? Usually they control two motors, each with one PWM signal, therefore two PWM signals altogether. ***But BTS7960 controls only one motor, therefore only one PWM signal is needed. perhaps that causes your confusion, and also drive BTS7960 crazy and fried. :)***. – tlfong01 Apr 14 '21 at 09:29
  • I am curious why you use two PWM signals. So I googled a user guide from Hanson Tech and surprisingly found that it also suggests to use two PWM signals. Perhaps it uses another set of control signals not the same as the BTS7960 data sheet. I think I need to study the schematic and Arduino code to see why the difference. My apologies of wrongly commenting that you use the wrong signals. It will take me some time to find out what is going on. Cheers. – tlfong01 Apr 14 '21 at 13:22
  • #Snaier, I seem to have found the reason why your BTS7960 module was fired. Please read Appendix C and ***let me know if you agree what I am guessing is indeed a stupid EE design mistake***. Ah bed time! See you tomorrow. – tlfong01 Apr 14 '21 at 14:26
  • I googled further and not before long I found the answer, as you said: "***the RPWM and LPWM became both HIGH (from parasites + long wire) and burnt the driver***". But, what you said below is not a good turnaround: "***so i should add pull down resistors.***". This is a long story which I found it difficult to cut short, ... :) Cheers. – tlfong01 Apr 15 '21 at 04:54
  • I think confusion arises between we are using two different sets of signal (names) with corresponding control procedures. Perhaps I should list the two schemes to clarify things, especially for the other newbie readers. Please read Appendix D later. – tlfong01 Apr 15 '21 at 06:32
  • Before I forgot, there are a couple of other things I might append to my answer: (1) For long distance of 10+ metres, you might consider (a) bypass/decoupling caps at both ends, (b) use 20mA loop protocol, (c) use UART control PWM/sig gen (described in my locked down answer). (2) If you use Method 2, then you don't need to worry about the both EnA,EnB high causing burning.problem. (3)Some tutorials suggest to use separate/decoupled PSUs for Arduino and BTS7960, to reduce interference, some even suggest total optical isolation to prevent noises/back EMF flyback through grounding wires. Cheers. – tlfong01 Apr 15 '21 at 07:08
  • Talk is cheap, so now I am wiring up a BTS7960 driver module test rig to prove the concept. I remember in this Q&A and the other one, both OPs mentioned about power connecting wires getting too hot and/or huge voltage drop. So in Ref 12 my last locked answer, I recommended a range of AWG number for moter currents up to AWG16 for 20A, This time I am tesing the waters,..Ah supper time, see you later, – tlfong01 Apr 15 '21 at 09:34
  • #Sainer, (1) So I modified my BTS7960 module, by just shorting INH_A and INH_B to make just INH, which is used to enable and disable the module/motor. The other two pins used are IN1 and IN2. (2) If IN1 High, and IN2 Low then motor moves in one direction. IN1 Low, IN2 High, then another direction. I am using the Thai McuCity Connection 2, which is used for L298N and BTN 7971B which is the standard connection. Here is the video: https://youtu.be/drmar5Cv3-A. Cheers. – tlfong01 Apr 16 '21 at 10:08
  • You simply can't drag some 5V voltage modulated PWM 10 meters out and expect something good to come out of it. The solution is to place a properly designed board with MCU and motor drivers integrated near the motor. The PWM controlling the motor driver should only be used on-board the PCB. The other side of the driver is far less sensitive and there you can have some distances - but there you face a different problem of voltage drop due to high currents. – Lundin Apr 16 '21 at 14:06
  • @Lundin, Ah there is some confusion. I mean the MCU is controlling a 10 metres away UART controlled PWM sign placed near the BTS7960 motor driver: (1) How can Rpi4B python UART talk to XY PWM Signal Generators? https://raspberrypi.stackexchange.com/questions/104779/how-can-rpi4b-python-uart-talk-to-xy-pwm-signal-generators/104780#104780. – tlfong01 Apr 16 '21 at 14:45
  • #snaier, Now that my offline BTS7960 tests using DC and PWM signals go well, I will move the last part of BTS7960 status/current sense pin. I think one of the possible reasons of frying you motor driver is the following: Your motor is stalled, causing a stall current which is many times of the loading current. Perhaps your strange looking motor takes huge current even at normal load. Can you give me a link of that? The BTS7960's status/current sense pin, as I read from datasheet has two purposes, (1) measuring motor current, (2) alarm status. Ah bed time, see you over the weekend. Cheers. – tlfong01 Apr 16 '21 at 15:05
  • #sanier, I checked that your bts7960 input pins should have already pulled down: https://i.imgur.com/1PuTkGX.jpg. Have a great weekend. Cheers. – tlfong01 Apr 17 '21 at 04:29
  • 1
    @tlfong01 Dragging out UART 10 meters is just as bad. – Lundin Apr 19 '21 at 06:19
  • @Lundin, I agree, so I was about to suggest esp32 WiFi, or nrfL2401+ 2.4G:https://raspberrypi.stackexchange.com/questions/108959/how-can-rpi-communicate-with-arduino-in-rf-radio-frequency-say-using-nrfl2401 but my answer has too many down votes and got locked, not allowed to append any more stuff now. :( – tlfong01 Apr 19 '21 at 06:48
  • 1
    @tlfong01 Avoid wireless when wires are possible. In this case the correct solution is to de-centralize the motor control by adding a MCU near the motor drivers, then have it communicate with other MCUs over a suitable bus if necessary. CAN or RS-485, not UART. – Lundin Apr 19 '21 at 07:01
  • @Lundin, I agree wired is better than wireless, and CAN is better than UART. It is only recently that I found local maker club teenagers are using simplex UART/CAN bus toy servos which can daisy chain instead of messy star topology: (1) How to interface UART servo? (LX-224HV) https://electronics.stackexchange.com/questions/518865/how-to-interface-uart-servo-lx-224hv. – tlfong01 Apr 19 '21 at 07:12
  • @Lundin How about using Ethernet ? Two Arduino with Ethernet shield on each side with Ethernet cable connecting between them – Snaier Apr 19 '21 at 10:32
  • @Snaier It's not suitable for direct motor control, you need real-time performance for that. But then Arduino isn't suitable for pretty for professional projects to begin with... obviously if this is just some hobbyist junk sitting on somebody's desktop or garage, then anything goes. If it's a real-world project, it needs to be unarduinoed. – Lundin Apr 19 '21 at 13:56

2 Answers2

1

You probably have a ground loop, and it's causing false signalling from the Arduino to the motor driver.

Basically, if you look at your diagram, you need to mentally substitute a string of resistors and inductors for all of the wires. The longer the wire is, the larger the resistance and inductance -- and ten meters is entirely too long for a single-ended logic-level signal.

Communication over that distance, in the presence of a noisy power connection* should either be done with the very careful application of something like RS-232, or -- far better -- with differential signalling (like RS-422) or by carrying the signal ground on a separate wire from the Arduino to the motor driver, and then using opto-isolators at the motor driver.

With your current setup, when the motor is on, and especially when you're driving a PWM signal to it, voltage will appear across your ground wire -- but the signals you're using to the driver board are referenced to the Arduino's ground. If the motor ground drops enough, the signals from the Arduino can both appear to be "on", even if they're not. Moreover, if the driver isn't protected, then the signals can go outside of the voltage range the chip can stand, and fry it on the input side.

Using differential signalling or opto-isolators running off of a separate reference ground from the Arduino will fix that. Using an Arduino on the left side for whatever user interaction you want, with a serial line (that itself uses RS-422) to the Arduino on the right side to drive the motor, will fix that.

You could also just generate 5V at the motor, and power the Arduino with a separate ground wire that's well-isolated from the one driving the motor. As long as you don't have any other ground connections, that may work -- but, 10 meters is a long way for what you're attempting.

Or you could place the motor driver right next to the Arduino, and just run your 10m wires out to the motor. That may actually be the easiest way to accomplish something that's electrically sound.

Having a circuit at the motor driver that won't let you simultaneously drive both half-bridges would be a good thing, too.

* Anything powering a motor is noisy.

TimWescott
  • 44,867
  • 1
  • 41
  • 104
  • 1
    Thank you that is so helpful. if i use Two separate PSU one for the motor one for Arduino and the Driver, will it work without needing to use differential signalling and another Arduino at the driver side ? – Snaier Apr 13 '21 at 21:45
  • 1
    Doesn't work that way. The signalling _looks_ like it's on two wires, but it's between those two wires and ground. Change the ground voltage, and you change what the motor driver sees. – TimWescott Apr 13 '21 at 23:54
  • I had the motor driver right next to the Arduino in my first setup, the issue was the power loss in the long wire, when i attempt to run at 30% speed the driver output is somewhere around 7V but at the end in the motor side the voltage drops to 2 V and i loose all the torque – Snaier Apr 14 '21 at 09:01
  • Arguably, the correct solution is to not use any hobbyist stuff at all but properly designed PCBs. Ideally with CAN which is more modern and rugged than legacy RS-422. – Lundin Apr 16 '21 at 13:59
-3

Question

The OP's BTS7960 DC motor driver module was fried. What can be the possible causes?


Answer

Short Answer

  1. One possible cause for frying the motor is that the OP uses a wiring and control scheme which might burn for a wrong combination of signals. (See Appendix C for more details. One solution is to use the classic L298N/BTN7961B wiring/control scheme, which I found working OK, so far so good.

  2. One workaround for sending signals over 10 metres long distance is to use current loop for not so frequency controls, for example, change motor direction lower than 10Hz.

  3. For sending PWM signals over long distance, one solution is to use UART control PWM/sig gen, as described in Appendix A (a)'s Q&A.

  4. If the OP prefers the risky connection scheme, it is important to avoid disconnecting motor when power is on, because back EMF spike might go back through ground wire to interrupt the Arduino and cause unexpected control signals to the motor driver and fries it.

  5. For the problem: "When I turn on the power supply the motor rotate for few seconds even though the Arduino didn't give orders to turn the motor on yet, ..."

    The problem might disappear if Connection/Control scheme #2 is used AND INH pin is pull down to ground.


/ to continue,


Long Answer

Contents

Part A - Possible causes of burning BTS7960 list

Part B - Troubleshoot BTS7960 tips list

References

Appendices

Part A - Possible failure analysis/causes short list

There are many possible causes. Below is a short list.


(1) Why is my PWM efficiency about 50%? Asked 5 days ago Active yesterday Viewed 330 times

1.1 My wiring setup.

1.2 My testing setup.

1.3 My input signals.


(2) Anything wrong with connecting L298Ns in parallel? Asked 17 days ago Active 12 days ago Viewed 154 times

2.1. Part 2 - How to use L298N input signals, IN1, IN2, and INH


(3) How to control DC motor speed by motor driver with PWM input? Asked 9 months ago Active 3 days ago Viewed 913 times

3.1 References: Part C - PWM Full H-bridge Motor Driver

3.2 Appendix A - L298N input signal routing diagram

3.3 Appenidx E - BTN7971B block diagram and input signals

3.4 Appendix L - Calibration of BTN7971B PWM/Duty Cycle (1kHz, 50% Duty cycle) performance


Part B - Troubleshooting Tips List

(1) KISS (Keep It Simple Stupid), Divide and Conquer testing suggestion

1.1 Following my locked answer (Part 1, s1.3) I would suggest to test the BTN7971B dual half bridge modules in two parts, and test only one of the parts, as shown in the figure below:


half bridge test


Notes

  1. The right part, half H-bridge #2 in grey, is disconnected (actually only rewiring is to disconnect IN2, input to half H-bridge #2 (IS, INH is common/shared between both half-Bridges). So only the left part, half H-bridge #1, is wired up for uni-direction testing on (a) PWM vs motor speed/efficiency, (b) current measurement using the IS pin only (ie, no clumsy, not so accurate, clamp meter is needed to be used as described in Part 1 (1)).

  2. The OP's BTS7960 dual half H-bridge module might have only one of the two half bridges fried. So lucky him might use this wiring diagram to check out if one of the half H-bridge is still alive, and try my suggested tip below to do some investigation research/feasibility studies, as a preparation for (firing) his coming, second new module. :)


/ to continue, ...


References

(1) BTS7960 High Current 43A H-Bridge Motor Driver User Guide - Hanson Tech

(2) Easy Setup Motor Driver BTN7960/ BTS7960 with Arduino - FireBitLab

(3) Double BTS7960B DC 43A Stepper Motor Driver H-Bridge PWM Driving Board Module - Thai McuCity

/ to continue, ...


Appendices

Appendix A - BTS7960 DC Motor Driver Module Schematic - Hanson Tech

bts7960 schematic


Appendix B - BTS7960 DC Motor Driver Module Control Signals - Hanson Tech

bts7960 control signal


Appendix C - Why was the OP's BTS7960 Module Fried?

1. I found the Hanson Tech user guide a bit weird: its control signal names do not correspond to its schematic.

2. Its control procedure is also weird: There are two direction mode enables, one for forward mode, another for backward mode.

My immediate question is this:

what will happen if both forward mode and backward mode are enabled at the same time? Won't the module melt down?

3. So I googled to know more. I had good luck: I found a YT which has a truth table that confirms my worries. See the picture below for what I found! :)

Easy Setup Motor Driver BTN7960/ BTS7960 with Arduino - FireBitLab


burn burn burn


burn truth table


Notes

  1. This is a very stupid mistake I never expected to see! I need to confirm the OP if what I saw is true!

Appendix D - Two different schemes of control signal/procedure as described by Thai McuCity

(3) Double BTS7960B DC 43A Stepper Motor Driver H-Bridge PWM Driving Board Module - Thai McuCity

two schemes


Notes

1. The main difference between the two schemes is the following:

(a) Method 1 does not short/combine En_A and En_B, and module would burn if both En_A and En_B are High.

(b) Method 2 shorts En_A and En_B together, the combined En_C is used as a High/Low or PWM signal to Enable/Disable or change speed of the whole module/motor. There is danger of burning the module by wrong combination of En_A and En_B signal.


Appendix E - L298N Connection/Control Signal Scheme Test Results

Using L298N signal and control everything goes well.

Youtube video of BTS7960 Test


PWM test

/ to continue, ...


tlfong01
  • 2,766
  • 1
  • 9
  • 17
  • 1
    There is no need for a table of contents on a well written answer. See Tim's answer for a well written, to the point answer. Again, SE is not a blog site. – Transistor Apr 14 '21 at 17:53
  • 1
    @tlfong01: Snaier already knows that setting LPWM and RPWM to high at the same time will cause the driver to burn up. From the question:"the RPWM and LPWM became both HIGH (from parasites + long wire ) and burnt the driver so i should add pull down resistors." The question is **how** did those two signals manage to go high at the same time when the code doesn't do that. – JRE Apr 15 '21 at 07:38