September 2007 Archives

Core Design - Project 3 - Part 1

| | Comments (0) | TrackBacks (0)
With the provided brushes in photoshop, I completed the following quick landscape: tree doodle And the following is a mockup for an urban landscape project: giant wildlife

Intro to Physical Computing - Lab 3

| | Comments (0) | TrackBacks (0)
Prepare the Breadboard I prepared the breadboard by putting power to it, and my standard filter capacitors. lab3-power Add a Potentiometer and LED lab3 -pot lab3-led Program the Module I wrote my own code, based upon Tom Igoe's code written in front of the class. // Intro PhysComp - Lab 3 // Code by Anderson Miller // inspired by code by Tom Igoe done in class int potPin = 0; int ledPin = 6; int potValue = 0; void setup(){ pinMode(potPin, INPUT); pinMode(ledPin, OUTPUT); } void loop(){ potValue = analogRead(potPin); analogWrite(ledPin, potValue/4); delay(10); // per Tom's suggestion } I had the following results: lab3-leddark lab3-leddark1 lab3-leddark2 Other Variable Resistors I used a light meter almost daily in college for filmmaking, so now I decided that I want to make a darkness meter! I used a photoresistive sensor and an autoranging algorithm. The final result is pictured here: lab3-bar1 lab3-bar2 lab3-bar3 The code is as follows: // Darkness Meter // C. Anderson Miller // for Pcomp lab 3 // 9/25/2007 int ledBar[] = {2,3,4,5,6,7,8,9,10,11,12}; int ledNumber = 10; int lightSensorPin = 0; int lightSensor; int minimum = 500; int maximum = 500; void setup(){ int i = 0; for(i=0;i<10;i++){ pinMode(ledBar[i], OUTPUT); digitalWrite(ledBar[i], LOW); } Serial.begin(9600); } void loop(){ lightSensor = analogRead(lightSensorPin); delay(10); // Serial.println(lightSensor); if(lightSensor > maximum){ maximum = lightSensor; } if(lightSensor < minimum){ minimum = lightSensor; } int range = maximum - minimum; int steps = range/ledNumber; int steps2light = (lightSensor - minimum)/steps; Serial.print(steps2light); steps2light = ledNumber - steps2light; //equation that changes it from a light meter into a darkness meter int i; for(i = 0; i < steps2light; i++){ digitalWrite(ledBar[i], HIGH); //light up the affected ones } while( i < ledNumber ){ digitalWrite(ledBar[i], LOW); //darken the unnafected ones i++; } } Resources: http://itp.nyu.edu/physcomp/Labs/AnalogIn

Intro to Physical Computing - Observation Assignment

| | Comments (0) | TrackBacks (0)
In the park, where I sometimes take my bagel and coffee in the morning, I saw a man using a contraption, or what might have been a group of contraptions. It was in Bryant Park, in front of the Carousel. He was at a metal table, painted dark green, with 3 legs. He had a boxy black clamshell in front of him, open, but not attached to the table. It was bigger than a regular clamshell, about the size of a big book. There was a plastic pad next to his shell. There was also a coffee cup on his table. There was a thin black wire coming from the back of the clamshell, to a device on the plastic pad. He'd move this device to and fro along the plastic pad, while he stared into the clamshell. He also had a black wire going from and earpiece in one of his ears, down to a silver device on his belt, and it may have been related, because he was fiddling with it in between moving the device on the plastic pad. He'd take it off his belt, focus on the silver device, press some buttons, put it back in a holster on his belt, and talk, while he moved his eyes along the inside of the black clamshell. There were squares on the inside of the black clamshell, and they seemed to respond to his movement of the plastic device. They were small squares filled with numbers. He looked very anxious, and very different than the other people in the park. Everyone else in the park was enjoying the sunny day, looking around, and he wasn't looking at anything except inside his plastic clamshell. I chose him because his reaction to the world was so different, and that although he was in nature, with a million stimuli around him, he chose to ignore all of them, and look into his clamshell, and talk into his wire.

Intro to Physical Computing - Lab 2

