Sunday, November 27, 2011

Logic for the cardboard sextapus

When executed, the following code will modulate two strings of LEDs based on the extent of flexing detected by one of two flex sensors (one for each string). A push button is incorporated so that the user can disconnect the analog input from the flex sensors to the LED string outputs. Basically, this would allow the user to transport the sextapus without turning it on and draining the battery.

int flexPin = A0;
int flexPinT = A1;
int LEDPin = 6;
int LEDPinT = 7;
int buttonPin = 10;
int buttonPushCounter = 0;   // counter for the number of button presses
int buttonState = 0;         // current state of the button
int lastButtonState = 0;     // previous state of the button

void setup() {
 pinMode(buttonPin, INPUT);    // initialize the button pin as a input
 pinMode(LEDPin, OUTPUT);      // initialize the LED as an output
 pinMode(LEDPinT, OUTPUT);      // initialize the LED as an output
 Serial.begin(9600);           // Set up serial communication at 9600bps

void loop(){
    // read the pushbutton input pin:
  buttonState = digitalRead(buttonPin);
  // compare the buttonState to its previous state
  if (buttonState != lastButtonState) {
    // if the state has changed, increment the counter
    if (buttonState == HIGH) {
      // if the current state is HIGH then the button
      // went from off to on:
    else {
      // if the current state is LOW then the button
      // went from on to off:
  // save the current state as the last state,
  //for next time through the loop
  lastButtonState = buttonState;

if (buttonPushCounter % 2 == 0) {
 int ledbright = map(analogRead(flexPin), 0, 300, 260, 0);
 int ledbrightT = map(analogRead(flexPinT), 0, 300, 260, 0);

 constrain (ledbright, 0, 273);
 constrain (ledbrightT, 0, 273);

 if (ledbright < 50) {
   analogWrite(LEDPin, 0);
 if (ledbrightT < 50) {
   analogWrite(LEDPinT, 0);

 if (ledbright >= 50) {
   int LED = ledbright - 50;
   analogWrite(LEDPin, LED);

 if (ledbrightT >= 50) {
   int LEDs = ledbrightT - 50;
   analogWrite(LEDPinT, LEDs);


Friday, September 30, 2011

Long time, no post

It appears that I got caught up in the craziness of the first few weeks of school and failed to blog. Below is a summary of week 2.

Week 2
I stayed on team 3, so it was up to my new team to flesh out the design encompassing the wind, daily, and inflation elements that we were assigned. We chose to bring the passively ventilating "wall-indow" completely indoors. The concept was to create a breathable partition between rooms within the home, which would be able to filter particulates out of the air and increase the natural circulation of air through the home. The inspiration for the form of the project was the bellowing movement of a jellyfish. When engaged, the bellows would push air through a carbon filter and distend a fabric covering on the other side of the wall, creating what we intended to be a unique breathing visual effect. The schematic of the "jellyfish wall" is shown below.

Payton and I worked on the wiring and coding of the RGB LED's within the acrylic substructure of the product. We calculated the number of resistors in parallel that we would need to not fry the 9 LED's (also in parallel) from the 5 volt Arduino source, and then proceeded to solder and connect them together. The circuit diagram and an image of the wall (multiple modular jellyfish units) is below.

The code for the pulsing of the jellyfish relied on Pulse Width Modulation (PWM), and a change in red to green color (green = 1- red). 

During week two our group definitely worked within our prescribed disciplinary stereotypes. The art and design students worked on sewing the fabric and making the bellows for the design, the architecture students made the computer models and lasercut the acrylic components, and the engineers made the jellyfish light up by programming, wiring, and designing the circuit layout. Much of the criticism of our project was based on its utility. Many people were concerned that the volume of air that it would push through the house would be too substantial, or that the the closing of the bellows would be too loud if we used actuators to actually make it. I like where the other groups took this design after I moved on to another project. Although moving it to the outside of the house and relying on natural air pressure to enable a good seal might be difficult to achieve. 

Tuesday, September 13, 2011

A Good Start

I confess to experiencing many different feelings after completing my first week of SmartSurfaces. First of all, I've never worked in a class that has had it's own clients before. To be working on projects that will perhaps find their way into the PowerHouse in Detroit is a unique experience. It means that there's more at stake than a grade in the course. I know that the projects we are working on now are probably not the same ones (or the same embodiments) that will end up as our final projects, but they are challenging first steps in the process of defining/building a smart surface. In the same vein, the project assignment is so much different than any coursework I've attempted throughout my formal education. To be told to define our own "high value problems," instead of being given explicit problems to solve, leaves a lot of room open for interpretation. I admit that working on "under-specified problems" was at first a very frustrating concept for me, but I'm trying to look at it now as an opportunity to perceive the World in an inquisitive and thought-provoking manner. To summarize the statements above- challenge accepted.

For the "first surface" assignment, my team (team 3) was given the design criteria: daily, wind, and inflation. We were pretty stumped, which was evident in our first cardboard/chipboard embodiment (shown below) that lacked utility and aesthetic value. I believe that the problem with this design was that it had many individual components that didn't function well as a whole. We were probably trying to do too much with it at one time.

The 1.5 hour build during the first class functioned to teach me that sometimes it is best to just jump into a design, or to think with my hands and brain simultaneously. We met the following day to discuss our previous design and to build on what we did well and what we could improve on, as well as to rethink our high value problem. We were originally focused on harnessing wind energy as a means of generating electricity, but we missed thinking about how wind directly could be used to serve some purpose, such as the regulation of temperature and airflow within a living space. The turning point in this brainstorming session came when we looked towards nature for inspiration. We thought about how the skin functions to protect the body and to regulate its temperature. We tossed around ideas about a semipermeable window that would be able to sense the conditions of the outdoors and react to stimuli like light and heat in order to enable a shading and cooling device that would make the conditions of the living space more comfortable. Ideally, the ability to regulate temperature (through ventilation) would be independent of the surface's ability to regulate shade. We split for the evening after we agreed on these general goals and planned to meet on Sunday with our own ideas semi-developed in prototype form.

In our final collaboration session we combined the elements that we liked from each individual design into a prototype, shown below. This took a while to do, but we all agreed on the end product. I am extremely excited to see what the next team comes up with to amend some of the design issues we experienced when conceiving/building this surface. And since I am still on this project, there will be more specifics (and hopefully animations) to come!