Bipolar stepper motor fails at proper voltage

I’m a newbie to Arduino but not so much to circuitry. I got the 12V mini stepper motor from SparkFun (Small Stepper Motor - ROB-10551 - SparkFun Electronics) and hooked it up to my Uno R3 using an L293D Dual H-Bridge motor driver. I hooked it up according to the schematic attached below. If I run off the power supplied by my USB cable, the motor works just fine, but if I attach a 12V DC power supply, the motor starts skipping, running backwards, and buzzing very loudly. The motor is rated at 400 mA and my supply is rated at 750 mA. The only thing I don’t know is whether the power supply is regulated to be exactly 12V or not. I’m not entirely sure why the motor is going nuts when I try running it off the 12V power supply. Any ideas?

Here is the code I am using:

Adafruit Arduino - Lesson 16. Stepper

#include <Stepper.h>

int in1Pin = 12;
int in2Pin = 11;
int in3Pin = 10;
int in4Pin = 9;

Stepper motor(48, in1Pin, in2Pin, in3Pin, in4Pin);

void setup()
pinMode(in1Pin, OUTPUT);
pinMode(in2Pin, OUTPUT);
pinMode(in3Pin, OUTPUT);
pinMode(in4Pin, OUTPUT);

// this line is for Leonardo’s, it delays the serial interface
// until the terminal window is opened
// while (!Serial);

void loop()




The DC resistance per phase for that stepper is quoted as 4 ohms. If you were to put 12V across a phase, it would pass 3A, which is way in excess of its rated 400mA. You should not apply more than 1.6V per phase to that motor. As it happens, the crappy L293D has around 2.6V voltage drop typically @ 600mA, so when run from a 5V supply you won't have overloaded it very much. I'm surprised your L293D is still working, after using 12V. Your 750mA power supply probably went into shutdown mode and saved it.

If you want to use that stepper with a 12V supply (which will provide better torque), then you need to use a chopper-type stepper driver, such as the A4988.

In summary, just because a stepper motor is rated at 12V does not mean that you can put 12V across it continuously. You need to look at the current rating and winding resistance too.

Hi, what type of supply is your 12V power supply. Wall Wart (Plug Pack) or is it a proper power supply.

You may have noise on the supply that is causing the arduino to reset, or the supply may not have enough filtering and some AC ripple is getting through.
To check, set your DMM to measure AC volts and measure the 12Vdc when your setup is malfunctioning.
If the AC measurement is higher than 0.1Vac then you will need to provide extra filtering.
Tom… :slight_smile:

The power supply is from an old printer and seems robust. I think it must be the circuitry, because I did the following:

  1. The bipolar stepper works using the USB power.
  2. It does not work using the 12-Volt power supply where I supply pin 8 of the L293D with Vin (12V)
  3. It does not work using the 12-Volt power supply where I supply pin 8 of the driver with 5V from the Arduino board.
  4. A cheap unipolar stepper from adafruit works with the same circuit and driver, whether powered from the USB or the 12-Volt power supply using the 5V output from the Uno.

Weird, huh?

Wondering if I need to cough up the $20 for a driver shield...which I hate to do if I can solve this with a few resistors and transistors?