Gate Driving your Way to Victory

As previously illustrated on this site, LOLrioKart’s motor controller is one big lesson in power electronics that I’m learning as I build it (…and blow it up…and rebuild it). While I must admit that it’s frustrating to have a controller that never really works, and which just sits on the metastable edge between functional and explosive, it’s a valuable learning experience to figure out exactly how to steer this edge towards the functional and reliable side.

You know, like finding out that your oscilloscope inputs are grounded so you absolutely shouldn’t probe a floating ground with it because it’ll dead short your power supply through itself and everything else in the path. Many times.

I found out that’s reason #1 why Segfault’s dual custom H-bridges all exploded. Live and learn, I suppose.

Cross-conduction

Another dominant cause of power amplifier failure is shoot-through, or cross conduction. In your average half-bridge circuit, the worst thing that can happen is your top and bottom side switches on the same leg being turned on at once. That usually results in very high pulsed current draw from the power supply, then…

Alright, so it’s not that bad. But shoot-through will generally blow fuses, melt wires, or destroy an output component (in the worst case causing it to fail short) if you‘re not a pussy don’t use fuses like me.  3 phase block commutation generally avoids this shoot-through phenomenon because it ensures the top and bottom sides of one phase are never switched consecutively.

However, DC motor drivers do not have that luxury, because there is essentially only one phase to switch. Therefore, whether in software or through hardware, provisions are generally made for shoot-through protection. It usually takes the form of a section of delay-circuitry, combinatory logic, a delay state in software, or if you’re Shane, driving optocouplers in inverse-parallel because they form a convenient delay circuit already.

During the times I have experimented with full-bridge or half bridge DC motor drivers, I’ve generally used a variant of the delay circuit presented in 6.131, the same one that is documented on Segfault’s progress report post. It takes a while to make, is nonintuitive, and more complex than it needs to be, taking up 5 of 6 inverters in a 7414 hex inverter.

For a little while I’ve been searching for a FET driver chip that has this function built in. After some digging on Digikey and places like FindChips, I found the IR21844.

Like the Ixys IX6R11P7 chips I favor now, it has a standard low side driver and an isolated, bootstrappable high side. The difference between the 2184(4) and the 6R11 is the input. The 6R11 takes two individual inputs, one high and once low. They do not affect eachother, and you could build in a self-destruct mode for your controller if you wanted because it can command both switches to turn on at once.

The IR21844, however, takes a single input and splits it internally into an inverted and noninverted output. So that means if your input is logical low, then the low side is on and high side is off – and vice versa. Not only that, but it also has internal shoot-through protection (IR calls it “deadtime”). Even better is that the 21844 variant allows you to tune the deadtime to the taste of your favorite mutant semiconductors.

It basically tells me that I wasted a year fumbling with this crap when someone already made something I can just buy – like everything else in life. The 21844 comes in 8 and 14 pin DIP through-hole components (+1) as well as SOIC (ewww… but handy if I ever come out of the course VI closet). And so, I gave a few quarters to the Internet semiconductor gumball machine for some units to experiment with.

Here’s the test circuit I rigged together using the schematic found in IR’s datasheet. I’m reading the two outputs using two channels of the MITERscope. The input is a 50% duty cycle square wave, 5Vpp and 10Khz. The single potentiometer is a 100Kohm unit that I’m using for deadtime adjustment.

See? I wasn’t lying. One input to the 21844 is split into two complementary outputs.

This scope screenshot is actually a little deceiving. The vertical scale is 5 volts per division and the zero levels are located on the X axis (channel 1) and 2 major divisions down (channel 2). What looks like the two square waves not meeting in the center is actually them overlapping. I should have used a wider division setting.

What’s really interesting – and what sold me on these – is the built-in deadtime.

Check this zoomed shot of the above square waves. What you see is an approx. 1us delay between when the low side turns off (channel 1 high to low) and the high side turns on (channel 2 low to high).

This is good. This break-before-make behavior ensures that your +V and GND rails never see eachother in the middle.

Even better is the fact that it does the exact opposite thing on the other side. On a low-to-high transition of the output, the high side turns off before the low side turns on again. Again, break before make. This proves that one output isn’t just a time delayed version of the other, it’s legitimately being trimmed to fit neatly into the other.

One implication of this is that the high side will completely shut off at a point before 0% input duty cycle. This seems to be inherent in the nature of delay stages and I conjecture is part of the reason why control deadbands exist. Complementary to this, the low side will completely shut off at a point before 100%, which must be considered if your drive circuitry is bootstrapped on the high side i.e. does not have its own isolated power supply at all times.

