Team
Christina Pham, Sydney Friedman, Shubham Goel, Shreyas
Description
We chose to keep the mechanics simple and aimed to create the cuckoo clock with just 1 servo motor. In essence we tried to use the motion of the cuckoo plank (instead of the motors) to open and close the doors. The motor was then just used to turn the plank. In the first iteration we just stuck the cuckoo (or the fun bald guy) on to the plank and just made it work. But it didn't give us the feeling that it was a cuckoo clock, instead it felt like a plank coming out. So our next challenge was to make the cuckoo slide in and out on the plank.
We decided to make a monorail on the plank to constrain the motion. The cuckoo (or the fun bald guy) was then made to slide on that monorail.
The doors were then hinged on the periphery of their plane. The plank motion was used to push the door open while a thread was used to pull the door back shut.
Since the goal of the assignment was to use simple mechanisms we aimed to keep the mechanism very simple. There is no gears etc involved just judicious use of materials and their motion.
Video
http://youtu.be/lVY7abeyJyA
Code
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
int doorServoPin = 7;
int startAngle = 10;
int endAngle = 100;
int delayTime = 2;
int pos = startAngle; // variable to store the servo position
void setup()
{
myservo.attach(doorServoPin); // attaches the servo on pin 9 to the servo object
Serial.begin(9600); // connect to the serial port
Serial.println("Servo control program ready");
Serial.println("Open(o) Close(c):");
}
void loop()
{
int serialVal = Serial.read();
if (serialVal == 'o')
{
// goes from end angle to start angle
for(pos = endAngle; pos > startAngle; pos -=1)
{
myservo.write(pos);
delay(delayTime);
}
}
if (serialVal == 'c')
{
for(pos = startAngle; pos < endAngle; pos +=1)
{
myservo.write(pos);
delay(delayTime);
}
}
}
- Login to post comments