587,008 active members*
3,358 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Stepper Motors / Drives > Has anyone attempted to roll their own stepper driver using the TI DRV8711
Page 2 of 3 123
Results 21 to 40 of 57
  1. #21
    Join Date
    Feb 2015
    Posts
    11

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    I bought the msp430g2 launchpad and the drv8711 boosterpack for it. I can get it to work (with the demo code for code composer studio) but my Energia code (same as arduino code but for TI's development boards) just wont work. Definitely not good choice for beginner unless you have experiance in coding C. The driver has nice features, but they make it hard to start using. Before buying you need to know how to write in register with SPI.

  2. #22
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Late to this thread as I was only just searching on "DRV8711". Spotted the chip a month or two ago
    and decided is was an obvious solution to low cost high current stepper driving and designed a little
    test board / breakout for breadboard investigations. Duly made up last week, and a first-cut at an
    Arduino driver for it working last night - still need to research more on the various settings and timings,
    but am spinning a small NEMA23 motor happily now.

    Was thinking about possible form-factors for this, perhaps as stackable Arduino (Mega) shield for
    3-D printing/GRBL use? Maybe two DRV8711's per shield is possible plus a uController to auto-configure.

    Here's the pictures: DRV8711 driver test board

  3. #23
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Late to the thread, just been searching about DRV8711. I spotted this chip a month or so ago and
    saw the possibilities. I put together a little bread-boardable breakout pcb (the TI breakout is not
    friendly in this regard) and got this built last week. I put together the basis of an Arduino library
    for it for testing and got it working with a small NEMA23 I have - there's still a bit of work fathoming
    the best combinations of decay mode and timings but the thing works nicely.

    I've been musing on the possible form-factors for this chip. Possibilities:

    Larger motherboard for the TI breakout
    Stackable Arduino shield with built-in uController for configuration, perhaps can get two DRV8711's on this.
    Edge-mounting daughter board.

    Anyway my breakout: DRV8711 driver test board

  4. #24
    Join Date
    May 2011
    Posts
    72

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by Mark_T View Post
    Late to the thread, just been searching about DRV8711. I spotted this chip a month or so ago and
    saw the possibilities. I put together a little bread-boardable breakout pcb (the TI breakout is not
    friendly in this regard) and got this built last week. I put together the basis of an Arduino library
    for it for testing and got it working with a small NEMA23 I have - there's still a bit of work fathoming
    the best combinations of decay mode and timings but the thing works nicely.

    I've been musing on the possible form-factors for this chip. Possibilities:

    Larger motherboard for the TI breakout
    Stackable Arduino shield with built-in uController for configuration, perhaps can get two DRV8711's on this.
    Edge-mounting daughter board.

    Anyway my breakout: DRV8711 driver test board
    Nice job! It's funny that you posted this today because I just ordered the DRV8711 booster pack and the suggested Launchpad for it.

  5. #25
    Join Date
    Feb 2015
    Posts
    11

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by Mark_T View Post
    Late to the thread, just been searching about DRV8711. I spotted this chip a month or so ago and
    saw the possibilities. I put together a little bread-boardable breakout pcb (the TI breakout is not
    friendly in this regard) and got this built last week. I put together the basis of an Arduino library
    for it for testing and got it working with a small NEMA23 I have - there's still a bit of work fathoming
    the best combinations of decay mode and timings but the thing works nicely.

    I've been musing on the possible form-factors for this chip. Possibilities:

    Larger motherboard for the TI breakout
    Stackable Arduino shield with built-in uController for configuration, perhaps can get two DRV8711's on this.
    Edge-mounting daughter board.

    Anyway my breakout: DRV8711 driver test board
    Hi Mark,

    Ive been trying to get the driver to work with my MSP430 dev board (its similar to arduino, and uses same libraries). Im having problem with the register writing over SPI. Can you show your arduino sketch where you write the register? Ill paste my code that gets the motor turning but it doesnt write the register correctly. But the enable bit does set 1 somehow so it will turn the motor. But the problem rises when i try select different microstep value or gain. The code sets the gain as ISGAIN=5 which will overheat the motor in no time.



    #include <Stepper.h>;
    #include <SPI.h>;


    const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
    // for your motor

    // Are the pins 9 and 10 only needed for indexer logic ?
    Stepper myStepper(stepsPerRevolution, 9, 10);

    const int slaveSelectPin = 11; // the pin which is connected to boosterpacks SCS
    const int nSleep = 6; // pin which wakes up the board
    const int nSTALL = 19;
    const int nFAULT = 18;


    void setup()
    {
    pinMode(nSleep, OUTPUT); // pin for the nSleep which wakes up the board
    pinMode(nSTALL, OUTPUT); //
    pinMode(nFAULT, OUTPUT);
    pinMode(slaveSelectPin, OUTPUT); // SCS

    digitalWrite(nSleep, HIGH); // HIGH wakes up board

    SPI.setBitOrder(LSBFIRST);
    SPI.begin();



    // CTRL Register
    digitalWrite(slaveSelectPin, HIGH); // slave select / SCS pin has to be in order to write register
    SPI.transfer(0x0F); // ive tried multiple different ways for this.. basically i would be trying to write 16 bit word 0x0f01 for full step. 0xf19 would be 1/8 microstep.
    SPI.transfer(0x01); //
    delay(15);

    delay(150);

    // TORQUE Register
    SPI.transfer(0x10);
    SPI.transfer(0x64); // torque limit to 100 in decimal
    delay(15);

    delay(150);

    // OFF Register
    SPI.transfer(0x20);
    SPI.transfer(0x30);
    delay(150);


    // BLANK Register
    SPI.transfer(0x31);
    SPI.transfer(0x08);
    delay(150);


    // DECAY Register
    SPI.transfer(0x43);
    SPI.transfer(0x10);
    delay(150);


    // STALL Register
    SPI.transfer(0x5f);
    SPI.transfer(0x40);
    delay(150);

    // Drive Register
    SPI.transfer(0x60);
    SPI.transfer(0x55);
    delay(150);

    // STATUS Register
    SPI.transfer(0x70);
    SPI.transfer(0x00);
    delay(150);


    // Sets fault and stall to high == no problem
    digitalWrite(nSTALL, HIGH);
    digitalWrite(nFAULT, HIGH);


    // set the speed at 60 rpm:
    myStepper.setSpeed(60);

    // initialize the serial port:
    Serial.begin(9600);
    }

    void loop()
    {
    // step one revolution in one direction:
    Serial.println("clockwise");
    myStepper.step(stepsPerRevolution);
    delay(100);


    // step one revolution in the other direction:
    Serial.println("counterclockwise");
    myStepper.step(-stepsPerRevolution);
    delay(100);

    }





  6. #26
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    SPI.setBitOrder(LSBFIRST);
    SPI is usually MSBfirst, and the DRV8711 is no exception. You need a pull-up on MISO but the Boost board
    has this I think.

  7. #27
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by Hartsai View Post
    pinMode(nSTALL, OUTPUT); //
    pinMode(nFAULT, OUTPUT);
    No, those are outputs from the DRV8711 (open collector outputs).

    You need to assert SCS high before each register write and take it low again afterwards. See figures 10 and 11 in the datasheet. SPI Mode 0
    works, that's the default though.

  8. #28
    Join Date
    Feb 2015
    Posts
    11

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by Mark_T View Post
    SPI is usually MSBfirst, and the DRV8711 is no exception. You need a pull-up on MISO but the Boost board
    has this I think.
    Thanks! Somehow i think it works with LSB as well... I know what LSB and MSB means but how do they affect the register write if set wrongly?

    Quote Originally Posted by Mark_T View Post
    No, those are outputs from the DRV8711 (open collector outputs).

    You need to assert SCS high before each register write and take it low again afterwards. See figures 10 and 11 in the datasheet. SPI Mode 0
    works, that's the default though.
    I figured this by myself actually after i posted the message. The earlier version of the code had it taking the chip select low at first then write and the high again.. Thats how pretty much every SPI example is written on internet but at least i learnt something: read the manual! I just forgot to change it to LOW when i was testing quickly if it makes any difference...

    After changing the pin to LOW in between it seems that the register is writing correctly ( I wish i knew how to read it now), but the stepper still isnt working correctly. Maybe its because the included stepper.h library isnt really working with the boards indexer logic. Even when i try full stepping, it seems that the shaft is only turning around 90 degrees... When i try step 800 steps it propably is stepping about 340 degrees. The stepper is 1,8 deg per step so it should just work with 200 steps per revolution. Im selecting only the step and dir pins for the movement so I guess the problem lies somewhere in there. Gonna try some different stepper libraries today, like Accelstepper and AFMotor if they work on MSP430 board.

    If you can come up with working code please share it! And thanks again for the helping.

  9. #29
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Use the AccelStepper library and the DRIVER option:

    AccelStepper stepper (DRIVER, step_pin, dir_pin) ;
    The Stepper library does not do step/direction pins, just drives H-bridges/unipolars.

    Or drive the pins directly.

  10. #30
    Join Date
    Feb 2015
    Posts
    11

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by Mark_T View Post
    Use the AccelStepper library and the DRIVER option:



    The Stepper library does not do step/direction pins, just drives H-bridges/unipolars.

    Or drive the pins directly.

    I got Accelstepper working with the driver set up like you said. I think it limits the max speeds somewhat. I tried with microsteps set to 8 and i only was able to run the motor around 75 rpm. Not sure if i was doing something wrong but anything over 200 steps a second didnt matter at all for the run speed. Heres the code for accelstepper I used: [C++] #include <AccelStepper.h>; #include <SPI.h>; //pin 9 for step, pin 10 for di - Pastebin.com


    After that i tried controlling the pins myself without any stepper library. What i found is that i could spin the motor up to 450rpm but there is no acceleration so higher speeds might not be possible because of that. I tried 500 rpm but the motor would just make that whining loudish noise and not spin at all and no holding torque either. 450 RPM would be 12 000 steps per second. The code is here : [C++] #include <SPI.h>; const int stp = 9; const int dir = 10; const int slaveS - Pastebin.com


    When i tried the demo code (not energia code, dont understand anything about it) that came with the boost-drv8711 and the msp430g2553 mcu it was able to spin the motor 1000 rpm without problem (on 8 microsteps) and it had acceleration too. So it is possible to have acceleration and higher speeds than the 450 RPM. Do you have idea what im doing wrong?

  11. #31
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by Hartsai View Post

    After that i tried controlling the pins myself without any stepper library. What i found is that i could spin the motor up to 450rpm but there is no acceleration so higher speeds might not be possible because of that. I tried 500 rpm but the motor would just make that whining loudish noise and not spin at all and no holding torque either. 450 RPM would be 12 000 steps per second. The code is here : [C++] #include <SPI.h>; const int stp = 9; const int dir = 10; const int slaveS - Pastebin.com


    When i tried the demo code (not energia code, dont understand anything about it) that came with the boost-drv8711 and the msp430g2553 mcu it was able to spin the motor 1000 rpm without problem (on 8 microsteps) and it had acceleration too. So it is possible to have acceleration and higher speeds than the 450 RPM. Do you have idea what im doing wrong?
    Yes you need to limit acceleration to get full speed, and AccelStepper has quite a low max step rate. You'll probably
    need fast or mixed decay mode to get fastest speeds too. For fast stepping I set up a regular interrupt at say 10 or 20kHz
    and use DDS technique (phase accumulator) to generate pulses. I'm still working on the Arduino library for the chip because
    of all the configuration its hard to construct a simple high level interface that does require the user to have read the entire
    datasheet!

  12. #32
    Join Date
    Feb 2015
    Posts
    11

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by Mark_T View Post
    Yes you need to limit acceleration to get full speed, and AccelStepper has quite a low max step rate. You'll probably
    need fast or mixed decay mode to get fastest speeds too. For fast stepping I set up a regular interrupt at say 10 or 20kHz
    and use DDS technique (phase accumulator) to generate pulses. I'm still working on the Arduino library for the chip because
    of all the configuration its hard to construct a simple high level interface that does require the user to have read the entire
    datasheet!
    I hear you, I also thought it would be easy but i guess the complexity of the driver makes it tougher than your average full stepping driver. I read on the accelstepper support site that the max step speed for the library is 4000 steps per second with arduino 16 MHz. MCU's with higher performance can get higher stepping speeds. The acceleration calculation limits the speeds a lot it seems. Ive been trying to figure out the code they provided with the boost-drv8711 , becuase it can go up to 1000 rpm and its using the exact same decay settings (and all the other registers are same as well) as my energia sketch has. I just feel that in my current code (the no non accelstepper one) its trying to accelerate to 500rpm in one step which stalls the motor. Could simple for loop make it work? Starting from longer delay between step pin HIGH and LOW and in the end reaching the wanted stepping speed? As you can probably see, im very beginner at coding and this is all new to me but im keen on learning.

    EDIT: I also think that using 16 bit mcu's is not that good of a choice here. The driver allows 256 microstep resolution which is basically useless with the 16 bit limits (or am i wrong?) the max turning speeds would be around 75 rpm with 256 microstep resolution. I'm seriously thinking about the C2000 launchpad , which has 32bit mcu

  13. #33
    Join Date
    Feb 2015
    Posts
    113
    hello, what do you think about this driver DMS-781 from germany (CNC Zubeh), do you recommended me to buy it ? is it good as the Gecko g203v drivers ? I want to use it with Nema 34 960 oz-in from CRP,dms-781
    thanks
    ASSADI
    Attached Thumbnails Attached Thumbnails dms-781_digital_cnc_steuerung.jpg  

  14. #34
    Join Date
    May 2011
    Posts
    72

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    I picked up the DRV8711 booster pack and connected it to an Arduino running GRBL. It does a great job spinning my stepper but there are a number of registers that have to be written to the DRV8711 each time it is powered up. This means that the Arduino needs to write to those registers before it enables the steppers. What I did was write a script to write all of the registers to the values that I want and then flash the arduino with the GRBL code and run the nc file. Obviously that is not an optimal way to do things. I have been working through the GRBL code trying to figure out a way to add the SPI writes to the GRBL code as part of the initialization routine but quite frankly I'm quite the amateur when it comes to coding. What I would like to be able to do is read and write the registers to insure that the appropriate values are loaded up on the DRV8711. Is there anyone out there that is really up to speed on the GRBL code that could help me to add DRV8711 read and write functions?

  15. #35
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by jerseyguy1996 View Post
    I picked up the DRV8711 booster pack and connected it to an Arduino running GRBL. It does a great job spinning my stepper but there are a number of registers that have to be written to the DRV8711 each time it is powered up. This means that the Arduino needs to write to those registers before it enables the steppers. What I did was write a script to write all of the registers to the values that I want and then flash the arduino with the GRBL code and run the nc file. Obviously that is not an optimal way to do things. I have been working through the GRBL code trying to figure out a way to add the SPI writes to the GRBL code as part of the initialization routine but quite frankly I'm quite the amateur when it comes to coding. What I would like to be able to do is read and write the registers to insure that the appropriate values are loaded up on the DRV8711. Is there anyone out there that is really up to speed on the GRBL code that could help me to add DRV8711 read and write functions?
    If it helps I have just checked in an initial Arduino library for the chip, at https://github.com/MarkTillotson/DRV8711

  16. #36
    Join Date
    May 2013
    Posts
    23

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    I'd like to add my interest in this project. Designing and manufacturing boards isn't a problem for me as well as modifying code on occasion. It wouldn't be too hard to do a custom build o GRBL for the DRV8711 initialization but it would probably be better to add a small MSP430 (because they're so cheap) to handle the initialization. You might be able to do the initialization with an Arduino sketch but I've never tried to run anything but GRBL on the setup I have.

  17. #37
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by GeorgeIoak View Post
    I'd like to add my interest in this project. Designing and manufacturing boards isn't a problem for me as well as modifying code on occasion. It wouldn't be too hard to do a custom build o GRBL for the DRV8711 initialization but it would probably be better to add a small MSP430 (because they're so cheap) to handle the initialization. You might be able to do the initialization with an Arduino sketch but I've never tried to run anything but GRBL on the setup I have.
    There's a version of GRBL which is an Arduino library/sketch, would be easier to integrate with that, but
    yes using a separate MCU per DRV8711 board would be good - am working on a board layout in fact
    with opto-isolated step/direction/enable interface and a non-isolated serial setup port for one-time
    configuration.

  18. #38
    Join Date
    May 2013
    Posts
    23

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    OK, well let me know if you want some help or a 2nd set of eyes during the design.

  19. #39
    Join Date
    Feb 2015
    Posts
    21

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    Quote Originally Posted by GeorgeIoak View Post
    OK, well let me know if you want some help or a 2nd set of eyes during the design.
    So far the schematic is this: http://sphinx.mythic-beasts.com/~mar...epcard-sch.png
    Still needs decoupling caps, crystal or resonator and such, layout in progress.

    I also though a web applet to generate register settings for the DRV8711 might be handy...

  20. #40
    Join Date
    May 2013
    Posts
    23

    Re: Has anyone attempted to roll their own stepper driver using the TI DRV8711

    I sent you a PM

Page 2 of 3 123

Similar Threads

  1. Has digital error correcting of machine tolerance faults been attempted?
    By cnccnc222 in forum Mechanical Calculations/Engineering Design
    Replies: 0
    Last Post: 02-19-2014, 09:02 PM
  2. Simple question: Hot roll vs cold roll steel
    By CuttersCov in forum MetalWork Discussion
    Replies: 2
    Last Post: 01-10-2013, 02:42 PM
  3. has any one attempted anything like this?
    By Feist92 in forum Linear and Rotary Motion
    Replies: 8
    Last Post: 06-07-2011, 04:28 PM
  4. hacking a roll to roll tape printer
    By ybakos in forum Printing, Scanners, Vinyl cutting and Plotters
    Replies: 1
    Last Post: 12-17-2009, 11:22 PM
  5. STEPPER DRIVER FAQ {Stepper/driver amp per phase match.
    By huios in forum Stepper Motors / Drives
    Replies: 0
    Last Post: 08-27-2006, 02:43 PM

Tags for this Thread

Posting Permissions

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