Gauging interest - Prop driver for DRV8711 stepper drive chip?
Mark_T
Posts: 1,981
I have existing code for Arduino to configure this chip, wondered if there was enough interest to
motivate me to write a Propeller version.
Its a flexible microstepping driver that uses external MOSFETs to allow high current handling
(5A or more easily). TI do a sort of breakout board for this:
http://www.ti.com/tool/boost-drv8711
It needs various SPI registers setup correctly after reset to work with any particular motor, but
otherwise is a step/direction driven stepper driver supporting various decay modes, microstepping
to 1/256.
It can also be configured as 2 H-bridges.
The MOSFETs on that board are dual MOSFETs CSD88537ND, with 12 milliohm on resistance,
substantially more capable that the best single-chip stepper drivers which have DMOS MOSFETs
on-chip of 200 miiliohm or more.
motivate me to write a Propeller version.
Its a flexible microstepping driver that uses external MOSFETs to allow high current handling
(5A or more easily). TI do a sort of breakout board for this:
http://www.ti.com/tool/boost-drv8711
It needs various SPI registers setup correctly after reset to work with any particular motor, but
otherwise is a step/direction driven stepper driver supporting various decay modes, microstepping
to 1/256.
It can also be configured as 2 H-bridges.
The MOSFETs on that board are dual MOSFETs CSD88537ND, with 12 milliohm on resistance,
substantially more capable that the best single-chip stepper drivers which have DMOS MOSFETs
on-chip of 200 miiliohm or more.
Comments
Hi Mark, I see that you have posted some code too, so it's not just a question then
What would be nice is if you could give us some feedback on the operation of this chip, it's pros and cons if you like. I've used other chips and there are definite limitations with them although in certain applications they work fine.
I'm interested in a Propeller version.
Do you think the boards TI sells for $25 are a good deal? I see the DRV8711 chips are $7.29 at Mouser but I haven't check the price on the MOSFETs.
http://uk.mouser.com/Texas-Instruments/Semiconductors/Power-Management-ICs/Motor-Motion-Ignition-Controllers-Drivers/DRV8711-Series/_/N-41dumZ1yxyu8uZ1z0zls6
I've got some NEMA 23 steppers I want to drive but the drive board I purchased a year and a half ago doesn't appear to be working correctly (or at all).
http://hackaday.io/project/4793-propeller-based-cnc-router-controller
I'm using some cheap L298N drivers to test my control code (just to see if the motors spin) but I'm sure I'll want to use a better driver chip once I install the steppers into the machine.
I'm wondering if the TI boards are worth the price or if I'd be better off making my own PCB.
Looks pretty nice
Not trying to prevent any future sales for Mark, but if you really want to get that thing going, get some of those G251Xs I have been talking about. I believe that would do the trick for you. I use them for both NEMA 17s and 23s, and I have used a bunch of them.
Expanding on what I said:
Its a flexible microstepping driver that uses external MOSFETs to allow high current handling
(5A or more easily). You could in theory do > 20A with the right MOSFETs, it supports various
drive levels and dead-time for external MOSFETs, although I can't remember what gate drive
voltage it uses (the chip works from 8V to 50V or so).
It needs various SPI registers setup correctly after reset to work with any particular motor, but
otherwise is a step/direction driven stepper driver supporting various decay modes, microstepping
to 1/256. 6 decay modes supported, adaptive blanking time, etc etc.
It can also be configured as 2 H-bridges - for driving DC motors - still get a range of decay modes.
Senses over current on the MOSFETs directly.
Produces a 5V rail from the high voltage supply with only a few capacitors. No external diodes
needed.
Has windowed backEMF sensing and a stall detection circuit that uses it. The backEMF is also
output on a pin.
The datasheet has more.
The typical one-chip stepper driver has integrated DMOS bridges with 0.2 to 0.4 ohms on-resistance
per MOSFET, limiting usable currents to 1.5A (without heatsinking), perhaps 2.5A with (DRV8825
for instance). They run very hot, and none of them can sensibly handle a large NEMA23 low-impedance
stepper motor.
Yes, but 4 or 5 of them is quite expensive. And they won't fit on the footprint of the back on a NEMA17 motor (42mm square) AFAICT
The chip is exactly what I was looking for a few years ago and didn't exist - integrated stepper driver using external MOSFETs.
If only it had EEPROM internally for the settings it would be a world beater. Compare the high component count on that Gecko
board with the dozen or so needed for the DRV8711.
Expect in the future stepper motors to have integrated driver electronics using chips like this:
CAT5 or similar to carry drive signals to opto-isolator, and DC motor supply wiring.
Much less RFI/EMI, robust, you get the right motor driver for the motor, and adding
an encoder is easier... How things should be done (except for very extreme environments
of course!)
You can configure a few things like current and microsteps but most of the decay mode
settings are hard-wired - it drives a 1.7A motor if 0.05ohm shunts are used, seemingly
smoothly.
[ BTW I connect only to GND, #sleep, reset, step, direction, MOSI, MISO (with pull-up to 3.3V), SCLK and SCS ]
I'm following along to see how you develop this. The $25 TI demo board seems to be a pretty good bargain to learn about this, so I've ordered one from Mouser. The DRV8711 itself seems quite straightforward, SPI interface to the 8 control registers, and you've already got that wrapped up. What's next? It seems like it would quickly become application specific.
You might want to look at these links: http://www.cnczone.com/forums/stepper-motors-drives/247622-anyone-attempted-roll-stepper-driver-using-ti.html
http://forum.arduino.cc/index.php?topic=295471.0
Thanks for the information Mark and thanks for the code.
Its not impossible, but only on a hobby use basis. I can make design(s) available, and I've also
mentioned the possibilities to Adafruit, but not had definite interest from them.
I am open to suggestions...
I've looked at the code Mark. I think it will be relatively easy to incorporate into my code. Thanks again for sharing.
I will likely continue testing my code with the cheap L298N boards until I've got the code working reasonably well. My present code generates the individual coil pulses but it will be easy to change it to step and direction output. The main challenge I've had writing the code is getting the axes to accelerate together and appropriately (which I think I have successfully accomplished (though I haven't tested it yet)). I'll move to the DRV8711 boards once I'm ready to run my code on my CNC router.
I'll add an update here once I get my router up and running using the DVR8711 boards (and your DVR8711 code).
Thanks for letting us know about these chips and thanks for porting your code to Spin.
TI Boost board (and probably in general) that may require some gate resistors for low-side drivers to suppress
spurious pre-driver faults. I currently can't power above 30V so haven't seen any issue.
So far I have yet to use that big of a stepper for any of my projects (the largest being Nema 17 that are easily driven through a ULN2803).
Though it sounds like it requires external devices to achieve the high load anyway, just the same as any current driver, and it is more complex than just using a ULN2803 (because you have to deal with SPI, stepper interface is much simpler).
I have a intellectual interest. May or may not ever use one, do not know.
Have you tested your program with the Prop?
The program appears to successfully set the registers in the DRV8711 but when it reads the registers they appear to return zero.
Here's the output of your program.
Are you getting the same output?
While I haven't been able to successfully read the registers, I can set the registers using your "setup_DRV8711" method. I've experimented with changing the number of microsteps and this appears to work well. I don't understand the other parameters so I haven't tried to change them.
I'm using my DRV8711 boards (I'm only used on so far) with NEMA 23 steppers and they appear to work well. Thanks for suggesting these drivers and thanks again for posting your code.
If you get a chance to check on the register reading part of the program, I hope you let us know.
If I feel ambitious, I may dig out my logic analyzer and try to compare the traces with what I can read from the datasheet.
1000 rpm with current drive. For CNC applications you want as much speed as you can get for rapids via lead-screws.
Even 1000's of rpm only gets you a few inches/second with cheap leadscrews.
Higher impedance 8/6/5 wire motors can be driven unipolar with 2803, but the large inductance means a severe limit
to top speed - you can drive belts resonably, but not leadscrews.
I could see using fine thread drive screws that you may need better speed. Though I have decided to use pulley style drive on my 3D printer.
1000 rpm == 50mm/s
More expensive multi-thread ballscrews can get you a pitch more like 10mm, but
then you need more motor torque for cutting... Rapids just need the speed so people go
to high voltage supplies like 80V or more - steppers can go astonishing speeds driven right.
I had just read that in the datasheet. And no, I don't have pullups on the pins.
Thanks.
Prop_SPI_MOSI
> Boost_SDI
> DRV_8711_SDATI
and
DRV_8711_SDATO
> Boost_SDO
> Prop_SPI_MISO
The clock and chip select (high) looks okay on the 'scope and it appears that the correct commands are being sent from the Prop. I did try reversing the sense of MISO and MOSI, thinking I might have goofed that up, but then it came back all zeros.
I'm not in a location where I can try it with motors. I think though that the SPI activity should be okay regardless.
If you getting all 1's ($FFF) the line must be pull-high but I noticed the pull-ups are powered from the 3.3V which needs to be supplied from an outside source.
The chip has a built in 5V regulator but not a 3.3V regulator. You need to connect 3.3V to the Boost demo board.
Based on what you're seeing I'm guessing you already know this.
The chip might not work without a motor attached. It senses the coils before sending pulses (or something like that).
Did you attach motor power? If not the chip wasn't getting any power. It has an internal 5V reg and has to be powered through "VM." The 3.3V input is just to power the pull-ups, LEDs and pot.
I'll check the wiring again tomorrow. It does not seem like it should test for the presence of motors before the operation registers are set. Are you now able to read the registers and changes?
I haven't used my DRV8711 boards since my previous post.
I've been working on wiring up some hardware so I can test the boards without a PC.
As you can see, I have the x and y axes drivers wired up but I'm waiting for my z-axis board to arrive from Mouser (it should arrive later today (Monday)).
I was quickly running out of I/O pins so decided to add some shift registers to both expand the output and also expand the input of the Propeller. I'm using the '595 shift registers to control the chip select, reset and sleep pins of the DRV8711 boards. I was surprised to find I still have P0 through P12 Propeller I/O pins free. I may use some of these pins to control a larger screen.
The fault and stall pins will be monitored using the '165 chip. The '165 chip (or chips (I'll probably add a second one)) will also monitor the limit switches.
I was able to add a MCP3208 ADC chip without using any additional I/O pins. The MCP3208 shares the control pins used with other SPI devices and the CS line of the MCP3208 is controlled with on of the channels of the '595 shift registers.
I removed the original screw terminals and replaced them with pluggable screw terminals. I added the new connectors to the bottom of the boards in order to make it easier to add a heatsink to the MOSFET chips. I'm not sure if I'll want/need to add heatsinks or not but if I do, it will now be easier to do so.
I just finished soldering all the various parts today and I haven't powered up the Propeller since making these changes in hardware.
Here is output from the Saleae during the process of setting up the DRV8711 with Mark's demo.
I did make one small change to DRV8711_SPI to make the Salae happy. In the setup_pins method, to initialize the SCK pin high. The DRV8711 does not need that, but the Saleae is picky.