0% found this document useful (0 votes)
31 views78 pages

PR Project Final Report

The Smart Child Safety System project report outlines a comprehensive security solution aimed at enhancing child safety through the integration of RFID access control, surveillance via ESP32-CAM, and real-time alert notifications using GSM and Telegram. The system is designed to prevent unauthorized access, detect forced entries with vibration sensors, and provide immediate alerts to guardians, making it suitable for homes, schools, and daycare centers. The report details the project's objectives, working principles, and the various components utilized to create an effective and cost-efficient safety mechanism.

Uploaded by

vimayuva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views78 pages

PR Project Final Report

The Smart Child Safety System project report outlines a comprehensive security solution aimed at enhancing child safety through the integration of RFID access control, surveillance via ESP32-CAM, and real-time alert notifications using GSM and Telegram. The system is designed to prevent unauthorized access, detect forced entries with vibration sensors, and provide immediate alerts to guardians, making it suitable for homes, schools, and daycare centers. The report details the project's objectives, working principles, and the various components utilized to create an effective and cost-efficient safety mechanism.

Uploaded by

vimayuva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 78

SMART CHILD SAFETY SYSTEM

PROJECT REPORT

Submitted by

PREETHI KALYANI V - 421621105025

RAKSHANA S - 421621105030

In partial fulfillment for the award of the degree

Of

BACHELOR OF ENGINEERING

In

ELECTRICAL AND ELECTRONICS ENGINEERING

MAILAM ENGINEERING COLLEGE, MAILAM

ANNA UNIVERSITY: CHENNAI 600 025

MAY 2025

i
BONAFIDE CERTIFICATE

Certified that this project report “SMART CHILD SAFETY SYSTEM” is the Bonafide

work of “PREETHI KALYANI V, RAKSHANA S’’ who carried out the project work

under my supervision.

SIGNATURE SIGNATURE

Dr.N. MURALI KRISHNAN Dr.A.JERALDINE VIJI


HEAD OF THE DEPARTMENT SUPERVISOR
PROFESSOR PROFESSOR
Electrical and Electronics Engineering Electrical and Electronics Engineering
Mailam Engineering College Mailam Engineering College
Mailam-604 304 Mailam-604 304

Submitted to project work and viva-voce examination held on……………….

INTERNAL EXAMINER EXTERNAL EXAMINER

ii
ACKNOWLEDGEMENT

We take immense pleasure in thanking our honorable Chairman and


Managing Director Shri.M.DHANASEKARAN, our honorable Secretary
Dr.K.NARAYANASAMY and our honorable Treasurer Shri.D.RAJARAJAN
and our honourable Joint Secretary Shri. S. VELAYUDHAM for providing me
with an environment to complete my project successfully.
We wish to express our deep sense of gratitude to our Director
Dr.S.SENTHIL for giving us this opportunity to showcase our technical ability
with this project.
We would like to express our sincere thanks to our Principal
Dr.R.RAJAPPAN for this kind patronage.
We are deeply indebited to our Head of the department
Dr.N.MURALI KRISHNAN for his unwavering support during this entire course
of this project.
It is a great pleasure to express our gratitude and thanks towards our
supervisor Dr.A.JERALDINE VIJI Professor for his uninterruptable suggestions
and words of improvements regarding this project , which played a major role in
guiding us in our track.

Works are inadequate in offering our thanks to all Faculty members


of our department for their constant encouragement and support throughout the
course, especially for the useful suggestions given during the project period.
Finally, I extend my heartfelt gratitude to the Anna
University for their invaluable support and resources, which were instrumental in
the successful completion of this project.

iii
ABSTRACT

This project presents a smart child safety system that integrates door

access control, surveillance, and real-time alert mechanisms to enhance

security in environments where child protection is critical. The system

employs RFID technology to grant access exclusively to authorized

individuals, while unauthorized attempts trigger the ESP32-CAM module

to capture images for identification. A vibration sensor detects forced

entry attempts, providing an additional layer of physical security. Real-

time notifications are sent to guardians or authorities via GSM and

Telegram, ensuring immediate awareness and response to potential threats.

By combining RFID access control, camera monitoring, and instant

communication technologies, the system offers a comprehensive and cost-

effective solution for safeguarding children in homes, schools, and daycare

centers.

iv
திட்டசுருக்கம்

இந்த திட்டம் குழந்தைகளின் பாதுகாப்பை


மேம்படுத்துவதற்காக கதவு அணுகல் கட்டுப்பாடு, கண்காணிப்பு
மற்றும் நேரடி எச்சரிக்கை செயல்பாடுகளை ஒருங்கிணைக்கும் ஒரு
சிறந்த ஸ்மார்ட் பாதுகாப்பு அமைப்பை வழங்குகிறது.
அங்கீகரிக்கப்பட்ட நபர்களுக்கே அணுகலை வழங்க RFID (Radio-
Frequency Identification) தொழில்நுட்பம்
பயன்படுத்தப்படுகிறது. அனுமதியற்ற நபர்கள் அணுக முயற்சித்தால்,
ESP32-CAM மாட்யூல் அவர்களின் புகைப்படங்களை பிடித்து
அடையாளம் காண உதவுகிறது. மேலும், அதிர்வு உணரிப்பான் (Vibration
Sensor) கதவின் மீது வலியுறுத்தலான நுழைவு முயற்சிகளை
கண்டறிகிறது. சந்தேகத்திற்கிடமான நிகழ்வுகளின் போது,
பாதுகாவலர்கள் அல்லது பொறுப்பாளர்களுக்கு GSM மற்றும்
டெலிகிராம் வழியாக நேரடி செய்தி அறிவிப்புகள்
அனுப்பப்படுகின்றன. RFID அடையாளம், கேமரா கண்காணிப்பு மற்றும்
உடனடி தகவல் பரிமாற்றத்தை ஒருங்கிணைக்கும் இந்த அமைப்பு
வீடுகள், பள்ளிகள் மற்றும் குழந்தைகள் இருப்பிடங்களில்
குழந்தைகளின் பாதுகாப்பை உறுதி செய்யும் முழுமையான மற்றும்
செலவில்லா தீர்வாக அமைகிறது.

v
TABLE OF CONTENT

CHAPTER TITLE PAGE

NO ABSTRACT (ENGLISH) iv

ABSTRACT (TAMIL) v

LIST OF FIGURES ix

1. INTRODUCTION

1.1 Background 2

1.2 Objectives 3

2. LITERARY REVIEW

2.1 RFID-Based Access Control 7

2.2 Image-Based Intruder Detection Using ESP32-CAM 8

2.3 GSM-Based Alert Notification 8

2.4 Vibration Sensors for Intrusion Detection 9

2.5 Role of Node MCU and IoT Integration 9

2.6 Summary of Findings 9

vi
3. WORKING AND COMPONENTS

3.1 WORKING PRINCIPLE 10

3.1.1 System Initialization 10

3.1.2 RFID Access Control 10

3.1.3 Image Capture Using ESP32-CAM 11

