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.

DRV8308: speed control but not exactly speed need help on shaft to run....

Part Number: DRV8308


this is a question to the speed control but not exactly speed...

When I press the button the engine turns to the right while you have your finger on the button,

when I take my finger from the button the engine stops because I have the bits active and so the motor is stopped.
When I press the same button again to turn to the right, the engine does not rotate.

I have 3 situations:

if

start-> turn right-> stop-> turn right again >> problem does not run

if
start-> turn left-> stop-> turn left again >> problem does not run

if
start-> turn left-> stop-> turn right >> works perfect
               or
start-> turn right -> stop -> turn left >> works perfect

To help solve my problem I leave my records.

#define BLDCDRV_REGVAL_0X00 0b0100000001010010 /**< CTLR 0x4052*/
#define BLDCDRV_REGVAL_0X01 0b0000000000000000 /**< ADVANCE 0x0000*/
#define BLDCDRV_REGVAL_0X02 0b0000010011111111 /**< COMCTRL 0x04FF*/
#define BLDCDRV_REGVAL_0X03 0b0000111110000010 /**< MOD120 0x0F82 */ 
#define BLDCDRV_REGVAL_0X04 0b0101100011111111 /**< DRIVE 0x58FF*/
#define BLDCDRV_REGVAL_0X05 0b0000000000000000 /**< SPDGAIN 0x0000 */
#define BLDCDRV_REGVAL_0X06 0b0000000000000000 /**< FILK1 0x0000*/
#define BLDCDRV_REGVAL_0X07 0b0000000000000000 /**< FILK2 0x0000*/
#define BLDCDRV_REGVAL_0X08 0b0000000000000000 /**< COMPK1 0x0000*/
#define BLDCDRV_REGVAL_0X09 0b0000000000000000 /**< COMPK2 0x0000*/
#define BLDCDRV_REGVAL_0X0A 0b1111000000000000 /**< LOOPGN 0xF000*/
#define BLDCDRV_REGVAL_0X0B 0b0000000000000000 /**< SPEED 0x0000*/
#define BLDCDRV_REGVAL_0X2A 0b0000000000000000 /**< FAULT 0x0000*/
  • Esmith,

    This sounds like a state machine error in your code. Please debug it. I cannot debug code.

    Regards,

    -Adam

  • Hello Adam, 

    Not i put only the small code and with this register i have the same problem.

    the small code is the SPI communication to copy, the register to DRV8308 and the pins to enable, dir, and brake.

    i don't understand  if the drv loss the hall sensor position or is the mode basic or not....

    in register 0x04  option DELAY   on datasheet 

    Controls whether ADVANCE leads or lags Hall signals
    0 = Commutate before Hall signals arrive
    1 = Commutate after Hall signals arrive

    i change to 1 and to 0 and they not have diference.

  • Adam, 

    when the motor stop the led off FGOUT stay ON 

    this means that for the DRV the motor continues to rotate, because I do not understand how the led continues ON ...

    in data sheet say is a ouput signal from the HALL sensor if i read write...

    also when the engine turns I have the FAULTn LED ON
    when motor STOP the led FAULTn turn OFF.

    some times i read 0x51 (rotate write) or 0x40 (rotate left) from  the register 0x2A