Wednesday, August 18, 2010

3ph HD: Time for yet another motor controller.

I've pretty much stopped designing motor controllers for particular projects and am now just designing projects that allow me to build new motor controllers...

I am thoroughly satisfied with the 3ph Duo v2.1, which I've documented extensively. It's clocked a non-trivial number of miles on the BWD Scooter as well as on my RC car, and soon it will see use on Jed's electric long board. In summary, it's a 2 x 1kW dual sensored motor controller with sinusoidal commutation and field-oriented control.

 3ph Duo v2.1

I even managed to accidentally troubleshoot a longstanding issue with motor "crackling" at high load. Turns out it was due to unstable gate drive and the solution was simply to increase the gate resistor (now 30Ω instead of 10Ω). It doesn't harm switching speed much, since the IXYS GWM MOSFET modules have gate capacitances of only about 9nF. Rule of thumb: Switching time is approximately R*C = 30Ω*9nF=270ns. Still only a small fraction of the PWM period.

Having two motors on one board is convenient for the scooter, but in general it would probably be more useful to have independent controllers that are half the size and half the price. And why not also twice the power? Here is the quick list of features and improvements I am targeting for the 3ph HD, v3.0 in the 3ph series.
  1. 1 x 2kW brushless DC (really PM synchronous since v2.1) motor control in half the volume claim of the 3ph Duo v2.1. (So, you could put two next to each other for a controller the same size as the Duo, but with twice the power handling.) Depending on the FET and bus capacitor selection, it could be from 80A@24V to 40A@48V.

  2. Runs on my shiny new wootstick 2.0 (STM32F103-based) microcontroller board. I really need to learn how to program for this 32-bit chip and this will be the perfect motivation. Each controller gets its own dedicated 32-bit processor with three independent timers. No more computational efficiency hacks required. I can also explore sensorless and induction motor control, which require an extra level of processing beyond what I've done so far with field-oriented control.

  3. Uses the cheaper gate drive I tried out on the HexBridge (Arduino BLDC shield). This will keep the costs down so that two of these are no more expensive than a single 3ph Duo, even with independent signal boards. It also saves a ton of board space.

  4. Smaller DC/DC converter. I ran the numbers and discovered that the bulk of my power draw is XBee Pro transmit current, which is ~200mA. (The voltage doesn't matter, since everything from 15V down is through linear regulators.) So I spec'ed a 500mA DC/DC converter instead of a 1A one.
And here's the form factor:


I decided to go with cutting the 3ph Duo volume in half length-wise. This board is 3.90"x1.55", with the possibility of wires sticking out in either of those dimensions depending on the particular mounting provisions. The four 10mm bus capacitors are significantly more than the Duo had, which will add to the current capacity. It has two 5mm standoffs in opposing corners for mounting to a heatsink. The IXYS GWM module is on the bottom, as usual, where its heat transfer tab can be pasted to the sink:


Also on the bottom is a low-profile inductor for the DC/DC converter. The passives for the converter turned out to be the hardest part of designing this board. I wanted to stick with the familiar line of NatSemi converters that I've used for a while now, but they switch relatively slowly and so they really need electrolytic capacitors. But I also wanted to stick the entire DC/DC converter under the microcontroller board, which left just 5.9mm vertical clearance.

Solution: 5.8mm capacitors.

This is why I need EAGLE and SolidWorks open at the same time... But even that isn't good enough, since my 3D model of the microcontroller board doesn't really show what's on the underside. In the end, I had to just look at it in real life. There are a few vias, but no solder joints or objects protruding into the vertical space where the capacitors will go. Which leads me to the question no real circuit designer would have to ask: Are the capacitor cans even isolated? I think they are, but I don't know. If not, Kapton.

Besides the extra bus capacitors, the increased current-handling capability will come from better power trace routing:


In fact, there really aren't even power traces anymore. Wires get soldered very near to the power leads of the IXYS module. There are now three ACS714 current sensors: two phases and one on the DC input. This could be useful for Coulomb counting and/or fault detection. (If 2kW are going in but only 30W are going out......) Each sensor is optionally bypassed by two 1206 chip resistors. This hack allows the nominally +/-30A sensors to work at higher loads by sensing only part of the current.

I guess I have yet to mention why it's called the 3ph HD. It's High Def, yo. Or High Density, since it has twice the volumetric power density of the 3ph Duo.

Or is it Harmonic Drive?

Even though each of the STM32F103's three timers has four channels of PWM output, and one even has three channels dedicated to motor control, I chose instead to use one channel from each of the three timers to drive the three phases in this controller. This wasteful resource allocation pretty much prohibits me from using timers for anything that can't be counted at PWM frequency. (Or does it?) But, it allows me to get to the point of this whole endeavor: Piping three-track 8-bit music through the motor as it runs.

Yes, the main field-oriented controller will still be doing its thing, producing sine waves. These sine waves aren't what you hear, though. In fact, they're pretty much silent since they form a balanced three-phase set. What you will hear is the intentionally low PWM frequency of each phase's half-bridge. (Now you see why the abundance of bus capacitors?) Each phase gets a music track, a sequence of notes and durations, probably. The notes set the frequency of each of the three timers. Ring tones for your motor.

As usual, schematic / files to come if it works.

5 comments:

  1. i know a certain hub motor scooter which needs this.

    ReplyDelete
  2. AWESOME work on the new drive!! OH, and i'm not sure if you've seen "diptrace", but they also have a free version and for me it seems much easier to use compared to Eagle.

    ReplyDelete
  3. great work! I'd love to be the first to try it on my e-bike (1x2kW) ! and a scaled up version on my Quantya EVO1 (www.swisselectricmovement.ch). rolf_w

    thx a ton for the LTSpice file!!

    ReplyDelete
  4. great . . . kindly I need to know the application you use to build this 3D board images.

    ReplyDelete
    Replies
    1. I use SolidWorks, importing the board images as a sketch picture. I'm sure it's no better than any other CAD package for this kind of thing.

      Delete