Why do my ICs keep dying when scope probing? - Page 1
Forum section: electronics / beginners

author: Mike Ro
author_rank: Newbie
timestamp: June 10, 2019, 10:58:28 am
content: I am experimenting with TMC2130 silentstep stick modules in SPI mode and a NodeMCU.Mostly, I have everything working fine. But occasionally either the TMC2130 or the NodeMCU fails.The failure modes are varied, the most common is that the TMC2130 responds to SPI, but does not even attempt to drive the motor (SPI reports open load). I have another TMC2130 which continuously draws 350mA even without a motor connected and gets really hot. Also, one NodeMCU failed with the GPIO pin (connected to STEP) no longer driving properly.These failures seem to occur when I have been probing the signal (usually STEP or SPI) whilst the USB is connected to my PC.Instinctively, this sounds like a earth problem (bench power supply outputs are floating, USB is floating, scope ground is at earth potential).However, I have checked and double checked that that all the connections are properly tied to 0V. I have a single, low impedance 0V track that connects the NodeMCU ground (PC USB shell potential), TMC2130 driver motor power ground (bench supply - output) and scope ground (mains earth). The maximum DC voltage between any point is around 28mV and AC voltage is negligible.I am only driving the stepper motor at 300mA (both driver and TMC2130 are rated at over 1A).Normally, the circuit can run for days without problems, but every now and then I tweak the code and need to probe the circuit. This is when the problems occur.I feel like I am missing something really obvious, but what?

author: garethw
author_rank: Regular Contributor
timestamp: June 10, 2019, 11:00:08 am
content: Do you have sufficient bypass capacitors on the power pin of the IC?Sent from my iPhone using Tapatalk

author: Mike Ro
author_rank: Newbie
timestamp: June 10, 2019, 11:15:19 am
content: Quote from: garethw on June 10, 2019, 11:00:08 amThanks, that's a good point, but I think it is okay - the schematic for the module is here:https://github.com/watterott/SilentStepStick/blob/master/hardware/SilentStepStick-TMC2130_v11.pdfThere are bypass on both the VM and VCC_IO lines.

author: Gyro
author_rank: Super Contributor
timestamp: June 10, 2019, 12:22:21 pm
content: Quote from: Mike Ro on June 10, 2019, 10:58:28 amWelcome to the forum.My instincts would be the same as yours, but it sounds as if you have all the bases covered.A couple of random thoughts...- Is the PC grounded? A possibility if it's a laptop with a 2 pin mains lead (Y-Cap leakage).- You mention USB shell potential, that's not necessarily the same as the USB 0V signal. The two are normally only linked at one end, might relate to the above.It sounds like the occurrences are very tied to the times that USB is connected, so logically it's probably either the interface itself or what's connected at the other end.P.S. I would also look at more bulk capacitance on the TMC2130 supply. The internal output clamp diodes need something to shunt back-EMF from the motor into without spiking the supply too much. I have no idea how this would be USB related though.

