PIR motion sensor game

PIR Motion Sensor Circuit

Components list:

Potentiometer x2, Piezo Buzzer x1, Wire, LED x2, Arduino Uno, 220 Ohm resistor x2

The PIR sensor in fritzing is not representative of the sensor we used. The sensor used for this can be found at Adafruit.

How the game works:

The red LED represents the status of the motion sensor, when it is lit, the sensor is armed and ready. The green LED indicates when the sensor has been triggered. One potentiometer controls the “pace” while the other controls “wait” to make the game a little more challenging. The buzzer will tick, and when the buzzer makes the go noise, you have to waive your hand frantically in front of the sensor before you run out of time. If you succeed in triggering the sensor, then it buzzes a satisfying tune. Conversely, if you lose then it triggers a sad tune. The motion sensor waits about 14 seconds before the next cycle of the game starts.

The rearm function has one minor drawback, mostly due to the inconsistencies in the motion sensor, and that the wait time is hardcoded to 14 seconds, even though the wait time could be higher or lower than that.

 

For all the fun things you can do with the PIR sensor from Adafruit, it has one major drawback. There is a delay, often inconsistent, every time the sensor is triggered. While it can be adjusted sightly, it ultimately comes down to cheap hardware not doing the job right.

 

here is the code:

const int digitalInPin = 8;
const int armedLedPin = 3;
const int motionLedPin = 2;
int time;
int x = 14; //takes about 14 seconds to rearm sensor
void setup() {
Serial.begin(9600);
pinMode(motionLedPin,OUTPUT);
pinMode(armedLedPin,OUTPUT);
digitalWrite(armedLedPin,HIGH);
}
void loop() {
int motionVal = motionRead(digitalInPin,1000);
Serial.println(motionVal);
if(motionVal > 0) {
digitalWrite(motionLedPin,HIGH);
digitalWrite(armedLedPin,LOW);
} else if (motionVal < 1) { digitalWrite(motionLedPin,LOW); digitalWrite(armedLedPin,HIGH); } Serial.println(time); rearm(); } int motionRead(int pin, int wait) { delay(wait); int sensorRead = digitalRead(pin); return(sensorRead); } void rearm() { time = x; for(int x; x>0; x–) {
delay(1000);
}
}

Reading Response to Dunne & Raby

As I read both the readings I was thinking about what my project should be. Before I could figure out what the project was going to be I needed to pose some questions. This is the result of the new questions and understandings that I arrived at after the readings:

I was particularly interesting in the Dunne & Rabby reading about Hertzian space because they made me aware of a space that previously I had no idea existed beyond my phone’s recognition of wifi and a car radio’s ability to receive music signals from towers. There are so many terms and new vocabulary for describing Hetzian space and those who have found way to interact with and utilize it. Hertzian space is an area beyond normal human perception, which is why the vocabulary around it is so odd. It has to be very specific in order to describe this very particular area of the universe – the spectrum. A word has to be invented to designate something as existing because thats how humans communicate concepts, ideas, and things – especially things beyond which can be understood using our built in biological sensors. Senses such as taste, touch, sight, hearing, and smell can be used to share an experience with other humans because they have the same sensory abilities. For example, An apple is equally understood between two individuals from opposite sides of the globe as a fruit because it is sweet when eaten. it feels waxy to the touch and we can see that it grows on trees and that it has a stem. All of these features, which we can detect using our external sensory functions, of an apple make up how we, as humans define it to be an apple. But how do you understand something entirely that is beyond our natural human sensory perception? How do you describe such a thing? It is abstract if it has not been grounded in reality through our senses. Another language is required to describe realms beyond human perception: math. Mathematical equations can describe natural phenomenons that are beyond normal human perception. For instance Hertzian space is made up of the electromagnetic spectrum, which is understood in terms of frequency and is visualized as oscillating waves. However, this is still an abstraction of the original form and it is still removed from our senses. It is not truly representative.

How can we make Hertzian space into a place? How can we make Hertzian space more tangible? In what ways can we visualize Hertzian space? It is omnipresent, yet the only way we understand it to exist is the moment we lose connection to the internet and have to reconnect. Only in moments where we require access to the internet, but cannot get on, do we realize its existence, other wise we take it for granted that we can search wikipedia and surf google.

As James Hunter puts it, “we create ‘place’ only through continual acts of seizure.” That is, a space is something that doesn’t exist, is not defined, yet is everywhere and is only turned into place when something grabs your attention, pulling you away from your normal monotonous flow. Place is created where disruptions push an pull the normal current of time as perceived by a human. Hertzian space, at the moment, is disrupting people all the time when their internet goes out, but in a way that isn’t enjoyable, gainful, or fun. There were a few examples of people who were actively seizing hertzian space by searching for natural radio frequencies traveling through space and interacting with Earths ionosphere. What if there were some way to disrupt ones normal flow of activity by making them more aware of the dense radioscape they are surrounded by? How could the invisible become visible, tangible, and real to the human senses? These are questions I am beginning to ask as well as think about ways in which the questions can be materialized into a project.

Images related to Pallasmaa

Buildings inspired by nature, and not.

Examples of human center design and non human center design.

8 Spruce Street Downtown Manhattan. Designed by Frank Gehry.

Stata Center at MIT, Cambridge also designed by Frank Gehry.

Denver Art Museum in Denver, Co. Designed by Daniel Libeskind, also assistant architect of the Freedom Tower.

Guggenheim Museum, NY designed by Frank Lloyd Wright

Lideta Mercado, Ethiopia, designed by Xavier Vilalta

guggenheim Denver Art Museum MIT Stata Center 8 Spruce Street Detail14mercatolideta-xvstudio-04

Using all of Arduino’s Inputs and Outputs

Arduino inputs and outputs:

analog in – Arduino receives a signal from a sensor

analog out – Arduino sends voltage to a sensor

digital in – Arduino receives voltage from a sensor

digital out – Arduino sens voltage to a sensor

serial in – The Arduino receives an input from the serial monitor

serial out – The Arduino sends data to the serial monitor

 

Screen Shot 2015-02-09 at 3.35.41 PM Screen Shot 2015-02-10 at 12.22.39 AM

 

//led that i will trigger
int led = 8;
//led that i will fade
int pwm = 3;
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
pinMode(led,OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 1 from the photoresistor:
int sensorValue = analogRead(A1);
//map the sensor values to a new range
sensorValue = map(sensorValue,0,1024,0,500);
// print out the value you read:
Serial.print(“photosensor value: “);
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
//trigger the led to turn on and off depending on different lighting conditions
if (sensorValue < 34) {
digitalWrite(led,HIGH);
} else {
digitalWrite(led,LOW);
}
int flexValue = analogRead(A5);
// Convert the analog reading (which goes from 0 – 1023) to a voltage (0 – 5V):
float voltage = flexValue * (5.0 / 1023.0);
Serial.print(“flex value: “);
Serial.println(voltage);
delay(100);
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(pwm, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(pwm, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
}

Setting up a serial connection

when the room light is turned off, the led activates!

I pulled a value from a simple photoresistor to make this happen. The arduino code is posted bellow.

IMG_1810 IMG_1811

int led = 8;
void setup() {
Serial.begin(9600);
pinMode(led,OUTPUT);
}
void loop() {
int sensorValue = analogRead(A1);
sensorValue = map(sensorValue,0,1024,0,500);
Serial.println(sensorValue);
delay(1);
if (sensorValue < 34) {
digitalWrite(led,HIGH);
} else {
digitalWrite(led,LOW);
}
}

Studio: Environments Reading Response

Thoughts on Mzerleau-Ponty

How are Merleau-Ponty’s ideas on perception helpful in understanding our surroundings?

What topics from the reading do you currently apply to your own work?

Merleau-Ponty believes that we are innately connected with body and mind and that one cannot exist without the other. The only way we can perceive reality is with our senses and the only way that we can interpret reality is with our mind. Communication with those two are absolutely important to understanding our world. The only way we understand the world that we live in is through the five senses we have developed as a species. Using those senses in combination with our mind, we can understand our surroundings as whole pieces. To give an example, It is impossible to understand what a lemon is without tasting its acidic, sour juice, touching its leathery skin, smelling its puckering aroma, and hearing the sound of your mouth sucking the juice out of a slice of the fruit. If you isolate the individual senses, then it becomes difficult to understand an object in it entirety. You could break it down into its individual molecular properties and describe what precisely makes a lemon a lemon, but it requires the usage of sense to make any real connection with the fruit. There are things out there that we physically cannot sense because we have not adapted a need for them, but I am sure that through sensory implants that hook up to ones brain, we may be able to physically sense things beyond normal human perception. For instance, wifi or radio waves, if an implant were created that could stimulate our brain, suddenly we’ve opened up a whole new sensory range, and of course new emotions or behaviors might develop along with that new sensory perception. I image people would be so over stimulated within a city that they might go insane depending on what sort of stimulation they receive from surrounding wifi waves. In fact people might begin hating the internet because it is everywhere they go. Places they normally consider boring, like a train ride, might provide them an oasis that provides relief.

Everything anyone makes takes advantage of perception and the senses, unless of course what they create is able to evade all human sensory functions. Art created at the microscopic level, art created outside of the visible spectrum, music created at such a high pitch that it is impossible for humans to perceive, anything created outside of the bounds of human sensory perception essentially would not exist unless certain technologies were invented to reveal, in another form to our senses, their existence.

In my own work, I often like creating things that augment human perception, emotions, life, or experience. I think finding ways to extend human experience beyond what is normal makes life more interesting because it gives us new ways to think about and contextualize our existence.

The images bellow are from Asif Khan’s Sochi Winter Olympics installation. This installation takes an image of a visitor and creates a 4D depth map of their face on a massive hydraulic-actuated screen. Whats interesting about this beyond the enormous size of the screen and the technical challenge of manipulated hundreds of hydraulics, is that it gives an ordinary visitor the chance to manipulate the environment and become a participant and put on a show for other observers, at least for a few seconds.

MegaFaces-installation-by-Asif-Khan_dezeen_1sq Asif-Khan-3D-Faces-Megaface-2

Organ backpack documentation

My studio sound project:

Concept:

As we were required to experiment with sound in combination with our Arduino, I combined a few interests of mine for inspiration on the final product. I love sci-fi and it seems that there is a common trend in every sci-fi movie for some character to be wearing some sort of complex instrument on their back. I had made a previous attempt at creating a backpack, but out of soft material: tarp. This time I wanted to make something solid and strong. I decided to utilize the laser cutters to construct a wooden encasing for my backpack.

I don’t play any musical instruments, so figuring out how to link my project with sound put me in a very uncomfortable position. Naturally I was inclined to make something incredibly unconventional, something that wouldn’t resemble a formal instrument at all, but instead be something different.

I drew inspiration from a clip I found on the internet as I was looking through photos of burning man when i stumbled across a flame throwing organ! I was immediately drawn to the idea. So I took it up to merge the backpack and the unconventional flame organ into one – though without the flames. That would require more technical knowledge than I currently had time to learn.

 

preparation/construction:

All photos taken during the construction process were lost when my iphone 4 was destroyed. If I ever find a way to take the memory from the phone, I will post them here.

However, I do have some documentation on the drawings/notes I made:

IMG_1741 IMG_1743 IMG_1744 IMG_1745 IMG_1746 IMG_1747 IMG_1748 IMG_1749

 

 

 

final outcome:

IMG_1731 IMG_1726 IMG_1725 IMG_1724 IMG_1723

struggles/improvements/reflection:

 

Playtech!

Some photos from the design and technology Play Tech event on D12:
DSC04377 DSC04384

 

 

 

Final combined studio/coding

The original concept: To create an energy visualizer that collects data from a crowd. The machine would resemble the energy instrument used to measure the main character, Tetsuo, in the Japanese Anime Akira.   The 3D model  before physical construction: Screen Shot 2014-12-08 at 8.47.18 PM

Materials purchased:

one 4’x8′ 3/4″ birch plywood from Prince Lumber

one 12″ diameter plastic hemisphere from Canal Plastics

three 18″x12″ 1/8″ clear acrylic sheets

four 8″ 3/8″ diameter bolts with eight accompanying nuts and washers from Home Depot

one length of vacuum tube from Home Depot

one strip of RGB led from Amazon

four potentiometers from RadioShack

wire, wood glue, zap glue, zip ties, translucent mylar

Creating a quick prototype “hologram”. Really this is an illusion called “pepper’s ghost illusion.” Real holograms are created with lasers. Though this is a cheap and visually interesting alternative.

material:

clear PVC 2/32 sheets, wooden dowel, glue

Construction:

Could not be possible without the generous donation of this computer monitor from Mick, my boss over at the 3D printing/laser lab.

IMG_1657

 

IMG_1683IMG_1563 IMG_1567

IMG_1710 IMG_1722

 

 

Result:

My rendition of the energy measurement instrument:     Rather than being a machine exclusively for the purposes of measuring and visualizing energy levels, the machine is modular, capable of running many “apps”. The base of the machine is designed with spaceships and the future in mind, complete with diffused blue LED’s, hoses and tubes, and a circular construction. The machine is meant to be used to up to 4 people, as there are 4 potentiometers, one for each person, placed around the perimeter of the hologram. The potentiometers are used to change variables within the main processing sketch.

Mode 1: cube

IMG_1712

Mode 2: spaceship

IMG_1720

Mode 3: pong

Screen Shot 2014-12-09 at 12.30.10 AM

Mode 4: drawing tool

IMG_1716

road bumps/struggles/what i’d like to improve/add :

Construction of the base could be cleaner. Additionally, the edges of the pyramid could have been joined in a much more precise way.

if more time: I could make the lights on bottom respond to the potentiometers. I could also add sound and, as Sven suggested, fog that could shoot out of the hoses to create a more immersive interaction environment. Additionally, it would be great to eventually utilize this as the data visualizer I originally intended it to become. The next project would likely be creating a system to collect and parse the data.

Reflection:

All in all, the project took me a long time to make and I am happy with the end result. I think the amount of time I devoted to the project justifies the end result. I also am fairly pleased with the future spaceship looking aesthetic and the interaction that it induces, requiring people to be engaged with the object for the full experience to take effect.