3.1.4 Vibration Sensor-Based Intrusion Detection 12

3.1.5 GSM-Based Alert Notification 13

3.1.6 Telegram App Integration 13

3.1.7 Reset and Continuous Monitoring 14

3.2 COMPONENTS USED 15

3.2.1 Microcontrollers and Development Boards 16

3.2.2 Sensors and Input Modules 17

3.2.3 Communication Modules 19

3.2.4 Output Devices 20

3.2.5 Supporting Components 22

3.2.6 Software Analysis 23

vii
4. MICROCONTROLLER UNIT

4.1 MICROCONTROLLER 27

4.1.1 ATMEGA 328 Features: 33

4.1.2 ATMEGA328 ARCHITECTURE 34

4.1.3 AT MEGA328 36

4.2 SOURCE CODE: 39

5. PROPOSED SYSTEM

5.1 COMPONENTS 56

5.2 RESULT 58

5.2.1 OVERVIEW 58

5.2.2 FUNCTIONAL TESTING 58

6 CONCLUSION

6.1 CONCLUSION 61

6.2 FUTURE SCOPE 62

REFERENCES 65

APPENDIX 67

viii
LIST OF FIGURES

Fig 1.1: Block Diagram of Overall system 7

Fig 3,2.1 A) ESP32-CAM 16

Fig 3.2.1 B) Node MCU 17

Fig 3.2.2 RFID Reader (RC522) 18

Fig 3.2.3 GSM Module (SIM800L) 20

Fig 3.2.4 A) 16x2 LCD Display 21

Fig 3.2.4 B) Relay Module16 22

Fig 3.2.5 Power Supply Unit 24

Fig 3.2.6 Keil software 27

Fig 4.1.2 ATMEGA328 ARCHITECTURE 36

Fig 4.1.3 ATMEGA328 pin diagram 37

Fig 5.2.2 Images covered(Result) 60

Fig 5.3 Overall view 61

1
CHAPTER 1
INTRODUCTION

1.1 BACKGROUND

Child safety has become one of the most pressing concerns in modern
society. With growing urbanization, increased working parents, and rising incidents
of unauthorized access, abductions, and intrusion, there is an urgent need for
technologically driven solutions that ensure the physical security of children,
especially in unsupervised or semi-supervised environments. Traditional security
measures, such as mechanical locks, CCTV cameras, or security guards, often prove
insufficient due to human error, delayed response, or lack of real-time alerts.
Therefore, there is a growing shift toward intelligent, automated, and cost-effective
safety systems that combine real-time monitoring with access control.

Recent developments in embedded systems, Internet of Things (IoT),


and wireless communication have made it possible to design smart systems that are
not only efficient but also affordable for small-scale applications like homes,
classrooms, and daycare centers. These systems can integrate multiple modules,
including RFID for access authentication, microcontrollers for logic processing,
sensors for threat detection, and GSM or Wi-Fi modules for real-time alerts. One of
the most practical uses of this technology is in child safety systems that prevent
unauthorized individuals from gaining access to areas where children are present.

2
The Smart Child Safety System proposed in this project is designed with
this exact motivation. It aims to overcome the limitations of conventional security
systems by integrating multiple layers of protection — access control through RFID,
real-time image capture via ESP32-CAM, intrusion detection using vibration sensors,
and alert delivery through GSM and Telegram. These technologies, when properly
integrated, can deliver a seamless and reliable security experience with minimal
manual intervention.
The background research and motivation behind this project are
grounded in real-life needs and emerging security trends, making this system not
just a prototype, but a potential solution to an ongoing societal challenge. By
utilizing open-source hardware and software, this system also encourages further
academic research, customization, and deployment in a variety of safety-critical
settings.

1.2 OBJECTIVES

The primary objective of this project is to design and implement a


comprehensive embedded system-based solution for enhancing child safety in
indoor environments. With increasing concerns about child abduction, unauthorized
access, and negligent supervision in schools, hostels, and homes, the project aims to
develop a smart and integrated safety system that can offer real-time monitoring,
access control, and alerting features using affordable and reliable electronic
components.
3
At the heart of the proposed system is the use of RFID (Radio Frequency
Identification) technology to permit entry only to individuals possessing authorized
ID tags. This ensures that only registered users, such as parents or school staff, are
allowed access to restricted zones like classrooms or dormitories. Unauthorized
access attempts trigger the ESP32-CAM module, which immediately captures and
stores an image of the intruder. This image, along with the alert message, is
transmitted to guardians or administrators through both GSM SMS and Telegram
messages, ensuring rapid notification across both mobile and internet platforms.
The system also includes a vibration sensor to detect physical tampering or forced
entry. If a door is struck or broken into, the sensor activates, and the system triggers
an emergency response by sounding a local buzzer, capturing visual evidence
through the camera, and notifying concerned authorities. This feature significantly
enhances protection during off-hours or in areas with low supervision.

One of the core goals is to develop a standalone embedded solution that


is low-cost, energy-efficient, and modular. This ensures that the system can be
installed in a wide range of settings without requiring constant maintenance or
complex configurations. The hardware design leverages open-source
microcontrollers like ESP32 and NodeMCU, which offer wireless capabilities and
strong community support for future scalability. The software is developed using
the Arduino IDE, enabling easy customization and adaptability to future
enhancements, such as the integration of GPS tracking, face recognition, or mobile
app controls.

4
Additionally, the system is equipped with a local LCD display to provide
basic feedback such as access success, alerts, or system status. This makes the
system intuitive for users while offering real-time operational visibility. UART
communication protocols are employed to ensure smooth data exchange between
various modules like the camera, GSM modem, and RFID reader.

The project further aims to document access activity, maintain logs of all RFID tag
usage, and provide timestamped records of intrusion attempts. These logs can be
useful for post-incident analysis or for tracking attendance in educational
institutions. As part of future work, the project is envisioned to be expandable with
cloud-based dashboards, remote camera access, and voice-activated alerts for
enhanced user experience and centralized monitoring.

Overall, the Smart Child Safety System is designed to be a multi-layered,


intelligent security mechanism that ensures only authorized access, captures
evidence of suspicious activity, detects potential threats, and immediately informs
relevant parties. It demonstrates the use of embedded systems not just for
automation but as a meaningful response to real-world safety concerns, offering
protection for one of the most vulnerable sections of society—children.

5
Fig 1.1: Block Diagram of Overall system
6
CHAPTER 2
LITERATURE REVIEW

Child safety is a critical issue in modern society, especially in environments such as


homes, schools, and childcare facilities. The increasing number of cases involving
child abduction and unauthorized access highlights the need for intelligent safety
solutions. In recent years, the development of embedded systems and IoT (Internet
of Things) technologies has paved the way for the design of efficient, cost-effective,
and real-time safety mechanisms.

The proposed “Smart Child Safety System” integrates various hardware


and communication components to provide access control, real-time monitoring,
and alert notification. This chapter reviews relevant literature, existing technologies,
and component capabilities that support the implementation of this system.

