Monday, September 10, 2012

FF v1.1 and v1.2s Design Files

I'm finally getting around to collecting and organizing the hardware documentation for my two newest motor controller designs. These are the FF line motor controllers, which I've been testing for a few months now. They're small single-board three-phase motor controllers, designed for sensorless field-oriented control. v1.1 is the larger, higher-power version and v1.2s is the smaller, lower-power version.

FF v1.1 (left) and v1.2s (right).
Both versions share the same logic layout. The microcontroller used is the STM32F103C4, although the design should be pin-compatible with many other 48-pin STM32 microcontrollers, including some with floating-point capability. It can be programmed with a 3.3V FTDI adapter or wirelessly over XBee. The firmware is still very much a work-in-progress, but I've also uploaded two different firmware versions (IAR EWARM Kickstart Projects) here, for reference only:
  1. Air Firmware (STM32_air.zip): Framework for closed-loop RPM control based on 1000-2000μs RC-style PWM input. Inner loop is field-oriented current control based on sensorless position estimate.
  2. Ground Firmware (STM32_ground.zip): Framework for torque-controlled electric vehicles using field-oriented current control. The input is an analog throttle signal. There is an optional ramping start-up but it's not perfect.
Note that the firmwares are my working copies, not release versions. I won't even give them version numbers because they're that non-functional. Repeat: This will not run your motor. Each motor needs parameter tuning and the only way to do that right now is using hard-coded constants in the firmware. I'm only uploading them as examples that others can refer to for development. Also note that this hardware cannot do six-step BLDC control. It's designed with sinusoidal commutation / SVM and synchronous rectification in mind.

Both versions of the controller hardware also share the same gate drive solution, based on the Texas Instruments DRV8301. I call this the magic everything chip, because it's much more than just a nice 2A three-phase gate driver. It also has dual low-side phase current amplifiers, integrated gate and logic power supplies, integrated bootstrap diodes, and a completely independent buck controller with internal switch for creating a logic supply for the rest of the board.

Both versions also have the same I/O broken out, including pins for analog throttle, I2C, UART (shared with the FTDI programming port and with the XBee headers), RC-style PWM input, and three auxiliary inputs that can be either timer capture inputs (encoder), hall sensor inputs, phase voltage sensing, or general-purpose analog inputs. 3.3V and 5V supplies are also broken out to pin headers.

The differences between v1.1 and v1.2s are entirely in the power section of the board. v1.1 has a beefier power stage based on D2Pak-7 MOSFETs, while v1.2s has a smaller Super SO-8 MOSFET layout. The details and design files are below:

FF v1.1 [Design Files]


Size (board only): 3.00in x 1.50 in x 0.50in
Size (w/ external cap): 4.20in x 1.50in x 0.50in
Weight (board only): 28g
Weight (w/ wires and cap): 66g
Suggested External Capacitor: 680uF, 63V (x2 for high current)
Approx. Power: 48V / 30A (cont.), 75A (peak)
BOM Cost: $96.90 (1x), $74.38 (10x), $53.39 (100x)

This version of the controller was originally designed with large multirotors in mind, but it's also been tested on a number of ground vehicles at up to 75A acceleration current (the maximum phase current at full throttle). The continuous current capability is significantly lower due to the lack of large heat sink. 30A is my best guess with any of the MOSFETs listed above, but with adequate airflow it could be higher. The maximum voltage depends on the capacitors and MOSFETs used, but is limited to 50V by other components.

FF v1.2s [Design Files]


Size (board only): 2.00in x 1.50 in x 0.28in
Size (w/ external cap): 2.79in x 1.50in x 0.32in
Weight (board only): 11g
Weight (w/ wires and cap): 35g
Suggested MOSFETs: BSC016N04LS GBSC010N04LSBSC014N06NS
Suggested External Capacitor: 470uF, 35V (x2 for high current)
Approx. Power: 48V / 15A (cont.), 30A (peak)
BOM Cost: $56.89 (1x), $47.14 (10x), $33.32 (100x)

