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.

DRV8434S: Step direction not changing on first write

Part Number: DRV8434S

Tool/software:

Hello,

I am implementing a design with the DRV8434S and I am attempting to do all of the control for the chip through the SPI bus. I've come across an odd phenomenon when writing to the CTRL3 register. When attempting to spin the motor CCW the first step with the DIR field set to 1 spins the motor CW, though all subsequent writes step the motor CCW as expected. I've recreated this phenomenon on two separate drivers and two separate motors.

For example, for the following SPI writes to CTRL3 (address 0x05) I see the following:

0x30

Motor doesn't spin (correct)
0xF0 Motor spins CW (incorrect)
0xF0 Motor spins CCW (correct)
0xF0 Motor spins CCW (correct and continues for all subsequent writes).

I see similar behavior as well if it try to change directly from CW rotation to CCW rotation.

0x70

Motor spins CW (correct)
0xF0 Motor spins CW (incorrect)
0xF0 Motor spins CCW (correct)
0xF0 Motor spins CCW (correct and continues for all subsequent writes).

Looking at the SPI bus directly, I don't see any problems obvious problems with the timing or the frame formatting. Any insight into what could be causing this would be welcome. Thanks!

  • register

    Hi Matthew, 

    Thank you for posting in this forum. 

    The SPI waveform looks good. Would you please check followings in your setup.

    1- Please check if any other bits are not changed while you are changing the register

    2- would you please try it with different microstepping mode rather than the full step.

    Moreover, It is expected that the motor rotates CW when DIR=1 and CCW when DIR = 0 as explained below. Please check the wiring. 

    The SDI is 0xF0 for 0x05 address and the SDO is 1100 0000 1011 0000 which as expected the SPI_STEP bit is self-clearing, automatically becomes '0' after writing '1'.

    As mentioned in 7.3.3 Microstepping Indexer P 14 of datasheet , at each rising edge of the STEP input the indexer advances to the next state in the table below. The direction shown is with the DIR pin logic high. If the DIR pin is logic low, the sequence table is reversed.

    Based on that DIR = 1 is CW and DIR = 0 is CCW. 

    Please update me as you check the SPI and microsteeping modes

    Best regards, 

    Mojtaba.

  • Hi Mojtaba,

    I tried your suggestions. Unfortunately, I haven't found anything that resolves the issue.

    I have tried both full step modes, both half step modes as well as 1/4 & 1/8 microstepping. The only observation I have is that in the finer microstep modes, the problem of incorrect direction on the first step occurs in both the CW and CCW directions where on the more coarse settings it only affects the CCW direction.

    I checked the windings by taking current measurements at each step, which I think matched the indexer for 100% full step mode, but my current polarity does not match the table. At startup I measured A+ & B+ at a negative current (i.e. the current is being sunk into the controller). DIR = 1 and Ifs = 500mA. Measurements are in mA.


    A+      A-      B+     B-     Step
    -500   500   -500   500   +1
    500   -500   -500   500   +1
    500   -500   500   -500   +1
    -500   500   500   -500   +1
    -500   500   -500   500

    I took screenshots of a write followed by a read to the CTRL3 register and it seems that all of the bits in the register are stable with the expected exception of the STEP bit.

  • Hi Matthew, 

    Thank you for the update. 

    The provided SPI waveform looks OK. the Step bit is self-clearing, automatically becomes '0' after writing '1'. Would you please provide me with the following waveforms:

    1- Would you please read the fault status register at address 0X00 in normal operation and when you change the direction. 

    2- Would you please provide the current waveform under the normal operation in DIR=0 and DIR 1 and when the change direction bit is sent. 

    3- Would you please share your design schematic. 

    4- Do you have any same issue for other bits as well?

    Best regards, 

    Mojtaba.