2.1 RFID-Based Access Control

Radio Frequency Identification (RFID) is a widely adopted technology used for


authentication and access management. Studies have shown that RFID-based door
control systems are reliable and cost-effective in providing authorized access in
educational institutions and residential buildings. Here, the RC522 RFID module is
used to read unique tags. Authorized tags allow entry, while unauthorized attempts
trigger alerts and camera capture functions.Previous implementations such as smart
attendance systems and secure lab access have shown high success rates using RFID
due to its non-contact authentication capability, low power consumption, and easy
integration with microcontrollers.

7
2.2 Image-Based Intruder Detection Using ESP32-CAM

Visual surveillance systems are essential for identifying


unauthorized access. Traditional CCTV systems require manual monitoring. The
ESP32-CAM module improves on this by allowing programmatic image capture
and Wi-Fi transmission. Research in low-cost IoT surveillance has proven the
ESP32-CAM’s effectiveness for real-time image capture in smart security systems.

This module includes an onboard OV2640 camera and is capable


of capturing and transmitting images upon trigger events. In the proposed system,
when a person without an authorized RFID tag attempts access, the ESP32-CAM
captures an image and stores/transmits it for review.

2.3 GSM-Based Alert Notification

Several research efforts highlight the importance of real-time


communication in safety systems. GSM modules like SIM800L are widely used for
sending SMS alerts upon detecting abnormal events. In this system, the GSM
modem sends immediate notifications to predefined numbers when forced access or
unauthorized activity is detected.

The literature suggests that GSM technology is reliable for areas without
Wi-Fi connectivity and provides direct SMS-based communication, which is
particularly useful in emergency scenarios.

8
2.4 Vibration Sensors for Intrusion Detection

Vibration sensors are commonly used in physical intrusion


detection systems. When integrated with microcontrollers, they can detect unusual
movement or force applied to doors or windows. The proposed system uses a
vibration sensor to detect forced entries. When vibrations beyond a certain threshold
are detected, it is considered an unauthorized attempt.

Researchers have implemented vibration-based sensing in automated bank


lockers, secure doors, and earthquake alert systems. This validates the sensor’s
capability to detect physical tampering or unauthorized access effectively.

2.5 Role of NodeMCU and IoT Integration


NodeMCU (ESP8266) is a widely used development board for IoT
applications due to its built-in Wi-Fi support and programmable GPIO pins.
Previous systems have used NodeMCU to create smart home and security
applications. It plays a crucial role in this project by enabling wireless
communication between components and platforms like Telegram.

Integration with the Telegram app provides a cloud-based alert system, making it
easier for users to receive real-time notifications on smartphones—an improvement
over SMS-only systems.

2.6 Summary of Findings

From the literature reviewed, it is evident that a combination of RFID


access, image-based detection, GSM/IoT alerts, and vibration sensing creates a
robust safety solution. The technologies selected for the proposed Smart Child
Safety System are validated through previous implementations and research studies.

9
CHAPTER 3
WORKING AND COMPONENTS

3.1 WORKING PRINCIPLE

The Smart Child Safety System is designed to provide an intelligent and automated
method to restrict unauthorized access and ensure real-time monitoring for
enhanced child security. This system combines RFID-based entry control, ESP32-
CAM-based image surveillance, vibration detection, and dual-mode alert
communication (GSM and Telegram). The primary controller units—ESP32-CAM
and NodeMCU—coordinate multiple input/output modules to function collectively
as a safety network.The following sub-sections explain the complete working
mechanism in detail:

3.1.1 System Initialization

Once powered, the microcontrollers (ESP32 and NodeMCU) initialize all


peripherals including the RFID reader, GSM module, LCD, vibration sensor, relay
driver, and camera. A welcome message or “System Ready” message is displayed
on the 16x2 LCD to indicate that the system has entered standby mode and is
awaiting user interaction. All modules begin operating in loop mode, continuously
monitoring inputs

3.1.2 RFID Access Control

 The RC522 RFID module scans for nearby RFID tags.

When a user places a tag near the reader:


10
 The tag’s unique identification number (UID) is read and sent to the
NodeMCU.
 The UID is then verified against a pre-loaded list of authorized UIDs.

If the tag is recognized:

 A signal is sent to the relay driver to unlock the electronic lock or door.
 A success message such as “Access Granted” or the tag owner’s name is
shown on the LCD.

If the tag is not recognized:

 No unlocking is performed.

 A message like “Access Denied” is shown.

 The system proceeds to activate additional surveillance and alert functions.

 This ensures that only registered users can gain access, thereby restricting
entry to unauthorized persons.

3.1.3 Image Capture Using ESP32-CAM

When an unauthorized tag is detected or when access is


denied, the ESP32-CAM module is activated:
 The camera module captures a high-resolution image of the person attempting
access.
 The image can be stored in onboard memory or transmitted over Wi-Fi
depending on system configuration.
11
 In some implementations, the captured image is forwarded to a Telegram
account using the Telegram Bot API.

 This visual record provides post-event identification of intruders or unknown


individuals.
 The ESP32-CAM’s onboard processing and wireless features make it ideal for
small-scale surveillance integration.

3.1.4 Vibration Sensor-Based Intrusion Detection

To address forced entry scenarios, a digital vibration sensor is attached near the
door or lock mechanism. It detects unusual movement or tampering, such as hitting,
shaking, or forced turning.

 If abnormal vibration is detected, the sensor sends a HIGH digital signal to the
NodeMCU.

 This input is treated as a critical event.

 Immediately, the system activates the ESP32-CAM to capture an image and


proceeds to send alerts.

 This feature works even if no RFID attempt was made, ensuring passive
security.

 This provides another layer of protection against physical break-in attempts or


tampering.

12
3.1.5 GSM-Based Alert Notification

The SIM800L GSM module is configured with AT commands via serial


communication (UART). During an alert scenario (either unauthorized tag or
vibration detection):

 The system prepares a pre-defined SMS message.

 The GSM module sends the alert message to a stored mobile number.

 The message includes time-stamped information and context (e.g.,


“Unauthorized Access Attempt Detected”).

 This alert mechanism works without Wi-Fi or internet and is highly reliable
for remote notifications.

3.1.6 Telegram App Integration

In addition to SMS alerts, the system uses Telegram for sending real-time push
notifications and media (images). The benefits of using Telegram include:

 Faster internet-based delivery

 Ability to send images directly from ESP32-CAM. User-friendly interface for


parents or administrators

 The Telegram Bot API is configured with a bot token and chat ID. Once the
bot is triggered, it sends the text message along with an image (if available) to
the user’s Telegram app.
 This dual-layer alert system ensures that at least one method will reach the
concerned person, regardless of GSM or internet availability.
13
3.1.7 Reset and Continuous Monitoring

After any event—authorized entry, unauthorized tag scan, or intrusion—the system


resets its logic to standby mode. All modules resume monitoring without requiring a
manual restart. This allows the system to run continuously with minimal human
intervention.The modular design ensures scalability and allows additional features
to be integrated in the future, such as GPS tracking, face recognition, or mobile app
control.

