BLDC shield development suitable for Arduino due

A Friend of mine and I have developed a BLDC motor driver shield for the Arduino due. (basic functionality works now - motor turns according to my inputs XD ) I wonder if this could be something a larger community might be interested in.
The board is based on the FAN7388 chip from Fairchild. We are using current-sensors from Allegro (ACS711KLCTR-12AB-T ) to measure phase current. That enables us to run the motor in torque (current) control mode. Since the Arduino due has very power full PWM periphery - all the necessary PWM signals are directly generated from the due board. PWM frequency is currently running at 30kHz, therefore the board is suitable to run BLDC motors with relatively low inductance – like most model plain motors have. There is also an analog voltage controller (LM317) on board that allows the maximum DC link voltages of 40V. Output of the voltage controller is 10V which is used to run the MosFets and to supply the Arduino board. The MosFets have a D2Pack housing which allows a large variety on different types – currently I am using IRFZ44NS. The rotor position feedback is done by hall sensors at the moment but we also consider using sensorless control in future.
We also have written a library for the BLDC motor so that a motor command can be easily added to a sketch.
We intend to use the BLDC shield for a self made electric bicycle – but if anyone could use a shield like this for an other project we would be happy to share.
I would also enjoy a creative discussion about what kind for features a shield like this should have e.g.

  • over current detection
  • temperature monitoring
  • Senosorless control
  • encoder and vector control for precise positioning

Thanks for your feedback!

Nice job. That looks like some really well done work that you have right there. I've been increasingly interested about bldc controllers after seeing a skateboard fitted with a 2kw motor and batteries. There's nothing so special there - though the thing that caught my attention was that it has regenerative braking. A controller that would do that would make so much difference for power-generation and transport applications.

