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,261 views
  • 7 comments
  • 12 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

  • 2,104 views
  • 3 comments
  • 13 respects

Arduino EMF Detector A.K.A Ghost Detector

Project showcase by Patel Darshil

  • 6,161 views
  • 9 comments
  • 16 respects

Simple Programmable Robotic Arm

Project showcase by Ryan Chan

  • 49,020 views
  • 63 comments
  • 145 respects

Simple DALI Controller

Project in progress by NabiyevTR

  • 32,437 views
  • 55 comments
  • 35 respects

Simple Voice Recognition

Project showcase by Treebug842

  • 1,731 views
  • 1 comment
  • 13 respects

The Vibrating Pressure Temperature Altitude Tilt Detector

Project tutorial by Kutluhan Aktar

  • 1,038 views
  • 0 comments
  • 4 respects
Add projectSign up / Login