Integrated H-Bridge, Problem under Load conditions - Page 1
Forum section: electronics / projects

author: Snoopy04
author_rank: Contributor
timestamp: November 26, 2016, 12:02:06 am
content: Hi,I'm new in the Forum. Of courseI'm an electronics hobbyist and I've watched the EEVblog since a few months now. Which was really interesting in some fields. Especially the videos about the Design and preparing of a PCB for Manufactoring were helpful while I've designed my board. Which brings me to the reason I'm writing this article.The project I'm working on is a relatively powerful integrated H-Bridge including all recommended stuff for controlling and monitoring of the Bridge. The main purpose of course is the controlling of brushed DC-Motors until an acceptance power of 720 Watts. As I mentioned before the videos were really helpful. So my first professional Manufactored PCBs, actually it was a Panel with 3 seperate Boards, were nearly perfect. Except some stupid and weird design failsAfter soldering of a lot SMD and some throughole parts the first tests looked really impressive. Eventually no molten plastic arround the powerrails on the breadboard anymoreIt was the first time running under nearly full Load. During this test it turned out is that it seems to have an issue to get the Heat fast enough out of the Main driver Chip (VNH5019) while the Current exceeds the 20 Amps, but I think that's a topic for itself.So in the past few weeks I've written a lot of lines of code to get it all up and running. Until yesterday it worked pretty well but while I've testet it the first time with a powerful motor, I've spotet a really strange behavior of the PWM control:If the Motor is under no load everything is Ok. I can control it very smooth over the Full range of the duty cycle 0-100%, but If I put a load on the Motor (the same Type of Motor but now working as a generator, both connected with shaft couplings, resistors and lamps as load) the Speed and the Current draw, of the Motor, stays nearly the same between 50% and 98% of the duty cycle. I can't get more Power/Speed. The only thing which is changing is the sound of the Motor windings. I think the Frecuency of the tone is getting higher.Above the 98% the Motor gets immediately Full Power, under the 98% it slows immediately down and maintains Speed until 50%.The same behaviour I've observed during the Load tests with a few halogen lamps. First I thought it has something to do with the bulbs themselves but as I mentioned before it turned out that it has not.The Frequency Output of the micro I've already checked. It stays the same as it should be. According to the specs of the driver Chip it should work. (Except that I haven't a resistors in the PWM line)So therefore my question. "What have I missed". Is it a well known phenomen which is easy to solve or is it a fault/error of the driver chip itself?Some important data:Driver Chip: VNH5019 (manufacteur ST)µC: Atmega328p, 5V, 20mhzFrecuency: ca.19,5khzResolution: little lower than 9-Bits: 0-500Voltage: at the moment around 12.6VI think that's a good point to get started with the Forum. Hopefully someone can explain it to me

author: viperidae
author_rank: Frequent Contributor
timestamp: November 26, 2016, 06:10:23 am
content: Have you checked the output with a scope? Does the driver chip get hotter as you turn the duty cycle up above 50%? Does the current draw change between 50 and 98%?

author: tatus1969
author_rank: Super Contributor
timestamp: November 26, 2016, 11:16:02 am
content: We could help better if you post circuit diagrams. There must be something weird, that is not the supposed behavior of a H bridge with motor. How do the signals from your micro, and the ones to your motor look like on a scope?

author: rstofer
author_rank: Super Contributor
timestamp: November 26, 2016, 05:00:23 pm
content: Your PWM frequency is quite high.MOSFETs have quite a lot of gate capacitance and therefore take a lot of amps of gate current to switch. Yes, amps of gate current. Look at the MOSFET waveform and you will see that it is trapezoidal because it simply can't switch in zero time. During the leading and falling edges, the MOSFET is in the linear region and will be generating a LOT of heat. You want sharp edges, you want to switch in zero time and that takes a bunch of gate current. Which you probably can't deliver. So, you wind up with a trapezoidal waveform.At some point, the trapezoid will no longer have a period of time when it is fully on and the waveform will have only the leading and falling edges. It won't deliver much power to the load but it will certainly get hot. The MOSFET is spending 100% of its time in the linear region.So, if you slow down the PWM rate, there will be fewer edges per unit time and the MOSFET will stay on for a higher percentage of the cycle. This will result in less heat. It's not uncommon to keep the PWM rate down around 1 kHz. I didn't read the driver datasheet but I would see if the device will support a lower PWM rate.This is a case where a scope is invaluable. You really need to see what the MOSFET is doing.

