Sie sind auf Seite 1von 5

technology workshop craft home food play outside costumes

Arduino Motion Detection Light


by Gabriel Aron on December 5, 2016

Table of Contents

Arduino Motion Detection Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Arduino Motion Detection Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: MATERIALS YOU NEED: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: Connect the PIR sensor to the arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 3: Connect the 5v relay to the arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 4: Coding.... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 5: WARNING!!!!! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 6: Attach everything to the wooden sheet with the screws. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 7: You are Done. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

http://www.instructables.com/id/Arduino-Motion-Detection-Light/
Author:Gabriel Aron
i am gabi,from chennai,tamilnadu

Intro: Arduino Motion Detection Light


PLEASE VOTE! ME IF YOU LIKE IT

Hi, this is my new Arduino Motion Detection Light. It is powered by an 9v supply for the arduino and 5w for light. If a man or an animal pass through the PIR
sensor, it detects and will start the relay(as the light turns on). If there is no detection, then it will stop the relay(as the light turns off). You can also attach to
walls with the hanging tie.This project is very usefull in our life. You can attach it to your room or bathroom or in a bedroom........

Step 1: MATERIALS YOU NEED:


1.A Wooden Sheet

2.A bulb (0.5watts or 7watts)

3.A bulb holder

4.arduino board

5.a 5v Relay

6.a 9V adapter

7.a motion sensor(pir)

8.Jumper cables and 2 meter double wire(twisted)

9.screws(which can go through arduino and relay holes)

Step 2: Connect the PIR sensor to the arduino


1.connect the VCC pin to the 3.3v.

2.connect the GND pin to the ground.

3.connect the OUT pin to the digital pin 4.

http://www.instructables.com/id/Arduino-Motion-Detection-Light/
Step 3: Connect the 5v relay to the arduino
1.Connect the GND pin to the ground.

2.Connect the IN1 pin to the digital pin 8.

3.Connect the VCC pin to the 5v.

http://www.instructables.com/id/Arduino-Motion-Detection-Light/
Step 4: Coding....
copy and paste to the IDE.

int irmotionPin = 4; // Pin of IR Motion Sensor

int relayPin = 8; // Pin of Relay Module

void setup(){ Serial.begin(9600);

pinMode(relayPin, OUTPUT);

// Set Pin connected to Relay as an OUTPUT

digitalWrite(relayPin, LOW);

// Set Pin to LOW to turn Relay OFF }

void loop(){

while (digitalRead(irmotionPin) == HIGH)

{ // If Motion detected

digitalWrite(relayPin, HIGH);

// Turn Relay ON

Serial.println("Relay is ON");

delay(15000);}

digitalWrite(relayPin, LOW);

// Turn Relay OFF Serial.println("Relay is OFF");

delay(500); }

Step 5: WARNING!!!!!
Its very dangerous beacuse of high voltage AND you might get shocked.So recheck that everything is connected properly and correctly.After doing all , PLUG IN YOUR
CIRCUIT. FIRST THE LIGHT TURNS ON AND OFF. THEN YOUR CIRCUIT WILL WORK.if It dosnt, please comment, so that i can solve it.

Step 6: Attach everything to the wooden sheet with the screws.

http://www.instructables.com/id/Arduino-Motion-Detection-Light/
Step 7: You are Done.

Related Instructables

Arduino Motion
Sensor Control DIY Smart MOTION Lighting up an Motion Sensor PIR Motion
Room Light SENSOR USING LED with Leap Arduino by Detector With
Led Light by
System With ARDUINO by Motion on Mac ZakariyeA Arduino:
eglass1 PIR Motion OSX (For Operated at
appytechie
Sensor and Beginners) by Lowest Power
Arduino by jkimee Consumption
CircuitMagic Mode by
TheElectromania

Advertisements

Comments

http://www.instructables.com/id/Arduino-Motion-Detection-Light/

Das könnte Ihnen auch gefallen