Stepper motor driver's behavior while magic smoke came out - Page 1
Forum section: electronics / beginners

author: sairfan1
author_rank: Frequent Contributor
timestamp: September 24, 2021, 10:09:51 pm
content: I'm setting up small CNC, my objective is to lean G Code commands and moving X, Y and Z axisWhile just testing and driving motors some DRV8825 gave magic smoke and my arduino was also gone. I noticed there are other stepper drivers like A4988, TMC2209I want to know which one is better, OR they are all same? any of these have any protection like in case of short circuit it keeps the higher voltage and arduino 5v separate?

author: Ian.M
author_rank: Super Contributor
timestamp: September 24, 2021, 11:27:48 pm
content: Dying gracefully is rarely a specified feature of *ANY* power interface/driver chip. I thought I'd made that clear in your previous topic:https://www.eevblog.com/forum/beginners/stepper-driver-drv8825-gave-magic-smoke-what-could-be-the-reason/but perhaps I need to go into more detail. While portions of the silicon die are in the process of failing by melting or vaporizing, transient voltages that may appear on supposedly logic level input pins are entirely unpredictable as they depend on things like how the meltdown propagates across the die and in high energy failures, which bond wires fuse first. If the Gnd bond wire fails first the input pins may get directly connected to Vcc until the expanding metal and silicon vapors rupture the package, which may (or may not) break the connection.If cascading damage from a power interface/driver chip blowout is unacceptable then control circuits must be protected against sustained direct connection to any voltage rail present outside the logic supply rails (Logic Vcc and Gnd). This can be done in a number of ways, including series resistors + clamps on the logic side, or optoisolators, which should be regarded as sacrificial as the side connected to the power interface/driver chip is likely to get damaged in any high energy failure.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 25, 2021, 12:46:08 pm
content: So now I see you are the same guy who keeps up blowing USB isolators by applying high voltages to their secondary side.It probably is some kind of wiring error.Another possibility is just a crappy 24V power supply.When a coil of a stepper motor is turned off, then the current has to go somewhere, and it is usually redirected to the positive supply rails via diodes in the stepper motor drivers. As a result the 24V supply rails rises. This can be a serious problem, especially if you have big stepper motors and a lot of inertia behind them. Then the motors can act as dynamo's during deceleration and this can increase the power supply to beyond what the stepper motor drivers can handle and destroy them. Big electrolytic capacitors on the power supply rails reduce this issue, but sometimes even voltage clamps and bleed-off resistors are added to the power supply to prevent it from rising too much during such events.

author: jmelson
author_rank: Super Contributor
timestamp: September 25, 2021, 04:09:34 pm
content: I used to sell the 8825 drivers, now I am seling the 4988's, as their microstepping seems to work much better with some motors. But, I don't know if one is more robust than the other. You do need a large capacitor to remove spikes on the DC motor supply, close to the driver.Jon

author: sairfan1
author_rank: Frequent Contributor
timestamp: September 25, 2021, 05:10:28 pm
content: Quotegetting famous on the forumQuoteQuoteI'm using RAMPS board it has 35v capacitors near each driver, do you think its enough?Thing that worries me is, I was not doing anything just turned on the power and its gone, before this everything was working all good, and i did not change anything to the related driver. I ordered new modules and its going to waste my about 25/30 days, I'm more towards learn how to minimize risk of such accidents. If its something rare but happens then its ok, I'm worried what if new items comes in and I burn them again.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 25, 2021, 10:47:30 pm
content: I was sort of expecting you were using a PCB like that.I've heard other people damaging electronics with such PCB's but I do not know the exact cause.A possibility is the cheap low quality of connectors and the sheer number of them.I've heard several reports about stepper drivers getting damaged by disconnecting the wire to the stepper motor while it's running, but I never fully understood why this would lead to damage. The mediocre quality of the cheap connectors can be a cause of intermittent contact and therefore have the same effect as disconnecting wires during operation. There are plenty of PCB's available with both a microcontroller and a bunch of stepper motor drivers soldered onto it, and including SMPS circuits. BigTreeTech makes such PCB's, and they appear to be friendly to the Open Source community and have quite a lot of stuff parked on github. BigTreeTech is just an example though, there are more of such boards made for 3D printers.Another possible reason for failure is the use of different power supplies. This can lead to partially powered IC's during startup and most IC's don't like that.Marginal wiring can also read to other problems, for example a high current though a (too thin) GND wire will have a voltage drop over that GND wire, and depending on where that wire is and how other wires are routed, this may change the effective voltage that your logic IC's see.I have used some of the bigger stepper motor drivers myself. (for Nema23 motors, and several Amps of current) These all have built-in optocouplers to separate the low voltage input driver side from the high motor currents on the secondary side.A possible partial remedy for the USB isolator is to put PPTC fuses (the smallest you can get 50mA or maybe 100mA) in series with the power and signal wires, and combine that with TVS diodes on the side of the USB isolator. The goal is that the TVS diodes short excessive voltage surges, and the PPTC fuses reduce DC currents during a fault, so the TVS diodes do not overheat and get damaged.

author: amyk
author_rank: Super Contributor
timestamp: September 26, 2021, 06:17:57 am
content: I also recommend the OP to check for and use ESD prevention practices like grounding straps and the like. The effects of ESD don't always show up immediately but repeated catastrophic failures suggest an environmental problem.