The deadtime adjustment is internally grounded on the 2184 but brought out to a pin on the 21844 variant. You connect it to ground through a variable resistance of your choice – datasheet page 10 gives a rundown on deadtime vs. resistance.

As advertised, the deadtime is adjustable from about 400ns (0 ohms)…

…To roughly 2.5us when my 100Kohm pot was pegged. The 21844 appears to support deadtimes of up to 5 microseconds.

Indeed, when I just straight yanked the pot out of the circuit, all the output shut off. I suppose an infinite deadtime is just like being permanently off.

With this in mind, I went ahead and made a little buck converter just like I did in 6.131. I used two IRF2807 FETs that I had leftover, running in bootstrapped high side mode. It was still running on the 50/50 square wave input. Will it work? Will everything explode?!

Well, what happened first was that I shorted the high side through the scope probe, killing half of the 21844.

Sad.

That’s why I bought a rail of 30.

But then it worked! On the (real) first try, even! That is, well enough to totally smoke a power resistor of too small value while I wasn’t watching.

hey guys i made a power electronic widget that worked on the first try do i win a prize do i do i do i

The next stage was to replace the resistor with something more meaningful. Something that actually does some useful work besides making a small smoke column… I mean, it can do that too, but it should be designed to do otherwise.

I have an idea – let’s try a DC motor!

HO REGEN BRAKING YAY

I probably played with this thing for half an hour – just gunning the motor, then quickly dropping the duty cycle and watching the power supply’s voltage spike up. This half bridge circuit brings me one step closer to a 4 quadrant synchronous regenerative drive for LOLrioKart, and who knows what else. To add the other two quadrants, I just need to make another half-bridge and connect the motor up between them.

Speaking of LOLrioKart, can these little driver chips actually handle semiconductors the size of those I have an excessive amount of? One way to find out is to try driving the gate. This is an IXYS VMM65001F, good to 100 volts (same as a Swapfet) and 680 amps, which is at least three Swapfets. This is a bigger transistor than LOLrioKart can ever hope to push. Just because of that, it’s a good example to test the 2184s on.

Also because it is a convenient half-bridge module, and two of them will easily make an oversized H-bridge for said LOLrioKart.

I drove the gigaFET using the bootstrapped high side.

It took a full 1.7us to turn on, where I defined turn-on as the gate voltage reaching approx. 67% of the drive voltage. There are many ways of defining “turn-on”, this is just one of them.You can even see a little bit of the “Miller Plateau“.

This is not bad given that the on period is very long compared to the switching period. During this switch is when the FET acts like a resistor, dissipating power. LOLrioKart’s PWM runs at 4Khz, which is a half-period of .125 milliseconds, still about 70 times longer than a switching cycle. Not the best, but most likely better than anything else I have on the kart at this moment.

And the turnoff occurs a little faster, since the gate voltage only has to reach 4 volts before it falls under the threshold voltage. The turnoff itself is mostly clean.

So where does that leave me? I now have a method of switching a half-bridge in an orderly manner, without external glue circuitry. I also happen to have enough large semiconductors to make a 600 amp peak capacity H-bridge. I have this dumb shopping cart with a motor on it.

Will there be a kartroller version 6?!

The Summer Build Season 2010: Yeah, uh, about that.

A few weeks ago, I entered RazEr, one Deathblade, and my work on small hub motor technology into MIT’s de Florez award competition with the aim of winning the $3,000 first prize in the undergraduate design category. After Eloranta fell through, I had hoped to use the still nontrivial amount of money to fund Super LOLrioKart if I won first prize. I figured I stood at least a decent chance, seeing as how Course II doesn’t actually build things.

After an intense day and a half of waiting,  I learned that I won fourth place in undergraduate design. Not bad, and certainly appreciable, in my opinion, considering the fact that my presentation table was crammed into a corner (then behind a column) and I spent half an hour finding and waiting on the last judge who was only supposed to spend 5 to 10 minutes at each presentation. The fourth place was announced as a 3-way tie, which I can only presume is their way of telling me I won a consolation prize.

I guess completely self-directed and self-originated (the top three projects were all UROPs and teams) work with a full documented engineering history isn’t enough to impress the modern engineering collegiate demographic if the work isn’t being done for developing nations or are attempts at harvesting “alternative energy”.  After all, it’s the current most fashionable field of research outside biomechatronics, so I suppose everyone’s looking out for it.

Oh well – I probably needed that dose of reality.

Regardless, fourth place winners received a $450 cash prize. $450 is still a nontrivial amount of money, but it is not going to build me a Super LOLrioKart, at least not a very nice one.

