DVD drive stepper motor, ULN2003 driver and Arduino

Playing with a DVD drive stepper and an Arduino today. I mostly used the information from here

I omitted the Zener, from the circuit shown. And I’m driving stepper with a cut down version of his code:


const int motorPin1 =8;
const int motorPin2 =9;
const int motorPin3 =10;
const int motorPin4 =11;


void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(motorPin1, OUTPUT);    
  pinMode(motorPin2, OUTPUT);    
  pinMode(motorPin3, OUTPUT);    
  pinMode(motorPin4, OUTPUT);     
}

void loop() {
 // HALF STEP  
 int motorDelay=10;
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, LOW);
  delay(motorDelay);
 
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, HIGH);
  delay(motorDelay);  
 
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, HIGH);
  delay(motorDelay);  
 
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, HIGH);
  delay(motorDelay); 
 
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, HIGH);
  delay(motorDelay); 
 
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, HIGH);
  delay(motorDelay); 
 
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, LOW);
  delay(motorDelay); 
 
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, LOW);
  delay(motorDelay); 
}

Video:

Circuit diagram from link for reference:

  • Pingback: Laser CNC from Bluray parts | 41J Blog()

  • Emma King

    The guide of playing with a DVD drive stepper and an Arduino does helpful to me..

  • sanderson r. seixas

    I would like to close a door with a bolt and this engine would be ideal.
    already got 3 recycled.
    would you mind sending me the schematics of this engine?
    to rotate it in one direction and the other?

  • Cinmay

    Thats it. You are officially my hero of the day! This is just what I was looking for. :D

  • siddharth rawat

    hey,
    i would like to know the steps per revolution of this DVD stepper motor.