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.

DRV8836: How to interface MSP430F2101 to the motor driver in PHASE/ENABLE Mode to drive a bipolar stepper motor

Part Number: DRV8836
Other Parts Discussed in Thread: DRV8834, DRV8801

Hi,

the motor will be driven in Full Step Sequence using DRV8836 in Phase/Enable Mode. The driving waveforms are shown in the datasheet of DRV8834 (page 24, Figure 14) where APHASE and BPHASE are two PWM square waves 90° shifted one respect to the other. In that same figure the two signals AENBL and BENBL are both high to enable driving. I suppose that brake will start whenever AENBL and BENBL are low. My questions are the following:

- is it correct to drive AENBL and BENBL with the same signal (High/Low for drive/brake) with transitions asynchronous with respect to APHASE and BPHASE? (the target is to minimize the number of signals from MSP430). In this case is there some drawback, e.g. brake could become out of control?

- Is it correct to suppose that PWM signals are only needed for APHASE and BPHASE signals while AENBL/BENBL can be tied to a GPIO without PWM funtionality? (the target is to minimize the number of used pins with PWM function in MSP430).

- In order to drive the motor in Full Step Sequence, the two PWM signals APHASE and BPHASE can be generated using TIMER_A in Up/Down mode with two different compare modules, TACCR1 and TACCR2. Is there a different TIMER_A configuration suitable to generate the two PWM signals (90° offset) while using a single compare module?

Thanks a lot.

Best regards,

Mauro

  • Mauro,

    Do you drive a five wire unipolar stepper mother? Or, six wire unipolar stepper motor? 

    For a stepper mode, if you want the motor brake, you can keep the winding current same as previous step.

    Page 24, Figure 14 shows AENBL and BENBL are same to get bi-polar stepper motor Full Step Sequence. You can drive AENBL and BENBL with the same signal (High/Low for drive/brake).

    It is correct that PWM signals are only needed for APHASE and BPHASE signals while AENBL/BENBL can be tied to a GPIO.

    "In order to drive the motor in Full Step Sequence, the two PWM signals APHASE and BPHASE can be generated using TIMER_A in Up/Down mode with two different compare modules, TACCR1 and TACCR2. Is there a different TIMER_A configuration suitable to generate the two PWM signals (90° offset) while using a single compare module" I think it works for bipolar motor and six wire unipolar stepper motor. For  an unipolar stepper motor, I think it is also doable with the same method. But, we need to draw the winding power sequence similar as page 24 figure 14.

  • Wang Li,

    thank you for the detailed answer.

    The stepper motor is 4-wires bipolar.

    I see in Table 4 of DRV8836 datasheet that, when MODE =1 and xENABLE=0 (i.e. in brake condition) then xOUT1 and xOUT2 are Low.

    Table 2 of DRV8834 datasheet indicates that:

    - when M1=1 and xENBL=0 then xOUT1 and xOUT2 are High-inpedance and this condition is defined as 'asynchronous fast decay mode' while

    - when M1 = 0 and xENBL = 0 then xOUT1 and xOUT2 are 0 and this is described as 'slow decay or brake mode... used when controlling the speed of a DC motor by 'PWMing the xENBL pin'.

    So is it correct to assume that, since in DRV8836 datasheet only brake condition is indicated for PHASE/ENABLE mode, it is necessary PWMing the xENABLE pin to implement brake, i.e. slow decay? Plainly speaking: what is the difference between PWMing xENABLE and simply setting it to ground?

    Best regards,

    Mauro

  • Mauro,

    Do you use DRV8834 or DRV8836?

    "since in DRV8836 datasheet only brake condition is indicated for PHASE/ENABLE mode, it is necessary PWMing the xENABLE pin to implement brake"

    I agree with you according to Table 4 of DRV8836 datasheet.

  • Wang,

    I use DRV8836 but I am looking at datasheet of DRV8834 because it is more complete including plots of input and output waveforms.

    Best regards,

    Mauro

  • Hello,

    in this forum I found a clarification that explain when to use PWM to drive xENABLE pins or when you can safely set them directly to ground:

    when you disable the motor (as in there are no further PWM Cycles) and employ Slow Decay, as the current reaches zero, that is when braking begins! At this point in time, the motor is "shorted" and all of the current in the winding is used up to generate a magnetic field which in essence fights the rotor back. This is a very dangerous portion of time for the H bridge as pretty much all of the motor stored energy is used up in a very small portion of time. Of course, integrated FET devices like the DRV8801 were designed to take this into consideration and survive scenarios of this sort.

    So I expect that, if the driving current is lower enough than 1.5A, you can quickly brake a motor using DRV8836 by setting xENABLE to ground. Othrwise, if the current is next to the device maximum current it is safe to PWMing the xENABLE accounting for a longer brake interval.

    Mauro