14
3.2 COMPONENTS USED

The Smart Child Safety System utilizes various embedded and communication
modules to perform secure authentication, real-time image capturing, vibration
detection, and instant alert notifications. Each component plays a key role in
ensuring the system functions accurately and efficiently.

The components are categorized into Microcontrollers, Sensors, Communication


Modules, Output Devices, and Supporting Components.

3.2.1 Microcontrollers and Development Boards

1. ESP32-CAM

Fig 3,2.1 A) ESP32-CAM


15
The ESP32-CAM is an ESP32-based microcontroller with a built-in OV2640
camera and Wi-Fi/Bluetooth capabilities. It is used in this project for capturing real-
time images of unauthorized users. It supports multiple GPIO pins and can handle
wireless transmission of captured data. Its compact form and integrated camera
make it ideal for surveillance-based embedded applications.

Technical Specifications:

 Microcontroller: ESP32-D0WD
 Camera: OV2640 with 2MP resolution
 Connectivity: Wi-Fi 802.11 b/g/n, Bluetooth 4.2
 Features: MicroSD card slot, 12 GPIO pins, UART/SPI/I2C/PWM

2. NodeMCU (ESP8266)

Fig 3.2.1 B) Node MCU

16
NodeMCU is a low-cost open-source IoT platform that includes firmware running
on the ESP8266 Wi-Fi SoC. It controls the RFID reader, relay, and GSM modules.
Its built-in Wi-Fi and GPIO access make it suitable for IoT-based embedded
solutions like this safety system

Features:

 Operating Voltage: 3.3V

 Flash Memory: 4 MB

 GPIO: 11 digital I/O pins

 Communication: UART, SPI, I²C

 Programming Platform: Arduino IDE

3.2.2 Sensors and Input Modules

1. RFID Reader (RC522)

Fig 3.2.2

17
The RC522 is a 13.56 MHz RFID module that reads passive RFID tags. It supports
SPI communication and allows the system to detect and verify authorized users. It
plays a crucial role in the access control mechanism of the project.

Key Features:

 Frequency: 13.56 MHz

 Operating Voltage: 3.3V

 Interface: SPI, UART, I²C

 Range: 3–5 cm
 Baud Rate: 106 kbps

2. RFID Tags

These are passive tags containing a unique UID used for authentication. When
placed near the RFID reader, the tag is read, and the UID is checked for
authorization.

3. Vibration Sensor

The vibration sensor is used to detect physical force or tampering. When mounted
near the door, any forceful activity like knocking or breaking triggers a HIGH signal
to the NodeMCU, which initiates alerts.

Features:

 Digital Output

 Built-in potentiometer for sensitivity adjustment

 Instant triggering on vibration/tampering

18
 Suitable for intrusion detection

3.2.3 Communication Modules

1. GSM Module (SIM800L)

The SIM800L is a GSM module that allows sending and receiving SMS using AT
commands. It is used in this project to alert parents or guardians during
unauthorized access or tampering.

Fig 3.2.3
19
Key Specifications:

 Frequency: GSM 850/900/1800/1900 MHz

 Voltage: 3.7V–4.2V

 Communication: UART

 SIM support: Micro SIM

 Features: SMS, voice call, GPRS

2. Telegram Bot Integration

Using Telegram’s Bot API, the system sends push notifications over Wi-Fi. Images
captured by ESP32-CAM are transmitted using HTTPS POST requests to a specific
chat ID. This ensures real-time updates via a smartphone.

Advantages:

 Works over the internet

 Supports media files (images, documents)

 Reliable and fast alerting platform

3.2.4 Output Devices

1. 16x2 LCD Display

Fig 3.2.4 A)

A 16-character, 2-line alphanumeric LCD is used to display system states such as


20
“Access Granted”, “Access Denied”, or “System Ready”. It provides real-time user
feedback during operations.

Specifications:

 Display: 16 characters × 2 lines

 Interface: Parallel (4-bit/8-bit)

 Backlight: LED
 Controller: HD44780

2. Relay Module

Fig 3.2.4 B)

The relay module acts as a digital switch to control the door lock based on RFID

21
authentication. A signal from NodeMCU triggers the relay to open the door if
access is granted.

Features:

 Type: Electromechanical relay

 Operating Voltage: 5V

 Load Current: Up to 10A at 250V AC or 30V DC

 Trigger: Active LOW/Active HIGH

3.2.5 Supporting Components

1. MAX232 IC

MAX232 is used for voltage level shifting between TTL (Transistor-Transistor


Logic) and RS232 signal levels. It enables UART communication between the GSM
module and the NodeMCU, as GSM operates on RS232 standard voltages.

Features:

 Dual driver/receiver

 Supports baud rates up to 120 kbps

 Converts TTL to RS232 and vice versa

22
2. Power Supply Unit

Fig 3.2.5

A regulated DC power supply unit is used to provide consistent voltage to


microcontrollers and modules. It ensures stable 5V and 3.3V outputs for the various
hardware components.

Specifications:

 Input: 230V AC

 Output: 5V/3.3V DC

 Current Rating: 1A–2A (based on modules)


 Type: Buck Converter/LM7805 based circuit

3.2.6 Software Analysis

Compilers are programs used to convert a High Level Language to object


code. Desktop compilers produce an output object code for the underlying
microprocessor, but not for other microprocessors. I.E the programs written in one
of the HLL like ‘C’ will compile the code to run on the system for a particular
processor like x86 (underlying microprocessor in the computer). For example,
compilers for Dos platform is different from the Compilers for Unix platform. So if
23
one wants to define a compiler then compiler is a program that translates source
code into object code. The compiler derives its name from the way it works, looking
at the entire piece of source code and collecting and reorganizing
the instruction. See there is a bit little difference between compiler and
an interpreter. Interpreter just interprets whole program at a time while compiler
analyzes and execute each line of source code in succession, without looking at the
entire program.

The advantage of interpreters is that they can execute a program immediately.


Secondly programs produced by compilers run much faster than the same programs
executed by an interpreter. However, compilers require some time before an
executable program emerges. Now as compilers translate source code into object
code, which is unique for each type of computer, many compilers are available for
the same language

KEIL C COMPILER:

Keil is a German based Software development company. It provides several


development tools like:

 IDE (Integrated Development environment)


 Project Manager
 Simulator
 Debugger
 C Cross Compiler , Cross Assembler, Locator/Linker

24
Keil Software provides you with software development tools for the 8051 family
of microcontrollers. With these tools, you can generate embedded applications for the
multitude of 8051 derivatives. Keil provides following tools for 8051 development
 C51 Optimizing C Cross Compiler,
 A51 Macro Assembler,
 8051 Utilities (linker, object file converter, library manager),
 Source-Level Debugger/Simulator,
 Vision for Windows Integrated Development Environment.
 Nine basic data types, including 32-bit IEEE floating-point,
 Flexible variable allocation with bit, data, bdata, idata, xdata, and data memory
 Interrupt functions may be written in C
 Full use of the 8051 register banks
 Complete symbol and type information for source-level debugging,
 Use of AJMP and ACALL instructions
 Bit-addressable data objects
 Built-in interface for the RTX51 Real-Time Kernel
 Support for dual data pointers on Atmel, AMD, Cypress, Dallas Semiconductor,
