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: BDLC motor configuration & pi

Part Number: DRV8316REVM
Other Parts Discussed in Thread: DRV8316, LAUNCHXL-F280025C, C2000WARE, TMDXIDDK379D, DESIGNDRIVE

Hi, 

Setup : LAUNCHXL-F280025C, DRV8316 REVM, BDLC motorEM1 encoder

Code: universal Motor control

Current configuration: DMC_LEVEL_3

I would like to move a motor to a specific location based on the tick count from my encoder. Is there a built-in PID (Proportional-Integral-Derivative) controller that I can use for this purpose?( i notice i don't have the BDLC option in the predefined symbols).

Additionally, I don't have much information in my motor datasheet. Are there any calibration guidelines available to assist me in achieving this?

Thanks!

  • Hi Shahar,

    Thank you for the E2E post! I'll have to direct you to the C2000 team, allow them some time to take a look at your question and provide an update.

    Regards,

    Yara

  • Hello,

    So, we have two questions to address here. First, moving the motor to a specific position based on the tick count. To clarify, what aspect of the encoder, code, or QEP are you referring to when you say tick count?

    Second, tuning the parameters of the lab for the motor parameters. In the Universal Motor Control Lab User's Guide, the Level 4 Incremental Build section has basic guidelines on usage of the InstaSPIN-FOC FAST Motor Identification routine. Please note that the motor ID routine requires you to use the FAST estimator. If there are parameters you don't have that are not listed and you cannot determine, please let me know and I'll assist you further!

    Regards,
    Jason Osborn

  • Hi Jason, 

    Em1 data sheet - Transmissive Optical Encoder Module

    I'm using interrupts to keep track of changes in the A,B and I channels. When I receive an index interrupt, I reset the count. I have a total of 40,000 ticks(QEP), which helps me determine my location on the disc by counting these 'ticks.' Is this the correct approach to track my location? Also, could you provide guidance on how to use PID for this?

    In addition I switched the motor from Teknic_M2310PLN04K to Anaheim_BLY172S_24V, and I noticed that the power consumption dropped from 0.9 volts to 0.2 volts. Can you share your thoughts on why this might have happened

    Many thanks!

  • I would be happy to help, Thanks!

  • Hello,

    Apologies for the delayed response.

    For motor power consumption, it seems that it's likely that the Anaheim motor is closer to the actual spec of your motor than the Teknic, and so the control process is more accurate and efficient. I'd definitely recommend, if possible, using the InstaSPIN-FOC FAST Motor Identification routine to learn more about the specifics of your motor's physical parameters! This will likely increase efficiency further.

    For the encoder, the C2000 actually has a built-in tool to allow more efficient interface with an A/B/Index encoder! Refer to the device TRM chapter on the eQEP peripheral, located at this link. This will allow the device to perform several aspects of the encoding logic that would normally need to be performed in an ISR, like yours. I would highly recommend using this over implementing decoding logic into an ISR.

    We have several usage examples in the C2000Ware Driverlib example library (eQEP peripheral examples for the F28002x). Additionally, the Universal Motor Control Lab itself has built-in support for hardware encoders using the HALL_EN or ENC_EN predefined symbols, depending on the type of encoder (In your case, I believe ENC is the correct symbol). Refer to the Universal Motor Control Lab User's Guide for more detailed information on usage of this implementation.

    Regards,
    Jason Osborn

  • Thanks, 

    there is a build in PID method to move the motor to target location?

  • Sahar,

    Apologies, I'm not sure I fully understand the question. If you're asking whether the Universal Motor Control Lab has a built-in method of moving the motor to a targeted motor angle using the encoder data, I don't believe so, other than aligning to the index. The UMCL is based around controlling the motor speed as the primary control variable. I believe we do have a solution based on this, but I cannot recall offhand which it is. I'll consult with some colleagues and get back to you.

    If I've misunderstood the question, please let me know!

    Regards,
    Jason Osborn

  • Hi Jason,

    Thank you for your prompt response.

    In my project, I require precise and smooth control over the motor to achieve accurate movements without any sudden jerks. Do you have a PID option available for controlling the motor to achieve specific angles?

     in addition your ref speed variable to set the speed having PID controller behind? 

    Appreciate your assistance!

    Thanks!

  • Sahar,

    After consulting with a colleague, it appears that the DesignDRIVE Industrial Development Kit (DesignDRIVE IDDK) has the position controller you're looking for. It is listed in the Motor Control SDK as tmdxiddk379d.

    Regards,
    Jason Osborn

  • Hi

     in addition your ref speed variable to set the speed having PID controller behind? 

    thanks!

  • Shahar,

    Apologies, I do not understand the question. Can you reword it?

    Regards,
    Jason Osborn