Backward/Forward Crawler

For my crawler, I originally created a wheel with many “knees” so that only the forward option would bite into the ground, with the backward motion only causing each joint to close. However, it only went around in circles.

To get around that, I tried playing around with the design so that motion would be forward and backwards. I tried making a larger forward leg to see if the uneven legs would cause the crawler to move forward if a peg attached to the motor struck the forward and backward leg.

Then I tried placing a large rubber band across the center and have the motor tense and relax the tension of the rubber band. Unfortunately I did not succeed – the crawler stands motionless.

crawler

Cuckoo Clock Lab

Members:

Nisha Pathak
Leah Rosenbaum
Owen Hsiao
Daniel Chen

For this lab, our task was to build “Cuckoo Clock” mechanics. We first drew out specifications for the doors that would open and close using one mechanism. We also wanted the bird’s movement to come from that same force. Initially, our plan was to build sliding doors that would open after pulling a string that was attached to the doors using hooks we created. However, the sliding doors needed stability which we thought could be provided by placing the stationary and moving doors on the same track. But, we found that there was too much friction between the tracks and the bottom and tops of the doors and we couldn’t open the doors in a seamless fashion. What’s more, we found that the hooks we created weren’t stable enough to open the doors. We chose to reevaluate our plan and instead, built a mechanism that would simultaneously push the bird out and open the doors outward. We built stationary boards (supported by “L” shaped pieces of cardboard) to which we connected the doors that would actually open. Using rubber bands and push pins, we adjusted the elasticity of the bands so that the doors would open with ease and would close on their own. The bird was attached to a flat, triangulated piece of cardboard and both of these pieces were connected to a small, wood beam. Using a small hinge, we attached this beam to another piece of wood and created a lever to push the bird through the doors. The lever was attached to a stack of wood pieces and is held together with a rubber band. Finally, in order to get the height we needed, we placed this entire mechanism on top of a tissue box.

Components:

  •      4 wood pieces (6” x 4”)
  •      4 rubber bands
  •      2 small wood beams (1.2” x 6”)
  •      3 wood squares (4”x 3”)
  •      Push pins
  •      Masking tape
  •      Small hinge
  •      Tissue box
  •      Glue
  •      Saw

img_7470 img_7472

 

 

Trapdoor Cuckoo Clock

Description:

Our group wanted to attempt an unconventional cuckoo clock, counter to the example we saw in class with the 4-bar joint. Instead of a cuckoo that emerged horizontally from the door, we designed a cuckoo that plunged through a trapdoor instead. The primary mechanism used to move the trapdoor and lower the cuckoo through the opening is a pulley system. As the pulley is pulled in one direction, the trapdoor moves out of the way to reveal an exit. As the pulley is pulled and the trapdoor is moved back, the cuckoo also lowers. The cuckoo is mitigated from falling outside the bounds of the trapdoor exit until the opening is wide enough for it to plunge through. The cuckoo can then continue to be lowered, or reigned back into the clock by pulling the pulley in the opposite direction. The trapdoor is prevented from collapsing on the cuckoo prematurely by means of (1) the distances used in both the strings affixed to the door and the cuckoo, and (2) the rotational distance between the door and the peg that pushes it back into place.

To hold the system in place and direct accurate movement, we have in place four poles around the trapdoor’s perimeter (but not affixed to the trapdoor). These poles are taped securely to the surface of the foam board/clock base. While there are three gears in our structure, only the center one is unrestrained by a foundational support component. For our design, it is imperative that thread lines are measured to have sufficient tension and slack when appropriate. Otherwise, the system will fail. If the support structure also shifts (whether at foundation or at suspension), the system is likely to fail due to the shifting of the trapdoor in and out of place. Also necessary is a wall to prevent the cuckoo from traveling with the trapdoor as it slides back, as opposed to falling through the exit.

We think this cuckoo clock mechanism design is appropriate, considering the majority of cuckoo clocks hang on the wall, and so have room beneath them that can be utilized.

Components Used:

  • 7 gears (4 for foundational support, 2 for suspended support, 1 for pulley system)
  • 1 long stick
  • 2 mid-length sticks
  • 5 short sticks (sizes must be relative; 3 for pulley system)
  • 1 cuckoo (made out of a spool, suspended by string)
  • two cuts of string (1 for the trapdoor, 1 for the cuckoo)
  • 1 relatively large piece of balsa wood for the trapdoor
  • 3 relatively narrow pieces of balsa wood for support/error-prevention
  • 1 T-pipe
  • 2 straight joints with medial socket
  • 1 claw
  • 1 foam board sheet
  • duct tape
  • X-acto knife and cutting board
  • sufficient string for the pulley system

 