Infineon, Philips, and Triscend microcontrollers,
 Support for the Philips 8xC750, 8xC751, and 8xC752 limited instruction sets,
 Support for the Infineon 80C517 arithmetic

Working with Keil:


To open Keil software click on start menu then program and then select keil2
following window will appear on your screen

25
Fig 3.2.6

26
CHAPTER 4

MICROCONTROLLER UNIT

4.1 MICROCONTROLLER

The Arduino Uno is a microcontroller board based on the ATmega328


(datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM
outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power
jack, an ICSP header, and a reset button. It contains everything needed to support
the microcontroller; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started.

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-
serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version
R2) programmed as a USB-to-serial converter. Revision 2 of the Uno board has a
resistor pulling the 8U2 HWB line to ground, making it easier to put into DFU
mode.

Revision 3 of the board has the following new features:

Pinout: added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the
voltage provided from the board. In future, shields will be compatible both with the
board that use the AVR, which operate with 5V and with the Arduino Due that
operate with 3.3V. The second one is a not connected pin, that is reserved for future
purposes.

27
 Stronger RESET circuit.

 Atmega 16U2 replace the 8U2.

"Uno" means one in Italian and is named to mark the upcoming release of Arduino
1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving
forward. The Uno is the latest in a series of USB Arduino boards, and the reference
model for the Arduino platform; for a comparison with previous versions, see the
index of Arduino boards

Power

The Arduino Uno can be powered via the USB connection or with an external
power supply. The power source is selected automatically. External (non-USB)
power can come either from an AC-to-DC adapter (wall-wart) or battery. The
adapter can be connected by plugging a 2.1mm center-positive plug into the board's
power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of
the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less
than 7V, however, the 5V pin may supply less than five volts and the board may be
unstable. If using more than 12V, the voltage regulator may overheat and damage
the board. The recommended range is 7 to 12 volts. The power pins are as follows:

 VIN. The input voltage to the Arduino board when it's using an external
power source (as opposed to 5 volts from the USB connection or other
regulated power source). You can supply voltage through this pin, or, if
supplying voltage via the power jack, access it through this pin.

 5V.This pin outputs a regulated 5V from the regulator on the board. The
28
board can be supplied with power either from the DC power jack (7 - 12V),
the USB connector (5V), or the VIN pin of the board (7-12V). Supplying
voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your
board. We don't advise it.

 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum


current draw is 50 mA.
 GND. Ground pins.
Memory

The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB
of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM
library).

Input and Output

Each of the 14 digital pins on the Uno can be used as an input or output, using pin
Mode (), digital Write(), and digital Read() functions. They operate at 5 volts. Each
pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor
(disconnected by default) of 20-50 ohms. In addition, some pins have specialized
functions:

 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial
data. These pins are connected to the corresponding pins of the ATmega8U2
USB-to-TTL Serial chip.

 External Interrupts: 2 and 3. These pins can be configured to trigger an


interrupt on a low value, a rising or falling edge, or a change in value. See the
attachInterrupt() function for details.

 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the
29
analogWrite() function.

 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI


communication using the SPI library.

 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits
of resolution (i.e. 1024 different values). By default they measure from ground to 5
volts, though is it possible to change the upper end of their range using the AREF
pin and the analog Reference() function. Additionally, some pins have specialized
functionality:

 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using
the Wire library.

There are a couple of other pins on the board:

 AREF. Reference voltage for the analog inputs. Used with analogReference().

 Reset. Bring this line LOW to reset the microcontroller. Typically used to add
a reset button to shields which block the one on the board.

See also the mapping between Arduino pins and ATmega328 ports. The mapping
for the Atmega8, 168, and 328 is identical.

Communication

The Arduino Uno has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega328 provides UART TTL
(5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX).
An ATmega16U2 on the board channels this serial communication over USB and
appears as a virtual com port to software on the computer. The '16U2 firmware uses
30
the standard USB COM drivers, and no external driver is needed. However, on
Windows, a .inf file is required. The Arduino software includes a serial monitor
which allows simple textual data to be sent to and from the Arduino board. The RX
and TX LEDs on the board will flash when data is being transmitted via the USB-
to-serial chip and USB connection to the computer (but not for serial
communication on pins 0 and 1). A Software Serial library allows for serial
communication on any of the Uno's digital pins.

The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino
software includes a Wire library to simplify use of the I2C bus; see the
documentation for details. For SPI communication, use the SPI library.

Programming

The Arduino Uno can be programmed with the Arduino software (download).
Select "Arduino Uno from the Tools > Board menu (according to the
microcontroller on your board). For details, see the reference and tutorials. The
ATmega328 on the Arduino Uno comes preburned with a bootloader that allows
you to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol (reference, C header files).

You can also bypass the bootloader and program the microcontroller through the
ICSP (In-Circuit Serial Programming) header; see these instructions for details. The
ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is
available. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be
activated by:

 On Rev1 boards: connecting the solder jumper on the back of the board (near

31
the map of Italy) and then resetting the 8U2.

 On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB
line to ground, making it easier to put into DFU mode.

You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac
OS X and Linux) to load a new firmware. Or you can use the ISP header with an
external programmer (overwriting the DFU bootloader).

USB Overcurrent Protection

The Arduino Uno has a resettable polyfuse that protects your computer's USB ports
from shorts and overcurrent. Although most computers provide their own internal
protection, the fuse provides an extra layer of protection. If more than 500 mA is
applied to the USB port, the fuse will automatically break the connection until the
short or overload is removed.

Physical Characteristics

The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively,
with the USB connector and power jack extending beyond the former dimension.
Four screw holes allow the board to be attached to a surface or case. Note that the
distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the
100 mil spacing of the other pins.

32
4.1.1 ATMEGA 328 Features:

Features

 High Performance, Low Power AVR

 8-Bit Microcontroller

 Advanced RISC Architecture

 131 Powerful Instructions – Most Single Clock Cycle Execution

 32 x 8 General Purpose Working Registers

 Fully Static Operation

 Up to 20 MIPS Throughput at 20 MHz

 On-chip 2-cycle Multiplier

 High Endurance Non-volatile Memory Segments

 4/8/16/32K Bytes of In-System Self-Programmable Flash progam memory

 Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

 Data retention: 20 years at 85°C/100 years at 25°C

 Optional Boot Code Section with Independent Lock Bits In System


Programming by On-chip Boot Program True Read While-Write Operation

 Programming Lock for Software Security

33
Peripheral Features

 Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode

 One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and


Capture Mode

 Real Time Counter with Separate Oscillator

 Six PWM Channels

 8-channel 10-bit ADC in TQFP and QFN/MLF package

 Temperature Measurement

 -channel 10-bit ADC in PDIP Package

 Programmable Serial USART

 Master/Slave SPI Serial Interface

 Byte-oriented 2-wire Serial Interface

 Programmable Watchdog Timer with Separate On-chip Oscillator

 On-chip Analog Comparator

 Interrupt and Wake-up on Pin Change

4.1.2 ATMEGA328 ARCHITECTURE

The architecture of the ATMEGA328 is as below:

34
Fig 4.1.2

35
4.1.3 AT MEGA328

Fig 4.1.3 ATMEGA328 pin diagram

Pin Descriptions
 VCC Digital supply voltage.
 GND Ground.
36
Port B (PB7:0)

Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port B output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port B pins that are externally
pulled low will source current if the pull-up resistors are activated. The Port B pins
are tri-stated when a reset condition becomes active, even if the clock is not
running.Depending on the clock selection fuse settings, PB6 can be used as input to
the inverting Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the
inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as
chip clock source, PB7.6 is used as TOSC2.1 input for the Asynchronous
Timer/Counter2 if the AS2 bit in ASSR is set.

Port C (PC5:0)

Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The PC5..0 output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port C pins that are externally
pulled low will source current if the pull-up Resistors are activated. The Port C pins
are tri-stated when a reset condition becomes active, even if the clock is not
running.

PC6/RESET

If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the
electrical characteristics of PC6 differ from those of the other pins of Port C.If the
RSTDISBL Fuse is programmed, PC6 is used as a Reset input. A low level on this
pin for longer than the minimum pulse length will generate a Reset, even if the
clock is not running. Shorter pulses are not guaranteed to generate a Reset.
37
Port D (PD7:0)

Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port D output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port D pins that are externally
pulled low will source current if the pull-up resistors are activated. The Port D pins
are tri-stated when a reset condition becomes active, even if the clock is not
running.

AVCC

AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It
should be externally connected to VCC, even if the ADC is not used. If the ADC is
used, it should be connected to VCC through a low-pass filter. Note that PC6..4 use
digital supply voltage, VCC.

AREF

AREF is the analog reference pin for the A/D Converter.1.1.9 ADC7:6 (TQFP and
QFN/MLF Package Only)In the TQFP and QFN/MLF package, ADC7:6 serve as
analog inputs to the A/D converter. These pins are powered from the analog supply
and serve as 10-bit ADC channels

38
4.2 SOURCE CODE:

To configure the ATmega328P for UART communication with the GSM module,
the following initialization code is used:

#include <Arduino.h>

#include <WiFi.h>

#include <WiFiClientSecure.h>

#include "soc/soc.h"

#include "soc/rtc_cntl_reg.h"

#include "esp_camera.h"

#include <UniversalTelegramBot.h>

#include <ArduinoJson.h>

int ir = 12;

const char* ssid = "try_wifi";

const char* password = "12345678";

39
// Initialize Telegram BOT

String BOTtoken "7611065253:AAGKwPL5_rrlQxPm7QzYMgR9MLrxwbHkugE";

// your Bot Token (Get from Botfather)

//String BOTtoken = "7702894644:AAHPx5eDUgf4AuCQivE-YOa-2v4n214wqEo";

// your Bot Token (Get from Botfather)

// Use @myidbot to find out the chat ID of an individual or a group

// Also note that you need to click "start" on a bot before it can

// message you

//5241593624

String CHAT_ID = "5241593624";

//String CHAT_ID = "6578417473";

bool sendPhoto = false;

WiFiClientSecure clientTCP;

UniversalTelegramBot bot(BOTtoken, clientTCP);

40
#define FLASH_LED_PIN 4

bool flashState = LOW;

//Checks for new messages every 1 second.

int botRequestDelay = 1000;

unsigned long lastTimeBotRan;

//CAMERA_MODEL_AI_THINKER

#define PWDN_GPIO_NUM 32

#define RESET_GPIO_NUM -1

#define XCLK_GPIO_NUM 0

#define SIOD_GPIO_NUM 26

#define SIOC_GPIO_NUM 27

#define Y9_GPIO_NUM 35

#define Y8_GPIO_NUM 34

#define Y7_GPIO_NUM 39

#define Y6_GPIO_NUM 36
41
#define Y5_GPIO_NUM 21

#define Y4_GPIO_NUM 19

#define Y3_GPIO_NUM 18

#define Y2_GPIO_NUM 5

#define VSYNC_GPIO_NUM 25

#define HREF_GPIO_NUM 23

#define PCLK_GPIO_NUM 22

void configInitCamera()

camera_config_t config;

config.ledc_channel = LEDC_CHANNEL_0;

config.ledc_timer = LEDC_TIMER_0;

config.pin_d0 = Y2_GPIO_NUM;

config.pin_d1 = Y3_GPIO_NUM;

config.pin_d2 = Y4_GPIO_NUM;

config.pin_d3 = Y5_GPIO_NUM;
42
config.pin_d4 = Y6_GPIO_NUM;

config.pin_d5 = Y7_GPIO_NUM;

config.pin_d6 = Y8_GPIO_NUM;

config.pin_d7 = Y9_GPIO_NUM;

config.pin_xclk = XCLK_GPIO_NUM;

config.pin_pclk = PCLK_GPIO_NUM;

config.pin_vsync = VSYNC_GPIO_NUM;

config.pin_href = HREF_GPIO_NUM;

config.pin_sccb_sda = SIOD_GPIO_NUM;

config.pin_sccb_scl = SIOC_GPIO_NUM;

config.pin_pwdn = PWDN_GPIO_NUM;

config.pin_reset = RESET_GPIO_NUM;

config.xclk_freq_hz = 20000000;

config.pixel_format = PIXFORMAT_JPEG;

config.grab_mode = CAMERA_GRAB_LATEST;

//init with high specs to pre-allocate larger buffers

