Author Topic: BLDC Motor Controller, Design, Waveforms, Thermal Tests  (Read 29274 times)

0 Members and 2 Guests are viewing this topic.

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, RC Snubber Design + Waveforms
« Reply #50 on: January 24, 2018, 04:25:21 pm »
So this thread seems pretty much dead but I'll keep posting anyways.


My PCBs arrived,



Had 2 tiny (stupid) mistakes which I am SUPER disappointed about. 1- I connected the anode of the LCD back-light to ground by mistake on the schematic, and I when I was moving some components around, I didn't realize that on of the buck converter CAPS moved. Now its right up against the regulator, luckily it will still fit but only just.

Went over the PCB a couple of times so I'm very disappointed in myself that I didn't spot these but luckily they are not major and I can work around them. Hopefully there are no more mistakes lurking about.

Will solder it up and see if it works. Fingers Crossed
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: BLDC Motor Controller, RC Snubber Design + Waveforms
« Reply #51 on: January 24, 2018, 09:24:39 pm »
 :-+
 
The following users thanked this post: Glenn0010

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #52 on: March 02, 2018, 03:08:54 pm »
So here is Prototype 2 (P2). She is working :)

It is a 4 layer board whose FET layout is inspired by Vedder. Got total isolation from the logic side to the power side. This includes isolated current sensing as I am using Hall effect current sensing. Was my first time soldering QFN packages so I did butcher the Micro but it works.

It works well. Now looking t moving forward and running some thermal tests on it. Also looking at comparing trace inductance with the first version seen in the posts above.

In the mean time I have been working on P3 which will be similar to P2. However P3 will have temperature sensing, and an integrated 3 Phase Full Bridge (MTI85W100GC). Also the P3 will feature REALLY short tracks between the Gate Drivers and fets, since they will go from the top of the board to the bottom. This is aimed at reducing the inductance and hence making the circuit more hardy.
Any suggested Improvements of the P2 for the P3 are welcome

 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1272
  • Country: gb
    • bitdynamics
Re: BLDC Motor Controller, Design + Waveforms
« Reply #53 on: March 02, 2018, 03:36:07 pm »
I'd get rid of that single large electro cap and replace it by more lower value surface mount versions.  They could be mounted closer to the power switches too, and better spread across the power / ground planes. As output inductance generally isn't an issue, you could allow more room for some snubbers ?
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #54 on: March 02, 2018, 03:46:10 pm »
That could work, it would also make the controller smaller, and cheaper. I also have an I identical cap on the bottom side of the board aswell. What values would you go with and how many?

As output inductance generally isn't an issue, you could allow more room for some snubbers ?

In what way do you mean more snubbers? Across the DC link or across all the high side fets and.or low side fets?
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #55 on: March 02, 2018, 04:44:48 pm »
You can do a double pulse test under the same conditions and that will show you the "layout quality" of the several versions. One interesting test on the current version would be to test as you have now and test with the caps soldered flush to the board (in the vertical position). Don't save too much in uF for the DC link, as you can have situations of resonance with the battery wiring.

The problem with snubbers at these power levels is that tend to be big and heat up, so I don't see them in consumer products.
 
The following users thanked this post: Glenn0010

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #56 on: March 02, 2018, 05:16:26 pm »
That's definitely a test I want to do since it is used in industry.

TO be honest it scares me a little bit since I don't want to destroy my boards incase it causes some super high voltage spikes.

It would be very interesting especially comparing the P1 to the P2. The test as you said on the P2 will also be very interesting, since it could justify switching to SMT caps as max_torque suggested above.

Still worried I could destroy my gate driver/fets, however I guess it is worth the risk. I'll start on the P1 since it is the most likely to have the biggest spike hence I'd rather destroy that than the P2
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #57 on: March 02, 2018, 06:21:33 pm »
Well, best way to keep it safe is not power it up, ever :D
The double pulse is a highly controlled test. Start with smaller current (smaller current rampup time), and smaller switching speeds (higher gate resistor) so you get a feel for the initial behavior.
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #58 on: March 02, 2018, 07:15:38 pm »
Yup Might as well go for it  ;)

As the inductive load, I shall use my one phase of the motor to the +48V rail, while I will use another phase connected between the two birdges. I will also hjave the motor with locked rotor correct?

