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.

How to set IQ Full scale current to max out my motor performance?

Other Parts Discussed in Thread: DRV8312

Hi,

I'm using DRV8312 and F2805x. The default setting:

USER_IQ_FULL_SCALE_CURRENT_A (10 ) A

AND USER_ADC_FULL_SCALE_CURRENT_A (17.30) A

I am not able to achieve my motor spec from above setting. (not enough current for high acceleration or torque)

Basically, my motor is not able to run at its full performance under this current scaling.

So I modified the Current scaling as following, I am able to draw more current into my motor under same motor parameter setting at user.h

USER_IQ_FULL_SCALE_CURRENT_A (5) A

AND USER_ADC_FULL_SCALE_CURRENT_A (8.65) A

BUT it still not able to produce as much torque as it should be. only 1/4 of my max torque(12mNm)

The max current for my motor is 0.41A. Is there any document can help me to set this scaling correctly to max out my motor's performance?

  • USER_ADC_FULL_SCALE_CURRENT_A defines the maximum current at the AD converter. The value that will be represented by the maximum ADC input (3.3V) depend on hrdware, it is based on the current sensing and scaling to the ADC input.
    USER_IQ_FULL_SCALE_CURRENT_A defines the full scale current for the IQ variables, must be larger than the maximum current. You can't change both values if you don't modify the hardware.

    You can increase USER_MOTOR_MAX_CURRENT in user.h according to your motor, to increase the torque current of motor.
  • What's the potential problem or risk if I only change the current scaling in software but not in hardware? How it would affect my motor performance (in term of position control accuracy)?

    I already put the max current value for my motor (0.4) A from motor's datasheet. I am afraid that if I increase this value too much, my motor will over heat very fast and burn out.

  • Qiang,
    you can't change the USER_ADC_CURRENT value, it is set by HW. If you change it the software is going to think a different amount of current is flowing through the shunt, which will cause issues.

    to set the maximum amount of current for the motor you increase USER_MOTOR_MAX_CURRENT
    this value is NOT the max current rating of the motor, it is always higher. There is a peak current associated with the peak torque capability of the motor that you need to calculate / set.

    for example the 24V motor in the DRV8312 kit is rated at 4A, but it takes 7.1A peak current to make the rated torque.
  • Thanks Christ.

    1: Based on my tests, after I set a higher value of USER_MOTOR_MAX_CURRENT (1.64) A, it would have a much better performance, and less position error as well. But I don't want my motor to be overheated.

    As you mentioned if USER_MOTOR_MAX_CURRENT is not the max current rating of the motor, then how can I properly set this value, what's the REAL current limit base on my motor's datasheet?
    (My motor is 24V with max rating current of 0.4 A).

    2: Another question about the current scaling, I plan to change my HW, Then changed the software current scaling coordinately .
    The default HW: R34=1Kohms, R27=19.1Kohms, so it's about 20X current sensing. based on R34/(R34+R27)
    I want to make it 40x , 60x or even 80x by replacing the R25,R26,R27 to 39.1kohm, 59.1kohm, 79.1kohms
    Which one would you suggest for the best motor performance based on my motor parameter?

    Also, I notice that, if I changed my HW current scaling, USER_MOTOR_MAX_CURRENT is also get affected, How do I balance these two values?

    Thanks for your help!
  • 1. from the control side, you need USER_MOTOR_MAX_CURRENT to be at least equal to the current required to generate PEAK torque of your motor, which is certainly more than 0.4A.  However, you also may need to provide your own protection logic to insure that you don't command more than the rated current for more than the rated amount of time. That is up to you.

    2. I don't understand your question. You need to select your shunt resistor and other gain resistors to produce 3.3V output of the circuit when you measure +CurrentMax and 0V when you measure -CurrentMax

    It is a good idea to design this CurrentMax for your peak continuous current + 10-20%

    USER_ADC_CURRENT will then be (2 * CurrentMax)

    And USER_IQ_CURRENT will then be >= CurrentMax

    USER_MOTOR_MAX_CURRENT will be equal to the maximum peak continuous current you want to command from your speed controller.