img_6360 img_6359

Let’s crawl

Description

It was hard to derive linear motion out of a motor whose direction of rotation alternates. Initially I tried to design shoes out of erasers but it turns out the friction was too much for it to begin moving. The video for this attempt can be found here – https://goo.gl/photos/QXmh7DSLDyzkFmXM8

 

To fix this problem, I tried removing the feet and reworked the placement of wires. I got something which moves a little but only on a rough surface like that of a carpet or a rug – https://goo.gl/photos/5Jiy4hLLPD3BEsbm6

 

Components

Arduino Board
Bread board
Servo motor
Wires

 


/*
 * Servo with Potentiometer control
 * Theory and Practice of Tangible User Interfaces
 * October 11 2007
 */

int servoPin = 7;      // Control pin for servo motor
int potPin   = 0;      // select the input pin for the potentiometer

int pulseWidth = 0;    // Amount to pulse the servo
long lastPulse = 0;    // the time in millisecs of the last pulse
int refreshTime = 20;  // the time in millisecs needed in between pulses
int val;               // variable used to store data from potentiometer

int minPulse = 500;   // minimum pulse width

void setup() {
  pinMode(servoPin, OUTPUT);  // Set servo pin as an output pin
  pulseWidth = minPulse;      // Set the motor position to the minimum
  Serial.begin(9600);         // connect to the serial port
  Serial.println("servo_serial_better ready");
}

void loop() {
  val = analogRead(potPin);    // read the value from the sensor, between 0 - 1024
  
  if (val > 0 && val <= 999 ) {
    pulseWidth = val*2 + minPulse;  // convert angle to microseconds
    
    Serial.print("moving servo to ");
    Serial.println(pulseWidth,DEC);
  
  }
  updateServo();   // update servo position
}

// called every loop(). 
void updateServo() {
  // pulse the servo again if the refresh time (20 ms) has passed:
  if (millis() - lastPulse >= refreshTime) {
    digitalWrite(servoPin, HIGH);   // Turn the motor on
    delayMicroseconds(pulseWidth);  // Length of the pulse sets the motor position
    digitalWrite(servoPin, LOW);    // Turn the motor off
    lastPulse = millis();           // save the time of the last pulse
  }
}

The Chopstick Bot

To make a crawler, the first thing that came into my mind was chopsticks. So I gather a few chopsticks, break them, and them try to put them together in a way that would make the single-legged servo motor crawl. It took some observation and reiteration. I used a lot of tapes and a few coins to adjust the balance. Now this robot is really crawling.. but not in a straight line.. It seems to be moving towards Northwest…

Video

Arduino Code


#include <Servo.h> //add servo library

Servo myservo; 

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(4); // waits 15ms for the servo to reach the position
}
delay(200);
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(4); // waits 15ms for the servo to reach the position
}
delay(200);
}

3D-Printed Crawler

Video: https://www.youtube.com/watch?v=Pf1nZoAFWvA&feature=youtu.be

 

For this assignment I happened to have a 3D-printed arm in a box in my room (what?), so I set about programming it to crawl forward in a straight line. The arm is made from 3D-printed finger joints, metal wire, a plastic housing, and some zip-ties and a laser-cut servo protector. It wasn’t originally designed to crawl forward along carpeted surfaces, but with a little bit of retrofitting it does the job nicely.

 

Materials:

  1. Servo Motor
  2. 3D-printed lobster tail
  3. Arduino Uno
  4. Lead wires
  5. 4 AA batteries
  6. Battery holder
  7. Steel cable
  8. Hot glue
  9. Zip ties

Code:

 

/* Sweep

by BARRAGAN <http://barraganstudio.com>
This example code is in the public domain.

modified 10/19/2016
by Adam Hutz
http://www.arduino.cc/en/Tutorial/Sweep
*/

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0; // variable to store the servo position

void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop()
{
for(pos = 0; pos <= 110; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(8); // waits 15ms for the servo to reach the position
}
for(pos = 110; pos>=0; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(8); // waits 15ms for the servo to reach the position
}
}

 

 

Lab 07

Description

I used Arduino with servo motor. I followed the lab instruction and set up the Arduino with a servo motor. I used the sample code provided in the lab to make Arduino interact with the servo motor. I also attached the servo motor with for legs and decorated the servo motor. Lastly, I  uploaded the code and took pictures of the result.

Components

  • 1 Arduino
  • 1 servo Motor
  • 1 Breadboard
  • 8 lego pieces
  • Pot

Video

https://drive.google.com/open?id=0B0Lealdkh-I8Vi1CQUEzQ2NMdXM

Code

/*
 * Servo with Potentiometer control
 * Theory and Practice of Tangible User Interfaces
 * October 11 2007
 */

int servoPin = 7;      // Control pin for servo motor
int potPin   = 0;      // select the input pin for the potentiometer

int pulseWidth = 0;    // Amount to pulse the servo
long lastPulse = 0;    // the time in millisecs of the last pulse
int refreshTime = 20;  // the time in millisecs needed in between pulses
int val;               // variable used to store data from potentiometer

int minPulse = 500;   // minimum pulse width

void setup() {
  pinMode(servoPin, OUTPUT);  // Set servo pin as an output pin
  pulseWidth = minPulse;      // Set the motor position to the minimum
  Serial.begin(9600);         // connect to the serial port
  Serial.println("servo_serial_better ready");
}

void loop() {
  val = analogRead(potPin);    // read the value from the sensor, between 0 - 1024
  
  if (val &gt; 0 &amp;&amp; val &lt;= 999 ) {
    pulseWidth = val*2 + minPulse;  // convert angle to microseconds
    
    Serial.print("moving servo to ");
    Serial.println(pulseWidth,DEC);
  
  }
  updateServo();   // update servo position
}

// called every loop(). 
void updateServo() {
  // pulse the servo again if the refresh time (20 ms) has passed:
  if (millis() - lastPulse &gt;= refreshTime) {
    digitalWrite(servoPin, HIGH);   // Turn the motor on
    delayMicroseconds(pulseWidth);  // Length of the pulse sets the motor position
    digitalWrite(servoPin, LOW);    // Turn the motor off
    lastPulse = millis();           // save the time of the last pulse
  }
}


 

Single and Double Servo Crawlers

Ganesh and I worked on a proof of concept with one servo motor wherein we used a single wire to propel the servo forward.  The motion is illustrated in the video at the link –

https://drive.google.com/open?id=0ByHw8c_nutT2ZVZ6WllBbUJpOVk

After trying various mechanisms, we picked this one with two legs made out of a single wire. The key in this arrangement is that the two legs are of different lengths. This enables each leg to alternately anchor and drag the motor while also drifting slightly sideways and the next step correcting for the sideways drift.

After being successful with the single motor and the mechanism, we tried using two motors to propel a stuffed toy supported on chopsticks. The idea being that the two motors would work in opposite directions –  anchoring and propelling forward alternately (pic included below).

crawler

 

Code:

 

/*
* Servo Control Serial
* modified for TUI October 2007
* Servo Serial Better
* ——————-
*
* Created 18 October 2006
* copyleft 2006 Tod E. Kurt <tod@nulltodbot.com>
* http://todbot.com/
*
* adapted from “http://itp.nyu.edu/physcomp/Labs/Servo”
*/

int servoPin1 = 7; // Control pin for servo motor
int servoPin2 = 8; // Control pin for servo motor

int pulseWidth = 0; // Amount to pulse the servo
long lastPulse = 0; // the time in millisecs of the last pulse
int refreshTime = 20; // the time in millisecs needed in between pulses
int val; // variable used to store data from serial port

int minPulse = 500; // minimum pulse width
int maxPulse = 2250; // maximum pulse width

void setup() {
pinMode(servoPin1, OUTPUT); // Set servo pin as an output pin
pinMode(servoPin2, OUTPUT); // Set servo pin as an output pin
pulseWidth = minPulse; // Set the motor position to the minimum
Serial.begin(9600); // connect to the serial port
Serial.println(“Servo control program ready”);
}

