Wednesday, September 30, 2009

Even More Heliotropic Systems!

So this week was a bit different in Smart Surfaces as we spent last Friday in class learning Digital Project, a software program that is a pain to work with but kinda cool when it does work.
Sitting in class, making Theo Jansen walking leg machines in Digital Project. Note, watch the Theo Jansen TED talk I linked just above. It's amazing.

Our objective this week,

You are to make a heliotropic field that is responsive to the movement of the sun. Use this project to build on previous work and to refine your understanding of a heliotropic system. Is it possible that the shadow of one cell might affect its neighbor? Is it possible for cells work together to share the available sunlight? The power copy demonstration developed a simple form and framework that uses information from the solar chart. Working with your team, you are to develop a speculative design in Digital Project and a prototype array built with your Arduino materials.

This should be presented as:
  • An animation using screen shots from Digital Project.
  • An operational prototype of 3 working / related cells.
Obviously the digital representation can include a larger field of components and demonstrate their relationships while the Arduino mock-up will demonstrate the operation of a few cells.

So, with that in mind, this is what we're working on. A field of cells that follow the sun using data on where the sun is from Excel and Digital Project. We're also designing something akin to flower petals that open as the day starts to collect sun and close in the evening.


Initial Ideas and Drawings

Assembly of our field.


The field, these are pulled by two servos to follow the sun.

Assembly of the servo connections.

Our field, moving, controlled by the Arduino.

Cutting out the petals for the collectors on the laser cutter.

Our group is meeting again tonight for final set up to get everything working. I'll be taking pictures and posting soon!
Thanks for reading!

Arduino Heliotropic Code

This is the code from our second project, the light source finder. Our code was mostly derived from the Arduino meets Processing project and was pretty much figured out by Michael Mathieu, a senior in MSE.

Just a note for anyone who's never looked at code before, anything inside of or after / is a comment to tell the human reader what it does.

/*
* ap_LDRAiming
*
* Reads an analog input from the input pin and sends the value
* followed by a line break over the serial port.
*
* This file is part of the Arduino meets Processing Project:
* For more information visit http://www.arduino.cc.
*
* copyleft 2005 by Melvin Ochsmann for Malm� University
*
*/
#include
Servo myServo;

// variables for input pin and control LED
int PhotoA = 3;
int PhotoB = 4;
int PhotoC = 5;
int LEDpin = 13;
int pos = 0;

// variable to store the value
int valueA = 0;
int valueB = 0;
int valueC = 0;
// a threshold to decide when the LED turns on
int threshold = 750;
void setup(){

// declaration of pin modes
pinMode(PhotoA, INPUT);
pinMode(PhotoB, INPUT);
pinMode(PhotoC, INPUT);
pinMode(LEDpin, OUTPUT);
myServo.attach(9);
// begin sending over serial port
Serial.begin(9600);
}

void loop(){
// read the value on analog input
valueA = analogRead(PhotoA);
valueB = analogRead(PhotoB);
valueC = analogRead(PhotoC);

// if value greater than threshold turn on LED
if (valueA <>

// print out value over the serial port
Serial.print(valueA);
Serial.print(",");
Serial.print(valueB);
Serial.print(",");
Serial.print(valueC);
// and a signal that serves as seperator between two values
Serial.print(";");
// Checks if right is greater than left, if so move to right.

if (valueB > (valueC +20))
// +20 is the deadzone, so it wont jiggle back and forth.
{
if (179 > pos)
pos++;
myServo.write(pos);
}

// Checks if left is greater than right, if so move to left.
if (valueC > (valueB +20))
// +20 is the deadzone, so it wont jiggle back and forth.
{
if (pos > 1)
pos -= 1;
myServo.write(pos);
}

// wait for a bit to not overload the port
delay(10);
}

The code includes a serial input that we used to judge whether or not our solar detection was working properly in a numerical sense. By slowing the program down to a delay of 250, we were able to tweak the code in order to ensure that the readings were proper, and that we could utilize the changes in direction properly.

The biggest issue for our group was ambient lighting, which we were able to counteract with a shade of sorts Allison and I made while in design, but in final display we could not, because of the amount of ambient light in the presentation area rendered our shade useless. We set our thresholds slightly too high for the situation that we were in, but it worked amicably for the purpose of presentation.

Thanks for reading.

Smart Surfaces and Heliotropic Systems

A quick update on week 2-3. We've moved along with arduino learning how to program it using photocells and servo motors to follow a light source, which is quite cool actually, I'm still at the "gee-whiz! It moves!" stage of physical computing. I really think they should teach physical computing in Physics 240 (electromagnetic physics and includes circuits) and Engin 101 (programing). Learning how to manipulate code to actually have a physical result is much more engaging than the same old compile, run, debug, compile, run, "hello world!'.

Anyway, all of this is leading into heliotropic systems (following the sun, like sunflowers).

Our light source tracker!

The bread board and all the wires inside the base.

We had two servo motors moving our contraption. One on the horizontal (x-axis) making it rotate and follow side to side and the other on the vertical (y-axis) following up and down.

For a quick video of it mostly working (too much ambient light, we set our light threshold a bit to high). Check out my group member, Damien's, flickr site here. Her blog can be found here.
Related Posts with Thumbnails