Tuesday, October 5, 2010

Bringin Home the Tomatoes

The beginning of last week was a little frightening for me...we had two seemingly different approaches to our urban farming problem.  One faction wanted to stick with the geometrical polyhedron and the other wanted to come up with a completely different shape and different mechanisms for the final prototype.  To jog your memory this is the prototype from the week before:

The main problem that I had with this design was that it was inefficient in doing its most important functions....like collecting water.  It was supposed to collect water in those flaps on the bottom and squish the water into a sponge or through a membrane.  Another problem that was discovered was that when this prototype is scaled up to size it would stick out 6 feet.  That kind of defeats the purpose when we are trying to save space.  There was some resistance to change in the group but we eventually came up with a compromise.

The original design that was suggested was the following:


It really isn't that attractive, so much of the group wasn't very fond of it.  It also doesn't quite follow the original criteria of shapes that cover curves efficiently, so a compromise was made:


The top side of each of the panels opened out to allow for water to come in easily and can allow for venting heat and humidity.  Here is a pic of the final product:



The code used for Arduino is as follows:

//  SmartSurfaces 2010
//  Project 1
//  Design Group 1
// 
//  Alex Carmichael, Jason Prasad, Beth Glesner
//  Joyce Tseng, Jim Christian, Chris Parker
// 
//  Written by Beth Glesner and Chris Parker
//  Using SHT1x Library by practicalarduino.com

#include <Stepper.h>
#include <SHT1x.h>

#define SHTDATA  2
#define SHTCLOCK 3
SHT1x sht1x(SHTDATA, SHTCLOCK);

#define MOTORSTEPS 400
Stepper stepper(MOTORSTEPS, 8, 9, 10, 11);

float instantTemp  = 0;
float averageTemp  = 0;
float instantHum   = 0;
float averageHum   = 0;

int cpuCycles      = 0;

void setup()
{
    stepper.setSpeed(100);
   
    Serial.begin(9600);
    Serial.println(“Starting Up”);
    Serial.println(“Calibrating Sensors”);
   
    for(int i = 0; i < 30; i++) {
        averageTemp  += sht1x.readTemperatureF();
        averageHum   += sht1x.readHumidity();
        delay(1000);
    }
    averageTemp /= 30;
    averageHum /= 30;
   
    Serial.println(“Sensors Ready”);
    Serial.print(“Average Temperature(F): “);
    Serial.print(averageTemp, DEC);
    Serial.print(“  “);
    Serial.print(“Average Humidity %: “);
    Serial.print(averageHum, DEC);
    Serial.print(“\n”);
}

void loop()
{
    instantTemp = sht1x.readTemperatureF();
    instantHum = sht1x.readHumidity();
    Serial.print(“Temperature(F): “);
    Serial.print(instantTemp, DEC);
    Serial.print(“  “);
    Serial.print(“Humidity %: “);
    Serial.print(instantHum, DEC);
    Serial.print(“\n”);
   
    if(instantTemp > averageTemp + 2.0) {
        Serial.println(“Opening Panels”);
        stepper.step(400);
    }
   
    if(instantTemp < averageTemp - 2.0) {
        Serial.println(“Closing Panels”);
        stepper.step(-400);
    }
   
    delay(50);
}

This code averages the temperature and humidity in the room and then opens or closes the panels when the temp or humidity differ from the average.

These are the roles for the week:  Rhino-Jason, Jim, and Alex  Arduino-Chris and me  Presentation-Joyce  Construction-everyone!  


I was really impressed how well we came together as a group in the end.  We started out on shaky ground this week, but pulled together to come up with an impressive final product.

No comments:

Post a Comment