NEMA 17 Stepper with 26:1 Gearhead vs 28BYJ-48

Setup: Adruino Uno R3, Adafruit Shield RV2.3 and 12VDC 15A power supply to the +/- on Shield with no jumper.

Stepper is a NEMA 17
• Motor type: Bipolar stepper
• Step angle: 0.067°
• Step accuracy: 5 %
• Recommended voltage: 12 V DC
NEMA-17 bipolar 4-wire with integrated planetary gearbox
• Holding torque: 30 kg·cm
• Gear ratio: 26 103⁄121:1
• Rated current: 1.7 A

Using the following code I can run the 28BYJ-48 micro-stepper motor with no issues. Runs smoothly forward and reverse.

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include “utility/Adafruit_MS_PWMServoDriver.h”

// Create the motor shield object with the default I2C address

Adafruit_MotorShield AFMS = Adafruit_MotorShield();

// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61);

// Connect a stepper motor with 240 steps per revolution (1.8 degree)
// to motor port #1 (M1 and M2)

Adafruit_StepperMotor *myMotor = AFMS.getStepper(240, 1);

void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println(“Stepper test!”);

AFMS.begin(); // create with the default frequency 1.6KHz
//AFMS.begin(1000); // OR with a different frequency, say 1KHz

myMotor->setSpeed(10); // 10 rpm
}

void loop() {

Serial.println(“Single coil steps”);
myMotor->step(5000, FORWARD, SINGLE);
delay (10000);
myMotor->step(5000, BACKWARD, SINGLE);
delay (10000);

}

Now when I connect the NEMA17 it runs choppy…no matter what changes I make (which is limited to the RPM and Speed)…I cannot obtain a smooth rotation. I’ve changed the step type to double/micro/etc and still cannot obtain a smooth stepping rate…

Since 28BYJ stepper works fine and the NEMA is a 26:1 gear I would think that the same code would work and the step rotation would be further dampened by the gear head. I’m considering removing the gear head to test the stepper

Any advice would be greatly appreciated.

This is the first time I have seen centre-aligned code. That is not the way to do it.

Please modify your post and use the code button </>

so your code looks like this

and is easy to copy to a text editor. See How to use the Forum

Without seeing a short video of the two motors working it is hard to know if the bigger motor is behaving normally.

Unfortunately Adafruit have developed libraries that make the simple control of motors hard to figure.

I doubt that the Adafruit motor shield is suitable for that motor. Something like a Pololu DRV8825 stepper motor driver would be suitable.

You don’t say what power supply you are using for the motor. AFAIK the 28BYJ requires 5v but the bigger motor is unlikely to work well at 5v and really needs 12v or 24v and a specialized stepper driver.

…R
Stepper Motor Basics
Simple Stepper Code

Thank you, Corrected the centering...guess that was weird but wanted to offset the code from the notes...

The power supply to the motor was listed in the 1st line of the post at 12vdc 15a.

Since the 28BYJ tests fines I must assume the adafruit drivers, even though rated for the current, are not sufficient for the larger motor even under no-load.....the adafruit is trying to drive the larger motor but epileptically. I then removed the gear head and that's not causing the drive issue.

When checking the robotcom site where I bought the stepper they recommended the Pololu 4988. Checking the specs on the 8825 seems to be the better of the two.

Appreciate the feedback and will update the post once I obtain a new stepper driver board.

VR...B

Bluwavguy:
Thank you, Corrected the centering…guess that was weird but wanted to offset the code from the notes

Well why not use the code button </> like I suggested. It makes things much easier for people trying to view your code.

When checking the robotcom site where I bought the stepper they recommended the Pololu 4988. Checking the specs on the 8825 seems to be the better of the two.

I reckon the A4988 would be too close to its upper limit with a 1.7 amp motor.

The power supply to the motor was listed in the 1st line of the post at 12vdc 15a.

Sorry. I missed that. But using a 12v supply risks damaging your stepper motor unless you are using a stepper driver with the ability to limit the motor current.

…R

Thank you....As far as the DRV8825 specs....

"The DRV8825 driver IC has a maximum current rating of 2.5 A per coil, but the current sense resistors further limit the maximum current to 2.2 A."

