Tangible Media – DMDN312

Experiment Two—PIR Motion Sensor

Posted in Project One by Neo BA on August 15, 2009

This experiment is for catching the motion of moving objects, such as man body or animals. It is useful for controlling the entity/organism in flash. It is easy to install and use. The code how to interact with flash needs to be wrote late.

1.  Hardware Requirements:

sensor2

2. Sample code in Arduino:

————————————————————————————————————–

int ledPin = 13;                 // LED connected to digital pin 13
int sensor = 2;
int val = 0;

void setup()
{
pinMode(ledPin, OUTPUT);      // sets the digital pin as output
pinMode(sensor, INPUT);       // sets the digital pin as input
}

void loop()
{
val = digitalRead(sensor);   // read the input pin
if(HIGH == val)
digitalWrite(ledPin,HIGH);   // sets the LED to the high
else
digitalWrite(ledPin,LOW);    // sets the LED to the low
}

————————————————————————————————————–

2. PIR Motion Sensor (face): Module SE-10

Red wire is power (5 to 12V). Brown wire is GND. Black wire is open collector Alarm.

sensor3

3. PIR Motion Sensor (back): it bought from Mindkits

sensor4

4. Installation:

sensor1

More info:

1. http://itp.nyu.edu/physcomp/sensors/Reports/PassiveInfraRedSensor

2. http://itp.nyu.edu/physcomp/sensors/Reports/PIRMotionSensor

Follow

Get every new post delivered to your Inbox.