loading

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.

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.

Step 4: Connect the Bulb

Connect the -ve end of the current to the NC slot.
Connect the -ve end of the bulb to the NO slot.
Now connect the positive of the bulb to the positive of the current.

Step 5: 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 6: 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 7: Attach Everything to the Wooden Sheet With the Screws.

Step 8: You Are Done.

About This Instructable

3,400views

83favorites

License:

Bio: i am gabriel ,from chennai,tamilnadu. I create new gadgets to change the Future
More by Gabriel Aron:Arduino Motion Detection Light Arduino clapswitch LAMP Arduino security alarm 
Add instructable to: