• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Laser Security System Using ESP32 Arduino

By Abhishek Ghosh March 9, 2023 7:27 pm Updated on March 9, 2023

Laser Security System Using ESP32 Arduino

Advertisement

Laser tripwire-based security systems use low-energy lasers and simple technology to trigger the alarm system. This alarm can be auditory, visual or mobile notification via IoT based system. These systems are completely legal in any country till the laser rays are not disturbing the public. On the other hand, a laser fence or laser wall uses a high energy laser (cutting laser) to injure bodies passing the laser beam. This can be illegal in most of the regulated countries when used by a civilian.

In this article, we are talking about the first type of device development which is completely legal and safe. Laser tripwire-based security systems can be developed using transistors or ICs. However, they are primitive and their upgradation to send a mobile notification is not possible. In this article, we are sharing the system which is basic i.e. just triggers a buzzer alarm. This is an easy system and can be built by the kids. The parts we need are:

  1. ESP32 or Arduino UNO Board
  2. Laser Diode Module KY-008
  3. Buzzer
  4. LDR
  5. Resistors (10k)
  6. Push Button Switch
  7. Bread Board
  8. Jumper wires

 

Working Principle of Laser Security System

 

The principle is the same as was in Turn On LED in Dark With LDR and Arduino. The LDR is sensitive to light, when the laser can not reach LDR, the voltage output changes, which eventually triggers the alarm. The project works on the principle of interruption. If the light is interrupted the buzzer will start. We are adding a push button to reset the system.

Advertisement

---

 

Code and Circuit Diagram

 

Initially, I wrote the code and later realized that the difficult part is drawing the circuit diagram and keeping it simple. After searching a bit, I found that Utsource Part already published the thing on maker.pro which I wanted to show you.

Laser Security System Using ESP32 Arduino

Finally, I modified their code to support ESP32 with future WiFi support. This code is for Arduino UNO and can be used with ESP32 (when commented out). For ESP32, any of the ADC1 GPIO pins can be used. We can use GPIO 35 (ADC1 CH7).

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
int laserPin = 3;
// for ESP32
//int sensorPin = 35;
// for Arduino UNO
int sensorPin = A0;
int buttonPin = 12;
int buzzerPin = 11;
 
//adjust the value
int laserThreshold = 10;
 
void setup() {
pinMode(laserPin, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
Serial.begin(9600);
}
 
boolean alarmState = false;
 
void loop() {
if (! alarmState) {
delay(1000);
digitalWrite(laserPin, HIGH);
delay(10);
unsigned long startTime = millis();
while (millis() - startTime < 1000) {
int sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if (sensorValue > laserThreshold) {
alarmState = true;
break;
}
delay(10);
}
digitalWrite(laserPin, LOW);
} else {
tone(buzzerPin, 440);
if (! digitalRead(buttonPin)) {
alarmState = false;
noTone(buzzerPin);
}
delay(10);
}
}

My original thing’s circuit diagram was this one. Vcc of the laser module should be connected to the power source. This is not required for this project but I published it for self-reminder.

Laser Security System Using ESP32 Arduino 1
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Laser Security System Using ESP32 Arduino

  • Arduino and LED Bar Display : Circuit Diagram, Code

    Here is a Guide Explaining the Basics, Circuit Diagram, Code on Arduino and LED Bar Display. LED Bar Display is Actually Like Multiple LED.

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Arduino : Turn On Particular Color LED Depending On Light/LDR

    With Arduino We an Turn On Particular Color LED Depending On Light/LDR With Simple Circuit and Easy Code. We Can Create The Same Logic With IC too.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy