Stepper motor control using ULN2003

I am trying to control my stepper motor by using ULN2003.
I’ve found resourceful tutorials from the internet such as Controlling Stepper Motor with a Parallel Port and
I am trying to follow the diagram of bipolar stepper motor control using four wire connection.
I also found a good sketch of controlling stepper motor using arduino and the link of that tutorial is this.
And, I modified the sketch like this.

#include <Stepper.h>

#define motorSteps 200     // change this depending on the number of steps
                           // per revolution of your motor
#define motorPin1 8
#define motorPin2 9
#define motorPin3 10
#define motorPin4 11
#define ledPin 13

// initialize of the Stepper library:
Stepper myStepper(motorSteps, motorPin1,motorPin2, motorPin3, motorPin4); 

void setup() {
  // set the motor speed at 60 RPMS:

  // Initialize the Serial port:

  // set up the LED pin:
  pinMode(ledPin, OUTPUT);
  // blink the LED:

void loop() {
  // Step forward 100 steps:

  // Step backward 100 steps:


// Blink the reset LED:
void blink(int howManyTimes) {
  int i;
  for (i=0; i< howManyTimes; i++) {
    digitalWrite(ledPin, HIGH);
    digitalWrite(ledPin, LOW);

I’ve successfully uploaded this program to my arduino but, i am having trouble with hardware connection between ULN2003 and stepper motor and 12VDC.

I’ve tried to connect it like this.
But, the motor doesn’t move.
The circuit diagram of my stepper motor is here.

Could anyone advise me how to connect the hardwares?
Thank you.

shouldn't the yellow and white wires go to + ?

I don't think it's possible to control a bipolar stepper motor with a Darlington array like the ULN 2003.

You need to use an H bridge IC like the second schematic on this page.

isn't the clue about bipolar steppers that you don't need to reverse the current, as this is done by the bifilarly wound coils (center tapped) ?

Edit: of course I'm talking about UNIPOLAR :slight_smile:

bipolar: 2 coils + 2 h-bridges to reverse the current, 2 wires per coil
unipolar: 2 center tapped coils, 3 wires per coil, reverse by powering 1/2 a coil which is wound the other way

I don't know, but mingki is explicitly mentioning a 4 wire stepper, and i can't see how a 4 wire could possibly be centertapped ?

The circuit diagram in mingki's link looks like a unipolar motor. I think mingki's reference is to the four wire from the non center tapped end of the four coils being driven by the darlington.

But it looks like the yellow and white wires are the center taps and should be connected together and going to +v as per the tutorial.
Perhaps someone familiar with steppers can advise him on the correct wiring.

Dear everyone,
Thank you very much for your advise.
I connected white and yellow wire to +v like this and the motor is being vibrated. No rotation.
Also, ULN2003 chip has gone extremly hot after three or four times vibration. It gets so hot that i can't even touch it.
It is unipolar stepper motor that i am using at the moment.
The specification is as below.

  • Unipolar stepper
  • 1.8 degree step
  • DC4V
  • Current : 0.95A/Phase
  • resistance : 4.2ohm/Phase
  • Inductance : 2.5mH/Phase
  • Holding torgue : 120gf-cm
  • Detent Torque : 120gf-cm
  • Rotor inertia : 38g-cm
  • Weight : 200g
    I don't know whehter it is normal for ULN2003 to get to reach to such high temperature during the operation when it is connected in four wire connection.

Hi Mingki,

I think the ULN2003 is rated at half an amp per driver and your motor is drawing twice that!

Perhaps one of the guys here that has experience with beefy steppers can suggest the best way to drive it.

OK, so it is a unipolar stepper - good :slight_smile:

You can parallel two inputs on the uln2003 to get 1Amp, but then of course you will ned two 2003's

Hello, mem, hi, Mikmo~!
Could you teach me how to parallel two inputs on the ULN2003?
I don't know how I should connect it to make parallel connection using two ULN2003 but at least I tried to connect it like this. ;D

It looks like you have the inputs paralleled ok, you need to do the same to the outputs. Connect the output pins of the two chips together in the same way you connected the inputs

I am not familiar with the stepper library but passing myStepper to digitalWrite can’t be correct.
digitalWrite(myStepper, HIGH/LOW);

digitalWrite expects an 8 bit value, you are passing the stepper class.

oh.. I see. Thank you for pointing out the error.
I also thought that I must have some error in the loop statement.
I am still trying to figure out the way to make my stepper to be turned when the beam sensor is disturbed.
Could anyone please advise me what kind of statement is suitable to use to make my stepper to turn only when the beam is disturbed?
I really want to know~~!
Please leave your comment~!
Any word of advise would be highly appreciated.
Thank you.