Hi!
I'm kinda new to all this, so go easy on me?
I've got a Nema 17 stepper motor connected to a L298N driver, a 12v power supply, and all hooked up to the Arduino.
I'm trying to get it to rotate a card index carousel (the motor connected directly to the axel, the whole thing weighs about 350g)
It seem to control ok from the code, but the motor just doesn't seem to be able to move the carousel more than few mm. I think it's a lack of torque?
I've seen videos of these motors moving far more weight than this, so not sure what i'm missing.
Any insights to what I could try?
The L298N is an ancient and inefficient brushed DC motor driver. It will work only for certain types of stepper motors with high resistance windings.
For most steppers, you need a current limiting stepper driver capable of handling the rated coil current. For advice, post a link to the data sheet or product page for the exact model stepper you have.
NEMA 17 specifies only the size of the motor mounting endplate.
I wasn't able to find a data sheet for the motor I have specifically, but this the product page for what i've got: iMetrx Nema 17 Stepper Motor 42x40mm Ender 3 Extruder Motor 1.5A-3.8V 2 phase 4 wires 1.8 degrees with 1Meter cable for 3D Printer Motors : Amazon.co.uk: Business, Industry & Science
I saw a few places recomending the L298N driver, but that doesn't mean much, I guess.
any idea what would be a good driver to pick up?
In every topic you start, if hardware or program code exists, include them.
If you made your own motor code, perhaps you did not write for the driver to move correctly, or the driver is not configured correctly, or the driver is not connected to the motor correctly or power out of the driver is insufficient... only you have a view of it. Your link says the motor needs 3.8vdc at 1.5A current... perhaps that is unburdened. Is there a label on the motor that says more?
Try a DRV8825 with a 12volt or 24 volt motor supply.
Use a CNC shield if you plan to use more than one stepper motor
The L298 is totally unsuitable.
Leo..
This is the wiring i'm working from; the only difference with mine is that've tried it with 5v and 12v power supply:
And the code is basically just the example code for a stepper motor:
#include <Stepper.h>
const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
void setup() {
// set the speed at 60 rpm:
myStepper.setSpeed(100);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(1000);
}
I thought that might be the case. TBH, i'mnot 100% clear on what the driver board actually does. Is that a likely cause of the motor not seeming to having enough torque to turn the carousel, Or should I be looking for a different motor too?
A 3.8volt/1.5A motor with L298 will try to draw about 10Amp from a 12volt supply.
That could release the magic smoke from one or more parts.
You need a current controlling driver for that motor.
What do you mean by "turning a carousel".
Leo..
This means the motor has a resistance of 2.53 Ohms, if you apply 12 volts, the current will be 4.74 Amps and burn the motor out.
Nothing has gone "pop" yet, so the board i've got at the moment must be doing something at least ![]()
Sorry, it's a little hard to discribe. It's a bunch of cards attached to a wheel (a bit like a large split-flap display) that I'm trying to get rotating (doesn't have to be at any great speed). it weighs about 300g, in all, and is about inches in diameter.
The motor you have is designed for torque at high speed.
Low speed, inches in diameter...
Maybe you should look at a geared stepper motor, like the 28BYJ-48 (up to ~12RPM).
They come with a driver board.
Or change to the 30 ohm stepper motor from Adafruit if you want to keep your setup.
Or change the driver to a DRV8825.
Leo..
I tried a 28BYJ-48, with the driver it came with, at first but it struggled to move the carousel at all. Speed is fine, just not required, as long as I can turn it all very precisely.
I'll give it a go with a different driver board and see if that helps. Currently the motor stops turning at the slightest resistance, which isn't what I had expected XD
The breadboard is probably high in resistance between power supply and motor driver. Bypass the breadboard.
The Pololu DRV8825 can handle your 1.5A-3.8V stepper, and if you follow instructions to set the current limit to less than 1.5 Amperes (e.g. 1 or 1.2 Ampere) that motor should be able to handle a small carousel.
The motor power supply should be able to provide at least 12V at around 2 Amperes, minimum.
I've currently only got 1amp power supplies. Guess it's time to go shopping ![]()
Set the current limit for 0.5 Amperes per winding, and you should have no problem.
The motor torque is proportional to the current, and even that low setting might be enough for your project.
Thank you!!! I'll let you know how it goes ![]()
Make sure you set the current on the DRV8825 before you connect the stepper motor.
A 12volt/1Amp supply should be enough for a 3.8volt/1.5A motor at low-ish RPM, because a current controlling driver acts as a buck converter. Watch this video.
Leo..
You need one of these:
TB6560
Instruction sheet:
TB6560-1axis.pdf (55.5 KB)
No luck ![]()
I wasn't abel to get hold of a DRV8825 buty I was able to get a A4988, which I was told would be a suitable alternative.
This is how i'm wiring it:
and this is the new code:
#include <Arduino.h>
#include "A4988.h"
int Step = 3; //GPIO3 in Arduino UNO --- Step of stepper motor driver
int Dire = 2; //GPIO2 in Arduino UNO --- Direction of stepper motor driver
int Sleep = 4; //GPIO4 in Arduino UNO --- Control Sleep Mode on A4988
int MS1 = 7; //GPIO7 in Arduino UNO --- MS1 for A4988
int MS2 = 6; //GPIO6 in Arduino UNO --- MS2 for A4988
int MS3 = 5; //GPIO5 in Arduino UNO --- MS3 for A4988
//Motor Specs
const int spr = 200; //Steps per revolution
int RPM = 100; //Motor Speed in revolutions per minute
int Microsteps = 1; //Stepsize (1 for full steps, 2 for half steps, 4 for quarter steps, etc)
//Providing parameters for motor control
A4988 stepper(spr, Dire, Step, MS1, MS2, MS3);
void setup() {
Serial.begin(9600);
pinMode(Step, OUTPUT); //Step pin as output
pinMode(Dire, OUTPUT); //Direcction pin as output
pinMode(Sleep, OUTPUT); //Set Sleep OUTPUT Control button as output
digitalWrite(Step, LOW); // Currently no stepper motor movement
digitalWrite(Dire, LOW);
// Set target motor RPM to and microstepping setting
stepper.begin(RPM, Microsteps);
}
void loop() {
digitalWrite(Sleep, HIGH); //A logic high allows normal operation of the A4988 by removing from sleep
stepper.rotate(360);
}
The motor rotates just fine, but as soon as I connect it to wheel, it starts clicking like it doesn't have the strnegth to move it.
Could it just be that the motor isn't strong enough? should I give it more than 12v?