I will then apply the double side to the low side bridge
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #59 on: March 04, 2018, 11:06:11 am »
BAD NEWS, I NEED SOME ADVICE.

So I today I went to do some testing. I charged my 48V battery fully and started running the motor at full speed no load. Ran fine for around 10 seconds and 'THUD' the rotor locked up and everything shut off. At that point I knew I KOd one or more gate drivers.

I Checked for shorts and sure enough there was a short between my 15V and GND rails, so that could be either the buck regulator (unlikely) or the gate drivers, my money is on gate drivers. Tomorrow I will go to uni and un-solder them to se how many I KOd.

So assuming that the gate drivers are KOd, I believe this was caused by the inductance of the traces from my gate driver to the fets. Even Vedder himself had problems dealing with his VESC 4 were some motor would destroy his drivers as seen here below

https://youtu.be/1iwN5LGGM80?t=70

So as seen below there is roughly 5cm between the driver and the fets, I didn't think was too much but apparently it is.



So to fix this issue what I need to do is ensure that traces between the driver and the fets are minuscule. Naturally in this version this is not possible. Hence to fix this version what I propose on doing is the following:

1 - Use 100 ohms gate resistors, which slows down the turn on/off times.
2 - Add a 10nf capacitor across the gate and source of each fet, this also slows down the transients.

I think this hould fix my issues. Funny thing is that on my very first working controller. I had the PCBs set up in modules (one for gate drive, one for power stage) I was sending the drive signals over jumper cables between the two boards. The only different thing I had in my layout was the 10nf capacitor, which I currently do not have and that controller worked fine even with the long jumper wires. So I think although I am not fixing the issue, I am fixing the symptom at the cost of some efficiency.

In my P3 this should not be an issue, since I placed the gate drivers really close. as seen below there is rougly 1.5 cm. IS this too much?





 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1272
  • Country: gb
    • bitdynamics
Re: BLDC Motor Controller, Design + Waveforms
« Reply #60 on: March 04, 2018, 01:53:29 pm »

So assuming that the gate drivers are KOd, I believe this was caused by the inductance of the traces from my gate driver to the fets.

How does extra inductance to the gate cause the driver to fail? 
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #61 on: March 04, 2018, 02:08:54 pm »
I don't see how the driver - gate inductance can cause failure, either. Inductance will slow down gate charging and discharging - there is, switching speed. Do you have any gate resistor? Did you do the double pulse test 1st, before running the motor and analyzed the switching behavior? Vgs and Vds scopeshots will tell you alot.
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #62 on: March 04, 2018, 04:37:25 pm »
I believe this issue is caused because of undershoot at the VSSA pin of the UCC20520 and having inductance in the traces between the FET and the driver does not help.

I currently have a 10 ohm gate resistor. I did not do the double pulse test, I was just running the motor normally to test my current sensors since I need to implement them before doing the double pulse test. However a mistake on my part is not taking any waveforms like you said while running. So I will fix that in the future.

O have been reading up and I think its because of the under voltafe, I have found this application not which is quite useful.  https://www.infineon.com/dgdl/an-978.pdf?fileId=5546d462533600a40153559f7cf21200

These are the main points I took from it which highlights how to mitigate the under voltage:










This last image is from the UCC20520 Datasheet

To hopefully solve this problem, I will do the following:

1 - Increase Gate resistor to 100 ohm (Not sure about this)
2 - Increase the low side capacitor according to the 4th image. In my case, both of them are the same (0.47nf) hence I will increase the lows ide capacitor to 4.7nf
3 - Add a 10nF capacitor between Gate and source. To produce cleaner waveform as in image 5.
4 - Take measurements on the gate driver.

I think based on the AN these are good adjustments to make. I am not sure about increasing Rgate too much since with the addition of the capacitor between gate and source it may slow down the switching too much

What do you think?
« Last Edit: March 04, 2018, 04:39:31 pm by Glenn0010 »
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #63 on: March 04, 2018, 06:21:37 pm »
Bingo I think we have a winner!



Here is the maximum undervoltage it tollerates -0.3V. So I will replace the driver and measure the under voltage I'm getting.

Here Is a post on a different form where a guy experienced what seems to be the same issue:

