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.

CCS/LAUNCHXL-F28069M: Getting started: InstaSPIN Lab 1b where is the waveform?

Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: BOOSTXL-DRV8301, DRV8312, MOTORWARE, CONTROLSUITE, INSTASPINUNIVERSALGUI

Tool/software: Code Composer Studio

I have a LAUNCHXL-F28069M / BOOSTXL-DRV8301 and a motor.

I'm going through the labs following the InstaSPIN Projects and Labs User Guide ver 1.0.16.  I'm finding it hard to follow along.

On page 28 we start setting up Lab 1b, Step 2a.  On page 30 I see an oscilloscope screen shot showing wave forms.  I presume (but am never told) that I should be able to replicate those waveforms.

On page 28 I'm told (in a sentence that is barely recognizable as English)  that the output will appear on PMWxA and PMWxB pins.  It would have been nice here to be directed to the LAUNCHXL-F28069M User Guide in order to find the location of those pins, if in fact that's the right thing to do.  It took me some time to find that.  I also found that  the x in PMWxA runs from 1 to 6, and they occupy pins 35-40 and 75-80, assuming the pins have been set to the correct MUX value.  I'm not told which of those to check, so I'm checking them all.

Question:  Which pins on the LAUNCHPADXL-F28069M should I probe with my oscilloscope?

Question:  Should the waveforms also appear at the phase voltage terminals for the motor (BOOSTXL-DRV8301 J11 A, B, and C) ?

On page 29 there are some software settings to check.  I made those, and rebuilt.  At the bottom of page 29 are three lines, the first starts "Ch-1 -> PMWDAC1: SVGEN output ..." 

Question:  What are those three lines trying to tell me?  I can't find any reference to PMWDAC1 or SVGEN.  Is that something that is relevent for the DRV8312, and not for the 8301?  

On page 30 is the wave form.   I presume, but are never told, that I should debug the program now, and that I should see this waveform.  But if I do that, I do not see any waveform on any pin,  and nothing on the phase voltage terminals.  (BOOSTXL-DRV8301 J11 A, B, and C).   LED D9 is blinking.

Question:  Should I be seeing a wave form on my oscilloscope at this point?   If so, which pins?

I continue with the next parts, Step 2b and DATALOG.   Nothing to be seen on the 'scope, and ... questions about DATALOG will have to wait.

On page 37 is a section "Lab Procedure".    

Question: How is this different from Steps 2a and 2b?    

I can't make progress here, however.   I'm asked to open proj_lab01b.js, but I cannot find that file in my motorware directory.  

Any general advice on getting started with these labs is appreciated.   