This version was designed with smaller multirotors in mind, although it should be fine on the not-so-heavily-loaded CineStar 6 as well. It's not really suitable for vehicles, but might work fine for robots / RC cars /  small servo-mechanisms. The maximum voltage and current depend on the MOSFETs and external capacitor chosen, but it should have no trouble at 15A continuous and 30A peak, higher with more air flow or heat sinking.

That's it for now. Later I hope to post a lengthy document outlining the sensorless position estimation algorithm at work in the reference firmware. Even later I hope to make a GUI for configuring the firmware for a particular motor. For now, you're on your own with that.

10 comments:

  1. In your opinion would it be at all feasable to use the drv8301 for higher voltages such as 100v?.TI rates it for 60V max but where would that limit come from? The buck converter?

    ReplyDelete
    Replies
    1. The datasheet lists 70V as the absolute maximum voltage including transients. It generates its own 15V gate drive supply and 6V logic supply with internal regulators which may have components that break down at somewhere just above 70V. So I would say 100V is definitely too high.

      Delete
  2. Awesome stuff!

    > 30A is my best guess with any of the MOSFETs listed above,

    Did you test how hot the big D2PAK-7 FETs get without heatsinking at 30A continous? I mean there is almost no heatsink area on that tiny PCB... except the FETs with the phase wires on the other side. Poor FETs on the top side ;-)

    ReplyDelete
    Replies
    1. Not much heat at all at 30A with the IRFS3004-7PbF (0.90-1.20mOhm at 25C). Barely above ambient temp. It's only about 2-3W of dissipation for all six FETs, if the switching losses are as low as I think they are. Most of the sinking probably comes from the wires, like you said.

      For higher continuous currents, it would definitely need some airflow, I think.

      Delete
  3. Ah OK I thought you use the 3107-7 as you mention 48V.
    With twice the RDSon you'd see a more significant temp rise at 30A RMS.

    But still very nice result. Those -7 FETs seem to be as good as having 2 to 3 standard FETs in parallel or so ;-)

    ReplyDelete
  4. Hi Shane. Great stuff!

    I was wondering under what terms you are sharing these design files? Specifically, can I branch out from here to make my own project?

    I'm interested in making ESCs for fixed-wing UAVs with some functionality that isn't found in the run-of-the-mill hobby ones. Specifically I'd like to add provisions for ESC and motor temperature feedback and speed control instead of percent-full-power control. I'd really like to play around with using the BLDC as a low resolution stepper and bringing the prop around until one of the blades is lined up with a reflective photo sensor so that a plane with a large 2-bladed propeller can land without damage even though the centerline of the motor is closer to the ground than the radius of the prop, as on a flying wing with no landing gear.

    ReplyDelete
    Replies
    1. Sounds like a great idea! These boards don't have temperature sensor built-in but maybe you could wire them in to analog inputs. The hardware files released here are free to use and develop from, released as-is with no implied suitability for any particular application. The code is released under the MIT license.

      Delete
  5. Hi Shane,

    Only just found your blog and have been reading through it with interest. I'm going to attempt to put together a FF controller in the coming weeks.

    I realise this is an old post but was wondering if you can comment on the ability of the controllers to reverse motor direction? I'm looking at using it for a ground based vehicle.

    Cheers

    ReplyDelete
    Replies
    1. The ground firmware was developed mostly for scooter-type vehicles, so I haven't put in any logic for reversing. The hardware is capable of it - should just take some minor tweaking in the code to allow it, I think. Most likely it will not be able to go from forward to reverse without stopping and running a startup ramp again in the reverse direction.

      -Shane

      Delete
  6. Hi Shane,

    I am starting my Senior Design Project and v1.2s motor controller appears to perfect for that purpose. I have a few questions I was wondering you would be able to help.

    I have worked only with HCS12 development board using asmIDE. So, I do not know how I would create an interface between the controller and my computer.

    What I would like to know is -
    * The input and output pin descriptions of the board.
    * What IDE/compiler/assembler did you use?
    * How do you load a program using 3.3V FTDI adapter (I do not want to use Xbee)

    I will appreciate your comments.

    - Suman

    ReplyDelete