| | Comments (0) | TrackBacks (0)
The goal of this lab is to connect a digital input circuit and a digital output circuit to a microcontroller. Prepare the breadboard. I connected a 100uF capacitor at the input of the 7805, and a 10uF capacitor at the output, to regulate voltage spikes and dips. img_0266.jpg Add a digital input (a switch). img_0267.jpg Add digital output (LEDs). I chose red and green. img_0269.jpg Program the Arduino. I wrote the following program quickly to try and become more familiar with the Arduino language. mycode -lab2 img_0218.jpg img_0217.jpg img_0219.jpg Combination Lock My combination lock is a simple DIP switch. img_0271.jpg The combination has to entered in the order of : Turn on 1 Turn off 1 Turn on 2 Turn off 2 Turn on 3 Turn off 3 Turn on 4 Turn off 4 The LED blinks for a fraction of a second as each state is changed. 3 rapid blinks (an error message) happens if you get the order wrong. When you get them all right, the system "unlocks", and a green LED lights up. img_0275.jpg my code for my combination lock follows:

// Code by C. Anderson Miller
// Combination Lock for Lab 2, Intro to Physical Computing
// 9/21/2007
int state[][4] = {   //two dimensional array to describe the states involved in the unlock sequence
	{LOW, LOW, LOW, LOW},  // state 0
	{HIGH, LOW, LOW, LOW}, // state 1
	{LOW, LOW, LOW, LOW},  // state 2
	{LOW, HIGH, LOW, LOW}, // state 3
	{LOW, LOW, LOW, LOW},  // state 4
	{LOW, LOW, HIGH, LOW}, // state 5
	{LOW, LOW, LOW, LOW},  // state 6
	{LOW, LOW, LOW, HIGH}, // state 7
	{LOW, LOW, LOW, LOW}   // state 8
};

int states = 8;
int inputs = 4;
int debug = 0;

int stateCounter = 0;
int* currentState;

int keyPins[] = {2,3,4,5};

int ledPin = 13;

void setup(){
	int i;
	for(i=0; i < 4; i++){
		pinMode(keyPins[i],INPUT);
	}

	pinMode(ledPin,OUTPUT);
	Serial.begin(9600);  //for debugging
}

void loop(){
	int i;
	for(i = 0; i<4;i++){
		currentState[i] = digitalRead(keyPins[i]);  //reading in current pin configuration

	}

	int equal = 1;  //assumes equal states until proven otherwise
	int advancedState = 1; //likewise with state advances

	for(i=0; i < 4; i++){
		if( stateCounter < states && currentState[i] != state[stateCounter][i] && equal == 1){
			equal = 0;
		}

		if( stateCounter < states && currentState[i] != state[stateCounter+1][i] && advancedState == 1){
			advancedState = 0;
		}
	}

	if( stateCounter < states && advancedState == 1 && equal == 0){
		stateCounter++;
		blink();
	}

	if ( equal == 0 && advancedState == 0 && stateCounter < states){
		stateCounter = 0;
		error();
	}

	if( stateCounter > states - 1){
		goalState();
	}

	delay(500);

	if(debug == 1){  //prints things to serial if the debug variable is equal to 1

		Serial.println(stateCounter);
		Serial.print("pin 4 ");
		Serial.println(digitalRead(keyPins[3]));
		Serial.print("advancedState = ");
		Serial.print(advancedState);
		Serial.print("   equal = ");
		Serial.println(equal);
	}

}

void goalState(){ //shows unlock
	digitalWrite(ledPin,HIGH);
}

void blink(){//subroutine to blink the LED on a correct move
	digitalWrite(ledPin, HIGH);
	delay(100);
	digitalWrite(ledPin, LOW);
}

void error(){  //subroutine to show an error via the ledPin

	digitalWrite(ledPin, HIGH);
	delay(50);
	digitalWrite(ledPin, LOW);
	delay(50);
	digitalWrite(ledPin, HIGH);
	delay(50);
	digitalWrite(ledPin, LOW);
	delay(50);
	digitalWrite(ledPin, HIGH);
	delay(50);
	digitalWrite(ledPin, LOW);
}

Core Design - Project 2

| | Comments (0) | TrackBacks (0)
The following are my 7 simple sketches: sketch8sketch6sketch5sketch4 sketch3sketch2sketch1 The following are my 10 excerpts from rotating, zooming in, and changing my 8 simple sketches: zoom1zoom3zoom5zoom6zoom7zoom8zoom9zoom11zoom12zoom10 And the following are the painted versions of 2 of my 12 excerpts: painting1painting2

Networked Objects Project 1

