Introduction: Laser Spirograph Using Arduino

Picture of Laser Spirograph Using Arduino

I was fascinated with Quackmaster Dan's "Four Motor Laser Spirograph" so I decided to build one. The pictures represent about a year and a half of procrastination, and late nights, all in all it probably took me about 80hr. to build as I had to go through a couple revisions of the electrical system, and it was totally worth it.


If you have any questions about components or fabrication, leave them in the comments and I will gladly answer.

Update 2013-10-12:

I am currently working on an updated version of this and plan to have it done by late January 2014 (I will write a full ible for it). In the process of planning that build I found my old arduino code that ran this spirograph, it is very basic, but I might be useful to those working on similar projects:

#include

AF_DCMotor motor1(1, MOTOR12_64KHZ);  // create motor #1, 64KHz pwm
AF_DCMotor motor2(2, MOTOR12_64KHZ);
AF_DCMotor motor3(3, MOTOR34_1KHZ);
AF_DCMotor motor4(4, MOTOR34_1KHZ);

int PotPin1 = 5;                      // Analog Input from Potentiometers
int PotPin2 = 4;
int PotPin3 = 3;
int PotPin4 = 2;

int Rate1 = 0;                       
int Rate2 = 0;
int Rate3 = 0;
int Rate4 = 0;


void setup() {
  Serial.begin(9600);               // set up Serial communication at 9600 bps
  Serial.println("Spirograph!");
 
  motor1.run(FORWARD);              // Set all fans to run forward. They will not run backwards
  motor2.run(FORWARD);
  motor3.run(FORWARD);
  motor4.run(FORWARD);


}

void loop() {
 
 
  //Read and Map AI to Rate#
 
  Rate1 = analogRead(PotPin1);
  delay(15);
  if( Rate1 != 0 ) {
    Rate1 = map(Rate1, 1, 1023, 20, 255);
  }
 
 
  Rate2 = analogRead(PotPin2);
  delay(15);
  if( Rate2 != 0 ) {
    Rate2 = map(Rate2, 0, 1023, 20, 255);
  }
   
  Rate3 = analogRead(PotPin3);
  delay(15);
  if( Rate3 != 0 ) {
    Rate3 = map(Rate3, 0, 1023, 60, 255);
  }
 
  Rate4 = analogRead(PotPin4);
  delay(15);
  if( Rate4 != 0 ) {
    Rate4 = map(Rate4, 0, 1023, 60, 255);
  }
 
  output(Rate1, Rate2, Rate3, Rate4);
 
  if( Rate1 == 255 && Rate2 == 255 && Rate3 == 255 && Rate4 == 255){
   
    for(int a=0; a < 255; a+=10){
      output(180, 100+a, 250, 0);
      delay(500);
      }
      output(100,0,0
    for(int b=0; b < 155; b+=10){
      output(180, 0, 0, 100+b);
      delay(500);
    }
  }
 
   
}

void output(int m1, int m2, int m3, int m4) {
 
  motor1.setSpeed(m1);
  motor2.setSpeed(m2);
  motor3.setSpeed(m3);
  motor4.setSpeed(m4);
 
  Serial.print("Motor Speeds\t");
  Serial.print("\tM#1:");
  Serial.print(m1);
  Serial.print("\tM#2:");
  Serial.print(m2);
  Serial.print("\tM#3:");
  Serial.print(m3);
  Serial.print("\tM#4:");
  Serial.println(m4);
 
}

Comments

zvizvi (author)2013-03-11

Very nicely done! and awesome enclosure... where did you get it?

John Culbertson (author)zvizvi2013-10-12

An aerospace machinist I used to work with gave it to me. Based on the tags and what we dug out from inside of it we were pretty sure it was a parachute sequencer for a launch vehicle.

John Culbertson (author)2012-03-19

The reason I didn't post an instructable is because the basic theory of operation is no different that the other spirograph instructables. The only difference with mine is that I map the values from the potentiometers to the motor speeds using an arduino microcontroller.

As for a list of components here you go:

4x 1k Potentiometers
1x Arduino
1x Motor Shield
4x Motors (I chose 12V DC Fan motors because they were cheap and already had mounting holes.
1x laser (as bright as you want)
4x Round mirrors (Check hobby and craft stores)

jortega calero (author)2012-03-19

Hi, i´m spanish. congratulations. Where I can find any documentation of the project? I want to build one like this.

jordomaller (author)2012-02-15

do you have a list of components i an wanting this to take to my next festival also can i make this portable?

mikolynn (author)2012-01-24

And ... Where is the instructable?
It look great, but we miss the instructions to replicate it!

Revonok (author)2011-12-10

Do you have pictures or a video of it in action, the images it creates? I'd love to see it. your set up looks great.

About This Instructable

5,995views

19favorites

License:

More by John Culbertson:Standing Desk Pulley Lamps Bed Liner Bike Frame Wireless Mechanical Shutter Release
Add instructable to: