At the Dentist

So what I was trying to do was make a scene at the dentist where the dentist would try to pull out the tooth of the patient and the patient would scream with his legs being raised and his head going up. So I searched for some time to see how other automatons functioned. I sketched out the automaton parts.

20141110_153418

20141110_153443

 

I used the laser cutter to cut out the parts on a 1/8 thick paper but it was too thin that it wouldn’t work. So I stacked 3 papers on top of each other so it would work better. Three out of two had worked and the last one, where the horizontal movement was transferred to the vertical movements were not functioning properly due to the less amount of friction that the paper had. I tried to fix it but the paper wasn’t strong enough to hold it tightly in place. Below is the video to the automaton that I had made.

For the Arduino part I just used the sample code given instead of trying something difficult since I had too much trouble with the making the gears part that I really didn’t have much time to invest in coding.

CIRC03

 

 

int motorPin = 9;  // define the pin the motor is connected to
                   // (if you use pin 9,10,11 or 3you can also control speed)

/*
 * setup() - this function runs once when you turn your Arduino on
 * We set the motors pin to be an output (turning the pin high (+5v) or low (ground) (-))
 * rather than an input (checking whether a pin is high or low)
 */
void setup()
{
 pinMode(motorPin, OUTPUT); 
}


/*
 * loop() - this function will start after setup finishes and then repeat
 * we call a function called motorOnThenOff()
 */

void loop()                     // run over and over again
{
 motorOnThenOff();
 //motorOnThenOffWithSpeed();
// motorOnThenOff(); 
motorOnThenOffWithSpeed(); 
//motorAcceleration(); 
 //motorAcceleration();
}

/*
 * motorOnThenOff() - turns motor on then off 
 * (notice this code is identical to the code we used for
 * the blinking LED)
 */
void motorOnThenOff(){
  int onTime = 2500;  //the number of milliseconds for the motor to turn on for
  int offTime = 1000; //the number of milliseconds for the motor to turn off for
  
  digitalWrite(motorPin, HIGH); // turns the motor On
  delay(onTime);                // waits for onTime milliseconds
  digitalWrite(motorPin, LOW);  // turns the motor Off
  delay(offTime);               // waits for offTime milliseconds
}

/*
 * motorOnThenOffWithSpeed() - turns motor on then off but uses speed values as well 
 * (notice this code is identical to the code we used for
 * the blinking LED)
 */
void motorOnThenOffWithSpeed(){
  
  int onSpeed = 200;  // a number between 0 (stopped) and 255 (full speed) 
  int onTime = 2500;  //the number of milliseconds for the motor to turn on for
  
  int offSpeed = 50;  // a number between 0 (stopped) and 255 (full speed) 
  int offTime = 1000; //the number of milliseconds for the motor to turn off for
  
  analogWrite(motorPin, onSpeed);   // turns the motor On
  delay(onTime);                    // waits for onTime milliseconds
  analogWrite(motorPin, offSpeed);  // turns the motor Off
  delay(offTime);                   // waits for offTime milliseconds
}

/*
 * motorAcceleration() - accelerates the motor to full speed then
 * back down to zero
*/
void motorAcceleration(){
  int delayTime = 50; //milliseconds between each speed step
  
  //Accelerates the motor
  for(int i = 0; i < 256; i++){ //goes through each speed from 0 to 255     analogWrite(motorPin, i);   //sets the new speed     delay(delayTime);           // waits for delayTime milliseconds   }      //Decelerates the motor   for(int i = 255; i >= 0; i--){ //goes through each speed from 255 to 0
    analogWrite(motorPin, i);   //sets the new speed
    delay(delayTime);           // waits for delayTime milliseconds
  }
}

I think I should have tried different materials and maybe made it in bigger and thicker in size due to the fraction it had. And a little bet of miss placement and measuring caused a lot of trouble in this automaton, and that accuracy is really important in it. Also I think that the simple gears functioned well and that more time should be put into how the gears connect to each other rather than how motor can actually make it work.

Comments are closed.