| | Comments (0) | TrackBacks (0)
Physical Computing Improv Project: My action that I've decided on is tapping: tapping 1tapping 2 And my object is pudding: pudding The end goal here, is to have a kinetic motion (pudding jiggling) to happen when a sensor picks up tapping. As a sensor I picked an accelerometer, and as an actuator, I picked vibration motors. The circuit I ended up with looks like this: netobjects circuit The pictures of the final product are here: netobjects-Proj1 And with pudding intact: netobjects-Proj1.1 One vibration motor didn't give enough jiggle, so I used two in parallel: netobjects-Proj1.1-motor The sensor was noisy, and my algorithm was (where X = X, Y, and Z axes): Take Xavg = average sensor reading (20 samples) Xdiff = abs(Xavg - Xreading) If Xdiff > Threshold, buzz, else re-run. The problem with the algorithm, was that as the sensor drifted (as it liked to do), the pudding would start jiggling without reason. I think if I were to do this project again, a better algorithm would be to use the math.h library (it has square root), take a running average of the inputs, and buzz only for any input that's over one standard deviation above the mean.

Core Design Project 1

| | Comments (0) | TrackBacks (0)
Tiny Version of Project 1 The PDF can be found here (it's bigger/more detailed).

Lobster Costume

| | Comments (0) | TrackBacks (0)
I made a lobster costume this weekend for a costume party. The materials were egg crate foam, spraypaint, and staples. Here are the claws: img_0169.jpg And here are pictures of me in the costume: img_0164.jpg img_0162.jpg img_0159.jpg

Intro to Physical Computing - Lab 1

| | Comments (0) | TrackBacks (0)

Part 1: Measuring Voltage

The first goal of this lab, was to get power to the breadboard, wire it properly for power, and measure the resulting voltage. So here is the wired board: Establishing Power This board was connected to the 5V and GND pins on the Arduino, in the Red and Blue lanes, respectively. And the measured voltage that resulted: Measuring the Initial Voltage My meter is auto-ranging, so I didn't have to set anything special to get it to output at the proper order of magnitude. I also wired the board so that the opposite side could receive power. Part 2: The Basic LED Circuit Then I built my Basic LED circuit. Without the resistor in place, the LED soon gets too bright, then burns out. With a 220 Ohm resistor in place, the LED glows at a reasonable brightness, and can last a long time. I also put a momentary pushbutton switch into the circuit to control it. The voltage I measured across the LED when the pushbutton switch was engaged was 2.097v. Across the 220Ohm resistor, the voltage was 2.508v. Button Press 1Button Press Off Seen here in both ON and OFF positions! I used the following chart to find out which resistor was 220 ohms. (Source 3) And the wikipedia page on LED's is incredibly helpful as to which end is which: (source 2) Part 3: Components In Series Here I connected two LED's, one after another, in series. In Series The voltage across each, was 2.403v across red, and 2.475v across yellow (not pictured, done for measurements). Together they added to 4.878, which is really close to 4.91, but as the lab said, there's always some loss. For curiosity's sake, I used my voltmeter to test the resistance of each diode. Miraculously, each was around 220 Ohms! Each LED has a 220 Ohm resistor in the circuit (in this case another LED) keeping it from burning too brightly. Part 4: Components in Parallel, Measuring Amperage Then I connected 3 LEDs in Parallel In Parallel The amperage across each in this configuration was 0.67mA. Each of these were brighter (and hotter!) than they should be, so I thought I'd look up the formula on parallel resistance to see what the correlation here was. (Source 4) Apparently, in series, resistance stacks like so: Rtotal = R1 + R2 + R3 + R4(...) . But in parallel resistance stacks like so: Rtotal = 1/(1/R1 + 1/R2 + 1/R3 + 1/R4...) So the total resistance (before/after the LED) for any of those LEDs was 1/(1/220 + 1/220) OR only 110 Ohms. The Total resistance for the circuit by that formula was 73 Ohms. Part 5: Generating a Variable Voltage with a Potentiometer With Potentiometer The voltage across when the potentiometer was approximately in the center position was 2.803v, across the resistor was 132mV, and across the LED was 1.842v. Sources: 1. http://itp.nyu.edu/physcomp/Labs/Electronics 2. http://en.wikipedia.org/wiki/LED 3. http://n1ofz.connares.org/resources/resistor_code.gif 4. http://www.outlawnet.com/~oclass/electricity/formulas.htm#parallel

Orb

| | Comments (0) | TrackBacks (0)
This is a film that I worked on in Fall of my Senior year at JHU (Fall 2005). It's about 40 seconds long, and it's a timelapse of a glass globe as the sun passes it over the course of a day. Orb - Runtime 0:41 Seconds You'll probably want to right-click, and "Save Target As" rather than watching it in the browser.

Good News!

| | Comments (0) | TrackBacks (0)
I finally am making use of my candersonmiller.com domain name for something other than hosting my films so that people can view them (although I plan to post those too).

About this Archive

This page is an archive of entries from September 2007 listed from newest to oldest.

October 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.1