Sensorless Brushless DC Motor Drive

Hardware incubation. See also our in development projects wiki.

Sensorless Brushless DC Motor Drive

Postby Lgbeno » Tue Dec 18, 2012 10:15 am

Hi Everyone,

I thought that I would share my project on the forum. I call it BLDC Booster. It is a booster pack for the MSP430 LaunchPad that allows for sensored or sensorless control of a brushless DC motor. It is open source hardware & firmware under Creative Commons Attribution Share Alike license.

I designed the PCB in Design Spark and prototyped fabs at iTead. Currently I have the first prototypes and motors are spinning using my alpha firmware and custom GUI written in Python+QT. For slower motors, I think that it works pretty decent but currently I'm having some difficulty spinning high Kv motors under no load conditions due to my PWM method (unipolar) and slow ADC sample rate (20 kHz). Moving forward, I see not technical reason why I cannot leverage the full sample rate of the MSP430, just need more time to iron out the code. Also in version 2 I added current feedback via a lowside shunt resistor and TI INA199.

My current scheme for sensorless commutation is using BEMF integration and flux thresholding based on the theory of operation for TI's InstaSpin technology however my libraries are 100% written from scratch because the InstaSpin code does not port well to the Value Line series of MSP430's and is somewhat closed. My source is licensed under BSD so everyone is welcome to hack away.

All files are available on github. There's still a lot of work to do on the firmware side but I'm pretty happy with the hardware. Currently I have a few more v1 boards on hand but just ordered 50 of the v2 fabs which I plan on building up on Jan 9th with my friend who owns a CM service. I'd like to offer them for sale and was thinking that I would ship them USPS to anyone in the US for $35. I do have a connection with a motor vendor in China that if there is sufficient interest, we could do a order. Baseline motor would cost an additional $9. Contact me if you are interested.

Some pictures attached, more info is on github. Looking for feedback on the design and anyone interested in helping out with code development. Ian's comments are always welcome and by the way, nice interview on theamphour it is my inspiration for sharing this design on the forum.

-Luke
Attachments
DSC03830_shrink.jpg
image of BLDC Booster + LaunchPad
bldc_booster.pdf
Schematic and gerber views.
(277.06 KiB) Downloaded 1569 times
Lgbeno
Newbie
Newbie
 
Posts: 14
Joined: Tue Dec 18, 2012 7:13 am

Re: Sensorless Brushless DC Motor Drive

Postby jrhaedt » Tue Dec 18, 2012 4:27 pm

I really like the concept of this project. By utilizing the TI Launchpad you are opening up to a low-cost development environment with a simple and easy to use form factor.
jrhaedt
Newbie
Newbie
 
Posts: 1
Joined: Tue Dec 18, 2012 4:24 pm

Re: Sensorless Brushless DC Motor Drive

Postby Aeroengineer1 » Wed Dec 19, 2012 12:18 pm

Just out of curiosity, what would you estimate to be your assembled cost of the BLDC Boosterpack that you designed? Thanks for sharing.

Adam
Aeroengineer1
Newbie
Newbie
 
Posts: 25
Joined: Mon Jun 18, 2012 1:28 pm

Re: Sensorless Brushless DC Motor Drive

Postby arhi » Wed Dec 19, 2012 12:30 pm

why "booster" ? I don't see nothing being boosted :) .. maybe you should incorporate ESC into name of your project for easy search.

from what I see its ESC implemented with msp430. Looks nice but you might want to add ntc to monitor temperature of the board (fets) and another one to monitor temp of the motor.

Would be nice if you share the source files (for pcb/schematic/firmware...), there's not many ESC's out there that are open source so it might go wild fast :) ..
User avatar
arhi
Hero Member
Hero Member
 
Posts: 2109
Joined: Thu Jun 24, 2010 11:41 am
Location: Belgrade, Serbia

Re: Sensorless Brushless DC Motor Drive

Postby Lgbeno » Wed Dec 19, 2012 1:30 pm

Wow, I was really surprised when I went to DP today and saw the project linked right there on the front page!

Thanks for the comments, they are all well taken.

what would you estimate to be your assembled cost of the BLDC Boosterpack that you designed?

In regard to assembly cost, at the moment I've been hand soldering the first round of boards. This takes a decent amount of time (20-30 min per board) since there are quite a few discrete components (~50) and they are all quite small. For the next batch, I have a solder stencil and we're going to use paste, hand place components and reflow them in a toaster oven, hopefully this will drop the amount of time significantly. I'm not a pro for pricing models of assembly but when I started looking at pricing, I went on the conservative side and figured it woud be $5-$10. Besides assembly, theres cost of components, shipping them all around the place and the tooling for stencils and things like that. Surprisingly, the BOM cost is the smallest part of the pie on how I got to $35. I'm actually surprised how much a static bag and cardboard box costs in relation to some of the other components! In the spirit of open source, I definitely don't want to set pricing in a vaccuum, would be interested to hear everyones thoughts on that but hopefully that doesn't become the focus of this thread.