author: DDunfield
author_rank: Regular Contributor
timestamp: June 10, 2019, 12:32:36 pm
content: It does smell like a grounding problem. You've checked that no measurable current flows between scope ground and device ground?Assuming you've got a fairly standard scope with 1meg inputs, and are using a 10x probe, then touching a point on the circuit with the probe should be akin to touching it with 10 meg resistor to ground. which I would not think would be significant.A couple of other things to consider.The scope probe will present a slight capacitance compared to a pure resistor, but again I would not expect it to be significant (It's very low).The probe may be injecting noise into the circuit. Could be through grounding loops, could be something is acting like an antenna, hard to say.I don't have experience with the module in question, however I note that it is an "H-bridge" which are unhappy of both branches get turned on at the same time (even briefly).It could be that noise is getting injected and causing the H-bridge to enter a "funny" state, possibly enabling both sides at once, big spikes, potential lockup etc.Your module drawing significant current even if no motor is connected smells of a H-bridge failure.Dave

author: Mike Ro
author_rank: Newbie
timestamp: June 10, 2019, 01:29:35 pm
content: Thank you both for these very helpful suggestions.Quote from: Gyro on June 10, 2019, 12:22:21 pmIt's a Dell desktop PC, but the USB shell is not tied to mains earth.Quote from: Gyro on June 10, 2019, 12:22:21 pmOh, I hadn't realised that. Indeed, on the NodeMCU there is no connection between USB shell and USB 0V. There is about 1 ohm between the shell and 0V with the PC connected, so I guess they are linked at the PC end.Quote from: Gyro on June 10, 2019, 12:22:21 pmOk, that is easy enough to do as I have tracked out an additional capacitor so will fit it now.Quote from: DDunfield on June 10, 2019, 12:32:36 pmJust checked, there is no measurable current flowing.Quote from: DDunfield on June 10, 2019, 12:32:36 pmYep, scope is a Rigol MSO2072A with 1M input and x10 probe.Quote from: DDunfield on June 10, 2019, 12:32:36 pmThis is interesting, it does seem relatively easy to get this device into a funny state, either by setting an inappropriate register value or irregular step clocks.Unfortunately, I don't have a working module left to compare with. The resistance between A and B pins of each H-bridge is in the range of 5 - 15 Mohms with no discernible diode characteristic.

author: DDunfield
author_rank: Regular Contributor
timestamp: June 10, 2019, 01:56:13 pm
content: Quote from: Mike Ro on June 10, 2019, 01:29:35 pmIf it is in fact some noise causing the H-bridge to malfunction and essentially turn on both sides at once, then you should be able to see this as a large current pulse occurring while you are probing. Ideally you can make this run with enough series resistance to avoid killing the bridge if it happens.If you have a battery powered scopemeter you could put it in roll or slow-sweep mode monitoring a shunt resistor to see current draws in the recent past. (I find my UT-81B really handy for this as it can go into scope mode in current ranges).Another gadget I use for this kind of thing is a homebuilt adjustable circuit breaker. Functions like an adjustable resettable fast fuse. Makes it easy to see know when things have gone wrong.You might be able to get away with just a fuse, question is will it blow before H-bridge gets damaged.Dave

author: Johnny10
author_rank: Frequent Contributor
timestamp: June 10, 2019, 02:29:10 pm
content: Probe with differential probes or Battery powered oscilloscope.I did this on floating circuits.

author: Gyro
author_rank: Super Contributor
timestamp: June 10, 2019, 02:36:55 pm
content: Quote from: Johnny10 on June 10, 2019, 02:29:10 pmOr, assuming a two channel scope, use the poor man's version... Add the two channels with one channel set to invert. Make sure the ground clips stay well out of the way.

author: Mike Ro
author_rank: Newbie
timestamp: June 10, 2019, 03:00:57 pm
content: Thanks again all.Unfortunately, I don't have a differential probe or scope meter.What sort of duration are the transients likely to have? I have ordered some small shunt resistors because I also want to monitor the supply current and voltage. However, I think the smallest sampling interval is going to be ~1kHz.

author: Johnny10
author_rank: Frequent Contributor
timestamp: June 10, 2019, 03:28:39 pm
content: Then do what Gyro suggested use two probes and the invert function on your oscope.

author: ptricks
author_rank: Frequent Contributor
timestamp: June 10, 2019, 03:31:15 pm
content: The chips I have had fail like this were from the motor being disconnected while powered, the ground path not being a star configuration, or EMI entering from wires that were too long.Might want to look over this link and see if anything sticks out:https://www.analog.com/en/analog-dialogue/articles/staying-well-grounded.html

author: Mike Ro
author_rank: Newbie
timestamp: June 10, 2019, 04:51:20 pm
content: QuoteVery good article, thanks!

author: Mike Ro
author_rank: Newbie
timestamp: June 11, 2019, 12:16:48 pm
content: QuoteI followed this approach and the result was interesting. I discovered that in spreadCycle mode there were large voltage peaks on the driver outputs.I removed my fixed voltage supply and supplied the driver at a lower voltage (12V) and set the internal drive current to 100mA. Even at standstill, the output was reaching 24V peak. I then very gingerly ran the motor slowly forward and the peaks increased to around 28V.Now, I may be misunderstanding the concept of chopper drivers here (and the Trinamic spreadcycle one in particular), so please be patient with me!I thought that the idea is the chopper will overdrive the voltage to achieve a fast current rise time with the inductance of the motor coils effectively regulating the maximum voltage achieved.However, from the gentle test that I made, it looks like the voltage can significantly overshoot the supply voltage and I would have thought that this is a problem for the driver MOSFETs.I haven't found anything in the datasheet that describes the output voltages, only lots about the current / sense resistor voltage.Interestingly, when I configure the driver for 'traditional', constant off time with fast decay time (i.e. chopper mode, chm = 1) then the differential output looks more normal and is limited to the supply voltage.Also, in spreadCycle mode (chm = 0) then the motor has an audio whine both at stand still and when moving slowly. The pitch of this whine changes slightly when probing the outputs, so there must be some coupling going on.I have noticed in the data sheet about choosing appropriate sense resistors. The module has .11R which is optimised for higher currents, so maybe there isn't enough resolution for running at 100mA?QuoteThis was my first port of call when I saw the voltage overshoots. I wondered if the long (~50 cm) coiled motor leads were having an effect, but cutting them down to 50mm didn't make any noticeable difference.

author: rstofer
author_rank: Super Contributor
timestamp: June 11, 2019, 02:26:56 pm
content: Put a 1k resistor in series with the scope ground lead and connect the other end of the resistor to your normal test ground point. Measure the voltage drop with a DMM. If there is significant current, there will be a voltage drop.

author: nemail2
author_rank: Regular Contributor
timestamp: June 17, 2019, 11:57:28 am
content: try to contact trinamic directly. usually, they are very helpful and you get to write directly with the guys who like wrote the datasheet and stuff..

author: Mike Ro
author_rank: Newbie
timestamp: June 21, 2019, 09:48:22 am
content: Sorry for the slow response.I've ordered some more modules and this batch seem to be much more resilient.I will capture some waveforms and send them off to Trinamic to see if they are as expected or there is something wrong with my design.Thanks again for all the help.