That article immediately prompted me to remember the flea(http://www.flyelectric.ukgateway.net/avr_ff_timer.htm) - basically firmware that could be flashed to stock Turnigy Plush 6A controllers to include a free flight timer. A feature that will only enable/run the motor for a specified time. A few days of searching later, and I found the page again. Looking over it, it's meant for an ATMega8 and is written in ASM. The important point being that the Plush 6A is designed for sensorless motors - i.e plane motors, rather than car motors, which are typically sensor based. The code contained within that project demonstrates the software required for this motor type. Obviously, this could be re-done using FETs that were rated for more current, or with a front-end that was designed for a higher voltage.

Current and temperature measuring would certainly help to make the shield more idiot proof. Position encoding is sure to be of use to some too - though that may be more effectively realized by way of an optical encoder applied to the output shaft. Not too sure what the controller itself would want to do with such information.

But, I digress. I'd think that the ability to control sensor-less motors would provide the most utility to the largest number of people. It would, for example allow simple cd-rom motor controlling. Yeah, I know they have hall-effect sensors in em - but they're a recovery item from old drives. They would be a $0 option before spending $5 or $6 on a 100 watt one designed for RC.

Also, my math is a little rusty. How many rpm will 30khz allow? Is it divide by 2 or divide by 3 (1.5 * 2) for a 3 pole motor.

So, to sum up, I see great utility in being able to handle both sensored and sensorless motors, as well as being able to handle Delta and Wye terminated windings. (I forget if there's more to it than just the current rating. I think one type runs into synch problems more easily than the other - this may be a simple product of motor speed)

Also, something that seems related, only if loosely, is the DeviationTx project (http://www.deviationtx.com/) It allows firmware to be changed inside transmitters so that they can be switched between DSM2/DSMX, Walkera, Turnigy, FlySky, 9Eagles, etc, etc communication protocols.

Thanks a lot for your constructive feedback! - gives extra motivation seeing other people being interested in ones work.
Also thanks for your estimation of what features would be most valuable to other people.

  • regenerative braking should be "only" a matter of controlling the switches. But it is relatively hard to do the tests since one you would need somehow a back to back test where one motor runs the other motor/generator - but lets see...
  • sensorless control is something we plan to do - lets see if we are smart enough to realize it - I will keep posting here if we make some progress...

the 30KHz should not limit the motor in maximum speed. Assuming a min resolution of 10 pulses per 360 electrical degrees the maximum speed for a motor with 3 pole pairs would be 60000 rpm - if my calculation is right.

If you could develop position control for BLDC I'm sure you would find some interest in the CNC and 3d printer communities.

I too would be interested in all of this

  • over current detection
  • temperature monitoring
  • Senosorless control
  • encoder and vector control for precise positioning

and

position control for BLDC

I have a few old washing machine motors lying around that I would like to put to work.

keep up the good work :slight_smile:

Hi !

I also wanted to start an open source project for this purpose, but wow, you were faster! :smiley:
Ok., maybe we should do it together.

My goal was exactly the opposite. High performance, positioning in closed loop with field vector etc...

So we have 2 different needs, an I think they need 2 slightly different hardware:

  1. High precision positioning with encoder (ttl or sin-cos with interpolation) and closed loop operation
  2. low precision with no encoders, but some phase monitoring sensorless loop, for flying and RC application or only speed control

We need in both versions a good current loop, that is using some kind of current sensor, that is cheap and fast.

I suggest to not use SMD mosfets, since those can only be difficultly replaced if burned, and wastes precious PCB area, and heat transfer is not provided accurately.

My goal is:
Imax peak = 25A
Id = 15A
Umax= 80V
I have already used a very neat type: IRFI4321PBF-ND
It is cheap, and can handle 150V and 34A continuously. so it is protected against HV ringing and spikes during PWM switching.
And it is fully closed package.

As current sensor we should use 2 pieces of ACS714 +-30A

I want to use KiCAD because it is free etc.

Suggested communication protocols:

  • serial
  • step-dir
  • CAN bus
  • USB

feel free to contact me and lets do it!

Anyone working on this? Any suggestions?

We've been looking for a Arduino BLDC shield for months and we've not found a reliable product yet. There's got to be a market out there asking for this. We need to control 3 Brushless Reaction Wheels for a CubeSat; whose main flight controller is Arduino board. We tried to use 3 individual PWM ESC's, but it's very messy (wires and small PCB's everywhere).

It'll be great if someone come with a single circuit board with 3 or 4 sets of 3-phase motor outputs and each of the segments is controlled individually.

In addition, the board could act as a master power management board for any other shields. In other words, the battery will plug into this shield BLDC controller, and there will be regulated 3.3v and 5v outputs that can be used to power the Arduino and/or other shields.

SparkFun is actively considering developing something like this, but they're not offering it yet and it might not be available until next year (2014).

I think that advanced position control, accel/decel rate, s curve smoothing with quadrature encoder feedback would be very useful.
Not sure if serial would be beneficial as could be done via the Arduino.

Nice work :slight_smile:

Personally I need to would like to have/develop a high power BLDC controller for an industrial CNC machine.
It has to have the following characteristics:

  • 1 to 1.5 kW drive with 110V
  • position/speed measurement with quadrature encoder
  • Curent/torque/speed/position controlled
  • Reinject the power to the power supply
  • Controlled using CAN or similar
  • Able to block the motor in position

These are high performance requirements but so is the CNC machine.
As price information, the current electronic cost around 25k$ to replace and is based on analog servo controllers.

We are looking for a shield for one or two brushless dc motors.

  • We need sensor based control for high torque at very low speeds;
  • it must monitor the current because we need to limit the torque;
  • torque control (in addition to speed control) would be nice.

Doing this as open source project would also be nice.

I think that the BTN7960B drivers are a good choice. With three
of them you could control two BDLC motors with 12V and up to
20A continuesly (well, this will require a little bit of cooling).

Regards:

Uwe Fechner

VNB60:
A Friend of mine and I have developed a BLDC motor driver shield for the Arduino due. (basic functionality works now - motor turns according to my inputs XD ) I wonder if this could be something a larger community might be interested in.

Yes I am interested in your shield, particularly interested in FOC and a higher operating voltage. Good work, keep it up.

The DRV11873 controller from Texas Instruments can be another alternative.

I ran a few sketches using the evaluation module and I was pretty happy with the results.

It'll be great if it is converted to a shield for the Arduino.

Hi,

your project is really appreciated. I was searching for a long time to find a BLDC Arduino solution for my needs.

I like both, the sensorless version and a sensored one. For my needs i guess sensored is neccessary. What are you thinking about a absolut rotor position sensor for both, the comutation and the positioning. AMS has several diffrent options, you might have a look.

http://www.ams.com/eng/Products/Position-Sensors/Rotary-Magnetic-Position-Sensors

What is your plan, when will your shield become available?

Many many thanks for doing this project
Jakob

Hello everyone...

I'm looking in to building an Open BLDC controller /w Regeneratvie braking... it would obviously be Arduino compatible.

I'm lookiong for help, so if any of you are interested in contributing, please get in touch.

Thanks, Ben

Why not use an Integrated H bridge driver to lower component count and simplify things ??
SPI or I2C would be easier to interface as well...

Has anyone further developed this or similar project. We are currently looking at a project using a 50k digital potentiometer and a ne555 timer to drive a bldc motor for use as an add on micro spindle to various motion boards. Something like this could be further used with positional feedback as an alternative and as stated above a few years ago, be very popular in operating 3D printers.