Monday, September 24, 2018

TinyCross: Electron Herding Unit

My ultralight electric crosskart kit has arrived:


By "kit" I mean the water jet-cut plates and the 80/20 extrusion. There's still some custom machining to do, but most of the kart is designed as plate-and-standoff structure, so it does feel a lot like a kit build. I want to start putting it together, but also realize I am way behind on the electrical side and should get some PCBs on order before I really dive in to the build.

Since it's 4WD with independent motors, I want two dual controllers, front and rear. One of my first three-phase controllers was a dual layout, using IXYS GWM100-01X1 three-phase bridge modules. These modules have excellent cooling, thanks to their huge isolated heat sink interface that can be mounted directly to the chassis (with thermal paste). And while the GWM100-01X1 is undersized for this project, the newer MTI200WX75GD looks spectacular. So let's begin.

3ph v2.2: MTI200WX75GD High-Power Upgra...crap.

They're not available. Despite being in stock for a while, they seem to have disappeared. I mean if you want, you can still get one, but the big distributors have stopped stocking them and the little distributors are pains in the ass. Some day they will return, and I'll be ready for that day, but until then I need some other way of herding electrons.

Can I Just Stuff Some FETs Somewhere?


Sometimes having an extra constraint, even if silly, is good for making progress on things. It makes optimization easier by removing degrees of freedom. So in this case my silly constraint is that any alternative MOSFET configuration must fit entirely within the footprint of the MTI, so they could be swapped without changing the board design. 

I played with some DirectFET and Power SO8 layout ideas before settling on just one monstrous FDMT80080DC per leg. They're similar in many ways to the MTI, with comparable resistance, gate charge, and current ratings. They also have top-side cooling that, although smaller in surface area and not isolated, could sink heat to the chassis fairly well. Using just one per leg yields a tight and tidy layout that fits within the 12mm span of the eight MTI pads allotted to each phase. I've also left solderable tracks for adding extra conductors if needed.

Extending this constraint further, I decided the 12mm strips should fit an entire phase: FETs, gate drive, local capacitance, current sense, and output.


Copy-paste six total for a dual controller. A header in the middle eats current/voltage sensor signals and spits back gate drive inputs. The gate drive is the same one I use on everything: anti-parallel optos with dead-time RC. It's low part-count, easy to bootstrap the high side, tri-stateable, and guarantees dead-time in hardware. And as far as the microcontroller knows, it's just driving some LEDs. What more could you ask for?

Cross Karts, Not Current

For current sense, the ACS781 offers an impressively tiny 100A (150A peak) surface-mount Hall effect current sensor. The current sensing range can be extended by diverting some of the current around the sensor. I've had issues with nearby large currents coupling into small Hall effect sensors before, so in this case I've taken extra care to keep non-sense currents flowing perpendicular to the sensitive axis of the ACS781:


The sensors are aligned so that their sensitive axis is along the board X axis (left to right). Except for the sense leg, all nearby current is routed along the board Y axis (top to bottom). This is especially important for the sense and bypass current flowing immediately adjacent to the next sensor over, since cross-coupling is harder to deal with than a slight change in sensitivity on a single phase. Similarly, phase wires exiting vertically (Z axis) should not produce much field in the sensitive direction. Hopefully.

The Rest of the Panel


I've done separate logic/power boards for a while, but this is my first controller designed as a multi-board panel. In this case I wanted the power board, logic board, and two motor sensor boards all in one. OSH Park has a four-layer prototyping service by the square inch (no panelizing penalty), and some of the most beautiful-looking boards I've ever gotten have come from them. They do quantity three for everything, which is perfect since it gives me two controllers and a spare.

The logic board sits on the gate drive / sensor interface, with a single STM32 running the show. It turned out a lot denser than I thought. While it's more common to do a full schematic first and then layout and route, I tend to make nicer boards if I route as I go, doing a few nets at a time and planning the placement and pinout with the routing in mind. And sometimes you just get lucky and find an open path on the layer you need.

It's All So Clean Until You Add Wires

Since the dual controllers are on the kart centerline and the motors are in the corners, I need to run about 700mm of motor phase and sensor signal wires together to each corner, and I know how that story usually ends. I'll use shielded cable for the signal wires and try to keep them separated as much as possible, but I have a new trick to try for making the Hall sensor signals more robust. For starters, they will run through a buffer on the sensor side, to decrease the impedance. (Normally, they are just open-drain with pull-up resistors.) The real trick is on the logic board side, though, where they will be sent through this:


The signals are fed into a three-channel optocoupler, which means noise would have to be able to inject mA-level current into the signal to change its state. But the input side of the optocoupler also references only the phase signals, not a local or even remote ground. Common-mode noise, even on the order of Volts, can't change the state. It's a sort-of three-phase differential signal.

The Big Picture


It's been interesting to revist the idea of a dual controller. I'm honestly not sure how my first one worked at all, although I think the robustness of the IXYS bricks and opto gate drive helped me out a lot there. This one feels a lot more routine, and I'll consider it a success if it just works without any fuss, like Twitch X's drive. Speaking of Twitch X, there's a really neat consequence of independent front-wheel drive that might make for some interesting software parallels down the road...

Back to the build for now.

7 comments:

  1. Loving the new posts. But ... what happened to the Kerbals on Laythe?

    ReplyDelete
    Replies
    1. I still have that mission going in the background! Building up a fleet for the first launch window.

      Delete
    2. Excellent! This post - http://scolton.blogspot.com/2013/12/ksp-ascent-and-deorbit-simulators.html was one of the things that inspired me to go to engineering school. I wonder if they'll land before I graduate? ;)

      Delete
    3. That's awesome to hear! Motivated me to post an update to that mission: http://scolton.blogspot.com/2018/11/ksp-laythe-colony-part-2-robotic-fleet.html. It's been interesting thinking about fleet maneuvering and how to get a massive amount of hardware to one spot on Laythe.

      Delete
  2. I know this is a bit of an old post, but what would be your recommendation for trace widths for a given current? Using an online calculator for this board, with a q axis current of 120, so like 80ish rms, gives insanely wide traces. Considering you ran the trace for the negative connection to each FET in a 12mm space for each phase leg, and on a .5oz inner layer, how does the FR4 not just burn or something? Thank you in advance

    ReplyDelete
    Replies
    1. That return path is definitely frightening! It's using the full width of both inner layers, but that's still only the equivalent of a 12mm-wide 1oz trace buried in the FR4. It is relatively short (~2:1 aspect ratio) and sinks heat out vias on both sides to the surface of the board which is sil-padded to an aluminum chassis. But I don't think it would be able to handle 80Arms continuously. Neither can my motors, though. In my actual driving the peak:average current ratio is probably 5:1 or more. So far I have just been monitoring board temperature which has been surprisingly good. The motors are for sure the thermal bottleneck right now.

      I remember a rough rule of thumb that a square of 1oz copper (of any horizontal dimension) is about 0.5mOhm, so for the two 0.5oz traces stacked on top of each other, with an aspect ratio of ~2:1 between the via banks, it's about 1.0mOhm. At 80Arms, that's 6.4W, which is a lot, but not outside the realm of what I think can be sunk into the copper and the board itself for a few seconds at a time. (The FETs are dissipating about 2x that much, but are mostly sinking heat directly into the chassis.) Just have to get enough of that energy out before the next acceleration cycle that the overall board temperature doesn't get out of hand.

      Delete
    2. Hey thank you for the information, I guess I heavily underestimate the thermal mass of the copper on a pcb. I always envisioned them to be pretty much so thin they heat up pretty much instantly but I guess not!

      Delete