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.

Stepper Motor Issue

Other Parts Discussed in Thread: TM4C1294NCPDT, DRV8711

Dear Sir.,

We are using TM4C1294NCPDT microcontroller,we designed 4 stepper motor in our Hardware unit.Its separated from LHS(left hand side) and RHS(Right Hand side).Using DRV8711 Stepper driver IC for each stepper motors.

1st Stepper motor has high current and high speed.

2nd stepper motor has low torque and minimum speed.

The above motor has same process in RHS side too.

Previously we are operating only LHS or RHS.Now we planned to operate  both LHS and RHS (4 stepper motor) at the same time.All stepper motor has configured as 1ms timer interrupt.Now we are facing interrupt latency(That means the both LHS and RHS sequence was not same,having some delay.)

LHS Side:

1st stepper motor:

Control_Register.MODE    = 0x02;

Torque_Register.TORQUE   = 0xF0;

Decay_Register.TDECAY    = 0x10;

Stall_Register.SDTHR     = 0x1A;

Stepper motor 2:

Control_Register.MODE    = 0x02;

Torque_Register.TORQUE   = 0x64;

Decay_Register.TDECAY    = 0x10;

Stall_Register.SDTHR     = 0x40;

This above configuration same as RHS side.

If i operate both LHS & RHS means what kind of issue will come,otherwise what is the alternate option for this problem.

Thanks in advance

  • Hello,

    I am not exactly following the issue.  Are you indexing the stepper motor using the CTRL register (Address = 0x00) and writing to bit 2?  

    Regards,

    Ryan 

  • Thank you for your reply

    LHS Stepper Motor 1:

    Control_Register.Address = 0x00;
    Control_Register.ENBL = 0x01;
    Control_Register.RDIR = 0x00;
    Control_Register.RSTEP = 0x00;
    Control_Register.MODE = 0x02;
    Control_Register.EXSTALL = 0x00;
    Control_Register.ISGAIN = 0x02;
    Control_Register.DTIME = 0x03;

    LHS Stepper Motor 2:

    Control_Register.Address = 0x00;
    Control_Register.ENBL = 0x01;
    Control_Register.RDIR = 0x00;
    Control_Register.RSTEP = 0x00;
    Control_Register.MODE = 0x02;
    Control_Register.EXSTALL = 0x00;
    Control_Register.ISGAIN = 0x01;
    Control_Register.DTIME = 0x03;

    The above code is same as RHS.

    Thank you.,

  • Tom,

    I am still not following what the issue is.  And can you please answer the question above?  Are you using the STEP input (hardware pin) or Control register to move the motor?

    Regards,

    Ryan

  • We are using STEP input hardware pin for moving motor.

    When the STEP input is high pulse generation should be start.

  • Thank you.,

    To avoiding Interrupt latency , all stepper motor configured from individual timers.For eg.,

    Motor 1= Timer0A

    Motor 2= Timer1A

    Motor 3= Timer2A

    Motor 4= Timer3A

    So i write a code like,

    void Timer0A_Initialize (void)
    {
    SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
    TimerConfigure(TIMER0_BASE, TIMER_CFG_A_PERIODIC);
    TimerLoadSet(TIMER0_BASE, TIMER_A, g_Timer0A_ClockSetValue);
     IntPrioritySet(INT_TIMER0A, 0);
    IntEnable(INT_TIMER0A);
    TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
    TimerEnable(TIMER0_BASE, TIMER_A);
    }

    In 1st stepper motor I added the IntPrioritySet(INT_TIMER0A, 0);  I set Highest priority in this motor.

    And also i know lowest priority IntPrioritySet(INT_TIMER0A, 0xE0); 

    And my question is, is it possible to set all motor in higher priority,or other motor will set lower priority.

    Note:We are using totally 14 interrupts.If you need any information about this please let me know.

  • Tom,

    I am not a firmware expert or knowledgeable on the TMxx processor.  At first, I thought this may be a DRV8711 issue, but it appears it is more related to software residing on the MCU.  Is that correct?

    If so, I will pull in a TMxx expert.

    Regards,

    Ryan

  • Thank you Ryan.,

    Actually i experimented its a DRV8711 issue and  interrupt latency issue.

    First of all i will need to know is this DRV8711 capable for running 4 steppers(like 1st & 2nd for -DRV8711, 3rd & 4th for another DRV8711 )

    I think TMXX expert will sort out my issue.Kindly resolve this.

    Thank you..

  • Tom,

    Can you please share your complete schematic?  Each DRV8711 is intended to run only 1 stepper motor.  Have not considered running more than one with one IC, but maybe it is possible.

    Regards,

    Ryan