Andy + Andrew

From BenningtonWiki
Revision as of 01:53, 9 December 2008 by Aprzystanski (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Final Project

Gear system housing, arduino.
Protective fencing in place.
Making adjustments.
Project sitting on pedestal.

Late this weekend the project was finished. After a great deal of work, the gear system was completed. The gear system was by far the most challenging obstacle in our way.

Each of the three moving objects has a different personality. Their "personalities" were derrived from the individual traits of each gear system. The pyramid is aggressive, the rounded object is often unpredictable, and the unusually shaped object is shy.

We found a pedestal that met our needs. The pedestal's side compartment will be used to store the project's USB-based power source.

Videos of the project can be found below.

video 1 video 2

Code: <source lang = java> int servoPin = 9; int minPulse = 500; int maxPulse = 2500; int pulse = 0;

long lastPulse = 0; int refreshTime = 20;

int analogValue = 0; int analogPin = 3;

void setup() {

pinMode(servoPin, OUTPUT);  
pulse = minPulse;           
Serial.begin(9600);

}

void loop() {

analogValue = analogRead(analogPin);      
pulse = map(analogValue,0,1023,minPulse,maxPulse);   

if (millis() - lastPulse >= refreshTime) {
  digitalWrite(servoPin, HIGH);   
  delayMicroseconds(pulse);       
  digitalWrite(servoPin, LOW);    
  lastPulse = millis();          

}</source>


_________________

Final Project

Collection of progress pictures.
Gears system (lowered).
Gears system (raised).

This week we crafted the three sculptures out of blocks of bass wood and painted them in a pseudo metal coating. We also purchased the wood chips, more pvc, caps for the pvc to prevent woodchips from entering, rods for the raising and lowering mechanisms and some fake foliage.

While calculating the necessary size of our cams to produce the vertical lift needed, we found that the cams would have to be inordinately large. We briefly entertained the notion of building the more complicated camshaft system as is found in car engines, however we promptly arrived at the conclusion that not only was it too difficult to construct, it would also add significant weight to the system and strain the servos inhibiting motion. Thus, we decided to go with the pivoting rod style cam and developed a complimentary gear system to ensure sufficient torque. As a double benefit this system removes the challenge of shaping a perfect oblong cam and controlling its pitch. Two rods are easily controlled and the only challenge is determining the proper gear sizes to produce the desired vertical lift with the available torque.


Final Project

Outside of the box.
Inside brackets of the box.
Corner screws of the box.
Woodchips
Sketches of figures emerging from mulch

We made significant progress this week. Among our accomplishments:

  • Constructing the steel box.
  • Finding the right soil/earthy material for our needs (woodchips/mulch).
  • Devising a way to suspend the mulch inside the box using layered sheets of chicken wire.

The Box

The box turned out beautifully. We decided to go with the class's suggestion and purchased aluminum corners for the box. After some initial issues with our measurements, we successfully implemented the corners into our design. The result is a clean, stable look.

We altered last week's design by ensuring that every side sans the base is made from metal. The project is no longer "stuck to the wall," and the audience now has the ability to circle the project freely

The base of the box is made from wood so that we can later drill holes in it. The metal casing is attached using L-Brackets.

The Woodchips

The use of soil posed several issues. Firstly, using a fine-grain soil would have caused serious problems and would have jammed the servo-gear system. This problem is alleviated with the use of wood chips or mulch. Secondly, wood chips are relatively light weight. The servo motors need to be able to freely operate and the objects emerging from the soil need to be able to easily push through.

Suspending the Woodchips

Because the box is no longer made from glass, we don't have to fill it entirely with wood chips. Filling the box would add unnecessary weight to the project. Using two or more layers of chicken wire suspended inside of the box, we can suspend the wood chips on the top third of the box. We have already purchased the chicken wire.

Additional Notes

As requested last week, a sketch of the objects emerging from the soil has been including in this week's update.
________________________________________________________________
Andy's Notes


Sketch of Final Project (Click for larger image)

Framework: A glass box will be filled with soil. As a member of the audience approaches the installation, objects begin to emerge from the soil. Small sculptures vaguely resembling smokestacks, buildings, and other symbols representing man's influence on the planet will rise from the soil. These objects do not rise simultaneously. Rather, the level of activity in the soil will be dependent on the level of activity detected by IR sensors. A central plant-like object emerges slowly over time. Message: The project will comment on man's influence over nature. The box, to some degree, representing an ecosystem in miniature. The plant-like objects, while geometric and metal, sprout from the soil like actual plants. Andrew and I will experiment with creating "layers" of activity visible through the sides of the glass case. It is still unclear as to how we will physically move the objects through the soil. We are considering whether or not to incorporate a servo-driven pulley system or hydraulics. My knowledge of hydraulics is extremely limited, so I will need to do extensive research before pursuing such a system. The arduino will reside in a wooden structure directly underneath the glass case (which will likely be improvised from an aquarium). A variety of soils will be incorporated into the project to create the illusion of "layers" in the earth.

The description above has been revised. An unfinished list resources we will need:

  • A glass tank
  • Various soils
  • Metal/Metal Sheets
  • Fabric
  • Lumber
  • PVC Pipe
  • LEDs
  • IR Rangefinders
  • Light sensors
  • Servo motors

We are still working out how physically thrust the objects through the soil. We are experimenting with water pressure, air pressure, and a gear-based system using servo motors. A sketch of what the project could look like is on the right.

Robotic Plant

Andrew's Notes

Sketch of Final Project (Click for larger image)

Originally Andy and I were thinking of putting together a glass box filled with dirt from which icons of human pollution would emerge in a time-line of devastation as humans approached the box. As a person walked toward the box there would be at least four steps. The first was a cow, plow or some other agricultural symbol, because agriculture is the first way in which the human race significantly altered the environment around him and began to pollute the air. The second step would be a smoke stack from the industrial revolution which would emit smoke, haze, mist or a chemically created cloud of some variety. This was the first time humans literally pumped poison into the air and did it at incredible rates. Third would be the automobile, it too could have some smoke emanating from the tail pipe and potentially slowly flashing and dimming headlights. Lastly we would have built the iconic hourglass-like structure from nuclear power facilities. This would not emit smoke but would glow green and perhaps have some toxic waster spilled around it. To summarize again, as a person approached the box would simulate the effect humans have on the environment as humans interact and affect it more and more. The box would also have to change in mood as the situation got worse to truly exemplify the damage done. This variable had not been determined.

After the constructive discussion regarding our ideas in last class, Andy and I have refined the plan. Instead of various iconic symbols of human environmental devastation we will be creating a more abstract piece. From the dirt will emerge a metallic plant-like sculpture. It will have a central body and several tendrils throughout the box. The centerpiece will be limited mostly to growth activity while the tendrils may perform additional functions. The tendrils could potentially rotate toward a subject based on video tracking and perhaps vibrate at high proximity. The new concept is still under development however we have some thoughts on how to construct the mechanisms.

The raising and lowering of the centerpiece may occur inside the shield of a pvc pipe, this will prevent the dirt from caving in on the sizeable hole when the centerpiece is submerged. Currently the most likely plan to raise and lower the different pieces involves a servo motor with a gear on it. This gear would connect to a a shaft with teeth cut into it. The gear would rotate and push the shaft up or down. There are still some unresolved issues with the appearance of the box whilst the objects are submerged. How does one prevent too much dirt from falling on of the objects so that they don't get stuck while still allowing enough to fall so that the surface looks normal. One could prevent any dirt from getting in and attempt to make it look as real as possible. In this case the pvc pipe would not allow any soil to fall into the chamber while a fabric or other covering with dirt glued on would cover the opening of the pipe. As the centerpiece rose it would push the cover out of the way and as it fell the cover would fall back into place.

Early Work

Servo Motor
Turns out the map function doesn't work on Arduino 10, had to update to Arduino 12. Otherwise all went well.

Servo motor setup(from afar)


<source lang="java">

int servoPin = 2; int minPulse = 500; int maxPulse = 2500; int pulse = 0;

long lastPulse = 0; int refreshTime =20;

int analogValue = 0; int analogPin = 0;

void setup () {

 pinMode (servoPin, OUTPUT);
 pulse = minPulse;
 Serial.begin(9600);

}

void loop() {

 analogValue = analogRead(analogPin);
 pulse = map(analogValue,0,1023,minPulse,maxPulse);
 
 if (millis() - lastPulse >= refreshTime) {
   digitalWrite(servoPin, HIGH);
   delayMicroseconds(pulse);
   digitalWrite(servoPin, LOW);
   lastPulse = millis();
 }

} </source>

Midterm Progress

Nidterm Progress: RGB LEDs (with very long wires)

Andrew and I stopped by the local Home Depot and RadioShack to make a few purchases. At Radio Shack, we purchased:

  • Wire, three colors
  • 4 RGB LEDs

At Home Depot, we purchased:

  • 2 2"x4" Wood
  • Sheet of plywood
  • Bag of white pond rocks
  • Plexiglass sealant

This weekend we experimented with the LED code. The RGB LEDs have four prongs each, three for red, green, and blue, and one for ground. I soldered rather long cables to two LEDs to test how they would work...this was successful. The code is below. As you can see, I adjusted the amount of power going into each pin (RGB) to create a fade effect.

Code: <source lang= "java"> int ledpinr = 9; int ledping = 10; int ledpinb = 11; int red = 0; int blue = 0; int green = 0;

void setup() {

 //Nothing to setup

}

void changeColor(int red, int green, int blue){

 //Set PWM on pins 9 10 and 11
 analogWrite(ledpinr, red);
 analogWrite(ledping, green);
 analogWrite(ledpinb, blue);
 delay(100);

}

void loop() {

 //Red
 changeColor(255, 0, 0); 
 changeColor(255, 0, 0);
 changeColor(255, 0, 0);
 changeColor(255, 0, 0);
 changeColor(255, 0, 0);
 changeColor(255, 0, 0);
 changeColor(255, 0, 0);
 changeColor(235, 20, 0);
 changeColor(215, 40, 0);
 changeColor(195, 60, 0);
 changeColor(175, 70, 0);
 changeColor(155, 80, 0);
 changeColor(135, 90, 0);
 changeColor(115, 100, 0);
 changeColor(95, 120, 0);
 changeColor(75, 140, 0);
 changeColor(55, 160, 0);
 changeColor(25, 180, 0);
 changeColor(5, 200, 0);
 
 //Green
 changeColor(0, 255, 0);
 changeColor(0, 255, 0); 
 changeColor(0, 255, 0);
 changeColor(0, 255, 0);
 changeColor(0, 255, 0);
 changeColor(0, 255, 0);
 changeColor(0, 235, 20);
 changeColor(0, 215, 40);
 changeColor(0, 195, 60);
 changeColor(0, 175, 80);
 changeColor(0, 155, 100);
 changeColor(0, 135, 120);
 changeColor(0, 115, 140);
 changeColor(0, 95, 160);
 changeColor(0, 75, 180);
 changeColor(0, 55, 200);
 changeColor(0, 25, 220);
 changeColor(0, 5, 250);

 //Blue
 changeColor(0, 0, 255);
 changeColor(0, 0, 255);
 changeColor(0, 0, 255); 
 changeColor(0, 0, 255);
 changeColor(0, 0, 255);
 changeColor(0, 0, 255);
 changeColor(0, 0, 255);;
 changeColor(20, 0, 235);
 changeColor(40, 0, 214);
 changeColor(60, 0, 195);
 changeColor(80, 0, 175);
 changeColor(100, 0, 155);
 changeColor(120, 0, 135);
 changeColor(140, 0, 115);
 changeColor(160, 0, 95);
 changeColor(180, 0, 75);
 changeColor(200, 0, 55);
 changeColor(220, 0, 25);
 changeColor(250, 0, 5);

} </source> [[1] Mood Cube Code]

Mid1.jpg
Mid2.jpg

<source lang= "java"> // INPUT: IR should be connected to 5V and GND int potPin = 3; int potVal = 0;

int redPin = 9; // Red LED, connected to digital pin 9 int grnPin = 10; // Green LED, connected to digital pin 10 int bluPin = 11; // Blue LED, connected to digital pin 11

// Program variables int redVal = 0; int grnVal = 0; int bluVal = 0;

int DEBUG = 1;

void setup() {

 pinMode(redPin, OUTPUT);   // sets the pins as output
 pinMode(grnPin, OUTPUT);   
 pinMode(bluPin, OUTPUT); 
 if (DEBUG) {           
   Serial.begin(9600);  
 }

}

// Main program void loop() {

 potVal = analogRead(potPin);   
 if (potVal < 341)  
 {                  
   potVal = (potVal * 3) / 4; 
   redVal = 256 - potVal;  
   grnVal = potVal;        
   bluVal = 1;             
 }
 else if (potVal < 682) 
 {
   potVal = ( (potVal-341) * 3) / 4; 
   redVal = 1;            
   grnVal = 256 - potVal; 
   bluVal = potVal;       
 }
 else  
 {
   potVal = ( (potVal-683) * 3) / 4; 
   redVal = potVal;       
   grnVal = 1;            
   bluVal = 256 - potVal; 
 }
 analogWrite(redPin, redVal);   
 analogWrite(grnPin, grnVal); 
 analogWrite(bluPin, bluVal);  
 if (DEBUG) { // If we want to read the output
   DEBUG += 1;      
   if (DEBUG > 100) 
   {
     DEBUG = 1;     
                            
     Serial.print("R:");    
     Serial.print(redVal);  
     Serial.print("\t");    
     Serial.print("G:");    
     Serial.print(grnVal);
     Serial.print("\t");    
     Serial.print("B:");    
     Serial.println(bluVal); 
   }
 }

}

</source>


Week 8
Serial Graph

Wk8 1.jpg
Pcgraph.png


<source lang="java">

Sensor Graphing Sketch


import processing.serial.*;

Serial myPort; // The serial port int graphXPos = 1; // the horizontal position of the graph:

void setup () {

 size(400, 300);        // window size
 // List all the available serial ports
 println(Serial.list());
  myPort = new Serial(this, Serial.list()[0], 9600);
 // set inital background:
 background(48,31,65);

} void draw () {

}

void serialEvent (Serial myPort) {

 // get the byte:
 int inByte = myPort.read(); 
   // print it:
 println(inByte);
 // set the drawing color;
 stroke(200,170,100);
 // draw the line:
 line(graphXPos, height, graphXPos, height - inByte);
 // at the edge of the screen, go back to the beginning:
 if (graphXPos >= width) {
   graphXPos = 0;
   // clear the screen:
   background(20,50,100); 
 } 
 else {
   // increment the horizontal position for the next reading:
   graphXPos++;
 }

} </source>