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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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:

5 Comments

  1. […] steppers are controlled by an Arduino using a ULN2003. The steppers seem to be at their limit and I don’t think they could push around much more […]

  2. Emma King says:

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

  3. sanderson r. seixas says:

    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?

  4. Cinmay says:

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

  5. siddharth rawat says:

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

Leave a Reply