H-bridge motor control circut burns MCU after some time - Page 1
Forum section: electronics / projects

author: rasul
author_rank: Contributor
timestamp: March 26, 2019, 07:29:37 pm
content: Hi everyone!I got a problem recently. I have already spent for about a week trying to figuring out what is causing the problem. I'm not very experienced in the field of motor control electronics.Circut's schematics is attached.Basically it's a simple H bridge with five 1 Ohm resistors connected in parallel and used as overcurrnt detectors. It's controlled by MCU.This circut works fine while motor current is below 3 amp. But when I use motors with about 7A current consumption after some time system stops working. At first I thought that this was caused by voltage spikes during start of the motor on current sensor resistors. And I was right. On all malfunctioning boards they was damaged and had higher resistance. I fixed this problem by lowering they resistance and by using resistors with higher power rating. After that fix I don't observe any dangerous voltage spikes on those resistors and boards are working for a few hours longer.After some time I start to observe 12V on MCU pins and this condition reset MCU which also reset it's outputs and 12V dissapears. Looks like this voltage somehow come from outputs controlling this H bridge. And sometimes it just destroy MCU - it starts overheating and stops working.I have also tried to reduse resistance of R4, R11, R12 and R13 so parasitic capacitors on MOSFET charge faster but it didn't helped.This circuit was designed to be cheap for motors consuming 7A under nominal load. I replaced those cheap chinese MOSFETs with irfz44n and irf4905 but it didn't helped either.Any ideas why it's happening? I'm totaly confused.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: March 26, 2019, 07:39:49 pm
content: Fully discrete H-bridges are somewhat dangerous. Some small bug and you have a short e.g. over the left highside and lowside, burning the FETs.Are you sure you're at least using blanking times when switching directions? For inductive loads, active freewheeling might be necessary to stop recirculation.I'd recommend to just use a monolithic H-Bridge or at least some dedicated IC to control the FETs.

author: wraper
author_rank: Unknown
timestamp: March 26, 2019, 07:46:24 pm
content: This circuit is non functional. With 47k R1 and 2.2k R2 (times 4), this won't ever react to any control signals.

author: Benta
author_rank: Super Contributor
timestamp: March 26, 2019, 08:01:00 pm
content: Quote from: wraper on March 26, 2019, 07:46:24 pmNot only non functional, it's also dysfunctional. With 47k and 2.2k, the lower MOSFETs are on all the time.

author: rasul
author_rank: Contributor
timestamp: March 26, 2019, 08:43:39 pm
content: Thank you guys!Quote from: wraper on March 26, 2019, 07:46:24 pmYes. You right. I changed those values later. But I forgot to change schematics and now even don't remember what exact values I used there after. I'm sorry for misleading.Quote from: 0xdeadbeef on March 26, 2019, 07:39:49 pmThanks! I will consider this. Delays are long but there is a part in this device's behavior which can result in immediate direction switch (i just thought about this condition).But I don't understand how this can lead to 12V going to MCU pins. Anyway I should change this behavior, maybe it' a part of a problem at least.

author: magic
author_rank: Super Contributor
timestamp: March 27, 2019, 09:03:20 am
content: Quote from: rasul on March 26, 2019, 08:43:39 pmI don't get it either. The B-E junction of the transistor should short the base to goundAren't the BJTs completely ruined when it happens?Is the 5V/3.3V supply for the MCU functional or does it get shorted to 12V?And yes, everything has inductance. You turn the FETs off but current still flows through the motor resulting in at least 4 things:1. fast voltage raise at the drain of the FET, check if it doesn't raise faster than absolute maximum dV/dt2. overvoltage at the drain of the FET and avalanche breakdown3. capacitive charge injection into the gate of the FET4. perhaps a transient overvoltage on the 12V rail after the reverse pair of FETs turns on

author: jonroger
author_rank: Regular Contributor
timestamp: March 29, 2019, 01:46:55 pm
content: You could add some diodes to protect your MCU outputs from excessive voltage (high or low).

author: free_electron
author_rank: Super Contributor
timestamp: March 29, 2019, 02:47:54 pm
content: is your schematic complete ? you use the resistors as current sense but i don;t see where you are actually sensing the current ? is there a wire from those resisotrs to an analog input on the mcu ? if there is : that is your point of failure. current spikes there will cause overvoltage on the adc input