https://electronics.stackexchange.com/questions/322615/isoltaed-gate-driver-consistent-failure

What he did to solve the issue was he increased his sinking resistor and added schottky diodes from source to gate, Considering I dont have a turn of diode or resistor, what are my options apart from bodging them?

I will update you guys with scope shots from the driver soon!

 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #64 on: March 04, 2018, 11:38:47 pm »
Ok. In that case, increase Rg to 100R (bullet 1) is what I would do to start. Then measure.
Beware how you measure... use the short GND clip and make sure there's no problem with connecting your scope GND to a non GND circuit node.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8110
  • Country: fi
Re: BLDC Motor Controller, Design + Waveforms
« Reply #65 on: March 05, 2018, 10:19:36 am »
100ohm gate resistor is HUGE for a motor driver this size, and it's going to seriously compromise the efficiency. 10ohm is on the right ballpark.

Hugely excessive switching times can get the FET outside of its safe operating area, since these FETs are designed for switching, not linear, dissipative operation.

You can definitely try that, but I'd recommend trying to find the actual cause of the problem instead. I'd recommend you to run at half DC link voltage, probing all possible signals for over/undershoots. Then scale up.
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #66 on: March 05, 2018, 01:56:28 pm »
So Here is an update.

I removed all of my gate drivers and to my surprise they are NOT the issue. With them out of circuit, I still had the short between 15V and GND. After some more digging around, I found out that it was due to my buck converter.

I am using the LM2576HVSX-ADJ. I Bought it from mouser, so it must be a genuine part right?

I am using it to drive 15V. The interesting thing is that once I removed the regulator it is shorted between Pin 2 (Output) and GND. It is not shorted between Pin 1 (Input) and GND. This leads me to believe that something went wrong on the 15V rail not the input.

 So here is my schematic.



This is the recommended schematic by TI. The differences I have, are the diode the inductor and the output capacitance.
Diode - My diode is a Schottkey diode I think it is fine.

Inductor - I used a 100uH ias reccomened on the diagram. In figure 31 of the data sheet, it shows that for a 100uh inductor at roughly 50V, it can supply a max current of 1.75A. I do not suspect this to be an issue.

Capacitor - O the output, my capacitor is much smaller I am using a 220uF instad of the 1000uF (for the fixed) and 2000uF for the adjustable on one diagram and 1000uF on the other diagram. however I don't think this is the cause, I shouldn't be drawing large amounts of currents for this application, since I am only driving an mcu, lcd, and the fets. Or is such a large CAP required for stability?





Another issue that I am suspecting is the layout that I have used. I placed the regulator and all other components on the bottom while placing the inductor at the top due to space issues.  Could this be causing some kind of issue?




Could there be some kind of ringing when I switch the FETS that is causing an issue?

This is a really surprising issue for me. I have those cheap Chinese version of this regulator which I could unsolder and test again however I'd like to see what is the underlying issue before I blow it up again.
« Last Edit: March 05, 2018, 02:08:00 pm by Glenn0010 »
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #67 on: March 05, 2018, 07:10:03 pm »
So I tested the standalone Chinese buck converter board. I connected a load resistor of around 8.4 ohms at 15V buck setting, with a 100uH inductor. When  I switched on the buck first and then connected the load, I got a max current output of 1.78A however the voltage sagged to 11.8V. at 50V input voltage. This current value corresponds exactly to the datasheet figure shown below. To increase this maximum current I could connect a 68uH inductor instead.



When I switched on with the load connected, the voltage only reached around 6.7V. I also connected a 1000uF cap on the output as per the datasheet to no effect.


However I don't think this is really an issue however, since on strat up I have really low current demands since only the logic need power. Then when I start running the motor at no load, all the circuit current is around 1.8A including the motor hence we can say that the buck current is negligible since most of the current is going through the motor and not the buck.


You can definitely try that, but I'd recommend trying to find the actual cause of the problem instead. I'd recommend you to run at half DC link voltage, probing all possible signals for over/undershoots. Then scale up.

Tomorrow I will replace the regulator on my board and test it using the scope   and a limited power supply a Siwastaja suggested. I will move up in voltages until I see a problem.

