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.

DRV8256: Sleep (also toff?) pin is toggling when switching directions quickly on motor

Part Number: DRV8256

I am having the chip power a motor and send PWM signals. When it switches from from forward to reverse direction several times, something weird happens where the motor stops performing as necessary and instead, the nSLEEP pin starts to toggle on and off for a few times. This is with the breakout board from Pololu (www.pololu.com/.../4038). Essentially, I need this motor to go forward and backwards very rapidly, but it can't trigger the SLEEP pin. I'm also unaware if the breakout board has the TOFF pin connected to the SLEEP pin, so maybe the TOFF pin is the issue that's driving the SLEEP pin to low and thus pausing the motor. If I get readings from the oscilloscope, the fault pin is pulled up to 3.3 (with an external pullup 10kOhm resistor). The SLEEP (and maybe TOFF) pins are alternating high to low at approximately 0.6 seconds. The motor will spin while the SLEEP is high (at whatever last PWM signal it was given), but it won't stop doing this until I do a power reset. All other pins seem to be worked as planned. If I force the SLEEP pin to high (just plug it into 3V3 instead of a GPIO pin), the high-low switching of the GPIO doesn't start/stop the motor, but then the motor is just spinning at it's previous speed and won't change no matter what the controller is giving it. For reference, I'm making a gimbal. There's an IMU that communicates with I2C to a Nucleo L476RG. A PD controller takes in the error (how far away the system is from equilibrium) from the IMU and converts it into the PWM signal to send to the motor to correct this. When the system is close to equilibrium (such as alternating between +1 degrees and -1 degrees), the motor starts doing the weird stuff. The motor is going forward/backwards fast, but there's not a huge current draw that I have measured (under about 60mA, seems completely reasonable).

  • Hi Matthew,

    Something strange is happening with this device. Firstable, nSLEEP should not toggle. It is an input signal. It should be tied to an external logic power supply. Can you provide more information on how you have the breakout board set-up. A simple diagram will be enough.

    I'm also unaware if the breakout board has the TOFF pin connected to the SLEEP pin

    Looking at the schematic on their website, it doesn't seem to be connected. TOFF by default is left open but can adjust the TOFF values by adjusting the TOFF pin voltage following the table below.

    The SLEEP (and maybe TOFF) pins are alternating high to low at approximately 0.6 seconds

    Can you provide some scope showing this. While you are it, can you also  take a waveform showing nFAULT (make sure it's pulled to 3.3V via 10kohm resistor), nSLEEP, IN1, OUT1 (or IN2 and OUT2 depending on which input is PWMing).

    The motor will spin while the SLEEP is high (at whatever last PWM signal it was given), but it won't stop doing this until I do a power reset

    Can you do a quick test for me. Can you remove the motor and drive the outputs. Measure the SLEEP signal. Is it toggling or is it stable? Could be that the motor is causing the toggling issues.

    When the system is close to equilibrium (such as alternating between +1 degrees and -1 degrees), the motor starts doing the weird stuff.

    What is the PWM frequency you are using? Could be that the ON time is very short such that it is less than the dead time. The PWMing may be too fast for the driver to process it in time before the next PWM pulse occurs.