Help with Pololu DRV8711 Stepper Motor Driver


+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    91

    Default Help with Pololu DRV8711 Stepper Motor Driver

    Hello - I am trying to write a simple program to run a stepper motor back and forth using the Pololu DRV8711 driver (Link: https://www.pololu.com/product/3730). In order to use the driver, you must first enable it and then you can use the DIR and Step Pins to run your stepper. With other drivers, all you needed to do was drive the ENABLE pin high and you were good to go. With the 8711 board, you have to enable it via SPI. This is done by sending 16-bit values to the registers on the board. Page 27 of the data sheet for this (Link: https://www.ti.com/lit/ds/symlink/drv8711.pdf) shows the registers and gives the default values. Technically, all I should have to do is to set bit 0 of the CTRL register to 1 and that should enable the motor, correct? I also want to limit the current to 1/2 of it's maximum value of 4A. This is done using the lower 8 bits of the TORQUE register. Here is my routine to do that:

    Code:
    '****************************************************************
    InitStepper1:
        'Set current to 1/2 max (2A) 
        '$1180 = %0001000110000000
        high M1SCS
        Shiftout m1SDAT, M1SCLK, 1, [$1180/16]
        low M1SCS
        
        pause 50
        'Enable Motor
        '$0C11 = %0000110000010001
        high M1SCS
        Shiftout m1SDAT, M1SCLK, 1, [$0C11/16]
        low M1SCS    
        
        return
        
    '****************************************************************
    I am leaving all of the other values at their default. After executing the InitStepper1 code, I go to stepping the motor by pulsing the STEP pin and nothing happens. My stepper spins freely and I get no indication from my power supply that there is any additional current draw. Is there something I am not doing or doing wrong? Thanks! Jeff

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,607


    Did you find this post helpful? Yes | No

    Default Re: Help with Pololu DRV8711 Stepper Motor Driver

    Looks like you're shifting out $1180 divided by 16, truncated to 8 bits, so $22. That's not what you want, is it?

    Be careful with / vs \ ;-)

  3. #3
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    91


    Did you find this post helpful? Yes | No

    Default Re: Help with Pololu DRV8711 Stepper Motor Driver

    THANKS! Good catch and yes, I feel stupid. I will give this a try and let you know if that was it! Jeff

  4. #4
    Join Date
    Sep 2006
    Location
    Florida, USA
    Posts
    91


    Did you find this post helpful? Yes | No

    Default Re: Help with Pololu DRV8711 Stepper Motor Driver

    Well, While that was a problem, it was not THE problem. Still no movement. I tried both mode 1 and mode 0 for the SHIFTOUT methods, also, to no avail.
    Here is a snip of the circuit board design for examination. It seems pretty straight forward, so I think my issue is with setting the registers. Any thoughts are appreciated.
    NOTES: There are 2 drivers on board. Green traces = 5V, Blue = Gnd, Red = 12V, Black = Signal. PIC = PIC16F877A. Thanks!
    Name:  Snip1.JPG
Views: 10
Size:  109.4 KB

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,607


    Did you find this post helpful? Yes | No

    Default Re: Help with Pololu DRV8711 Stepper Motor Driver

    Hmm...PortA...have you disabled the analog functions (ADCON1 and CMCON registers, I believe)?
    Have you verified (logic analyzer or scope) that the expected data does appears on the pins?

Similar Threads

  1. Stepper motor question:
    By MOUNTAIN747 in forum General
    Replies: 6
    Last Post: - 20th June 2021, 23:56
  2. Motor Stepper Example
    By Melanie in forum Code Examples
    Replies: 134
    Last Post: - 3rd January 2015, 17:58
  3. Possible? to use 'SOUND' to drive a Stepper Motor Driver Board
    By rayzrocket in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 30th October 2013, 15:28
  4. Pololu Dual Serial Motor Controller
    By larzazral in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th August 2011, 05:11
  5. Stepper Motor troubles
    By Fryin in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st March 2007, 01:56

Members who have read this thread : 7

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts