This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

understanding instaspin

Other Parts Discussed in Thread: MOTORWARE, CONTROLSUITE, HALCOGEN, TMS570LS3137, INSTASPIN-BLDC, DRV8301

I am trying to figure out how to control motors with the DRV8301-LS31-Kit. I got the TMS570_instaspin_bldc example to work. But i want to understand the source code. In the pdf file(InstaSPIN Control for the Hercules TMS570LS31x) there are listed some modules or Macros on Page 4. But how exactly are they working together?  In the PDF it says "Please refer to pdf documents in motor control folder explaining the details and theoretical background of each macro". But what is this "motor control folder" ?

 In the example code (drv.h) I can see a DRV_Obj. But where can i find documentation on this object and the related functions.

I downloaded a motorware.exe which gives a resource explorer, but i cant find anything about an DRV_Obj. And i dont know if this is the correct package, because it is for Piccolo. But TMS570 is no Piccolo? But i cant find another motorware.exe on TI for hercules, which also gives me an resource explorer.  I have installed motorware for hercules in the hercules subdirectory, but there is no documentation. When i search the folder there are some pdfs all below 5MB which dont help me much. Are there some tutorials on how i start coding using PWM or instaspin or something else?

I hope you can answer some of my questions.

  • Hello user4458346,

    I've forwarded your question to one of our engineers that has been working with the instaspin application. They should get back with your soon.
  • Hello,

    The instaspin_bldc demo on the LS31 MCU was ported over from a demo running on a F28035 MCU from the C2000 microcontroller series. There is a good application note that explains the theory behind the various macros used in this demo. You can find this app note here:

    If you need detailed descriptions of each of the macros, there is a document that is only available as part of the ControlSuite toolset for the C2000 MCUs. You can then find this document under the C:\ti\controlSUITE\libs\app_libs\motor_control\math_blocks\v4.3\~Docs folder, assuming you install ControlSuite under the C:\ti folder.

    I have also attached the document here for your reference.

    0677.DMC MATH_v13.1.pdf

    Regards,

    Sunil

  • thanks, as I can see this is very tecnical. But I am new to the hercules Board and do have only experience with Atmel controlers not so complex.
    So I should possibly work with more simple projects in the start. I already tried to figure out the HET_PWM_570LS31 example, but the motor doesnt spin and there is no documentation on how exactly the code works.
    I have no coding experience with TI projects. My main problem is that I dont understand the basic principles for writing codes for the TMS570 as well the hercules board. For example how do I use PWM or the ADC exactly?
    Is there any Information on how to start coding a simple project or documentation for examples for the hercules board? Or is the hercules board not suited for beginners?
  • Hello,

    We have other development kits that make it easier to become familiar with the Hercules MCUs. There are low-cost launchpads which make getting started with these MCUs really easy. You can find more information about Hercules launchpads here: 

    A Hercules is quite capable and can easily get you started with the concepts of PWMs and ADC conversions on the Hercules MCUs. Most of these modules are consistent across the Hercules family of MCUs, so you can easily transfer the module configuration from one MCU to another.

    You should download HALCoGen, which is the tool we support for generating code for configuring modules on these MCUs. You can find examples for configuring HALCoGen to generate code for PWM as well as ADC conversions in HALCoGen.

    The DRV8301-LS31-KIT comes with couple of demonstration code examples. These are complete Code Composer Studio-based projects developed for controlling the motor that is included in this kit. This code uses several modules on the LS31 MCU including PWMs, ADC, and RTI. It is a fairly large project and may not be the best example to get started with Hercules MCUs.

    Regards, Sunil

  • thank you. But I have more questions.

    With the kits came two DVDs. And I installed all of them. Now I try "importing Eclipse Projects" and select the Ti\hercules Folder. I find only three examples for TMS570ls3137, three for LS1227, three for RM46..., and three for RM48... One of these three is a "lib_build". What is that? The other are "instaspin" and "sensored speed".

    Are there other examples on the DVD or the web? Some days ago I downloaded the HET_PWM_570LS31 example , but I dont know where now. And this example does not work, because the motor does not spin. There is no documentation following with it.

    For the instaspin example:
    If I want to change the speed of the motor in runtime(for example by reading a Poti) how exactly can I do this? Do I need to change just one var?

  • The Hercules MotorWare software package includes two different motor control routine examples, one that demonstrates sensorless FOC with a redundant sensor (sensored speed control) and one that demonstrates InstaSpin-BLDC (includes multiple ways to control).

    The "lib_build" project is only created to build the different libraries used by these sensored-FOC and InstaSpin-BLDC examples.

    Please review the document titled instaspin_bldc_ls31.pdf in the C:\ti\Hercules\MotorWare\v1.0.3.03\sw\solutions\instaspin_bldc\boards\drv8301kit_revD\hercules\tms570ls3137\projects\ccs5\project01\docs folder. This document explains the different control modes and which variable needs to be updated to control the motor speed for each of these control modes (except for the mode that implements a torque-control loop rather than a speed-control loop).

    This document also explains the PWMs required for driving the motor-driver (DRV8301) used in the DRV8301-LS31-KIT. I am not sure which N2HET1 signals you are driving using the HET_PWM_570LS31 example. I am afraid this example code may not have been built for this motor control kit. Can you upload this example code so I can take a look?

    As I said in my earlier post, a Hercules LaunchPad is probably a better development kit in order to become familiar with the PWM generation capability and the ADC module performance on the Hercules MCUs.

    Regards, Sunil

  • Hello, 

    The link is dead and i would like have information on the macro. Is it posible to receive the link which explained all macro use for InstaSpin BLDC (BLDPWM, PID, RC, SPEED_PR...).

    Thank you,

    Regards, 

    Alexandre

  • Hello Alexandre,

    Can you be more specific about which link you are referring to as a dead link ? I might also suggest that you open a new thread in order to get your question in front of current experts that are monitoring the Hercules Safety MCU E2E; however, the choice is yours and I will be more than happy to try and chase down the document or item that the dead link is pointing to.
  • Hello,

    I'm speaking about the link that Sunil Oak sent on Aug 13, 2015 3:23 PM. It's the second answer of this topic.

    Thank you,

    Regards,

    Alexandre
  • Hello Alexandre,

    This should be what you are looking for:

    www.ti.com/.../universalsearch.tsp