Showing posts with label In-Class Project 4. Show all posts
Showing posts with label In-Class Project 4. Show all posts

Sunday, October 18, 2009

Inarticulate Eloquence Opens and Closes with the Sun

Here is the code for our Hoberman Surface. For include statements, blogger likes to take the <> as HTML code, so I just took them out. Also, if statements with > < etc are changed to 'is less than' 'is greater than' etc to prevent the same issues.

The Stepper Motor - Arduino
#include afmotor.h

AF_Stepper LeftMotor(48, 1);
int position = 1;

void setup() {
Serial.begin(9600);
Serial.println("Stepper test!");

LeftMotor.setSpeed(250);
}

void loop() {
if(Serial.available()){
Serial.println("Available");
char ch = Serial.read();

switch(ch){
case '+':
if (position == 0){
LeftMotor.step(2250, FORWARD, SINGLE);
position = 1;
Serial.println(position);
}
break;
case '-':
if (position == 1){
LeftMotor.step(2250, BACKWARD, SINGLE);
position = 0;
Serial.println(position);
}
break;
}
}
}

The LDR - Arduino
int PhotoA = 3;
int LEDpin = 13;
int valueA = 0;
int threshold = 500;

void setup(){
pinMode(PhotoA, INPUT);
pinMode(LEDpin, OUTPUT);

Serial.begin(9600);
}

void loop(){
valueA = analogRead(PhotoA);

if (valueA is less than threshold){
digitalWrite(LEDpin, HIGH);
Serial.print('+');
}
else {
digitalWrite(LEDpin, LOW);
Serial.print('-');
}

delay(1000);
}

The Link - Processing
import processing.serial.*;

Serial MotorPort;
Serial LDRPort;

void setup()
{
size(720, 720);
colorMode(RGB, 1.0);
noStroke();
rectMode(CENTER);
frameRate(100);

println(Serial.list());
MotorPort = new Serial(this, Serial.list()[0],9600);
LDRPort = new Serial(this, Serial.list()[2],9600);
}

void draw()
{

char ch = LDRPort.readChar();
MotorPort.write(ch);

}

Fairly simple code this time. Got the job done.

Saturday, October 17, 2009

The Final Product: Minor Heliotropic Surface

The grand finale for our last minor project took place on Friday. Our project, as mentioned earlier, was a binary heliotropic surface based on the mechanism of a Hoberman Sphere. The idea was that one side would open and the other would close based on the presence or lack of light.

The biggest problem that we had with the project crept up in the final 24 hours. The final problem was two-fold. First, the motor shield was assembled improperly. It was an honest mistake, two of the resistors on it were switched (one is a high resistance for handling current to the Arduino, the other is lower resistance for handling current somewhere else). My Arduino wound up fried because of this. Secondly, we did not have a motor capable of operating the system. The slip present in all of the stepper motors we had available made it impossible to get enough torque to close the system, even though very little was actually required. Fortunately, John had a fix for us, by providing us with a significantly larger stepper motor and a working motor shield.

With new equipment in hand, we were able to finalize our project just before class began. We tested it a few times, and had an issue with the line we were using not spooling properly - not something that could be fixed in a short period of time with no resources available for it. We had to make the best we could of it. Fortunately, when it came to our time to present, the code worked well, and the system opened and closed as intended. Mechanical stress caused the fracture of a couple of pieces during the testing, but the issue was minor and due to the material properties - ideally, the system would not be built out of acrylic.

Julian Bleecker had some criticism for our project in the sense that we delved too deeply into the mechanism, and should have stepped away from it. I couldn't disagree more. In fact, I feel that the reason our project was a good project was that we spent so much time working on the mechanism. Instead of creating a one-trick pony - something that would have a single intended use - we developed a mechanism that could be utilized in a large number of situations with some modification and scaling. Developing with an intended use is overrated, in my mind, as a lot of things developed with an intended use do not stay in that category for very long. Perfect the mechanism, and let other people figure out a use for it. There'll always be someone that is interested enough to find a way. XKCD states it pretty well. If you build it, they will come.

Monday, October 12, 2009

Methodical Madness Builds a Guillotine

The idea behind our group's heliotropic surface is that it is exactly as described - a surface. There is no re-orientation mechanism, nothing of the sort, only a reaction to the presence or lack of presence of the sun (or light in general).

The inspiration behind our design is a Hoberman Sphere, a complex-looking mechanical sphere that utilizes very simple parts working together. We took the sphere, re-represented the mechanism in 2-D, and came up with this. So far, it has only been constructed in chipboard, but it looks pretty neat. The issue we have been having is a materials one - chipboard is not strong enough for our purposes, so we are replicating the circle in acrylic and hoping that it can hold itself in one piece without breaking. The idea is to take two of these circles, join them together (easier said than done), and have a mechanism that opens and closes them in an alternating fashion based on whether or not there is [sun]light shining on the surface. The idea is to create a binary system that can have two different uses in less space than would be required by always-open circles.

The difficulty behind this project hasn't been designing the mechanism - that was done on day one - but instead has been finding a purpose for the mechanism. There are so many options that we have thought of, but we cannot decide which to produce. The best part about the mechanism is that it is modular and scalable - we could have an essentially infinite chain, and it could be as large or small as we can produce and assemble it. The only limits are the capabilities of the chosen material. We are using 3/16" acrylic (at last check - we may have changed it, I am not in charge of buying the acrylic), and producing a circle that is about 18" in diameter when expanded, and maybe 6" in diameter when contracted. We are using spandex with 4-way flexibility as a covering for the acrylic. It will look sweet, I promise.

My brilliant idea, which was immediately dismissed by the group, was to make a guillotine that shoots fireworks out of the other circle. It's brilliant! Extremely efficient, lots of spectacle, chopping of heads... the French would be proud. I was going to make a paint drawing, but don't quite have the necessary paint skills (or Paint... I'm on a Mac). Needless to say it includes blades and fireworks. What more do you need, in all honesty? Real ideas include a skylight / spray system for a greenhouse, a skylight / ceiling light alternation, solar collection / solar powered usage, and several others that we are less likely to produce.

Our group has been working well together. We have kind of developed a production chain for which people are in class / not in class, so the acrylic is being cut by Marc, assembled by Josiah, geared by Taylor, and then we are re-assembling the group to work on it together after that point. I feel like, the way our project is designed, the Engineers have less to do this week than in previous weeks - our design really is lacking complexity. I work mostly with the coding, which is generally a few hours per project at most. I am going to try to put together some sort of graphic interface in Processing that shows different things based on what the physical position of the system is, making everything more shiny.

Thursday, October 8, 2009

SmartSurfaces, Day Four, 10/2/09

Day four saw us present our extremely awesome solar tracker, which was, as I said, extremely awesome. I unfortunately do not have any video or images of it (I haven't succeeded in remembering my camera for class yet), but there are a variety of images throughout blogs of my teammates. From this point forward, I am going to build an overarching blog post for each out-of-class project, which will hopefully be all-encompassing (and not give me carpal tunnel). As such, the in-class pieces will become shorter and shorter as the important parts of class become more fluid in time.

The project assigned on day four was extremely open-ended - design a heliotropic surface. Make it do something. That's it. Simple, yet extremely complex. As I said, project will be covered in another post.

I'd like to try to make a minimum of 3-4 posts a week from this point forward - one each of Project, Conceptual, Coding, and Miscellaneous. No guarantees that the Miscellaneous post will have anything to do with the class in more than an abstract sense, in fact it may just be something sweet that I saw online that I just had to share. Prepare for an onslaught of posts starting next week... let's see how well I can keep to my minimums.