Project showcase
Simple Movement Detector

Simple Movement Detector © GPL3+

This project is about a simple movement detector. Whenever any obstacle comes in a line (predefined) a light will glow.

  • 2,914 views
  • 8 comments
  • 14 respects

Components and supplies

Apps and online services

About this project

Images

The Project

So my project is about a simple motion detector. This can be used in various project's like automatic light on/off, intruder detection etc. We make the circuit in such a way that the light from led will fall on LDR. So with the initial observation we make the coding. The theory used is that whenever the light falls on the LDR, resistance changes. So varying light create varying resistance. This property is being used here.

The LDR is connected to the analog pin of the Arduino in order to get the varying resistance (or voltage) value. So at first stage we measure the resistance without any obstacle between the LDR and LED and then with some object. This observation is noted and used while coding. Whenever the resistance fall or rise below a certain limit we can infer that there is some thing place in between the LDR and LED. So if something is placed in between LDR and LED a light will glow.

Code

Code for the systemArduino
int sensorPin = A0; // select the input pin for LDR

int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600); //sets serial port for communication
pinMode(2,OUTPUT);
pinMode(12,OUTPUT);
}
void loop() {
sensorValue = analogRead(sensorPin); // read the value from the sensor
digitalWrite(2,1);
Serial.println(sensorValue); //prints the values coming from the sensor on the screen

delay(1);
if(sensorValue<80)
{
  digitalWrite(12,1);
}
else 
{
  digitalWrite(12,0);
}
}

Schematics

Circuit Diagram
ldr_intruder_2_ImFsUEc5uA.fzz

Comments

Similar projects you might like

Light Intensity and Solar Panel Energy Detector

Project tutorial by Kutluhan Aktar

  • 3,085 views
  • 3 comments
  • 14 respects

Simple DALI Controller

Project in progress by NabiyevTR

  • 46,188 views
  • 64 comments
  • 46 respects

Arduino EMF Detector A.K.A Ghost Detector

Project showcase by Patel Darshil

  • 9,610 views
  • 9 comments
  • 21 respects

Simple Programmable Robotic Arm

Project showcase by Ryan Chan

  • 85,409 views
  • 75 comments
  • 219 respects

Simple IR Reciver

by Treebug842

  • 1,394 views
  • 0 comments
  • 7 respects

Bare Conductive Leak Detector

Project tutorial by Samir Undavia and Adam Cellon

  • 4,070 views
  • 2 comments
  • 13 respects
Add projectSign up / Login