TI's Instaspin - I have it working

zombiess

10 MW
Joined
Jan 31, 2011
Messages
3,048
Location
Oklahoma City
Decided to give another development platform a try, the Piccalo with Instaspin. This is much more advanced than the PIC processors I'm use to. I also have to dust off my C programming skills which have not been utilized in +10 years. Need to take a refresher on the basics.

Good news is I've started the tutorials which are not exactly straight forward. Took me longer to figure out exactly what order I needed to do things in. After a few hours of going over loads of documentation, I finally figured out how to use the tutorial and installed all the required software. Getting the motor to ID and spin was actually the easy part LOL. I'm glad that I had experience with Lebowski's setup as it's come in handy. A lot of the parameters I need to set are similar to his, as are some of the noises made during the measuring of the motor parameters.

Both setups make their measurements differently. Lebowski does his resistance and inductance measurements for FOC without needing the motor to move. Instaspin spins the motor for many of the measurements.

Figured this setup was worth the $66 it cost for the LAUNCHXL-F28027F with the BOOSTXL-DRV8301 (24v, 20A output stage) to experiment with. I'm impressed with the control algorithm so far and I'm only through about half the tutorials.

If you are interested in motor control and are comfortable with complex IDEs for doing development (I'm not much of a programmer) it's worth checking out. Be warned though, it's not exactly for a beginner.

Not sure where I'll go with this, but I like it so far and it's starting to make more sense to me. This is the part most people seem to figure out first, then they struggle with the gate driver / power stage. Motor control programming and power stage design go hand in hand, but they are VERY different skill sets.

I think I'm starting to understand why so many commercial controllers with decent to good interfaces have not so good power stage designs. Designing a complete controller is not an easy task at all, at least not something powerful and reliable.

The more I read about Instapin and understand what it's capable of, the more impressed I am. The motion control version is really cool based on some videos I've seen.
 
It looks pretty good.
The source code of the algorithm comes with the TI package to investigate, or is it hidden somewhere in a precompiled library?
 
Zomb I haven't gone down the TI route recently. What about the compiler. Which one is needed? Is it free?
 
peters said:
It looks pretty good.
The source code of the algorithm comes with the TI package to investigate, or is it hidden somewhere in a precompiled library?

Most of it is open and modifiable. The only thing hidden is TI's FAST observer code. Flux Angle Speed Torque. When looking at the instaspin motion demos its really amazing what FAST does since you no longer need a feed back sensor, just 3 wires to the motor. My launchpad is not capable of the motion since it lacks the FPU, but the other kits come with the higher level MCU.

Downside to this is it's an entirely new MCU system to me and that means a very steep learning curve. Spinning a motor is super easy. I haven't even figured out how to blink an led yet.
 
I have ordered instaspin like 2 years ago, as a free ev kit. It was delayed a few times, until delivery date was 18 months after order date. After 18 months, order was cancelled... This was a legit order, from company email. Ti, not cool....
 
Just buy one if you want to learn it, they are not expensive. Im starting out with a $66 setup. The more advanced ones are $300. I don't know if I'll have the time (i lack time more than anything, I have a lot going on right now) to learn this platform or not, but its already paid for in my mind. I received more than $66 in education for the few hours I spent using this setup and reading the docs. PI loops and motor control make a lot more sence when you get hands on.

As you probably already know, this platform is more powerful than the "popular" ones, it's much more geared to pros vs experimenters. I can develop very fast on my 18f PIC devices, but they are toys in comparison to this. Luckily my projects don't demand sophistication and I have yet to out grow even the 18F line of processors.
 
Long time since I updated this. I've been working with and studying the TI DSP lines. Specifically the TMS320F283335 and TMS320F28027F DSPs. I picked up the DRV8301 rev b board to get started since it's the fastest way to get started.

I spend a long time relearing C coding (i'm still rusty). Handles, classes, etc, it's been almost 20yrs since I last did any real C coding and it was never to the level that is in the demo projects which have something like 20 includes + the associated .h files for all of them. The largest part of this battle is figuring out what they did, why they did it and then where to add your own code so you don't break something.

These chips are not simple like PIC's or Arduinos. They require manual register setups, timer acknowledgments, ISRs, etc. I've been using mostly PICs the last few years and doing BASIC with some inline assembler if needed. I'm use to tweaking registers, but not having to hadle writing all the routines that do all the work. Luckily TI includes lots of great examples and documentation. On the down side, there is LOTS of documentation, thousands and thousands of pages. Just getting an ADC reading from an input is a much bigger challenge than what I'm use to.

As of last night I finally took the first step to developing my own brain board. I now have a low power controller that accepts my throttle input and controls the torque going to a motor. Now that I know where to place and tweak my code, my progress should be a bit quicker.

TI provides some amazing libraries for their DSPs, but this is by far the most difficult system I've tried to learn. Just navigating their IDE and file structure took me months to get use to and understand. Nothing like trying to move a project to a new directory that worked fine only to have it toss out +20 include errors due to linking/compiler path errors, etc.

DSPs really do seem to be where the good stuff is at. I picked up some Arduino boards a month ago to play with but haven't had time. I have some projects that don't require powerful 90-150Mhz processors so I'm going to play around with the Arduino Uno an Mega2560.

For those familiar with Micros like PICs and Arduinos it's interesting to see just how much more powerful a DSP is. The ATmega2560 is 16Mhz and can do 16MIPs (millions instructions per second). The F28335 I've been using is 150Mhz and can do 150-300MIPs, has 12 bit ADCs and 16 PWMs, 6 of which have 55pS resolution.

It's really different stepping up from the "hobby/hacker" market into the more professional level stuff. Completely different worlds and generally applications. The cool thing is once you figure out how to do stuff on the DSPs along with Matlab/Simulink models you can do just about anything. I'm now starting to get interested in home theater again because now I can write my own custom EQs and algorithms to accomplish things that I just couldn't dream of doing previously. I figure it will be good practice to help me learn how to design and use digital filters while still being fun.

Anyone who wants to go down this road needs to start learning the math. Something I started back in July. I can finally look at all those crazy calculus equations and make sense of some of them, hooray for the Laplace transform!
 
Alan B said:
Sounds like great progress!

I'm not sure if I want to go the control card route (cost) or do my own board for my controller work now. The cards are tempting for dev work and having customers test since they can easily be programmed.

So many options in the TI world, the libraries and support they provide is great, but the learning curve is almost vertical. The simplest task such as blinking an LED is quite difficult.
 
Yes. Lots more details to get right with the higher performance CPUs.

I'd vote for a controlcard modular solution to start with, much quicker to get working, and allows various controlcards to be used. Makes it easy for folks to buy spares, etc. A power amp set up to take controlcards would be quite useful, might be a bigger market for that than expected.

Making a dedicated design might make sense later to get costs down for big production. But it will take more time and spins to get it right, and be sensitive to the availability of a particular chipset which doesn't last all that long.
 
I've been playing with InstaSPIN on and off for a year or so now. I was using an EVM with the DRV8312 but it wasn't powerful enough for my needs and I blew it up in the end. I've recently started using the new Launchpad and BoosterPack and I really like them. I've also seen comments suggesting that there will be a new Launchpad with a bigger, faster MCU capable of running two motors. I'm not sure if they will somehow squeeze two output stages onto a single BoosterPack or if it will require two of them. Regarding the different MCU numbers and software algorithms: InstaSPIN-BLDC is trapezoidal commutation and is (I think) supplied completely in source code form. InstaSPIN-FOC requires a chip ending in "F" or "M". This indicates that the chip contains the FAST algorithm (including some of the motor identification I think) in ROM. The rest of the software is supplied in source code form. Chips ending in "M" also feature InstaSPIN-MOTION (based on SpinTAC from Linestream Technologies). As far as I can tell, this adds a motor inertia estimation algorithm, an associated speed loop which replaces the PID one and a trajectory generator. It looks like all of the "M" chips also feature an FPU so its probably true that InstaSPIN-MOTION requires it. However, there are also versions of the chips which feature an FPU but have only the "F" designation or no designation at all (and are therefore not able to run InstaSPIN-MOTION or InstaSPIN-FOC either in the latter case). It'll be interesting to see if the chip on the new Launchpad will be an "M" version or just the "F". TI apparently also plan to release some new initial/low speed position detection algorithms. These will apparently be released as binary libraries.

Correction: Actually, some of the "M" chips don't have an FPU after all. They do seem to at least have the CLA (Control Law Accelerator) though.
 
Looking ahead, what’s the strategy for scaling this up beyond the 24 V, 10 A limits of the booster pack? At a minimum, you’d need to beef up the power supply and the FETs, although you could probably keep the gate driver chip and current sensors. Or would you go to an original circuit and just use the LaunchPad for control? Or ditch the LaunchPad and build an original circuit around the DSP chip?
 
cycborg said:
Looking ahead, what’s the strategy for scaling this up beyond the 24 V, 10 A limits of the booster pack? At a minimum, you’d need to beef up the power supply and the FETs, although you could probably keep the gate driver chip and current sensors. Or would you go to an original circuit and just use the LaunchPad for control? Or ditch the LaunchPad and build an original circuit around the DSP chip?

Future is ditch the launch pad platform to miniaturize. Initially it makes development easy. I already have a working 15KW power stage on a lebowski controller (24 FET IRFB4115), but the 200A current sensor are stopping me from pushing it harder.

Short term I'm thinking of possibly taking TI's design and beefing up the FETs in it and maybe trying to make a high end RC controller to play with. Probably really any money to be made doing this, but it's good practice for me and I'm sure some people would be interested in playing with it for mid drive setups.

I have an 18 FET IRFP4568 stage built for Lebowskis brain chip. I'll probably do an improved version of this for my own brain board.

My goal is a 30kW controller that works up to 120V. I'd like to retail controllers in the future, but I'm a ways off from that. I do feel like I'm past the really difficult part which is building a power stage that is reliable. I need to do some serious bench testing to find out my 60min continuous power rating on my designs. I haven't had a chance to do that yet, so many things going on. I'm in the middle of a several month learning binge for a another project I'm working on with a partner so I'm reading up on lots of theory. Theory that will also help with this controller design.
 
You may have already done it but I imagine that one of the changes for the kinds of currents you are talking about would be switching to hall sensors for the current monitoring. One of the nice things about doing this is you can actually measure the phase currents rather than just the low side.
 
I've been reading up on one of their other evaluation kits, the $300 DRV8301-69m-KIT. It's rated for 60 V x 60 A, which might actually be usable as a controller in a system up to 48 V nominal and 3 kW. Some work would be required for proper heatsinking, cabling, and enclosure, but other than that the hardware seems ready to go.

Of course there's a software learning curve, but I think that it might be possible to run the motor identification routine, customize some parameters, and get it running in a basic speed throttle mode without having to do any coding. From there you could go as deep as you want to customize the functionality and performance.

zombiess, any thoughts on the feasibility of this, regarding both the circuit design and the software commitment it would take to get this running? (You can get a schematic-layout-BOM package by going to the product page linked above and scrolling down to "DRV830x Hardware Development Package".)

$300 ain't peanuts, but it could be worth it for the learning experience alone, and if I can actually make a functioning FOC controller out of it, that would be awesome.

med_tidm-threephase-bldc-hc-spi-inst_board.jpg
 
A high power, high speed sensorless controller would be a huge boon to ebike and small motorcycle hobbyists..

I'm lookin' at you.. tough to drive motors like the large turnigy rotomax, colossus, etc.

Glad to hear that you've made some motion on it.
 
the LAUNCHXL-F28069M is InstaSPIN-FOC and InstaSPIN-MOTION enabled. It's as cheap as the LAUNCHXL-F28027F
http://www.ti.com/tool/launchxl-f28069m#2

i still wonder if MOTION is really beneficial for our use. so many different forces that are not really predictable, like mechanical brake power, vehicle weight, wheel slippage on sand etc
 
Hello! I have just received my InstaSpin, and I am wondering if there is any "easy" way to control my PMSM motor with it? I have already tried the GUI, and the motor was spinning perfectly. However, I want to control the motor with a signal from an Arduino. Either 5V or serial signal.

Do any of you "instaspinners" have any tips for me where to start?

I have already looked into the C-code in the CodeComposerStudio, but I wonder if there is any easier way to configure the InstaSpin?

My instaspin:
http://www.ti.com/tool/drv8301-hc-c2-kit

Thanks!
 
naijs said:
Do any of you "instaspinners" have any tips for me where to start?

Is it configurable with the Motormind GUI? If so there should be an option for "external speed control" where you can enable analog
or pwm or servo pulses.
 
So just out of curiosity, why would you want to use an Arduino to control the C2000 DSP? The C2000 is many times more powerful and feature rich than the Arduino is.
 
naijs said:
I want to control the motor with a signal from an Arduino.
Can you be more explicit about what you have in mind here? Does "control" mean

- Providing something like a throttle signal?
- Interfacing digitally to the C2000 to change parameters and receive data?
- Replacing the ControlCard via the external controller port?
 
cycborg said:
naijs said:
I want to control the motor with a signal from an Arduino.
Can you be more explicit about what you have in mind here? Does "control" mean

- Providing something like a throttle signal?
- Interfacing digitally to the C2000 to change parameters and receive data?
- Replacing the ControlCard via the external controller port?

My plan was to supply the Instaspin with a throttle-signal from an Arduino (Pot-meter wired to the Arduino). If possible, I also want to read out errors on the Arduino. I have figured out that I can probably use I2C-bus from the Arduino to the Instaspin.
 
Back
Top