Hello I just bought a bunch of stepper motors and they don't work please help

Hello all I have worked on Arduino a lot but I just got a new kind of stepper motor that looks very fancy from amazon they look high quality. I found a simple tutorial on the internet about getting them spinning. I compiled it.

// Arduino stepper motor control code

#include <Stepper.h> // Include the header file

// change this to the number of steps on your motor
#define STEPS 32

// create an instance of the stepper class using the steps and pins
Stepper stepper(STEPS, 8, 10, 9, 11);

int val = 0;

void setup() {
  Serial.begin(9600);
  stepper.setSpeed(200);
}

void loop() {

  if (Serial.available()>0)
  {
    val = Serial.parseInt();
    stepper.step(val);
    Serial.println(val); //for debugging
  }
 

}

the little circtui board with the four leds is connected to arduinos gnd and 5 volt but i see no indication of it being on. Why is this am i missing something i tried another of my arduino boards and it was the same. Are they defective? thanks

Hi, is anything being printed with the Serial.println(val) command. There is a chance you are seeing nothing because to happens too fast so LEDs might never seem on. if the Serial.print does nothing means its never getting that far; if it does, might mean what I said above.

We are working blind here.

Please post data sheets for the stepper motors and the stepper drivers.

Also a schematic showing how things are connected. Show all components, their part numbers and/or values and all power supplies.

What are the specifications of the power supplies?

Clear photos of your wiring can also be valuable.

Arduino Stepper Motor Control Tutorial with Code and Circuit Diagram (circuitdigest.com)

But, did you upload it to the Arduino Uno?

Hi,
Can you please post links to spec/data of the steppers?
Can you please post an image(s) of the steppers?

A picture of your project setup to test one of these steppers would be good too.

Do you have a DMM?

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

We need to see your wiring. And we still don't know what you are using for a power supply.

What one did you get?

What value are you typing in to Serial Monitor?

You need to supply 5V at more amps than Arduino can supply to the 5V & -ve jumpers on the controller. The wiring on circuitdigest.com will more than likely let the magic smoke out of your UNO. (voice of experience)

Post a link to that Amazon page.

what OP seems reluctant to tell us is the stepper is a 28-BYJ48 with ULN2003 controller

Sorry to disabuse you but these are nothing fancy or new, they are fairly standard car air-con actuator motors which have the advantage of being cheap geared stepper motors for light duties.

I agree its not great to try and power these from the 5V logic supply, but they ought to work as they are about 100mA per coil I think - i.e. 50 ohm windings. The ULN2003 driving them has built-in free-wheel diodes to protect from inductive kickback, so shouldn't be too uncivilized to the 5V rail, but as I said its not the ideal. The ULN2003 drops a volt or too so powering it from 6V supply maybe worthwhile, such as 4 AA cells.

https://components101.com/motors/28byj-48-stepper-motor

When using a stepper for the first time don't overdo the step-rate - motors don't accerlate instantly to their top speed, so try around 10 steps a second in the first instance.

For best performance speed-ramping is usually needed, and the Stepper library doesn't support this - try the AccelStepper library maybe?

blink each output pin a few times, and verify that the correesponding LED the driver board blinks. Aldo make sure the jumper is connected where you connect your power and ground - without that jumper, the board won't work.