DRV8880 Stepper driver with Raspberry Pi

Hi
Motor: NEMA BiPolar 200s/r 17 2.8V - 1.7 A/Phase
Driver: DRV8880
Motor Voltage: 12V
Controller: Rasp. Pi 2 B
Driver Control Software: Lazarus (FPC)

I have programmed driver control software to accelerate, travel and decelerate the stepper motor by dynamically changing both microstep modes and step frequencies. This has worked well with the A4988 driver without problems.

But now I have changed to the DRV8880 to take advantage of the dynamic current features.

I have altered my driver logic to suit by dynamically setting the M0 pin on the Pi to an input in order to provide a floating potential as required for 1/8 and 1/16 micro steps on the DRV8880.

All other step modes work correctly except for those requiring a floating input. I have checked the M0 pin and found it floating as expected.

As I haven’t found any reference to this on the net - I assume I must be missing something obvious.

Any help most appreciated.

Rolly

Hello.

In what ways are the 1/8 and 1/16 microstep modes not working correctly? Can you give more details about what it is doing? What voltage did you set the VREF voltage to? How did you verify the M0 pin was floating? If you have not done so already, could you try leaving the M0 pin disconnected and see if that fixes the behavior? If the problem persists, can you post some pictures of your setup that show all of your connections?

Brandon

Hi Brandon and thanks for your response.

"In what ways are the 1/8 and 1/16 microstep modes not working correctly?"
When either are selected the driver appears to operate in 1/4 micro steps.

"What voltage did you set the VREF voltage to?"
2.0V

"How did you verify the M0 pin was floating?"
By attaching a multimeter across the M0 and control ground pins and stepping through my code. The M0 pin reading is 0.745V when the respective Pi pin is set to INPUT.

"try leaving the M0 pin disconnected and see if that fixes the behavior?"
It does so it would appear my concept of floating may be wrong??
If so - what should the voltage be and any idea of how to set it with the Pi?

"pictures of your setup that show all of your connections?"
I will as soon as I find how to attach an image to this topic.

Rolly

If it works when you disconnect the pin from the Raspberry Pi, I suspect the Raspberry Pi pin might not be acting as a high impedance input. I would still like to see a picture of your setup and connections. You can attach a picture by clicking the “Reply” button and selecting the “Upload” option. A pop-up window should appear with a choice to upload an image or file from your computer or the web; alternatively, you can drag and drop the file directly into the editor.

Also, it sounds like you might be setting the current limit to a value higher than the driver can handle continuously. The DRV8880 carrier is rated for approximately 1A per phase continuously without additional cooling; since this is lower than your stepper motor is rated for, you should adjust the current limit to around 1A (or slightly under) to avoid over-temperature or over-current conditions.

Brandon

Hi Brandon

Attached is a simple connection diagram to the DRV8880. The pink points
are not connected.

Regards
Rolly

Thank you for the diagram. It seems the Raspberry Pi has a pull-down on the I/O pin. Can you try running “gpio -g mode 27 tri” in order to disable the pull-down on GPIO27?

Brandon

Outstanding Brandon :smiley:

I located a method in the Lazarus GPIO library I’m using to disable both pull-up and down internal resistors for GPIO 27 and it now works fine.

Thanks very much for your help - much appreciated.

Regards

Rolly