author: reed
author_rank: Contributor
timestamp: September 26, 2021, 04:41:06 pm
content: I've never had any issues with my Ramps boards, they tolerate me well, however I have always used A4988 drivers. However as mentioned, these can blow if unplug with power still in the system (but less so on Ramps boards IMO)I did once read about some issue with those green power terminals shorting or something but I've never experienced it...?BTW, I moved on to using an Arduino Nano running GRBL (and making own motor driver circuits using A4988, well, now they are TB6600 drivers) when I started CNC over 3D printing... In CNC I go to Z and then go down whereas in 3D printing you go Z and then go up and Marlin didn't seem to want to do that naturally, I may be wrong though

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 26, 2021, 07:52:49 pm
content: I'm also using GRBL, but the AVR series of microcontrollers is a bit underpowered for GRBL, especially when you want to use higher microstepping levels.A few years ago I flashed GRBL into a Blue Pill, soldered it (in a socket) on a piece of matrix board, then buffered the the outputs with some 74LS244 chips I had lying around, and from there it goes to the big Nema23 stepper motor drivers.GRBL is also expanding, and the STM32F103C8T6 is also getting quite old.GRBL has moved on to the "GRBL_HAL" project some time ago, and under that umbrella it can be compiled for a whole bunch of different microcontrollers.I have successfully compiled it and flashed it in a We-Act "Black Pill" with an STM32F411something_something and done a brief test with it on a breadboard, but have not used this for something "real" yet.

author: perieanuo
author_rank: Frequent Contributor
timestamp: September 27, 2021, 08:52:41 am
content: Quote from: Doctorandus_P on September 25, 2021, 10:47:30 pmno fancy explain here, every inductance that is disconnected from supply fights the current interruption and generates a spike. if driver is mosfet-based, overvoltage means kicking the bucketfor OP, all drivers are not equal, regarding the professional designed ones you can have bad input connectors, bad output connectors, fluctuating supply, they won't dye. they will dye after years in production environments because the aging of the semiconductors that generally due to temperature and time of course.those 3$ drivers from ali, they can dye in 5 minutes if you let you child playing with the motor connector or some spikes on supply or motor

author: Jwillis
author_rank: Super Contributor
timestamp: September 27, 2021, 04:30:57 pm
content: Sure looks like an overloading issue .What size of stepper motor are you trying to drive ?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 27, 2021, 06:06:41 pm
content: Quote from: perieanuo on September 27, 2021, 08:52:41 amThat is indeed the standard explanation. But it's not that simple.If a current carrying wire to the motor gets disconnected you get a big voltage spike over the inductor, I agree with that part. And that high voltage spike creates a spark over the cut wire, or faulty connector. I agree with that too.But why does that damage the stepper motor driver? The high voltage is generated by the inductor, and dissipated again in the spark gap.So I'm missing something, but what?

author: amyk
author_rank: Super Contributor
timestamp: September 27, 2021, 11:53:25 pm
content: The spike arcs over and then continues to the other side.

author: perieanuo
author_rank: Frequent Contributor
timestamp: September 28, 2021, 08:31:24 am
content: Quote from: Doctorandus_P on September 27, 2021, 06:06:41 pmfrom my experience, mosfets die very quick if voltage specs are not respected (overvoltage i mean) or second cause, overpower. a little spike is deadly for them, unlike the bjt that can handle better spikes. you can try with a couple of mosfets yourself.think of this, a loose contact for example (which is not the primary cause of death in industry, there you got pro connectors or even soldering, i imposed myself soldering in a company using mosfet drivers for motors, never had problems, the primary cause there is DC rail fluctuations or mechanical problems of controlled motors) will tend to generate a spark like you say, but the spark has enough time to discharge some energy on transistor, it's not like a clean cut when all the energy goes into spark, that's the gap between theory and practice. the motor bobbin will definitively produce overvoltage in driver, no connector disconnects like a professional designed contactor/disjunctor.i think you are tackling this too theoretical. i spoke with other engineers with some experience in power electronics, they confirmed me this overvoltage explain (more like a field engineer myself, but also some r&d in that motor driver business, mostly for dc/step motors/brushless, the big part was step motors driver design, but not for huge motors)for me this was the only logical path because the drivers i found burnt had no mechanical blocks in general, no mechanical overcharge, and the scenario was mains voltage fluctuation (so you have large dc rail variations) and sudden mechanical block of drived assembly (this push us to overvoltage, the scope confirms this). for the OP case, loose contacts means the same thing (well, that's for the hobby case)

author: beanflying
author_rank: Super Contributor
timestamp: September 28, 2021, 09:23:13 am
content: Quote from: sairfan1 on September 24, 2021, 10:09:51 pmUnless I missed it what voltage are you running the Steppers on via the Ramps Board?Are you powering the Arduino via the Ramps board supply or are you feeding it power from a separate 'appropriate voltage'? Even at 12V some clone boards have been known to go pop (ask me how I know)Long before you get to blaming drivers go back to basics and power supply wiring.Below is not the only way but just an example of wiring for this sort of thing. Best practice for CNC applications is power to the steppers is one supply and the controller is another.

author: sairfan1
author_rank: Frequent Contributor
timestamp: September 30, 2021, 02:12:20 pm
content: QuoteI'm powering Arduino from its USB, I removed D1 (diode) on RAMPS 1.6 board to discontinue power from RAMPS (that is because in future i want to use with 24v.Please note that its not something i connected, powered and magic smoke came out, I was using this setup for about one month and then suddenly it happened.