Rotating Plate for 3D Object Videos

Recently completed an electronics project which allows me to make 3D object videos by using an arduino board to rotate a ikea rotating breadboard with a stepper motor.

You can rotate the pot by clicking and draggin on the embedded video above, it requires flash to work.

This was created using an Arduino Duemilova 328 board, a stepper motor, a ULN2003A driver and a 3v power supply.

To check which stepper motor pins are related to each other, use a multimeter to check which pairs create a circuit, these then correlate to pair 1 and 2 and pair 3 and 4.

The code I used is as follows,

int ledPin = 12;
int ledPin2 = 13;
int motorPin1 = 2;
int motorPin2 = 4;
int motorPin3 = 3;
int motorPin4 = 5;
int delayTime = 100;
int cameraTime = 5000;

void setup() {
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
pinMode(motorPin3, OUTPUT);
pinMode(motorPin4, OUTPUT);
}

void loop() {
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delayTime);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delayTime);
digitalWrite(ledPin2, HIGH);
delay(cameraTime);
digitalWrite(ledPin2, LOW);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(delayTime);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(delayTime);
digitalWrite(ledPin, HIGH);
delay(cameraTime);
digitalWrite(ledPin, LOW);
}

Youll notice in the code that there are several events for the LedPin 1 and 2, this is becuase I did not want to connect up the camera to the circuit for risk of damaging camera and also becuase the board wobbles slightly as the load comes to rest on top. The leds therefore are placed there to tell me when to take a shot using the camera switch. I used two different colours for clarity.

Some Pictures of completed circuit.


View from the top of the project.


View of arduino Board in circuit.


View of ULN2003 in circuit.

Any further questions or comments, feel free to contact me.

Special Thanks to Niklas “Tank” Andersson and Johan Ludvigsson for their help in this.