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.

TIDA-01496: How to decide the motor rotation speed with the EVM.

Part Number: TIDA-01496
Other Parts Discussed in Thread: DRV10983EVM,

Hi,I'm studying the DRV10983EVM,but we need to drive the motor with constant speed even if the motor torque is changed.

I found that TIDA-01496  can drive the motor with constant speed by entering the speed control signal to ADC input of MSP430.

But I'm not sure the relationship between ADC input value and rotation speed(Hz).

according to 3.1.2.2 Flow for Using ADC10 of MSP430 to Implement PI Speed Control System in the manual as  below,I think we should define SPEED_INPUT,and scale value.

3. The speed level determines the target speed of the electrical cycle (Hz), defined by SPEED_INPUT,and scale value, defined by Scale.

if we would like to drive the motor with the constant speed of  every 1000rpm between 10000rpm~30000rpm ,could you tell me how  we could  define the value ? 

Thanks .

  • Question 1) " I'm not sure the relationship between ADC input value and rotation speed(Hz)"
    Answer 1) In the software project, the relevant code is in file speedcontrol.c so I would suggest going through it to understand. In general,
    a) ADC input value that you read is an input voltage you can enter from 0 to 3.3 V and the msp430 converts it to a digital 10-bit value that is out of 1024 digital value, and is called variable "ADC_Value".
    b) "ADC_Value" is then assigned a specific "Speed_Level" value from 0 to 5 depending on the range of the "ADC_Value".
    c) Each "Speed_Level" corresponds to a different "SPEED_INPUT" value out of 1024 that corresponds to a particular duty cycle, with calculation of duty cycle = "SPEED_INPUT"/1024.
    d) At a specific motor torque, the "SPEED_INPUT" duty cycle control correlated to a specific motor speed. You should represent the ratio between the SPEED_INPUT duty cycle variable and the actual electrical speed of the motor through the variable "Scale" . Please refer to section 3.1.2.4 in the design guide on how to find the variable "scale".

    Question 2) if we would like to drive the motor with the constant speed of every 1000rpm between 10000rpm~30000rpm ,could you tell me how we could define the value ?
    Answer 2)
    a) Change "Speed_Level" variable from having 5 values to having the number of values to represent all the 1000rpm intervals between 10,000rpm and 30,000rpm.
    b) Find the pwm duty cycles or CCR1 value that correspond to each rpm value for each "Speed_Level", and the corresponding "SPEED_INPUT" for that "Speed_level" will be that CCR1 value. Calculate scale according to section 3.1.2.4 in the design guide.

    Sincerely,
    Sanmesh U.
  • Thank you for your reply.

    about answer 1) I understood I should decide the scale according to relationship between Speed_measured and CCR1 value.
    if the motor torque or load torque is changed a lot,I think this software can't follow the changes.
    in this case,Do I have to make the new software for that?

    about answer 2) I understood.Thank you.
  • I rhink you should be able to use this code.
    To keep the understanding simple, follow these steps:
    1) Identify the duty cycle, and thus the SPEED_INPUT (duty cycle = SPEED_INPUT/1024) that is associated with your target speed at nominal load torque. It doesn't have to be the exact duty cycle for a target speed, it just needs to be around the ball park of what duty cycle you would expect to get your motor spinning at a certain speed. This is because it is going to be your starting duty cycle you use to try to get your target speed. From there, the PI control will change duty cycle to compensate for any speed error.
    2) Make Scale = SPEED_INPUT/TargetElectricalSpeedInHz. To convert RPM to Hz, Hz = Rpm*#PolePairs/60 .

    This will give you your desired behavior.
    Rationale behind my steps:
    I think the key equation in the code is Error = SPEED_INPUT/Scale - SPEED_MEASURED;
    SPEED_MEASURED is the measured electrical speed in Hz.
    SPEED_INPUT is value from range 0 to 1024 that represents duty cycle = SPEED_INPUT/1024.

    So if you make Scale = SPEED_INPUT/TargetElectricalSpeedInHz, and substitute that into the equation: Error = SPEED_INPUT/Scale - SPEED_MEASURED, then error will be 0 and there will be no compensation when SPEED_MEASURED == TargetElectricalSpeedInHz .

    Let me know if you have any questions