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.

DRV8316REVM: Assistance on using the example universal control lab for running a motor

Part Number: DRV8316REVM
Other Parts Discussed in Thread: DRV8316

Hey Guys,

Need some help with running the example code Universal_Motor_Control_Lab for the F280049c and DRV8316 devices there were some build errors earlier which were solved on this support link.  

The code builds all fine but there was no motor movement seen, also do I need to make any changes to the expressions in the expressions window for this project similar to how we had to do for the example projects like IS07_Speed_Control (Changing the motorVars.flagEnableSys flag to 1 from 0). We even tried running the motor in a sensorless manner making tweaks to the code a bit, but we had no luck there as well, can you help us out with this one, have attached a code along this support request if you all want to have a look at the project files on your end. 

7737.attempt2_f28004x.zip

FYI: This support request is in relation to the support request that was created earlier. I created this another request just because the problem explained there with the program not building because of the linking errors was resolved and i didn't want the other people referring to the forums getting confused with this question.... check out that post over here.

Thanks,
Shlok Desai

  • Shlok, 

    The subject matter expert is out of office. Please expect a response on Wednesday.

    Thanks.

  • Hey Sahil, 

    Thats fine, can wait for  to respond as its from a project reference that he shared earlier

    For now we made certain modifications to the project taking the reference of the files shared by  earlier, now there are certain changes happening to the variables in the expression window, we ran the universal_lab_level4.txt to get in the variables. We can observe that the motor state turns to motor_fault_stop what could be the reason for that. You may check out the video as well here...



    Have attached the zip file of our project as well for you to debug on your end.
    attempt3_f28004x.zip

    Thanks 

    Shlok Desai 

  • Shlok, 

    We are looking into the video and files that you have shared. We will get back to you soon.

    Thanks.

  • Hey  and ,


    Update on the project, we got the motor running now, but the problem that we are facing now is that when MOTOR1_HALL and FULL_FAST_LIB is active the motor runs but when it's just MOTOR1_HALL it does not, even FAST alone works. Is it the case that the FAST Estimator must be on at all times, shouldn't be I guess as there are modes where just HALL effect is being used.

     

    Can we get some help on this??

    Thanks 

    Shlok Desai 

  • Hi Shlok,

    Are you running the project on a custom motor, or one of the motors that can be purchased from TI.com? (i.e. Technic or Anaheim motors)

    There is a HALL calibration (HALL_CAL) routine that can be enabled when running both the HALL and FAST algorithms. Can you see if the values in hallAngleBuf[] need to be updated based on the info below in 'motor1_drive.c' file?

    // Enable MOTOR1_HALL_CAL pre-defined sybmols, run the motor with FAST for angle
    // calibration
    // Copy hall_M1.thetaCalBuf[] to hallAngleBuf[]
    // 1->1, 2->2, 3->3, 4->4, 5->5, 6->6, 6->0
    // Disable MOTOR1_HALL_CAL pre-defined sybmols after calibration for normal operation
                                        // 6           1              2
                                        // 3           4              5
                                        // 6
    #if (USER_MOTOR1 == Teknic_M2310PLN04K)
    const float32_t hallAngleBuf[7] = { 2.60931063f,  -0.45987016f, -2.57219672f, \
                                        -1.50797582f, 1.59862518f , 0.580176473f,
                                        2.60931063f };
    

    Best,

    Kevin

  • Hi

    Yes, we are running the project on a custom motor, yesterday we had turned on HALL_CAL, MOTOR1_HALL and FAST as well and then there were changes happening to the hall_thetaCalBuf[] but only to the first 4 bits, so is that right?? The motor runs well with both Hall and FAST right now, but after substituting the values from hall_thetaCalBuf[] to hallAngleBuf[] also the motor wont run on just HALL. so,

    • Is running the motor on just HALL sensors really possible??
    • We are just getting 4 bits with some value in thetaCalBuf[] other bits are 0 does that mean we are doing something wrong??
    • Also when the motor is running the speed estimated by the HALL sensor is different from the actual speed target set by us, is that a problem as well?

    Have attached a video for your reference, 


    Also thank you for helping out on this, we at least got the motor running.

    Thanks 

    Shlok Desai

  • Hi Shlok,

    You are right, something seems wrong with the HALL based speed sensing. Can you plot and compare the FAST estimated angle and HALL angle, like below in the User's Guide, just to confirm it looks correct? The below is plotted using an external DAC board, but you can plot within CCS instead if you don't have the DAC board.

    Let me check with another expert and possibly test this myself.

    Best,

    Kevin

  • Hey Kevin,
    Update on the project, we are now able to get output from the HALL sensor seems like there was issue with the pullup to the pins the sensor was connected to. Even the thetaCalcBuf is now populating with legit values, thanks for your help.
    Have a question though how do we use the DRV8316 without the SPI board just the PWM pulses? 

  • Hi Shlok,

    Great to hear you got the HALL feedback working.

    Have a question though how do we use the DRV8316 without the SPI board just the PWM pulses? 

    Are you meaning you want to use DRV8316T: Hardware pin based configuration, instead of the SPI based DRV8316R? Or something else?

    Best,

    Kevin

  • Hey ,

    Are you meaning you want to use DRV8316T: Hardware pin based configuration, instead of the SPI based DRV8316R?

    Yes, we want to use the DRV8316T, we are aware of what registers we have to populate and depopulate based on the guide provided but was my question was about what all changes in the code shall be done. Anyways if we have any further doubt in making changes to the hardware, we will let you know. 

    Thanks 

  • Hi Shlok,

    You'll need to remove the SPI_DRV related code and possibly add some GPIO write / setting code.

    You can take a look at the code for BSXL8323RH_REVB in the Universal Lab to get an idea. DRV8323RH uses HW configuration similar to DRV8316T.

    Best,

    Kevin