Ghost Writer

Description:

South Hall is haunted by a ghost!
Just kidding (maybe) – I used the setup given in lab to explore how movement of pens would work when attached to a motor. I used the same circuit from the basic lab instructions, and connected different types of pens to to the motor and let it draw across the paper.
I found that the pens with the larger tip perform better, and they are more stable. The motor tends to just drag the pen across the paper, as you speed up the motor with the pot, it moves faster. If you change the speeds rapidly, it creates more of a “bend” pattern as the weight of the pen is distributed on the motor.
Is it the ghost telling us to finish our homework? Probably.

This is similar to Spinbot: http://www.makershed.com/products/make-spinbot-kit-bagged
img_1607img_1608-2img_1609

 

Components

  • 1x Bread board
  • 1x Arduino
  • 1x pot
  • 1x 1k resistor
  • 1x transistor
  • 1x diode
  • 1x DC motor
  • 1x battery pack

Code

/*
 * one pot fades one motor
 * modified version of AnalogInput
 * by DojoDave <http://www.0j0.org>
 * http://www.arduino.cc/en/Tutorial/AnalogInput 
 * Modified again by dave
 */

int potPin = 0;   // select the input pin for the potentiometer
int motorPin = 9; // select the pin for the Motor
int val = 0;      // variable to store the value coming from the sensor
void setup() {
  Serial.begin(9600);
}
void loop() {
  val = analogRead(potPin);    // read the value from the sensor, between 0 - 1024
  Serial.println(val);
  analogWrite(motorPin, val/4); // analogWrite can be between 0-255
}

 

 

Leave a Reply