why "booster" ? I don't see nothing being boosted :) .. maybe you should incorporate ESC into name of your project for easy search

Very true, I'm certainly not boosting a voltage rail or anything like that (although you could probably use this as the power electronics for a boost/buck converter with some creativity). Booster simply comes from "Booster Pack" which is what TI calls add on cards for their LaunchPad kits. Adding ESC is a good point, my goal is exactly that, to make a open source ESC, particularly one that uses the BEMF integration technique instead of the zero crossing method like a traditional ESC. The other goal is to make it inexpensive and compact so that we can someday see a quadcopter, RC car or airplane with a fully integrated controller + drive(s) all on one board. I really dislike excessive wire harnesses :)

you might want to add ntc to monitor temperature of the board (fets) and another one to monitor temp of the motor

Now that wouldn't be very Dangerous :) Actually good point, only thing that I'll say is that the extra ADC pins are unfortunately consumed by the UART so thats a bummer. I'm hoping the addition of current sense will be two fold, one is for control but also for protection to limit the strain on the FETs and motor.

Would be nice if you share the source files (for pcb/schematic/firmware...), there's not many ESC's out there that are open source so it might go wild fast

All source files are available on github For my initial post, the forum didn't like me including hyperlinks as a spam protection. I would be great if it goes wild fast (both figuratively and most important literally).

-Luke
Lgbeno
Newbie
Newbie
 
Posts: 14
Joined: Tue Dec 18, 2012 7:13 am

Re: Sensorless Brushless DC Motor Drive

Postby bearmos » Wed Dec 19, 2012 1:54 pm

Hi Lgbeno /jrhaedt, Welcome!

Looks good, I always read the back EMF microchip app notes with curiosity. The only thing that I was skeptical of was how finely tuned to a specific motor model the back EMF detection needed to be - have you tried different motors?

I like the addition of gate drivers to minimize switching losses. Looking at them in a bit of detail - it looks like you're pulling the gate up to V_PWR, so your input voltage would be limited to Vgss (20V) of the FET instead of Vdss(30V). I haven't looked at your simulation at all to verify any of this yet. Also, I have 0 experience with gate drivers - so take that for what it's worth!

The half bridges you have pack quite a punch, especially for the price...I won't even complain that they're not available in a power package:)

arhi wrote:you might want to add ntc to monitor temperature of the board (fets) and another one to monitor temp of the motor.

Definitely a good idea since this is meant to be shared with others and you don't have control over the operating conditions.
bearmos
Hero Member
Hero Member
 
Posts: 741
Joined: Tue Nov 02, 2010 10:02 pm

Re: Sensorless Brushless DC Motor Drive

Postby arhi » Wed Dec 19, 2012 2:08 pm

I was not playing with TI's kits before (using msp430 for a while but directly on boards, no dev kits) so was not aware of the "naming" :D

it's a great idea, back emf is used by a number of esc's on the market but non of them (afaik) are open source. having a good open source one would be super cool :)

as for the missing adc pin, if you have a spare digital in you can have ntc -> op-amp provide digital "warning" signal on some preset temperature
User avatar
arhi
Hero Member
Hero Member
 
Posts: 2109
Joined: Thu Jun 24, 2010 11:41 am
Location: Belgrade, Serbia

Re: Sensorless Brushless DC Motor Drive

Postby bearmos » Wed Dec 19, 2012 2:08 pm

bearmos wrote:The only thing that I was skeptical of was how finely tuned to a specific motor model the back EMF detection needed to be - have you tried different motors?

Taking a look at the youtube video on insta-spin seems to be answering this quite well - thanks for posting it.
bearmos
Hero Member
Hero Member
 
Posts: 741
Joined: Tue Nov 02, 2010 10:02 pm

Re: Sensorless Brushless DC Motor Drive

Postby Lgbeno » Wed Dec 19, 2012 3:04 pm

Hey Bearmos,

If you haven't read/referenced it already, there is a excellent app note on gate drive techniques for FET's

It's true that Vgss is the limiting factor my current scheme so unfortunately the upper end of my Half bridges is around 18V like you mentioned. For the most part that is fine for battery power applications but certainly not for driving 24V rated motors. I think this is one of my bigger lessons learned on the project. I wanted to use discrete parts instead of a monolithic chip for the educational value but I found that more sophisticated gate drive methods required more and more transistors or I need to have so many voltage rails to address the Vgss limitation that you mentioned. All in all I'd say that a good next step would be to use an all NMOS half bridge with a chip like the Fairchild FAN7888MX with bootstrapping and adding lower gate drive supply.

I agree though, these Diodes Inc FETs have great specs for the cost. Just a word of caution on the Simulation, I haven't touched in in quite awhile, it probably has some problems. I tried really hard to make TINA TI work for me but I much prefer LTspice.

