METHOD
I really enjoyed the interaction between the potentiometer and the DC motor so I kept the existing setup. Instead, I wanted to explore the different ways the motor could act as an output device and a means of expression. Initially I had the idea of attaching a pen to the motor, but found that it would be much to heavy and bulky. Upon disassembling the pen, I took pen cartridge and the spring. By attaching the spring to the motor and then the pen to the spring, I found that the centrifugal force would push the pen outward as the speed of the motor increased. Hence, by interacting with the potentiometer and increasing/decreasing the speed, you can create visualizations through the dc motor and pen that reflect this increase/decrease in speed. The markings that the pen makes increases in radius as the speed of the motor increase and vice versa. One thing I wish I had more time and resources to build for this assignment, is something that would hold the motor in an upright position. Currently, I had to use my hand to hold up the contraption, but it would have been much cooler if it stayed upright.
MATERIALS
1- Arduino Uno
1- Breadboard
1- 1k ohm resistor
1- diode
1- transistor
1- battery pack
1- DC motor
1- pen and spring
1- plastic cap
1- paper
CODE
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
}
- Login to post comments