I just remembered that when I was soldering the circuit, I soldered C7 (63 Volts capacitor for the input of the buck) backwards and it obviously blew. I replaced this and the buck worked fine,. Could I however when I blew the capacitor  stressed the buck converter and put it on the edge of failing and after running it for a few minutes later it finally failed?

Thanks for all your help it is much appreciated.
 

Offline killcode

  • Contributor
  • Posts: 13
  • Country: au
Re: BLDC Motor Controller, Design + Waveforms
« Reply #68 on: March 07, 2018, 07:52:25 am »
So I tested the standalone Chinese buck converter board. I connected a load resistor of around 8.4 ohms at 15V buck setting, with a 100uH inductor. When  I switched on the buck first and then connected the load, I got a max current output of 1.78A however the voltage sagged to 11.8V. at 50V input voltage. This current value corresponds exactly to the datasheet figure shown below. To increase this maximum current I could connect a 68uH inductor instead.




That is completely wrong. Y-axis on that graph is not volts, it is E.T (volt.us). You have to calculate it, in your case it is (48-15)*(15/48)*(1000/52) ~= 200.
So for a 1.75A load you need a H470 inductor. Look up the specs for that in table 4 and you'll have your inductor criteria. (In your case you could actually use Figure 30 (fixed 15v) as you are setting for 15v)....and you really should have a good idea of how much current you will be drawing on the 15v rail if you are at prototyping stage.

Using too small an output capacitor (within reason) will just result in more ripple. Stick your scope on it under load and see.

There is a detailed design procedure in the datasheet starting at page 21.
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #69 on: March 07, 2018, 08:43:20 am »
I completely agree with what you said. Upon further reading yesterday I came to the same conclusions. However as I was looking through the datasheet, I noticed that depending on the inductor size, you need a minimum value of output capacitor to ensure stability as seen below



So in my case I have a 100uH inductor. The minimum value for my capacitor would be as follows:

Cap out > 13300*((52V Vin Max)/15V*100) = 461. uF.

Now in my design I was using a 220uF cap on the output so that puts my pole pairs in the unstable region. I guess this is probably the cause of my buck converter working a lower voltages and failing at a fully charged battery i.e. 52V, since the highervoltage also effects stability. Therefore now I connected a 1000uf capacitor on the output that is more than twice the calculated value so it should be fine.

Today I tested it for 30 minutes under no load. Tomorrow I will test it with the motor connected with a supply. I wil take waveforms on the output of the buck and the gate drviers. Than I will do the same with the battery connected.

Hopefully the capacitor stability was the cause of my problems.

Regarding the fixed 15V model . I tried to find the 15V SMT model on mouse however I could only find the 12V and lower model. Hence that is why I went with the ADJ version so it would still be SMT.
 

Offline killcode

  • Contributor
  • Posts: 13
  • Country: au
Re: BLDC Motor Controller, Design + Waveforms
« Reply #70 on: March 07, 2018, 09:05:48 am »
Regarding the fixed 15V model . I tried to find the 15V SMT model on mouse however I could only find the 12V and lower model. Hence that is why I went with the ADJ version so it would still be SMT.

I meant that you can use the graph (Figure 30) intended for the 15v version to avoid calculating E.T for different input voltages.

100uH is much too small with your input voltage. look at E.T = 200 on that graph (Figure. 31). Even at 3A you need at least 330uH.
I suspect your peak load is more like 1A and that results in a 680uH inductor.
These old 52khz switcher designs need comparatively large inductors.
What is your actual peak 15v load?

Note. E.T = (Vin-Vout)*(Vout/Vin)*(1000/khz) = (48-15)*(15/48)*(1000/52) ~= 200.
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #71 on: March 07, 2018, 11:36:15 am »
I calculated that I have an average current consumption of around 250mA-300mA at 15V at worst case, Probabbly more like a 100mA. However The gate drives need around 1A peak tough that should be handled by their respective capacitors.

Can I assume around 1-1.5A current consumption to be safe and design around that? Since the graph we are referring to is stating Maximum current, and on start up, to charge the elec caps there is a significant draw.

That would mean around 680uH to a 470uH. However let's say my circuit is on stand by, and running at low current, I would fall out of this spec, would it risk destroying my buck converter? I think the inductor would operate in discontinuous mode, which is still fine for this converter according to the datasheet

