Lab 7: DC Motors
S.Berk Dincer. Professor Kimiko Ryokai. Info C262 Fall 2021.
In this lab, we had a chance to work with a DC motor. The circuit scheme for this week was tricky and helped my peers after I have done with the lab. In the homework of the lab, I tried to answer the question of is levitating and spin can be used to demonstrate a level of something. I used a fan to make the particles fly. During the lab. the connection point of my DC motor to cables was broken and spent so much time fixing it. Follow these steps to fix it.
I also experimented with different materials such as feathers, a pinball, and confetti, however, the cut trash bag was the best one. My initial idea was to design a separator that will separate the fan from the material that will fly. However, when I use a wood plaque as a separator the objects did not fly.
Components Used
- Arduino
- Breadboard
- Different colored wires
- Crocodiles
- Resistor
- Fan
- Laser-cut Separator
- Glass Dome
- Cut Plastic Bags
Images
Demo Video
Further Exploration
It will be interesting to control the fan speed other than a knob, such as a capacitance touch or photocell. Because of the timing consideration, for this week’s lab, I was able to experiment with a knob, but for upcoming weeks I would like to explore levitating as an output more.
Code
/* DC Motor with potentiometer control
* Theory and Practice of Tangible User Interfaces
* Fall 2021
*/
int motorPin = 9;
int potPin = A0;int potVal = 0;
int motorCtrlVal = 0;void setup() {
pinMode(potPin, INPUT);
pinMode(motorPin, OUTPUT);
Serial.begin(9600);
}void loop() {
potVal = analogRead(potPin);
Serial.print(“potVal: “);Serial.println(potVal);
motorCtrlVal = map(potVal, 0, 1024, 0, 255);
Serial.print(“motorCtrlVal: “);Serial.println(motorCtrlVal);
analogWrite(motorPin, motorCtrlVal);
}