In our last class we reviewed the importance of correctly mounting motors on a project. For this week's assignment, we are asked to create something that involves a motor and the correct mounting of that motor.
Working with the Motor
As per Ben's suggestion, immediately after class I headed over to the junk shelf to pick up an old CD-ROM component to strip it of it's stepper motor.
Here is what the CD-ROM looked like after removing the case and many metal layers
I extracted the motor, but wasn't able to find any information about how much voltage it would take to power it online. The only information on the motor were the numbers 010209. I took the motor to the floor, soldered a positive and negative lead on the motor and used a power source to determine that the motor can be efficiently powered with 5 volts.
The black piece below is the piece that held down the motor and I am surely keeping so that I can properly mount my motor
I'm interested in using the moving part for my project
Once I found out that this motor was actually a DC motor and not a stepper motor, I decided to scratch using it because it was too hard to slow down and I only wanted small movements in my project.
Project
I am really interested in using a motor to work with a Reveal the Message print. I wanted to ultimately use a motor that could easily be controlled with fine movements. With this said, I ended up using a Servo since I already had one in my toolbox.
With my servo in hand, I just needed to find a mount for the motor. At Tinkersphere I found this pan and tilt bracket:
I got the servo working in the behavior desired with the following Arduino code:
#include <Servo.h>
Servo myservo;
int potpin = 0;
int val;
void setup()
{
myservo.attach(9);
}
void loop()
{
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 179);
myservo.write(val);
delay(15);
}
Here is the image that I created and printed to reveal to the message. I decided that a great way to use the servo in this reveal would be to use a CD with a red vinyl strip that would allow you to read the message when it was over top of it
Here is the disc I had from a previous project. I simply added the red vinyl, the white, laser cut topper, and the servo mounting horn:
I then simply attached the CD and made sure that when the potentiometer was turned that the words were revealed.