Thanks for your help  ;)
« Last Edit: March 07, 2018, 12:16:44 pm by Glenn0010 »
 

Offline killcode

  • Contributor
  • Posts: 13
  • Country: au
Re: BLDC Motor Controller, Design + Waveforms
« Reply #72 on: March 08, 2018, 12:56:40 am »
I calculated that I have an average current consumption of around 250mA-300mA at 15V at worst case, Probabbly more like a 100mA. However The gate drives need around 1A peak tough that should be handled by their respective capacitors.

Can I assume around 1-1.5A current consumption to be safe and design around that? Since the graph we are referring to is stating Maximum current, and on start up, to charge the elec caps there is a significant draw.

That would mean around 680uH to a 470uH. However let's say my circuit is on stand by, and running at low current, I would fall out of this spec, would it risk destroying my buck converter? I think the inductor would operate in discontinuous mode, which is still fine for this converter according to the datasheet

Thanks for your help  ;)


That switcher has current limiting but you would want to ensure that your inductor will not saturate (especially give your large voltage delta). I wouldn't consider ephemeral current draw in inductor sizing as then you'll only be in continuous mode for microseconds. I don't think I've ever killed one of those simple-switchers, they're quite robust.

It's a balancing act to optimize for wide ranging operating conditions. Though I suspect your operating window is smaller than you think as peak draw at gate drivers will be provided by their respective capacitors and the average load on the DC/DC will be lower.

Since you have the rest of the board populated, you could hook up a lab supply to the 15v and actually scope the current draw.

If the load is low enough, this switcher will skip cycles while waiting for output voltage to fall below set point (discontinuous mode).
A higher value inductor will mean that the minimum current will closer to your average current, possibly avoiding discontinuous operation, at the expense of a larger and more expensive part.
Discontinuous mode is perfectly fine if the additional voltage ripple is acceptable.
The graphs for inductor selection are for continuous mode operation with certain assumptions on desired inductor ripple. I suggest you do some calculations, I wouldn't want to put a big expensive inductor in there...AN-1197 is a good intro.

have a quick read of 8.1.2 Inductor Selection
AN-1197 - Selecting Inductors for Buck Converters from TI is also informative.
http://www.ti.com/lit/an/snva038b/snva038b.pdf

Good luck!
 

Offline Glenn0010Topic starter

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #73 on: March 08, 2018, 07:13:07 pm »
Thank for the great info. Yes this regulator has a fairly low switching frequency, in the future I'd possibly change over to the TPS54160 since it has a much higher switching frequency leading to a small and cheaper inductor as you say. Also the chip itself is cheaper.

This morning it tested it out with a 680uh Inductor and it worked a treat!, even under around 110mA (no load) (i.e. discontinuous). The voltage was perfectly stable since I had a 1000uF cap on the output. It was at my maximum possible voltage (approx 52.7V). Here it is on startup.



I will test it will test it at full functionality i.e. with the motor as the gate drives get shipped since I want fresh ones (got some paranoia about using desoldered parts).

Thanks so much for your help!

As for future testing, apart from the double pulse test, I want to do a load test for the motor. I am looking at doing it cheaply. I am thinking of coupling a car alternator to the motor, I will apply a DC voltage to the Rotor of the alternator to create that magnetic field. I will short the 3 phase windings to create the load. As the rotor rotates, the alternator should start loading the motor. At low speeds should be less.

Meanwhile I will be monitoring the currents. The specification is a maximum draw of 20A from the DC supply (DC link). So I will stop at that point. I will be using a thermal camera to monitor the FET Temps. I will also vary the switching freq at 10Khz, 20kHz and 30kHz to see the effect of the switching losses on the FETs and if they come close to the simulation

Will keep you guys updated
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: BLDC Motor Controller, Design + Waveforms
« Reply #74 on: March 09, 2018, 02:27:40 am »
No need for the alternator. Lock your motor's rotor, that's the hardest load you can put on it, and it's a realistic load if you'll be using it to drive land vehicles. Your controller has to survive this "indefinitely" according to the specs you designed it for (X phase current).
This is the same setup you can use for the double pulse (I use it for both tests).
« Last Edit: March 09, 2018, 02:37:26 am by nuno »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf