Electronic Project 39: Alarm System Using the principle of LASER with the aid of LDR and arduino uno

in utopian-io •  7 years ago  (edited)

What Will I Learn?

At the end of this tutorial:

♦ The readers will be able to create an alternative device that can be used for protection and aims to provide efficient home and industrial security system

♦ The readers will be able to know how the circuit works base from it theory of operation.

♦ Learn to apply the circuit in creating advance technology in the future electronic projects

Introduction

Today, security is the most important factor anywhere in the world. Technology develops day by day in the world. In this modern time we are facing different kinds of problem, and one of the major problems that we are facing is our home’s security. Nowadays, criminal will no longer choose when to attack.

That is why this tutorial was made for us to create an automatic security alarm system by which laser was used. This system is designed to detect intruders who break into our house.

You can read more about laser here

image.png

Requirements

Electronic Components

♦ Arduino Uno

♦ Laser

♦ Piezo buzzer

♦ LED

♦ Light dependent resistor

♦ Resistor

♦ Breadboard

♦ Connecting wires

Software

♦ Fritzing application

Difficulty

♦ Advance

Tutorial Contents

Using the fritzing software, we will create our circuit diagram, arduino codes and prototype using the breadboard

Part I. Schematic Diagram

So first let us construct our circuit diagram.

image.png

Select the electronic components needed for the circuit in the fritzing library. We need 1 arduino uno, 1 light sensor (LDR), 4 resistors, 1 laser, 1 piezo buzzer , 1 transistor and 1 LED.

image.png

Arrange the components before constructing the circuit.
In arranging the components, place all the components for the input side (left side) of the arduino and the components for the output side (right side).

At the input side of our circuit we have the laser, our source of light and the light sensor that will detect the light coming from the laser. While at the output side of our circuit, we have the amplifier circuit and the alarm circuit composed of buzzer for sound alarm and the led for the light signal.

image.png

Now let us construct our circuit diagram. We need to connect a voltage source to the laser, so we will use the 5V output of the arduino and connect it to the laser as shown below. The laser, unfortunately, is not available right now at the this software, so I use the female header pins where the laser shoud be connected.

image.png

Then our light sensor must be constructed next to the laser so that the light will be directly detected. The light sensor will be connected to the source voltage and to the input pin of our microcontroller. So here, I use the pin A3 as our input pin. You can use any of the following analog input pin of the arduino uno.

image.png

The output signal from pin 13 is connected to the base resistor of our amplifier circuit. This signal will be amplified so that it can drive the external circuit as shown in the figure.

image.png

The alarm setup is constructed using a buzzer and led connected in series. In order to drive this circuit we need to connect this to the output of our amplifier circuit. The amplified output will trigger this alarm circuit when the laser and light sensor communication is being cut or interfered.

image.png

Now this is our final circuit diagram.

Theory of operation:

The basic operation in this circuit is that the laser transmitter emits the laser beam and on the opposite side where there is a light sensor that receives or detects the laser beam. If that laser beam is interrupted or the light sensor doesn’t receive the light, the resistance of the light dependent resistor increases which decreases the voltage inside the circuit. Then the output becomes low then the corresponding tripper gets triggered which automatically alarms the buzzer and the also the LED that plays as an indicator in the alarm system.

This alarm system will be placed in the area where you want security such that in case of home invasions the alarm will be triggered.

image.png

The laser and light sensor must be place opposite with each other so that the light from the laser is directly absorbed by the light sensor. Once this connection is interfered, a signal will flow through the input pin 3 of the microcontroller making it to trigger.

image.png

The microcontroller will give output signal at pin 13 that is connected to the amplifier circuit. Then this signal will be amplified as it flows through the amplifier circuit.

image.png

The amplified signal will now trigger the alarm circuit.

image.png

Part II. Code

Now let us do programming of our Arduino uno.
Click on code to start.

image.png

The input pin for our microcontroller from the output of the light sensor is the analog pin 3 and the output pin is pin 13.

int ldrPin = 1;  //light dependent resistor input pin
int resPin = 13; //output pin for our power amplifier circuit
int sensorValue = 0; //initial value store in the light sensor terminal 

image.png

void setup() {
pinMode (ldrPin, INPUT);        //light sensor output terminal as input value
pinMode(resPin, OUTPUT);   //for the resistor pin signal to the amplifier circuit 
}

image.png

void loop(){
sensorValue = analogRead(ldrPin); //read analog value from the light sensor output
if(sensorValue<=1000){
digitalWrite(resPin, HIGH); //give output at pin 13 to be amplified at the amplifier circuit
else 
digitalWrite(resPin, LOW); //no output at pin 13 
}

image.png

Here are our arduino codes.

int ldrPin = 1;  //light dependent resistor input pin 
int resPin = 13; //output pin for our power amplifier circuit 
int sensorValue = 0; //initial value store in the light sensor terminal 
  void setup() { 
pinMode (ldrPin, INPUT);        //light sensor output terminal as input value 
pinMode(resPin, OUTPUT);   //for the resistor pin signal to the amplifier circuit 
} 
void loop(){ 
sensorValue = analogRead(ldrPin); //read analog value from the light sensor output 
if(sensorValue<=1000){ 
digitalWrite(resPin, HIGH); //give output at pin 13 to be amplified at the amplifier circuit 
else 
digitalWrite(resPin, LOW); //no output at pin 13 
}

Part III. Breadboard

Click on the breadboard.

image.png

Arrange each component in the breadboard before connecting.

image.png

Now connect each component if you don’t know how to connect using breadboard just read my previous tutorial about how to construct a circuit in the breadboard

image.png

Application

The readers can create their own security alarm system. This device is mainly designed for security purposes. It is useful for home security and establishment’s security.

link source

Curriculum

Here are my other tutorials for electronic projects.

ELECTRONIC PROJECTS

Tutorial 1

Tutorial 2

Tutorial 3

Tutorial 4

Tutorial 5

Tutorial 6

Tutorial 7

Tutorial 8

Tutorial 9

Tutorial 10

Tutorial 11

Tutorial 12

Tutorial 13

Tutorial 14

Tutorial 15

Tutorial 16

Tutorial 17

Tutorial 18

Tutorial 19

Tutorial 20

Tutorial 21

Tutorial 22

Tutorial 24

Tutorial 25

Tutorial 26

Tutorial 27

Tutorial 28

Tutorial 29

Tutorial 30

Tutorial 31

Tutorial 32

Tutorial 34

Tutorial 35

Tutorial 36

Tutorial 37

Tutorial 38



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @cha0s0000, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @rfece143 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x