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.

Example project for LaunchPad F28027F to run a sensor-less BLDC Motor

Other Parts Discussed in Thread: BOOSTXL-DRV8301, ENERGIA, MOTORWARE, CONTROLSUITE

Is there an example project for LaunchPad F28027F to run a sensor-less BLDC Motor in CCS or Energia using the BOOSTXL-DRV8301? I need an example to modify to test a motor I have designed.

  • Hi Bruce,

    There sure is.  You'll want to download the TI Motorware package.  Inside you'll find a series of lab projects for this board combination that will get your BLDC up and running.  Let me know if you need additional assistance.

    BR,

  • Hi Trey,


    Yes I found them Thanks.

    #1


    Regarding the F28027F LaunchPad I have an issue with the installation of the Universal GUI as it includes GUIComposer which I have already installed for my DRV8312-69M-KIT and it's .exe files in the webapps directory.

    I wasn't sure if it was possible to reinstall GUIComposer again for the F28007F LaunchPad and it's webapps directory .exe without losing the DRV8312-69M-KIT webapps .exe files in an overwrite, so I created a new main directory c:/ti2/... for the f28027F GUI installation. That all went fine until I tried to launch the GUI from Motorware>InstaSpai-FOC>Piccolo 2802xF>GUI>Run Universal GUI it looks to my original c:/ti/... directory not the new c:/ti2?... so I copied the webapps directory at C:\ti2\guicomposer\webapps\InstaSPIN_F2802xF_UNIVERSAL to C:\ti\guicomposer\webapps\ but when I launch the GUI again I get an error...

    HTTP ERROR: 404

    Problem accessing /gc/webapp0/InstaSPIN_F2802xF_UNIVERSAL/lib/davinci.gc_1_2/WebContent/gc/templates/program/index.html. Reason:

        Not Found

    So apparently I can't just copy it over to the original c:/ti/... directory :(

    It would be nice to be able to launch all my board GUI's out of Motorware, so where have I gone wrong?

    #2

    I was watching the 6 part video series on the InstaSPIN-FOC LaunchPad and BoosterPack and noticed in the video that the USB emulator shown was not in my list of emulators and probes. By default the probe was "Texas Instruments XDS100v2 USB Debug Probe" but looks like in the video he is using Texas Instruments XDS100v2 USB Emulator. What should I select to use the GUI?

    #3

    Restarting Program Model...
    Initializing target : C:\ti2\guicomposer\eclipse\workspace\.metadata\.plugins\com.ti.binding.program\appConfig.ccxml
    Connecting target: Texas Instruments XDS100v2 USB Debug Probe/C28xx
    Loading program: null
    sun.org.mozilla.javascript.internal.WrappedException: Wrapped java.lang.NullPointerException (<Unknown source>#18) in <Unknown source> at line number 18Restart Completed.

    Looks like I'm missing the .out file from CCS?


    Any suggestions would be helpful.

    Thanks, Bruce

  • 1) Does it do the same thing when you just run the exe from Windows? It sounds like something got corrupted somewhere. As long as teh files are in the webapps directory things should work.

    2) Either should work. This is just some inconsistency in naming. The underlying software/hardware is the same.

    3) Strange... There should be an out file in the webapps/GUINAME/ folder named appProgram.out. Is that there?
  • Hey Trey,

    1) launching directly from windows c:/ti2/...webapps/... I get the same output as I posted in item (#3) and from c:/ti/...weapps/... where I added it with the DRV8312-69M-KIT files I get the error I posted in item (#1).

    2) OK then I'll stick to the default.

    3) I have no webapps/GUINAME/ folder in either my c:/ti/... or my c:/ti2/... installations, nor in any of the DRV8312-69M-KIT webapps directories.

    I was also wondering could this be why when I build and debug proj_lab02b and click the green triangle run button the DRV8312-69M-KIT motor wont run on the F28027F LaunchPad and BOOSTXL-DRV8301? Also do I skip proj_lab02a? Seems the project user guild was really for the DRV8312-69M-KIT???

    BTW I have only been able to get proj_lab01 to work (flashing LED) so far... so at least I know I'm able to flash the MCU :)

    Thanks, Bruce
  • 1) My best advice here would be to re-install the GUI from the download.

    3)GUINAME should be the name of the GUI. For instance, I think you are trying to run InstaSPIN_F2802xF_UNIVERSAL.

    Go to this directory: C:\ti\MotorWare\motorware_1_01_00_14\docs\labs and open the PDF in there. It will go through each of the labs in detail and also show you what project runs on what hardware. If you follow the steps in here you ought to be able to get your motor spinning with Lab 2b.

    BR,
  • 1) I did a reinstall with no difference in results. Do you think having two instances of GUIComposer installed may be causing some issue?

    3) Right I misunderstood they are all in there respective directories.

    Yes I have followed the steps to build and debug proj_lab02b using:

              #define My_Motor                    104

              #define USER_MOTOR My_Motor

    #if (USER_MOTOR == My_Motor)
    #define USER_MOTOR_TYPE                                            MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS                  (4)
    #define USER_MOTOR_Rr                                                 (NULL)
    #define USER_MOTOR_Rs                                                (0.4245605)
    #define USER_MOTOR_Ls_d                                            (0.0006408656)
    #define USER_MOTOR_Ls_q                                            (0.0006408656)
    #define USER_MOTOR_RATED_FLUX                            (0.0349341)
    #define USER_MOTOR_MAGNETIZING_CURRENT    (NULL)
    #define USER_MOTOR_RES_EST_CURRENT             (1.0)
    #define USER_MOTOR_IND_EST_CURRENT              (-1.0)
    #define USER_MOTOR_MAX_CURRENT                       (5.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz             (20.0)

    I then click the resume button and it states it running but no motor response. Am I missing a setup step or is build and debug all that is needed to flash the MCU for that project?

    Also I found some informative 6 part videos by TI on the InstaSPIN-FOC LaunchPad and BoosterPack but when I got to video part 3 the link takes you to part 5. Seems part 3 is lost somewhere. Do you know where I can find it?

    http://www.ti.com/sitesearch/docs/universalsearch.tsp?searchTerm=InstaSPIN-FOC%20LaunchPad%20and%20BoosterPack%20-%20Part%203:#linkId=12&src=top&r=1&m=dd

    Thanks, Bruce

  • Did you load the variables in the expressions window and change the enable flag to 1 and then the run_identify flag to 1?  This is what starts up the motor identification process.

    I honestly haven't used the Motorware GUIs that much.  Perhaps Chris Clearman can comment on the GUI issues.

  • Bruce,
    1. The two GUI composer installs use different GUI composer engines unfortunately so they don't play well together. Please uninstall everything from ti/guicomposer and then reinstall the UNIVERSAL version.

    3. I guess you have figured you that you need to follow the InstaSPIN_labs.pdf to understand how to work through all the features of the solution. I take it from your USER_MOTOR section that we were able to properly identify the motor? Do the parameters seem reasonable to you? Did the motor start spinning during the process and keep spinning until the very end?

    what is the maximum speed/frequency of this motor?

    I'll check on the video issue, thanks for reporting.
  • on the video, the URL you shared opens and plays Part 3 for me...

    all the videos are at:
    www.ti.com/.../support_community.shtml
  • I had enabled those variables but hadn't given it enough time to start the identification process so I aborted and moved on. Works fine now and it's interesting to note that in MotorWare the resulting identification is not as accurate as in CCS. With MotorWare the DRV8312-69M-KIT and NEMA17 55W Motor starts to vibrate over 3500 RPM but with the F28027F LaunchPad and BOOSTXL-8301 and the NEMA17 55W Motor it runs smooth through 4k.

    I'm curious though about the difference in the programming between project_lab01, lab02a and, lab02b. Why does proj_lab01 (blinking LED) after flashing (building and debugging) the MCU and then remove the USB connection (it continues to run, that's a good thing) and then remove the power source and then re-energize it immediately runs the blinking LED program? Yet with the two motor projects once the power source is removed and then re-energized the motor doesn't start on it's own. What saved variable(s) and where, has to be defined to run the flashed program once boards are energized?

    Yes I can get with Chris on the MotorWare GUI issue, but I'm happy with CCS by it self so far.

    Thanks for your help,

    Bruce

  • Hey Chris,

    My Bad... I saw off to the right of the video window the title to part 5 so I just assumed the video was part 5 not 3 as it is if one was to actually play the video.

    Sorry about that :(

    Thanks, Bruce

  • "in MotorWare the resulting identification is not as accurate as in CCS."
    this doesn't make any sense. CCS is the IDE you use to compile and run the MotorWare projects. it's not an either/or.

    "DRV8312-69M-KIT and NEMA17 55W Motor starts to vibrate over 3500 RPM but with the F28027F LaunchPad and BOOSTXL-8301 and the NEMA17 55W Motor it runs smooth through 4k."
    this is more likely caused by a difference in the USER_MOTOR_MAX_CURRENT vs. the boards USER_IQ_FULL_SCALE_VOLTAGE (used to set the initial speed loop gains). You need to tune the speed loop for your system, it is not possible to do this "instantly".

    "Why does proj_lab01 (blinking LED) after flashing (building and debugging) "
    I think you are only seeing this on the Launchpad, right? That is because the Launchpad comes pre-flashed with the LED Blinky example from controlSUITE (this is NOT proj_lab01).

    the MotorWare projects for the 27F are all in flash, so they do boot and start running. but you still need to connect to the target and set the variables. the MotorWare projects for the 69M default to RAM. You can right click and switch the build to Flash.

    "Yes I can get with Chris on the MotorWare GUI issue, but I'm happy with CCS by it self so far."
    you can import the F2806x Universal Webapp (zip up the folder, import and point to that zip) insides CCS Gui Composer. This is how I use it...that way you have a graphical instrumentation inside CCS instead of just using the expressions view.
  • Hey Chris,

    1. I had considered doing just that as it's not a big deal to switch back and forth between installs when needed for the different GUIs

    3. Yep if all else fails read the instructions... I actually pulled the initial parameters from the DRV8312-69M-KIT then entered them into user.h for proj_lab02a and b. Below is my findings that I posted back to Trey.

    "I had enabled those variables but hadn't given it enough time to start the identification process so I aborted and moved on. Works fine now and it's interesting to note that in MotorWare the resulting identification is not as accurate as in CCS. With MotorWare the DRV8312-69M-KIT and NEMA17 55W Motor starts to vibrate over 3500 RPM but with the F28027F LaunchPad and BOOSTXL-8301 and the NEMA17 55W Motor it runs smooth through 4k."

    Yes the motor once I gave it a chance to get started with the ID process ran and only stopped once variable run/identify changed back to "0"

    But my next question was about these labs 02a and b was "What saved variable(s) and where, has to be defined to run the flashed motor program once boards are energized independent of any USB connected GUI?"

    Thanks, Bruce
  • the projects as-is can't be run w/o the debugger to allow you to instrument the variables.

    you of course can go change the proj_lab##.c to hard code certain variables (Ex: enable, bypass ID, set a fixed speed, run), the it would run autonomously. Typically you want to be able to change those commands though, so you would want some interface back to the MCU to do so. You need to add all of that yourself. There is a HAL Tutorial in the documentation which gives a couple examples. Others have posted their I2C and UART examples also.
  • Got it...makes sense. "CCS is the IDE you use to compile and run the MotorWare projects. it's not an either/or."

    Understood... It's not apples to apples. "caused by a difference in the USER_MOTOR_MAX_CURRENT vs. the boards USER_IQ_FULL_SCALE_VOLTAGE"

    The pre-flashed F28027F LaunchPad sequences all 4 LED's where the proj_lab01 blinks just one on the right end of the row of LEDs. Plus I can start and stop the blinking by suspending the run in CCS. But like I said it will run the blinking of one LED just as soon as the F28027F LauchPad is energized and not connected to CCS. By flashing proj_lab01 that erasers the pre-flashed LED sequence so that's long gone at this point. So I have to assume that project_lab01 is in RAM as it starts the single LED blink?

    So with the 27F there's no way to preset the variables? Seems that is the case with proj_lab01???
    I also invested in the 28069M launchPad as well, are you saying it is capable of running a motor without connecting to set the variables once the program has been saved to RAM?

    I do recall reading about the option to use the GUI inside of CCS. I'll have to give that a try... but am I to assume I still need to remove all instances of GUIComposer before hand?
  • OK sounds like a plan... Thanks so much for your expertise help :)
  • "So I have to assume that project_lab01 is in RAM as it starts the single LED blink?"
    the project is built for flash

    "So with the 27F there's no way to preset the variables? Seems that is the case with proj_lab01??? I also invested in the 28069M launchPad as well, are you saying it is capable of running a motor without connecting to set the variables once the program has been saved to RAM?"
    You have to modify the code to fit your needs. It isn't done automatically. The examples are for development through the debugger and then you turn them into a standalone embedded firmware image.

    your code should set variables as required or give a way for exterior signals to give information to your software.

    "but am I to assume I still need to remove all instances of GUIComposer before hand?"
    No, the GUIs that you install are independent of the GUI Composer Run time engine that is used in CCS. It's confusing...all you need is the webapp folder from the installation.
    ex:C:\ti\guicomposer\webapps\InstaSPIN_F2806xM_UNIVERSAL

    you would zip this folder then import inside CCS --> GUI Composer. You have to install GUI Composer from the CCS App Store. That installation will then be tied into CCSv6, regardless of what is in your \ti\guicomposer install.
  • Nope there is no proj_lab02a in C:\ti\motorware\motorware_1_01_00_18\sw\solutions\instaspin_foc\boards\boostxldrv8305_revA\f28x\f2802xF\projects\ccs