I like to think that I don’t avoid projects just because other people think I can’t pull them off or they are technically infeasible – RazEr has been the prime example. The actual reasons for my proposal rejection notwithstanding, I now have a personal stake in completing Super LOLrioKart because MIT told me I couldn’t.

They might have not meant to, but keep in mind that unjustifiable grudges are instrumental in providing me with motivation.

I’ve been thinking about a few ways of executing this project under the now seemingly impossible financial constraints. It is quite difficult going from $6,000 of anticipated budget to roughly 0. I guess any time you are depending on outside funding for things, it works the same way. At least I get to experience it in the relatively calm bubble of academics?

1. Recycle, reuse, re… something

Waterjetted aluminum plates are expensive.

Custom neodymium magnets for custom motors are expensive.

Lithium batteries are expensive.

Absurd amounts of LED lighting are expensive.

Much (as in over 75%) of the expensive of SLK comes from fabricating the four wheel modules. This isn’t unreasonable, as combined, they are the core component of the vehicle… the whole point. But liberties can be taken and corners can be chamfered with the conformity of the design to my “style” of waterjetted aluminum.

I’ve known for a while that all-aluminum assemblies are not the most economical. This was especially evident on Segfault, where the scrap from cutting the space frame and trusses weighed more than the final parts themselves.

It’s technically possible and probably worthwile to switch the wheel module designs to be a welded steel sheet, plate, and structural shape assembly. Pound for pound, steel is still cheaper than aluminum, and even better if it’s surplus. Alot of the automotive competition teams here keep substantial amounts of structural steel around because they use it in their vehicle frames, so snitching or straight up buying it off them would save on shipping and waiting. And the shops throw scraps out by the bucketload.

Not to mention that welding steel, while less reversible than bolted and T-nutted aluminum, will probably get me a lighter assembly in the end because of the reduced volume of steel required coupled with more of a chance to use optimized geometries and profiles. And I could probably pitch a wheel module together in an afternoon, while not having to wait for machine access at a time when I won’t be running into people doing actual work.

Altogether, if I remade the wheel pods out of appropriate steel members, I could save a few hundred over the thick aluminum plates I’d otherwise have to buy.

Materials aside, I had intended to order custom curved motor magnets for my custom curved hub motors. That was going to run a $500+ bill just by itself because of the sheer volume of neodymium involved.  Stock flat magnets wouldn’t necessarily take that down to zero, but would cost 30 to 40% less.

Motor controls are rarely an area where I can fudge and get away with it, as LOLrioKart itself has shown. Whether custom or purchased, it seems that at the power levels I’m dealing with, everything costs about the same. Additionally, nobody seems to make a reasonably small bidirectional DC closed loop controller that can handle 48 volts. SLK’s build might come down to a power electronics issue again if I try to make my own motor drivers, and I don’t want to have to deal with that.

Otherwise, I’m trying to find surplus and secondhand sources for all the other major mechanical parts. The absolute position encoders for the wheel pods are probably an unavoidable expense, and it’s not like quadrature units at the size I need are cheap either.

All told, preliminary recalculations show that I can probably knock $800 to $1000 off the potential price if I scrounge carefully. This brings the vehicle down to reasonable levels, something I could probably handle over summer.

2. Accept Compromises

There are a few characteristics of the SLK design that add expense and are not exactly crucial to the core vehicle concept – an omnidirectional small electric vehicle that has wireless modular control and is…err, shopping cart based. The added tech points are nice to have, but ultimately I can live with…

  • DC drive motors! I like large brushless motors, and especially large custom ones. But building them (and even worse, controlling them) is kind of pricey – more so than commonplace DC drives and motors. If I went to DC drive motors, I could probably run the steering and drive off the same lower-voltage power bus. Speaking of which…
  • Less-than-48v main battery. 36 volts seems to be the cutoff point for inexpensive controllers, battery chargers, battery manage systems, and other power system components. By insisting on 48 volt vehicle operation, I’m probably making things way more expensive than they need to be. SLK is not going to be a drag racer, and if I’m taking away that design constraint, then more options are available.
  • No suspension! Again, a “nice” feature to have, but not only does it add complexity, but probably also introduces degrees of freedom that I am not foreseeing which will affect the omnidirectional drive. I was planning on using just cheap bicycle shocks, but they are probably worse than having no suspension at all.
  • Less than 360 degree steering coverage. This can eliminate the price (and interface difficulty) of absolute encoders, but I’d have to lose the “from any orientation to any orientation) ability. It’s the worst compromise, and would reduce SLK to the City Car.

3. Sell out

Yeah, yeah. You’re such an indie engineer, Charles.

Well, there’s definitely precedence. LOLrioKart itself has been advertising for Swapfest and is used whenever MITERS needs to make a statement somewhere.