Spinning thread spool

Description

Uses a DC motor to spin a thread spool to put the thread on it. A pot can be used to adjust the speed of the spinning, similar to how someone would use a foot pedal of a sewing machine to adjust the speed of the thread spinning.

Parts

  • 1 pot
  • 1 transistor
  • 1 diode
  • 1 DC motor
  • 1k ohm resistor
  • Arduino uno
  • 3V battery
  • Spool

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
 */<strong>
</strong>
int potPin = A0; // 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
}

<img class="alignnone size-medium wp-image-1739" src="http://blogs.ischool.berkeley.edu/i262/files/2016/10/IMG_7426-300x225.jpg" alt="img_7426" width="300" height="225" />

Leave a Reply