author: rasul
author_rank: Contributor
timestamp: March 29, 2019, 10:31:03 pm
content: QuoteYes. It was at least at first time. But then I used 0.1 Ohm shunt resistance instead of 0.2. I made some calculations and I thought that this cannot happen again. But it did. I used SMD resistors with not a great termal managment. But calculated resisance and power rating should be enougn for this application. That is why I tried to find an answer here.Recently I repeated testing with 0.08 resistanse and increased power rating of those resistors. So far everything is working. So...will see

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 30, 2019, 03:42:36 am
content: without giving more informations such as dso capture of fets' gates voltages, besides a complete schematics. its difficult to determine, there are few/many entries for errors and some of them are not shown. if its me guessing, you have shoot through due to slowly turning off fets, or linear (saturation?) fet operation during high power operation, shorting bridge, and then shorting bjt driver. ymmv.

author: Chris56000
author_rank: Frequent Contributor
timestamp: March 30, 2019, 04:35:58 pm
content: Hi!A lot of commercial and industrial motor drive and servo control amplifier PCBs I have seen at work use opto–couplers between the control MCUs and the motor drive amplifier, sometimes on both sides of the MCU with both input control voltages and the motor control voltages isolated, and I also think many of the purpose made motor bridge drivers are internally isolated between MCU drive pins and MOSFET driver gates as well, precisely to prevent the high peak voltages due to motor parasitics, self inductance etc., etc., getting back into the MCU and damaging it!As Member "Oxdeadbeef" said, a purpose–made H bridge driver is preferable as these devices contain built in dead–time to prevent "cross–conduction" between upper and lower halves of the drivers, and also precautions to prevent one half or the other "bottoming" or "latchup", and this is why he recommends their use!Have a look amongst T.I., ST and the other major Semiconductor Vendors for "H Bridge Motor driver" in their "Parametric Search" or "Search By Function" pages – you should find recommended devices and possibly even reference designs to use as a starting point!In fact, there are similarities in design between full bridge motor drivers and full bridge power supply designs, with the same MOSFET drive precautions being needed for each type of circuit! You can find examples of MOSFET gate–drive circuits in Keith Billing's "Switch Mode Power Supply Handbook" free from the Internet Archive or a few Uni repositories!If you get mega–stuck I'll see if there's any scrap at my work that uses a full bridge motor driver and if there is I'll draw a bit of it out for you to provide a commercial example of how it's done, but please have a look in the semiconductor maker's pages first!Chris Williams

author: rasul
author_rank: Contributor
timestamp: March 30, 2019, 04:42:53 pm
content: HiChris!That's a great advise I was looking for!I had to do it before I failed.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: March 30, 2019, 06:59:35 pm
content: I'd use something like an ST L9958 unless you need really high currents. These things are more or less foolproof, have SPI diagnostic/configuration, dynamic overcurrent limitation, freewheeling on low side and what not. Stuff like this is used in automotive environments for throttle blades and actuators like that.

author: TurboTom
author_rank: Super Contributor
timestamp: March 30, 2019, 10:16:12 pm
content: The major problem is capacitively turning on the P-MOSFETs while the N-FET is turned on. Provided the control scheme is sound, the P-Channel FETs are held non-conducting only by the 47k resistors. The reverse transfer capacitance is specified to be 110pF @ 25V, at 12V probably a little more. Gate-source capacitance is 680pF (calculated by the gate-source charge) which forms an inductive voltage divider of approx. 0.14 ratio. This means, a fast voltage change of 12V at the drain will momentarily induce a gate voltage of 1.68V which is well within the specified threshold range. So switching on the N switches, the P switches will always conduct for a certain time as well (until the input capacitance is discharged via the 47k resistors). This "punch-through" effect can only be eliminated by actively driving the corresponding gate below the threshold voltage.This effect gets the more severe, the higher the supply voltage is. Some high voltage circuits, especially IGBT stuff thus requires negatively biasing the gate (for an N-Channel switch) when the element is supposed to stay turned off.Better use proper gate drivers to eliminate the problem or at least an additional PNP transistor to reverse the drive scheme of the high-side switches.Good luck,Thomas

author: rasul
author_rank: Contributor
timestamp: April 04, 2019, 11:48:12 pm
content: TurboTomthank you very much.Actually those p-chanel MOSFETs were damaged during one of the tests iteration. I changed 47k resistors to 1k to reduse that switching time. Anyway I should read more about this "punch-through" effect and probably stay away from designing custom H bridges for powerful DC motors for a while.

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 05, 2019, 12:24:53 am
content: currently working on this discrete solution to get the pcb sent to fab-house (panelized with other stuffs to get dirt cheap cost per project) not the neatest in the world but sim tells me its working. only 2 controls for the whole h-bridge, save the hassle of 4 controls. fwiw ymmv.