if (psramFound())
43
{

config.frame_size = FRAMESIZE_UXGA;

config.jpeg_quality = 10; //0-63 lower number means higher quality

config.fb_count = 1;

else

config.frame_size = FRAMESIZE_SVGA;

config.jpeg_quality = 12; //0-63 lower number means higher quality

config.fb_count = 1;

// camera init

esp_err_t err = esp_camera_init(&config);

if (err != ESP_OK)

Serial.printf("Camera init failed with error 0x%x", err);

delay(1000);
44
ESP.restart();

void handleNewMessages(int numNewMessages)

Serial.print("Handle New Messages: ");

Serial.println(numNewMessages);

for (int i = 0; i < numNewMessages; i++)

String chat_id = String(bot.messages[i].chat_id);

if (chat_id != CHAT_ID)

bot.sendMessage(chat_id, "Unauthorized user", "");

continue;

45
// Print the received message

String text = bot.messages[i].text;

Serial.println(text);

String from_name = bot.messages[i].from_name;

if (text == "/start")

String welcome = "Welcome , " + from_name + "\n";

welcome += "Use the following commands to interact with the ESP32-CAM \


n";

welcome += "/photo : takes a new photo\n";

welcome += "/flash : toggles flash LED \n";

bot.sendMessage(CHAT_ID, welcome, "");

if (text == "/flash")

flashState = !flashState;

digitalWrite(FLASH_LED_PIN, flashState);

46
Serial.println("Change flash LED state");

if (text == "/photo")

sendPhoto = true;

Serial.println("New photo request");

String sendPhotoTelegram()

const char* myDomain = "api.telegram.org";

String getAll = "";

String getBody = "";

//Dispose first picture because of bad quality

camera_fb_t * fb = NULL;
47
fb = esp_camera_fb_get();

esp_camera_fb_return(fb); // dispose the buffered image

// Take a new photo

fb = NULL;

fb = esp_camera_fb_get();

if (!fb)

Serial.println("Camera capture failed");

delay(1000);

ESP.restart();

return "Camera capture failed";

Serial.println("Connect to " + String(myDomain));

if (clientTCP.connect(myDomain, 443))

Serial.println("Connection successful");
48
String head = "--RandomNerdTutorials\r\nContent-Disposition: form-data;
name=\"chat_id\";

\r\n\r\n" + CHAT_ID + "\r\n--RandomNerdTutorials\r\nContent-Disposition: form-


data;

name=\"photo\"; filename=\"esp32-cam.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n";

String tail = "\r\n--RandomNerdTutorials--\r\n";

size_t imageLen = fb->len;

size_t extraLen = head.length() + tail.length();

size_t totalLen = imageLen + extraLen;

clientTCP.println("POST /bot" + BOTtoken + "/sendPhoto HTTP/1.1");

clientTCP.println("Host: " + String(myDomain));

clientTCP.println("Content-Length: " + String(totalLen));

clientTCP.println("Content-Type: multipart/form-data;
boundary=RandomNerdTutorials");

clientTCP.println();

clientTCP.print(head);
49
uint8_t *fbBuf = fb->buf;

size_t fbLen = fb->len;

for (size_t n = 0; n < fbLen; n = n + 1024) {

if (n + 1024 < fbLen) {

clientTCP.write(fbBuf, 1024);

fbBuf += 1024;

else if (fbLen % 1024 > 0)

size_t remainder = fbLen % 1024;

clientTCP.write(fbBuf, remainder);

clientTCP.print(tail);

esp_camera_fb_return(fb);
50
int waitTime = 10000; // timeout 10 seconds

long startTimer = millis();

boolean state = false;

while ((startTimer + waitTime) > millis())

Serial.print(".");

delay(100);

while (clientTCP.available())

char c = clientTCP.read();

if (state == true) getBody += String(c);

if (c == '\n')

if (getAll.length() == 0) state = true;

getAll = "";

}
51
else if (c != '\r')

getAll += String(c);

startTimer = millis();

if (getBody.length() > 0) break;

clientTCP.stop();

Serial.println(getBody);

else

getBody = "Connected to api.telegram.org failed.";

Serial.println("Connected to api.telegram.org failed.");

return getBody;

52
void setup()

WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);

// Init Serial Monitor

Serial.begin(115200);

// Set LED Flash as output

pinMode(FLASH_LED_PIN, OUTPUT);

pinMode(ir, INPUT);

digitalWrite(FLASH_LED_PIN, flashState);

// Config and init the camera

configInitCamera();

// Connect to Wi-Fi

WiFi.mode(WIFI_STA);

Serial.println();

Serial.print("Connecting to ");
53
Serial.println(ssid);

WiFi.begin(ssid, password);

clientTCP.setCACert(TELEGRAM_CERTIFICATE_ROOT);

// Add root certificate for api.telegram.org

while (WiFi.status() != WL_CONNECTED)

Serial.print(".");

delay(500);

Serial.println();

Serial.print("ESP32-CAM IP Address: ");

Serial.println(WiFi.localIP());

void loop()

if (digitalRead(ir) == 0) // if (sendPhoto)

{
54
Serial.println("Preparing photo");

sendPhotoTelegram();

sendPhoto = false;

if (millis() > lastTimeBotRan + botRequestDelay)

int numNewMessages = bot.getUpdates(bot.last_message_received + 1);

while (numNewMessages)

Serial.println("got response");

handleNewMessages(numNewMessages);

numNewMessages = bot.getUpdates(bot.last_message_received + 1);

lastTimeBotRan = millis();

55
CHAPTER – 5

PROPOSED SYSTEM

5.1 COMPONENTS

The Components of the tricycle for the disability persons are:-

 Node MCU ESP82661  (Wi-Fi-enabled microcontroller for controlling


RFID, GSM, relay, etc)

 ESP32-CAM Module  (Microcontroller with built-in camera for image


capture)

 RFID Reader (RC522)  (13.56 MHz RFID reader for access


authentication)

 RFID Tags (UID Cards/Keyfobs)  (Passive RFID cards used for


authorized access)

 GSM Module (SIM800L)  (Sends SMS alerts to predefined numbers)

 Vibration Sensor Module  (Detects physical shocks or forced entry


attempt)

56
 Relay Module (5V)  (Controls electric lock based on authentication)

 MAX232 IC  (TTL to RS232 level converter for GSM UART


communication)

 Power Supply Module (5V/3.3V)  (Provides regulated power to


microcontrollers and peripherals)

 Jumper Wires  (For connections between components)

 Breadboard / PCB  (For prototyping circuit connections)

 DC Door Lock (optional)  (Acts as an actuator for locking/unlocking


based on relay trigger)

 Arduino IDE (Software  (Programming environment for NodeMCU and


ESP32)

 Telegram App / Bot (Cloud)  (Used for push notifications with captured
images)

57
5.2 RESULT

5.2.1 OVERVIEW

The Smart Child Safety System was successfully developed, implemented, and
tested in a controlled environment. The system integrates RFID-based access
control, vibration-based intrusion detection, ESP32-CAM-based surveillance, and
real-time alert notifications via GSM and Telegram. The coordinated functioning of
hardware and software modules resulted in accurate, fast, and reliable child safety
monitoring.

The system demonstrated effective identification of authorized and unauthorized


users, captured images of potential intruders, and issued timely alerts to guardians
or administrators.

5.2.2 FUNCTIONAL TESTING

The system was tested in multiple scenarios to evaluate performance, reliability, and
responsiveness.

 Authorized RFID tag presented Access granted, relay activated, LCD


displays message Pass

 Unauthorized RFID tag Door remains locked, image captured, alert

58
IMAGES COVERED:

Fig 5.2.2

59
Fig 5.3

60
CHAPTER – 6

6.1 CONCLUSION

The primary objective of this project—designing and implementing a Smart Child


Safety System—has been successfully achieved. The system effectively integrates
access control, real-time surveillance, intrusion detection, and dual-mode alert
communication using embedded technologies. Through the combination of RFID-
based authentication, vibration sensing, camera-based monitoring (ESP32-CAM),
and GSM/Telegram notifications, the system provides a secure, intelligent, and
responsive safety mechanism for children in homes, hostels, or schools.

The Node MCU microcontroller handled access validation, sensor data, and relay
control, while the ESP32-CAM was responsible for capturing and transmitting real-
time images. The GSM module and Telegram API ensured timely delivery of alerts
to guardians in the event of unauthorized access or suspicious activity. Testing
across various use cases confirmed the system’s reliability, speed, and scalability.

This project proves the viability of using low-cost, widely available IoT and
embedded components to build a functional, real-time safety solution. It
demonstrates the practical application of core engineering concepts such as
microcontroller programming, sensor interfacing, UART/SPI communication, and
wireless data transmission.

Overall, the Smart Child Safety System provides a valuable, real-world solution to a
pressing safety concern and lays a strong foundation for further enhancements such
61
as GPS tracking, facial recognition, or mobile app integration in future iterations

6.2 FUTURE SCOPE

The proposed Smart Child Safety System serves as a foundational model for child
protection, offering secure access, intrusion detection, and alert notifications.
However, the system can be significantly enhanced with additional features and
technologies to meet broader safety and health monitoring requirements.

One promising enhancement is the integration of a moisture sensor into the system
to detect wetness in a baby’s diaper. This would enable automated monitoring of
hygiene conditions and send timely alerts to parents or caretakers when a diaper
change is required. The sensor’s output can be processed through the
microcontroller and communicated via existing GSM or Telegram modules,
ensuring immediate response and improving infant comfort.

Incorporating a sound detection module is another valuable extension. By using a


microphone-based sound sensor, the system can be configured to recognize specific
acoustic patterns such as prolonged crying or sudden loud noises. These signals can
indicate discomfort, hunger, or health-related distress in infants or toddlers. The
system can differentiate between normal background noise and alarm-worthy
patterns using programmed thresholds, thereby reducing false alarms.

Movement detection can also be added through PIR (Passive Infrared) sensors or
accelerometers. Monitoring excessive or sudden motion during sleep or rest periods
62
may help identify restlessness, injury risk, or attempts to climb out of cribs. This
type of surveillance can be extremely useful in day-care centers and hospital wards.

An IoT-enabled mobile application can serve as a centralized dashboard to access


real-time data such as access logs, live camera feeds, environmental sensor
readings, and alert history. This would empower parents or staff to make informed
decisions remotely and improve the user experience. Secure login, role-based
access, and cloud-based data backup can be integrated for reliability and data
protection.

Additionally, voice-controlled commands using platforms like Google Assistant or


Alexa could be introduced to allow hands-free operation of the system, especially
for physically challenged or busy caregivers. Voice feedback for alerts or
notifications can also be implemented using text-to-speech modules.

For large-scale deployment in schools or institutions, the system can be extended to


support multi-door environments with centralized access control, attendance
logging, and real-time monitoring dashboards for administrators. Integration with
biometric devices such as fingerprint or face recognition systems could add another
layer of security and personalization.

Environmental monitoring features like temperature and humidity sensors can be


included to ensure children are in a safe and comfortable atmosphere. Threshold
63
breaches could trigger fans, heaters, or dehumidifiers via automated relay control.

Furthermore, using machine learning algorithms on edge devices, the


system could evolve to predict patterns—such as frequent crying at specific times,
restlessness during certain environmental conditions, or repeated unauthorized
access attempts. This predictive capability can help in proactive child care and
safety management.

Lastly, enabling GPS tracking for mobile children (e.g., while traveling to
school) can add outdoor safety coverage. Parents can track real-time location, set
geo-fences, and receive alerts if boundaries are crossed.

In conclusion, the Smart Child Safety System offers a robust platform upon which a
wide array of intelligent, health-focused, and safety-driven modules can be
integrated. These future enhancements will transform it from a standalone security
system into a holistic child welfare monitoring solutio

64
REFERENCES

[1] S. Suthanthira Vanitha, A. Jeeva, and N. Rajeswari, “RFID Based Attendance and
Security System,” International Journal of Engineering Research & Technology
(IJERT), vol. 9, no. 3, pp. 1–4, Mar. 2020.

[2] R. Thilagavathi and A. Dhivya, “Design of ESP32-CAM Based Surveillance


System,” International Research Journal of Engineering and Technology (IRJET), vol.
8, no. 7, pp. 1050–1054, Jul. 2021.

[3] N. Divya et al., “RFID Based Door Locking System with GSM Alert,”
International Journal of Scientific Research in Engineering and Management
(IJSREM), vol. 3, no. 2, pp. 11–14, Feb. 2019.

[4] K. Senthil Kumar and M. Abirami, “Vibration-Based ATM Protection System,”


International Journal of Advanced Research in Electrical, Electronics and
Instrumentation Engineering, vol. 9, no. 5, pp. 404–408, May 2021.

[5] S. Karthikeyan, T. Pradeep, and G. Vishnu, “Smart Security System using IoT,”
Proceedings of the International Conference on Communication and Signal
Processing, pp. 1355–1359, Apr. 2018.

[6] M. Saravanan, “IoT-Based Alert System using Telegram Bot API,” International
Journal of Innovative Research in Computer and Communication Engineering
(IJIRCCE), vol. 10, no. 4, pp. 122–126, Apr. 2022.

[7] Espressif Systems, “ESP32-CAM Technical Reference Manual,” [Online].


Available: https://docs.espressif.com/projects/esp32-cam/en/latest/

[8] RFID RC522 Datasheet, “13.56 MHz RFID Reader Module,” [Online]. Available:
https://components101.com/modules/mfrc522-rfid-module

65
[9] SIM800L GSM Module Datasheet, SIMCom Wireless Solutions, [Online].
Available: https://simcom.ee/modules/gsm-gprs/sim800l/

[10] NodeMCU Documentation, “ESP8266 Development Board,” [Online]. Available:


https://nodemcu.readthedocs.io/

[11] Arduino IDE – Official Documentation, [Online]. Available:


https://www.arduino.cc/en/software

[12] Telegram Bot API Documentation, [Online]. Available:


https://core.telegram.org/bots/api

[13] MAX232 Datasheet, Texas Instruments, [Online]. Available:


https://www.ti.com/product/MAX232

[14] 16x2 LCD Display Datasheet, Hitachi HD44780 Controller, [Online]. Available:
https://learn.adafruit.com/character-lcds/overview

[15] Sound Sensor Module Documentation, “Microphone Sound Detection Sensor


Module,” [Online]. Available: https://lastminuteengineers.com/sound-sensor-arduino-
tutorial/

[16] Moisture Sensor Module – Soil/Wetness Detection, [Online]. Available:


https://components101.com/sensors/soil-moisture-sensor

[17] PIR Motion Sensor Module – HC-SR501, [Online]. Available:


https://randomnerdtutorials.com/pir-motion-sensor-arduino-tutorial/

66
APPENDIX

 ESP32- CAM MODULE

 Node MCU

67
 RFID READER

 VIBRATION SENSOR

 LCD DISPLAY

68
 RELAY MODULE

69
70

You might also like