Thanks.

  • Gary,

    Sorry for the confusion, I'll try and answer your questions here:

    1. While not very intuitive, the pin outputs are labeled on the underside of the physical LaunchPad PCB. You'll see DAC1-4 labeled on the silk screen; these correspond to pins 32, 31, 72 & 71 respectively. You can also check out the schematic in ControlSUITE for more detail here: C:\ti\controlSUITE\development_kits\LAUNCHXL-F28069M\HwDevPkg
    2. No, the SVGEN (Space Vector Generator) output is similar, but not the same as the 3 phase voltage waveforms. The MOSFET will have some effect on the waveform.
    3. These three lines are referencing the code shown above. Channels 1, 2 and 3 of the PWMDAC are represented by gDacData.ptrData[0-2], and the SVGEN output is the Tabc.value[0-2] values. The period values for the PWMDAC modules (PWM7A/B and PWM8A/B) are identical to the PWM period values that are driving the MOSFETs for this step.
    4. You'll need to compile and load the project, as well as enable the flags to run the V/Hz profile. These steps are given in the Lab Procedure. You'll use the mapping I gave to question (1) to view any variables assigned to the PWMDAC module.
    5. The Lab Procedure describes how to change the V/Hz profile to match your motor by editing the user.h file, which was described theoretically in the previous section. Sections 2a and 2b give an idea how to view different variables on the PWMDAC and Datalog modules while running the Lab Procedure. Changing the variables from 2a->2b will require you to recompile and reload the .out onto the device, which doesn't happen until the Lab Procedure section.
    6. Page 38 gives a description of how to open the Scripting Console and where to locate the JavaScript file. One thing that sometimes can trip users up is that the default file type is not set for ".js" files when the Scripting Console prompts you to browse for the files.

    Hope this clears up some stuff, happy to help with more information.

    Sean

  • Thanks, that helped considerably.

    I am having some difficulties with Lab 1b.   I've tried to follow the directions very carefully.   When the code is setup to see the SVGEN waveforms (Step 2a), I do see them on pins DAC1, DAC2 and DAC3, but the peak-to-peak voltage is about half of what's displayed in the User Guide.   

    But I have less luck with Step 2b, which sets up the code to display the angle variable, and sets up the DATALOG.   When I run this one I see the angle ramp on DAC1, SVGEN on DAC3, but DAC1 and DAC4 is 1.5 V steady but a bit noisy DC.   Not what the UG shows in Figure 6.

    The DATALOG graphs aren't as expected.  DualTime B and SingleTime are flat at zero.  I've included what DualTime A displays below.  Again, not what the UG shows in Figure 9.

    Guidance welcome.   

  • For your first point, the amplitude doesn't need to match, we only show this picture for reference of the shape of the waveform. You can change the DAC gain to chain the amplitude if you wish to see it larger.

    Can you please post an oscilloscope screenshot that you're seeing for part 2b? I'm having trouble understanding exactly what you're seeing.

    For the DATALOG, it looks as if there aren't enough samples per period for the waveform. Since continuous refresh can tax the system, we suggest setting one-shot capture and increasing the buffer size to have a better result. Also, low speeds will require larger buffer to capture a full electrical cycle, so you can try increasing the reference speed (which in turn will allow a smaller buffer size)

    Sean
  • Sean, I appreciate your help.

    Two scope screen shots are below.  The first shows DAC1 and DAC3, the second shows DAC3 and DAC4.  

    Concerning buffer size, sampling, one-shot capture, recall that this is my first introduction to CCS and the hardware, so I don't know how to do those things.  I've checked quickly for how they might be changed, and I will continue to do so while I wait for your reply.  While I'm at it:  I also cannot figure out how to change graph parameters, in particular the x scale and the y-scale.  Sometimes the graph gets zoomed in, but I cannot get it zoomed out.  The "zoom out" icon does nothing in those cases.

  • Hi Sean,

    My scope waveforms for 2A)were the same as UG except for the amplitude being lower.

    However my 2B) scope waveforms looks something like this -

    Is there some setting I'm missing.

    I seem to have followed the steps.
    Sowmya

  • Sowmya,

    It looks like you did not correctly set the offset and gain parameters in HAL_setDacParameters(). Did you follow this step?

    Sean
  • Hi Sean,

    Yeah, turns out I didn't change the offset setting to 0.5 for one of the values.
    However I did change them now and added my motor parameters to user_j1.h
    The program seems to set the gMotorVars.Flag_enableSys variable to 0 despite making it 1 due to an error. " ctrlFreq_Hz_low"'
    What's the reason for this? This didn't happen yesterday till I connected my motor.(Which didnt run due to the error)

    With my motor disconnected now, with power to the EVM with both on and off cases I am unable to see the waveforms I could see yesterday. 

    This happens while monitoring both the SVGEN and the angle outputs.

    -Sowmya

  • Looks like it was my motor settings which were incorrect in user_j1.h Not all motor parameters are provided in the datasheets so some assumptions didn't go too well with the code. Right now I am running with a default speed of 0.0009. When I change it to about 0.005 the motor speeds up okay but it gets extremely hot very quickly. Is this expected behaviour?

  • Sowmya,

    When you reply please drag/drop your user_j1.h file into the reply so we can see your settings.

    0.0009 KRPM?

    that is much too slow for sensorless velocity control

  • Hi,

    I've attached my user_j1.h file and datasheet of the motor. (Highlighted the motor params in yellow in the pdf)

    I plan to integrate a quadrature encoder into my system as speeds could go low often in my robotic application.

    I changed the parameters under the Anaheim_BLY172S for my convenience.

    Also,I was running my motor at much lower voltage than rated, i.e. about 25V.

    3362.user_j1.hBN23-BrushlessDCMotorsDtS.pdf-Sowmya

  • Sowmya,
    With the user_j1.h you sent there will not be a USER ErrorCode generated. Are you sure your project is compiling with this user_j1.h?

    This is a straight forward motor and should be no issue to get running very quickly.

    Is this the same motor as Gary (who started this post)?
  • Hi Chris,
    I am not able to find Gary's motor specs.
    My project compiles okay and my motor runs too.

    I just have a problem with the motor running very slow and getting very hot. This is with the default set speed.
    As per the lab procedure, I increased the speed from the Expressions menu to a higher value(default shown was about 0.0009 in krpm). The motor speeds up, but it gets extremely hot with high draw of current.

    I ran project 1c) as well with the current control. I am able to see the motor spin with lower current draw(slight heating). So, could heating for lab 01b) be due to V/f control and low speed?

    These are my questions -
    1) In what number format should I be viewing Speed_krpm? Is it an issue with that ?
    2) How do I set the following parameter in my user.h file? "USER_MOTOR_RATED_FLUX " . Is there any issue here?

    Have some ques about lab 1c too) should I make another thread?

    Thanks,
    -Sowmya
  • Sowmya,
    Do you work with Gary or is yours a separate topic? If separate please start a new thread in the future.

    The default set speed for these projects is 1 KRPM. Please review the lab documents to make sure you are following the correct procedure, especially regarding importing the .js file or using the INSTASPINUNIVERSALGUI

    1. IQ24. Loading the .js file per the lab instructions sets all the types
    2. USER_MOTOR_RATED_FLUX is identified from the ID process. Use proj_lab02c to run your motor and receive the USER_MOTOR parameters. Update these in user_j1.h before proceeding to the next labs.

    yes, make another thread

    but in general the lab01 are really only for when you have your own hardware you need to test. Working with the TI hardware you can skip directly to lab02c to ID your motor.
  • Gary,
    I suggest moving to proj_lab02c.
    run motor ID. update your user file.
    move on to proj_lab05b for speed control. Make sure you keep the flags for OffsetCal and RsRecal enabled.
  • Hi,

    Thanks for the replies, they were helpful.

    No, I do not work with Gary, I posted here as I faced similar issues as him with lab 01b)

    I am importing the right .js files in the scripting console though. 

    I will create another thread if needed for lab 2c) for motor ID. 

    -Sowmya