author: Snoopy04
author_rank: Contributor
timestamp: November 26, 2016, 09:05:39 pm
content: No the current draw is very consistent (around 2 Amps). It varies in a range of only 200-300mA. The same applies to the temperature. It's not going over 32,8 °C.The Signal generated by the micro is very consistent between 50% and 98%, but the signal on the Output of the Bridge is a little bit weird. Especially in the range of 50%-98% when the problem occurs.In the following I've attached some pictures of the different states captured with the oscilloscope:Picture 1-2: The PWM Output of the micro (20µs/cm, 50µs/cm)Picture 3-4: The Output Signal to the Motor (unloaded, 50µs/cm, 10µs/cm)Picture 5-7: The Output Signal to the Motor (loaded with another motor as mentioned above, 10µs/cm, 20µs/cm, 5µs/cm )I've also tried to turn the Frequency down to 9khz but it's the same as before at 19,5khz.

author: rstofer
author_rank: Super Contributor
timestamp: November 26, 2016, 09:23:17 pm
content: You should probably pick a time/div and stick with it. 20 uS seems best because each cycle fills up a large number of divisions.In a perfect world, you would have the gate and motor signal on the screen at the same time.The good news is that your driver is producing pretty nice edges. That's the advantage of using a function specific driver instead of just trying to drive the gate from an IO pin.

author: tatus1969
author_rank: Super Contributor
timestamp: November 26, 2016, 10:42:26 pm
content: looks like false triggering on your last pictures, hard to judge what happens. but no obvious problem to see.what current does your halogen lamp draw? what is your motor inductance? (if you dont know, what type of motor?)how do youcontrol the ina, inb, ena, enb pins?

author: Snoopy04
author_rank: Contributor
timestamp: November 27, 2016, 02:15:45 pm
content: Ina, Inb, Ena and Enb are directly connected to the micro. Ena and Enb are held at +5V via a resistor. Until now they are not evaluated yet.If I connect only one Lamp it draws about 5 Amps on Full duty cycle. The range between 50% and 98% is now no longer a problem.Another thing I've discovered is that the controller is working normal in the range of 0% to 80% if I increase the PWM Value slowly. So I'm setting the duty cycle value not directly from 200 to 400 but in small steps counting up to 400. The Motor then smoothly ramps up until it reached the preset value of 400. If I'm increasing the duty cycle a little bit further it's the same crap as before.The inductance of the motor I don't know. It's not in the specs of the motor.

author: tatus1969
author_rank: Super Contributor
timestamp: November 27, 2016, 05:24:18 pm
content: how do you control pwm, ina, inb? can you draw signals or alike, this is still not clear to me. please gibe more detailed info.

author: nuno
author_rank: Frequent Contributor
timestamp: November 27, 2016, 06:01:15 pm
content: The ringing on top of the supply voltage could be the drastic current changes exercising the parasitic inductance of the layout (do you know how much time does it take a FET to switch?), or ringing on the supply voltage due to incorrect (too much ESR and or ESL from FET voltage supply to "ideal" capacitor, or current ringing between parallel capacitors) or insufficient power supply decoupling (if there isn't enough uF decoupling the supply, the capacitance may ring with the power supply's wiring inductance).

author: Zero999
author_rank: Super Contributor
timestamp: November 27, 2016, 06:39:41 pm
content: Quote from: tatus1969 on November 26, 2016, 11:16:02 amhttps://www.pololu.com/docs/pdf/0J49/dual_vnh5019_motor_driver_shield.pdfThe only comment I have is that it's running pretty close to the maximum rated frequency.

author: Snoopy04
author_rank: Contributor
timestamp: December 19, 2016, 12:00:17 am
content: Hi.Sorry that I've nothing written the last few weeks. I was a little bit busy, so I was not be able to get a little bit deeper in your replys.The good news: I've fixed itYour thoughts of the capacity went in the right direction.Well if you think about it, it's relatively easy. The main issue was the location and tracing of the main filter capacitors in the supply line. The connection to the main ground plane was established by a thin trace of only 0.5mmI've bodged the original capacitors out and Bridget the supply line with another capacitor directly under the Chip from VCC to GND. Wo a lah. The Motor speeded up to it's intended Speed and torque.Now it's usable over the entire range of the duty cycle and Load at a frequency of still 19.5 - 20 khzDespite that there is already something I do not understand:I've tried out a few capacitors to find the right one with the right values but with a capacity of already 1800uF, a little bit more than the 1500uF mentioned in the datasheet, it wasn't functioning correctly.The solution was to make use of two capacitors. The capacitance itself has now become fairly unimportant. I'm running it on two 100uF capacitors in parallel. 15 times lower than the intended value.Has anybody a statement for this

author: nuno
author_rank: Frequent Contributor
timestamp: December 19, 2016, 03:11:40 am
content: Quote from: Snoopy04 on December 19, 2016, 12:00:17 amWhen you parallel capacitors, you lower both ESR and, if correctly layout, ESL (on a pair of equal capacitors, youideallyhalf ESR and ESL). Minimizing both is very important in this application; it's not enough to put X uF, the 1stmost important capacitor characteristics are ESR and ESL, then capacitance. With 200uF "DC link" capacitance you should have some care about / be aware of the connection to the battery, there's a relatively short range of wiring length that can make it resonate with the capacitance.