About the motors, I've tried 3 different motors so far. The first was a Maxon 339282 which is a very nice motor and the BEMF looks almost exactly like what they show in the app notes. It is also very robust to imperfections in the exact timing of commutation but I'm sure efficiency takes a hit if it isn't dialed in. There are just a few scope traces on github in the DOCS/ScopeTrace directry, maybe I can dig up a few more. The other two motors are RC hobby motors, one is the Exceed RC 75M57 OPTIMA 450 and the other is BR2730 from KEDA. These two motors have significantly higher Kv so they are much more sensitive and tend to stall out if I'm too late on the commutation. This is really what is prompting me to move to a fast ADC sample rate to get more resolution on the exact time of commutation.

In general though, the concept of the flux integration technique is that there is one parameter that the algorithm needs to to spin the motor (flux threshold) so in theory, each of my 3 different motors would have a different threshold parameters but once this number is known, everything else works the same and is more robust to changes in motor load and speed. The python+QT GUI has a slider to adjust this threshold so it's pretty easy to explore and find the right number. Screen shot attached you can also see the sampled data from the ADC, BEMF looks nice and linear. This is with the that Maxon motor. Sorry, I hope that answers your question, let me know if not.

By the way, anyone interested in bread boarding this?
Attachments
GUI_Screenshot.png
Lgbeno
Newbie
Newbie
 
Posts: 14
Joined: Tue Dec 18, 2012 7:13 am

Sensorless Brushless DC Motor Drive

Postby Lgbeno » Wed Dec 19, 2012 3:11 pm

Just for fun, here is version .01 of the board.
ImageUploadedByTapatalk1355947909.232846.jpg
Lgbeno
Newbie
Newbie
 
Posts: 14
Joined: Tue Dec 18, 2012 7:13 am

Re: Sensorless Brushless DC Motor Drive

Postby bearmos » Wed Dec 19, 2012 10:34 pm

Lgbeno wrote:If you haven't read/referenced it already, there is a excellent app note on gate drive techniques for FET's

that's great, thank you.

Lgbeno wrote:I agree though, these Diodes Inc FETs have great specs for the cost. Just a word of caution on the Simulation, I haven't touched in in quite awhile, it probably has some problems. I tried really hard to make TINA TI work for me but I much prefer LTspice.

i also usually default to ltspice

Lgbeno wrote:In general though, the concept of the flux integration technique is that there is one parameter that the algorithm needs to to spin the motor (flux threshold) so in theory, each of my 3 different motors would have a different threshold parameters but once this number is known, everything else works the same and is more robust to changes in motor load and speed. The python+QT GUI has a slider to adjust this threshold so it's pretty easy to explore and find the right number. Screen shot attached you can also see the sampled data from the ADC, BEMF looks nice and linear. This is with the that Maxon motor. Sorry, I hope that answers your question, let me know if not.

After watching the TI youtube video on their insta-spin tech this was pretty apparent - props for creating a scratch built pyhon app for dialing in the flux threshold.

Lgbeno wrote:All in all I'd say that a good next step would be to use an all NMOS half bridge with a chip like the Fairchild FAN7888MX with bootstrapping and adding lower gate drive supply.

The last time I looked into using discrete FET's for a motor control app, this was pretty much what I had come up with - just buy an IC to drive them, especially complimentary pairs in an h-bridge because of the charge pump.
bearmos
Hero Member
Hero Member
 
Posts: 741
Joined: Tue Nov 02, 2010 10:02 pm

Re: Sensorless Brushless DC Motor Drive

Postby sandesh » Wed Aug 06, 2014 1:25 pm

please tell me from where to download these header files from ur Sensorless Brushless DC Motor Drive blog

#include "config.h"
#include "pwm.h"
#include "hall.h"
#include "timer.h"
#include "serial.h";
#include "commutate.h"
#include "tinystdio.h"

also tell how to include these header file in codecomposer 5.3 ,, thanks for ur support.
sandesh
Newbie
Newbie
 
Posts: 2
Joined: Wed Aug 06, 2014 1:18 pm

Re: Sensorless Brushless DC Motor Drive

Postby sandesh » Thu Aug 07, 2014 10:10 am

where you have saved all this header files listed bellow"
#include "pwm.h"
#include "hall.h"
#include "timer.h"
#include "serial.h";
#include "commutate.h"
#include "tinystdio.h"

the code composer gives errors like "" Description Resource Path Location Type
<a href="file:/E:/code%20composer%2031-05-2014/ccsv5/tools/compiler/dmed/HTML/5.html">#5</a> could not open source file "pwm.h" main.c /brushlessworking line 30 C/C++ Problem
""


please tell from where i get all this header files
sandesh
Newbie
Newbie
 
Posts: 2
Joined: Wed Aug 06, 2014 1:18 pm

Re: Sensorless Brushless DC Motor Drive

Postby neslekkim » Fri Aug 08, 2014 2:14 am

neslekkim
Sr. Member
Sr. Member
 
Posts: 305
Joined: Tue Sep 11, 2012 5:36 am
Location: Oslo, Norway


Return to Project development, ideas, and suggestions