void loop() {
pulseWidth = (4 * (maxPulse-minPulse) / 8) + minPulse;
updateServo();
delay(1000);
pulseWidth = (8 * (maxPulse-minPulse) / 8) + minPulse;
updateServo();
delay(1000);
}
// called every loop().
// uses global variables servoPi, pulsewidth, lastPulse, & refreshTime
void updateServo() {
// pulse the servo again if rhe refresh time (20 ms) have passed:
if (millis() – lastPulse >= refreshTime) {
digitalWrite(servoPin1, HIGH); // Turn the motor on
digitalWrite(servoPin2, HIGH); // Turn the motor on
delayMicroseconds(pulseWidth); // Length of the pulse sets the motor position
digitalWrite(servoPin1, LOW); // Turn the motor off
digitalWrite(servoPin2, LOW); // Turn the motor off
lastPulse = millis(); // save the time of the last pulse
}
}

Crawler frog

Description

For this project I used a servo motor and an old tape dispenser. Once I got the project working well I decided to improve its aesthetics. Since the tape dispenser was green I decided to convert it into a frog. Nevertheless, it seems that now it looks cute but it doesn’t work as it should. Probably I’ll have to remove the green paper and test it again tomorrow.

Components

  • 1 Arduino Uno
  • 1 Futaba Servo Motor
  • 1 battery holder
  • 2 rubber bands
  • 1 pot
  • Jumper Wires
  • 1 bread board
  • 1 old plastic tape dispenser
  • Green paper

Code

int servoPin = 7; // Control pin for servo motor
int potPin = A0; // select the input pin for the potentiometer

int pulseWidth = 0; // Amount to pulse the servo
long lastPulse = 0; // the time in millisecs of the last pulse
int refreshTime = 20; // the time in millisecs needed in between pulses
int val; // variable used to store data from potentiometer

int minPulse = 500; // minimum pulse width

void setup() {
pinMode(servoPin, OUTPUT); // Set servo pin as an output pin
pulseWidth = minPulse; // Set the motor position to the minimum
Serial.begin(9600); // connect to the serial port
Serial.println(“servo_serial_better ready”);
}

void loop() {
val = analogRead(potPin); // read the value from the sensor, between 0 – 1024

if (val > 0 && val <= 999 ) {
pulseWidth = val*2 + minPulse; // convert angle to microseconds

Serial.print(“moving servo to “);
Serial.println(pulseWidth,DEC);

}
updateServo(); // update servo position
}

// called every loop().
void updateServo() {
// pulse the servo again if the refresh time (20 ms) has passed:
if (millis() – lastPulse >= refreshTime) {
digitalWrite(servoPin, HIGH); // Turn the motor on
delayMicroseconds(pulseWidth); // Length of the pulse sets the motor position
digitalWrite(servoPin, LOW); // Turn the motor off
lastPulse = millis(); // save the time of the last pulse
}
}

Servo Motor

Description

My servo sometimes crawls  and sometimes doesn’t, depending on its mood…I used cardboards as its legs.

Components

  • 1 Arduino
  • 1 DC Motor
  • 1 Servo Motor
  • Several cardboards
  • 1 Breadboard

Code

/*
 * Servo with Potentiometer control
 * Theory and Practice of Tangible User Interfaces
 * October 11 2007
 */

int servoPin = 7;      // Control pin for servo motor
int potPin   = 0;      // select the input pin for the potentiometer

int pulseWidth = 0;    // Amount to pulse the servo
long lastPulse = 0;    // the time in millisecs of the last pulse
int refreshTime = 20;  // the time in millisecs needed in between pulses
int val;               // variable used to store data from potentiometer

int minPulse = 500;   // minimum pulse width

void setup() {
  pinMode(servoPin, OUTPUT);  // Set servo pin as an output pin
  pulseWidth = minPulse;      // Set the motor position to the minimum
  Serial.begin(9600);         // connect to the serial port
  Serial.println("servo_serial_better ready");
}

void loop() {
  val = analogRead(potPin);    // read the value from the sensor, between 0 - 1024
  
  if (val &gt; 0 &amp;&amp; val &lt;= 999 ) {
    pulseWidth = val*2 + minPulse;  // convert angle to microseconds
    
    Serial.print("moving servo to ");
    Serial.println(pulseWidth,DEC);
  
  }
  updateServo();   // update servo position
}

// called every loop(). 
void updateServo() {
  // pulse the servo again if the refresh time (20 ms) has passed:
  if (millis() - lastPulse &gt;= refreshTime) {
    digitalWrite(servoPin, HIGH);   // Turn the motor on
    delayMicroseconds(pulseWidth);  // Length of the pulse sets the motor position
    digitalWrite(servoPin, LOW);    // Turn the motor off
    lastPulse = millis();           // save the time of the last pulse
  }
}