Is this what you are referencing from the last comment? By using the 8825 the current limiter is automatically factored in if the coil current exceeds 1.7A (or 2.2A) for some reason while using the 12VDC PRW supply.

Given the max 1.7 A per coil draw is there anything else I need to consider vs cooling the IC?

On to the 12VDC recommended power to the stepper....I can up my output by 15% max...which would only give me a few VDCs vs going up to 24VDC PRW supply...theoretically reducing the current by appx 50% (P=I*V)....if that is an option vs going to the DRV8825 I can try this...

This stepper with gearhead is capable to move 14 kg·cm of torque at low speeds and I'm moving about 6 to 7 kg.cm. Therefore, can I assume the current load is not at it's max at 1.7A per coil if the max load is 1/2 its rated capacity? I want to assume Yes...but what's the min current at no-load or partial load?

(guess I need to measure the current to really understand what's up?)

Which brings me back to the unloaded current draw of the stepper and the Adafruit at a max of 1.2A per coil.....which could not drive the larger stepper...vs driving the micro 28BYJ as expected. Given the limit of 1.2A and I'm guessing the unloaded stepper must be drawing something close to that value for its operation to underperform.

VR, B

Bluwavguy:
Is this what you are referencing from the last comment? By using the 8825 the current limiter is automatically factored in if the coil current exceeds 1.7A (or 2.2A) for some reason while using the 12VDC PRW supply.

NO. There is a potentiometer on the board that you can adjust to limit the motor current. Read the Pololu DRV8825 web page.

On to the 12VDC recommended power to the stepper....I can up my output by 15% max...which would only give me a few VDCs vs going up to 24VDC PRW supply...theoretically reducing the current by appx 50% (P=I*V)....if that is an option vs going to the DRV8825 I can try this...

I think you have the wrong end of the stick. The purpose of the higher voltage is to get the step pulse up to the max current as quickly as possible against the inductance and impedance of the motor coil.

This stepper with gearhead is capable to move 14 kg·cm of torque at low speeds and I'm moving about 6 to 7 kg.cm. Therefore, can I assume the current load is not at it's max at 1.7A per coil if the max load is 1/2 its rated capacity? I want to assume Yes...but what's the min current at no-load or partial load?

A stepper takes all the current it can get regardless of load. It is not like a DC motor. If you don't need the max torque from a stepper motor you can reduce the max current so everything runs cooler.

(guess I need to measure the current to really understand what's up?)

NEVER disconnect a stepper motor from its driver while the driver is powered up or you will destroy the driver.

Which brings me back to the unloaded current draw of the stepper and the Adafruit at a max of 1.2A per coil.....which could not drive the larger stepper...vs driving the micro 28BYJ as expected. Given the limit of 1.2A and I'm guessing the unloaded stepper must be drawing something close to that value for its operation to underperform.

I have never had an Adafruit motor shield so I cannot answer that. And see my earlier comments - there is no such thing as "unloaded current draw" for a stepper motor.

...R

Low impedance bipolar steppers always require a chopper-driver, they are current driven, not voltage driven.
Your motor has about 1 ohm windings, it is low impedance.

To run a NEMA17 stepper from 12V with a dual-H-bridge motor shield requires a motor with about 40
ohm windings. The maximum speed you can get from such a setup is way less than with a low-impedance
motor driven from a chopper driver.

Adding to what MarkT said I think the cause of the "epileptic" behavior was that you were pulling too much current through the Adafruit board's driver chips causing them to go into shutdown. I'd be willing to bet that you could change the motor power supply to 5V (you still need to use an external supply) and get it turning properly. But don't think for a moment that you'll get performance as good as you would get with a proper chopper (A4988/DRV8825) driver.

Also, the DRV8825 is the superior driver in nearly all respects. The "sense resistor" comment is stating that you can adjust the current to a maximum 2.2A even though the chip is capable of 2.5A. Either way that's higher than the A4988's limit of 2A.

Chagrin and others,

Thank you for your responses....learning a ton on this project.

The Pololu DRV8825 will arrive tomorrow. I'll post an update once I have this built and tested...

VR, B