• 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

This Article Has Been Shared 781 Times!

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 e-Paper/e-Ink Buying Guide

    Here is Arduino e-Paper/e-Ink Buying Guide. e-Paper Still Costly, Offers Slower Refresh Rate, Yet it is Great For Some Project Where Paper Look Adds Beauty.

  • Digital Coaxial to RCA Converter Buying Guide

    Many of the UHD/4K Smart TVs Lack RCA or 3.5mm or HDMI Stereo Output to Connect With Home Theatre. Here is Digital Coaxial to RCA Converter Buying Guide.

  • ESP WROOM 32 : How To Setup ESP32 NodeMCU With Arduino IDE

    Here is Step by Step Guide to Setup on How to Setup ESP32 NodeMCU with Arduino IDE. We Provided Solutions For the Commonly Faced Problems Too.

  • Base64 Encoding on ESP32 Arduino (Base64 for Images)

    Base64 images are easy to transmit over the network. Here is How to Use Base64 Encoding on ESP32 Arduino. ESP32 lacks sufficient RAM.

  • Contact Bounce of Pushbuttons and Arduino ESP32 Debounce

    No surface is perfectly smooth and inelastic. When two surfaces of pushbutton comes together with any force, there is kinetic energy that makes ringing.

Additionally, 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

  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023
  • Advantages of Cloud Server Over Dedicated Server for Hosting WordPress March 26, 2023
  • Get Audiophile-Grade Music on Your Smartphone March 25, 2023
  • Simple Windows Security and Privacy Checklist for 2023 March 24, 2023
  • 7 Best Artificial Intelligence (AI) Software March 24, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Laser Security System Using ESP32 Arduino," in The Customize Windows, March 9, 2023, March 28, 2023, https://thecustomizewindows.com/2023/03/laser-security-system-using-esp32-arduino/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT