0% found this document useful (0 votes)
16 views

Intelligent Child Safety System Using Machine Learning in IoT Devices

Uploaded by

BKCHAITANYA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Intelligent Child Safety System Using Machine Learning in IoT Devices

Uploaded by

BKCHAITANYA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Intelligent Child Safety System using

Machine Learning in IoT Devices


Aparajith Srinivasan Abirami S Divya N
Undergraduate: Department of Undergraduate: Department of Undergraduate: Department of
Electronics and Communication Electronics and Communication Electronics and Communication
Engineering Engineering Engineering
SSN College of Engineering SSN College of Engineering SSN College of Engineering
Kalavakkam, India Kalavakkam, India Kalavakkam, India
[email protected] [email protected] [email protected]

Akshya R Dr. Sreeja B S


Undergraduate: Department of Associate Professor: Department of
Electronics and Communication Electronics and Communication
Engineering Engineering
SSN College of Engineering SSN College of Engineering
Kalavakkam, India Kalavakkam, India
[email protected] [email protected]

Abstract—Child safety and tracking is of utmost importance prove to be an additional feature in over-all monitoring of the
as children are the most vulnerable. With increasing crime rates children’s whereabouts in order to ensure their safety.
such as child kidnaping, child trafficking, child abuse and so on, Location and vitals monitoring give parents the confidence to
the need for an advanced smart security system has become a allow their children to explore the world outside, without the
necessity. With this motivation, a self-alerting “INTELLIGENT
stress and fear of wondering where they are or if they are safe.
CHILD SAFETY SYSTEM USING MACHINE LEARNING
IN IOT DEVICES” is developed to aid parents to monitor and IoT has made this possible with the introduction of wearable
track their children in real time as an alternate to stay beside sensors and various communication standards such as Wi-Fi,
them. This system is intended as an everyday wearable device ZigBee, Bluetooth, GSM etc. Though Wi-Fi and Bluetooth
on the child, in the form of a wrist band, hand glove, arm band are used widely, they appear to be an unreliable medium of
or a belt. The system is designed to continuously monitor the communication between the parent and child as they are not
location and body vitals of children. This electronic system available everywhere. Therefore, an SMS text enabled
comprises of an Arduino controller, a Raspberry-Pi and sensors communication medium between the child's wearable device
to detect the changes in parameters such as temperature, BVP and the parent is ideal as the environment for GSM is almost
(Blood Volume Pulse) and GSR (Galvanic Skin Response). The
present everywhere.
system also uses a GSM and GPS module. Decision Tree
Classifier Algorithm is used to detect any distress situation with This paper discusses about a smart wearable device that
sensor values as inputs. The location of the victim is traced using continuously monitors and tracks children and autonomously
the GPS module and is sent to the registered contact numbers as alerts the concerned using GSM technology. A major
a text message using a GSM module. The novelty of this work advantage of this proposed system over other wearable
lies in the autonomous decision making process with increased devices is that, it does not entirely depend on manual alerting
accuracy. by the victim, but can detect a distress situation
Keywords—Child safety, GPS, GSM, Sensors, Arduino, automatically. This system also takes in the child’s emotional
Raspberry-Pi, Decision Tree Classifier, Autonomous Decision, status into consideration which further aids in detecting
Intelligent Child Safety System using Machine Learning in IoT
alarming situations. These features stand out as the novelty of
Devices.
the proposed system. Further it can be used in any cell phone
I. INTRODUCTION and does not necessarily require a tech proficient individual
to operate.
Children can become victims to harm, injury,
violence and abuse as they are vulnerable by virtue of their II. EXISTING SYSTEMS
young age and evolving capacities. Unfortunately, a child
goes missing once every 10 minutes in India [1]. The “Design and Construction of a Panic Button Alarm
System for Security Emergencies” [3], requires manual
Vital signs are often considered to be the baseline
triggering of the panic button in case of any emergency. In
indicators of a child’s health and mental status. Vital signs addition to that, it uses Wi-Fi which is not as reliable as GSM.
are never stagnant, as they are influenced by a variety of
internal and external factors, which include disease, anxiety, In “A novel approach to provide protection for women by
pain, exercise and even circadian and diurnal rhythms. An using smart security device” [4], the GSR (galvanic skin
unusually high heartbeat, abnormal skin temperature and response) measurement is not used. The GSR proves to be an
emotional disturbance helps to detect the abnormal influential parameter in determining emotional stress. In
movement of the child while he/she is victimized. Real time addition to this, usage of a threshold may lead to false alarms.
monitoring of vitals has been made possible with various U. Chowdhury et al [5] considered the usage of heart rate
applications in the domain of IoT. but the GSR was not taken into account. A common drawback
WHDs (Wearable Health Devices) [2] is an emerging of all the existing systems is the use of a threshold to detect an
technology that enables continuous ambulatory monitoring of abnormal situation. This is inaccurate as it can lead to many
human vital signs when children are away from home and false alarms and the values of some vital parameters may even
parents. Incorporating location tracking with WHDs can remain normal or fall below the threshold during an
This work was funded by the SSN Trust
978-1-7281-9180-5/20/$31.00 ©2020 IEEE

Authorized licensed use limited to: Chaitanya Bharathi Institute of Tech - HYDERABAD. Downloaded on October 17,2024 at 08:51:25 UTC from IEEE Xplore. Restrictions apply.
emergency. These limitations can be overcome by IV. DATA ACQUISITION UNIT
incorporating an intelligent system using machine learning
A. Arduino Nano
III. PROPOSED SYSTEM The Arduino Nano shown in Fig.3 is a microcontroller
A. Flow of Data board based on the ATmega328. Primarily it is used to accept
the analog signals from various sensors, forward them to the
This project involves three stages of operation namely, Raspberry-Pi for classification and trigger the GSM module
data acquisition, data classification and alert notification. based upon the results of the classification. It also houses an
Values of the body vitals are obtained using wearable sensors emergency button for manual triggering, buzzer for alarming
connected to a micro-controller. Classification of the obtained in the proximity and LEDs for status indication purposes.
data is done using a processing unit. An alert notification is
sent when the result from the classification is abnormal.

Fig. 1. Flow of Data through the system

B. System Architecture
Fig. 3. Arduino Nano micro-controller

B. Raspberry Pi 3 Model B
The Raspberry-Pi shown in Fig.4 is a series of small
single-board computers. The function of the Raspberry-Pi in
the proposed system is to run the machine learning model and
predict the distress situation with more accuracy. A pre-
trained model is loaded into it and is used for prediction.

Fig. 2. Architecture of the proposed system

An autonomous alerting child safety system is presented


here. An Arduino Nano is used as a micro-controller which
receives the values of the pulse or BVP (Blood Volume Pulse),
GSR (galvanic skin response) and temperature from different
Fig. 4. Raspberry-Pi 3 Model B
wearable sensors. It also accepts the state of the emergency
button (1 or 0). Along with the parameter values, the location
in terms of latitude and longitude is sent to the Arduino using C. Pulse Sensor
a GPS module. The Arduino sends the collected parameter The pulse sensor, also known as the optical heart rate
values to a Raspberry-Pi for decision making.
sensor shown in Fig.5 works on the principle of PPG
The decision of whether an alert is to be sent or not is done (Photophethysmography) [6]. PPG is an optical technique
with the help of the Decision Tree Classification Algorithm used to detect volumetric changes in blood peripheral
running on the Raspberry-Pi. This system makes use of a circulation. Since light is absorbed by blood, blood flow can
Raspberry-Pi for machine learning only in order to increase be detected with PPG sensors as a change in intensity of
the accuracy and make a more precise decision. Using received light. The voltage signal output of the PPG sensor is
Raspberry-Pi as the main controller instead of the proposed proportional to the volume of blood flowing through the
Arduino-Raspberry-Pi combination will make the system blood vessels. It supports both analog and digital signal
bulkier as the former requires individual ADC (analog to outputs which is used in measuring the pattern of heart beat
digital convertors) for each and every sensor and module. (through BVP) and to count real time heart rate (pulse)
Two LEDs, red and green are used for status indication respectively. Due to the presence of BVP in the dataset [11],
purposes (instead of an LCD display which makes the system the proposed system uses BVP measurement from the pulse
bulky). The red LED turns on in case of a signal failure in the sensor.
GSM or the GPS module. The green LED blinks 3 times when
the alert is sent successfully. A buzzer is used to alert the
people in the proximity.
The whole system is powered using a portable power bank
which is compact.
Fig. 5. Pulse Sensor

Authorized licensed use limited to: Chaitanya Bharathi Institute of Tech - HYDERABAD. Downloaded on October 17,2024 at 08:51:25 UTC from IEEE Xplore. Restrictions apply.
D. Temperature sensor
Skin temperature is the temperature of the outermost G. GPS Module
surface of the body. Normal human skin temperature on the GPS (Global Positioning System) is a satellite-based
trunk of the body varies between 33.5 to 36.9 °C (92.3 to system that uses satellites and ground stations to measure and
98.4 °F) [7]. This work uses LM35 temperature sensor to compute its position on Earth. GPS receiver receives
measure skin temperature. information signals from GPS satellites and calculates the
location in terms of latitude and longitude [10]. NEO-6M
GPS chip is used for this project. It has a high level of
sensitivity i.e. -161 dB tracking.

Fig. 6.Temperature Sensor

E. GSR (Galvanic Skin Response) sensor


Galvanic skin response also known as the Electrodermal Fig. 8. GPS module
Activity (EDA), is a method of measuring the electrical
conductance of the skin [8]. Strong emotions can cause H. Buzzer
stimulus to one’s sympathetic nervous system, resulting in
more sweat being secreted by the sweat glands, thus A piezo-electric buzzer which makes a high-pitched tone
increasing the skin conductance. GSR can only measure the is used for proximity alert. When the child is in an unfortunate
intensity of emotion and not the type of emotion (happy, sad, situation where in the vitals are abnormal, the buzzer can seek
fear, etc.). On combining GSR with temperature and BVP or attention of people around for immediate assistance.
heart rate, the type of emotion along with its intensity can be I. Status Indication LEDs
detected with good accuracy. The GSR sensor shown in Fig.6
Two LED lights are used in this system for status
consists of 2 electrodes which can be attached to 2 fingers of
indication purposes. The red LED indicates that there is a
one hand to measure the skin conductance.
signal failure in the GSM or GPS module. The green LED
blinks 3 times indicating that a successful alert is sent.
V. DATASET AND CLASSIFICATION
Since the simulation of a real life danger situation is
difficult, an approximate model is created using the available
dataset. The dataset [11] was developed by making 30 people
watch small movie clips of various genres to elicit emotions
Fig. 6. GSR sensor such as amusement, arousal, happiness, fear, etc.
Physiological parameters such as ECG (Electrocardiogram),
BVP, GSR, respiratory rate, skin temperature and EMG
F. GSM Module (Electromyography) were measured. In the present work, the
The GSM (Global System for Mobile Communications) BVP, GSR and skin temperature are taken from the dataset.
is a standard to describe the protocols for digital cellular Since heart rate is derived from the BVP [12], it is assumed
networks used by mobile devices such as mobile phones and that usage of BVP instead of heart rate will result in similar
tablets [9]. It requires a SIM card to be inserted in order to predictions.
transmit and receive information. This project uses A6 The reason for adopting BVP, GSR and skin temperature
GSM/GPRS module shown in Fig.7 to send an alert along from the dataset is because they are more influential during a
with the location obtained from the GPS module in the form danger situation and these sensors are also compact. The
of text messages to registered mobile numbers. It can also values of BVP, GSR and skin temperature observed while
send the location of the child when requested by the parent. viewing of the clip eliciting fear were grouped among the
positive class and all the others were grouped as the negative
class for classification. The new derived dataset consists a
total of 9000 examples, each with 3 features (BVP, GSR, skin
temperature) which were taken randomly from the dataset
[11]. Out of the 9000 examples, one half is for the positive
class and the other half is for the negative class.
Classification was done using the Decision Tree
Classifier Algorithm [13], running on Raspberry-Pi. A
decision tree is a flow chart-like tree structure (Fig.9) where
an internal node represents feature (or attribute), the branch
represents a decision rule, and each leaf node represents the
Fig. 7. GSM Module

Authorized licensed use limited to: Chaitanya Bharathi Institute of Tech - HYDERABAD. Downloaded on October 17,2024 at 08:51:25 UTC from IEEE Xplore. Restrictions apply.
outcome or class. The topmost node in a decision tree is
known as the root node. It works by partitioning the attribute
value. The partitions are carried out in a recursive
manner. This model running in the Raspberry-Pi has been
implemented using python with the machine learning library,
scikit-learn.

Fig. 10. Flow chart of Implementation

VII. RESULTS AND DISCUSSION


Fig. 9. Decision Tree Classifier [13]
The prototype of the Intelligent Child Safety System is
VI. IMPLEMENTATION OF THE SYSTEM shown in the Fig.11. Its autonomous working was tested in a
simulated environment. Healthy human subjects of varying
The BVP, GSR, temperature and location are constantly
ages and sex were made to watch 5 small video clips from
read through the corresponding sensors and their values are
different horror movies which approximates the parameter
sent to the Arduino. The Arduino sends this array of data
values of a real life danger situation. During this study,
along with the current state of the emergency button (1 or 0)
significant changes were observed in BVP, GSR and
to the Raspberry-Pi for decision making. An alert along with
temperature. These changes were successfully detected by the
the location of the child in the form of a Google Maps link is
sensors and the signals were sent to the Arduino. The signals
sent as a text message (SMS) during the following three
were then sent to the Raspberry-Pi and the classification
scenarios:
process was carried out successfully.
i. When the child senses danger and triggers the
emergency button manually i.e., when the state of the
emergency button becomes 1.
ii. When the child goes out of a particular safe perimeter
specified by the parent.
iii. When there is an aberration in the values of the
parameters which happens when the child senses fear but is
unable to trigger the emergency button.
This aberration can be detected using the Decision Tree
Classification Algorithm which runs on the Raspberry-Pi. The
decision whether to send an alert or not is sent back to the
Arduino. When the output of the decision-making process is
to send an alert, the Arduino waits for 10 seconds before
sending the alert. If the button is pressed within 10 seconds,
the alert is aborted or else the alert is sent. This time gap helps
in avoiding false alarms. In this case, the process of sending Fig. 11. Intelligent Child Safety System
the alert is done automatically without the need for manual A. Classification Model Result
triggering of the emergency button.
The Decision Tree Classification model was trained with
The alert is a text message that is sent using a GSM module 6300 examples and was tested with 2700 examples. The
connected to the Arduino. When the alert is sent successfully, confusion matrix for the given model is given in Table 1.
the green LED blinks 3 times, which reassures the child that
help is sought. TABLE I. CONFUSION MATRIX
If the parents want to check the location of the child, they Predicted Label
can obtain the location from the system by sending the Actual Label
No Alert ‘0’ Alert ‘1’
message “LOC” to the number held by the GSM module. No Alert ‘0’ 1183 2

Alert ‘1’ 98 1417

The confusion matrix consists of the True Positives, True


Negatives, False Positives and False Negatives (TP, TN, FP,

Authorized licensed use limited to: Chaitanya Bharathi Institute of Tech - HYDERABAD. Downloaded on October 17,2024 at 08:51:25 UTC from IEEE Xplore. Restrictions apply.
FN) of each class (0 or 1). From the confusion matrix, we get B. Autonomous alerting
the model’s performance through the following metrics: The autonomous working of the system was tested with
1. Precision: It is the ability of a classifier to label an three subjects of age 12, 17 and 15 years respectively. Since
instance positive that is actually positive. For each the simulation of a real life danger situation is difficult, the
class, it is given by subjects were made to watch short video clips which induce
fear. These short video clips were taken from YouTube for
ܶܲ testing. In table 3, ‘1’ indicates that an alert was sent and ‘0’
”‡ ‹•‹‘ ൌ  ሺͳሻ
ܶܲ ൅ ‫ܲܨ‬ indicates that an alert was not sent.
2. Recall: It is the ability of a classifier to find all TABLE III. TESTING OF THE SYSTEM
positive instances. For each class, it given by
Subject Sex Age Fear Inducing Video Clips Average
No. No. No. No. No. (out of
ܶܲ 5)
‡ ƒŽŽ ൌ  ሺʹሻ 1 2 3 4 5
ܶܲ ൅ ‫ܰܨ‬ 1 F 12 1 1 1 1 1 5

2 M 17 1 0 1 1 1 4
3. F1 Score: It is the weighted harmonic mean of
Precision and Recall. For each class, it is given by 3 F 15 1 1 1 1 1 5

Total (out of 15) 14


ʹ ൈ ܲ‫ ݊݋݅ݏ݅ܿ݁ݎ‬ൈ ܴ݈݈݁ܿܽ
 ͳ ‘”‡ ൌ  ሺ͵ሻ
ܲ‫ ݊݋݅ݏ݅ܿ݁ݎ‬൅ ܴ݈݈݁ܿܽ
It is observed that out of 15 instances, the system has
4. Accuracy: It is defined as the rate of correct detected abnormalities in 14 and alerts were sent. This
classifications. It is common for both the classes and indicates an overall accuracy of 93.3%. This marginal
is given by decrease in accuracy from that of the trained model is
accounted for the minuscule errors of the sensors.
ܶܲ ൅ ܶܰ The following message was received when the system
 —”ƒ › ൌ  ሺͶሻ
ܶܲ ൅ ܶܰ ൅ ‫ ܲܨ‬൅ ‫ܰܨ‬ detected abnormality in the vitals while watching a fear
inducing clip.
All these metrics were taken using the 2700 test cases among
which the support (number of actual occurrences of the class)
for class ‘0’ and class ‘1’ were 1185 and 1515 respectively.
The classification report for the model is given in table 2.

TABLE II. CLASSIFICATION REPORT


Class Label Precision Recall F1 Score Support
0 0.92 1.00 0.96 1185
1 1.00 0.94 0.97 1515
Accuracy: 0.96 2700

From the classification report, it is observed that the model


performs better for class ‘1’ where the autonomous alert is
needed. False positives due to class 0 can be cancelled with
the help of the 10s timer of the button. Here, False positives
are the cases where the system detects an abnormal situation
when the actual situation is not abnormal. Overall, the
classification model has achieved an accuracy of 96%.

Fig. 13. Autonomous alerting

C. Location Request
The Fig.14 depicts the scenario when the message “LOC”
was sent to the system. The location of the child was sent back
by the system.

Fig. 12. Testing the system while watching a scary clip

Authorized licensed use limited to: Chaitanya Bharathi Institute of Tech - HYDERABAD. Downloaded on October 17,2024 at 08:51:25 UTC from IEEE Xplore. Restrictions apply.
REFERENCES
[1] Hindustantimes.com, ‘With 60,000 chilrden going missing in India e
every year, social media has propelled child lifting fear’, 2019.
[Online]. Available:
https://www.hindustantimes.com/india-news/with-60-000-children-
going-missing-in-india-every-year-social-media-has-propelled-child-
lifting-fear/story-AvL4yvASeN4fgXQPoAkBKP.html
[2] Dias D, Paulo Silva Cunha J. Wearable Health Devices-Vital Sign
Monitoring, Systems and Technologies. Sensors (Basel),18(8):2414,
2018.
[3] Awodeyi, Afolabi & Moses, Obomighie & Opeyemi, Makinde & A.,
Ben-Obaje & Abayomi-Zannu, Temidayo. Design and Construction of
a Panic Button Alarm System for Security Emergencies. International
Journal of Engineering and Techniques, 4(3):649-652, 2018.
[4] K. Seelam and K. Prasanti. A novel approach to provide protection for
women by using smart security device. 2nd International Conference
on Inventive Systems and Control (ICISC), Coimbatore, pp. 351-357,
2018.
[5] U. Chowdhury et al. Multi-sensor Wearable for Child Safety, IEEE
10th Annual Ubiquitous Computing, Electronics & Mobile
Communication Conference (UEMCON), New York City, NY, USA,pp.
0968-0972, 2019.
[6] S. Cheriyedadh, ‘Photoplethysmography (PPG)’, 2019. [Online].
Available:
Fig. 14. Location Request https://www.news-medical.net/health/Photoplethysmography-
(PPG).aspx
[7] M.J. Price, M. Trbovich, ‘Skin Temperature’, 2016.[Online].
VIII. CONCLUSION AND FUTURE SCOPE Available:
This paper has focused mainly on the autonomous https://www.sciencedirect.com/topics/agricultural-and-biological-
operation of the safety system. Combined usage of three sciences/skin-temperature
different vitals has increased the accuracy of detecting the [8] B. Farnsworth, ‘What is GSR(Galvanic Skin Responese) and how does
it work?’, 2018. [Online]. Available: https://imotions.com/blog/gsr/
abnormal situation. Usage of machine learning has improved
[9] Electronicsforu.com, ‘All You Wanted to Know About GSM Module
the accuracy and made the system intelligent for a general and GPRS Module’, 2019. [Online]. Available:
case compared to a threshold detector when tested on https://www.electronicsforu.com/resources/gsm-module
different sets of subjects. [10] Electronicwings.com, ‘GPS Receiver Module’. [Online]. Available:
A. Future scope https://www.electronicwings.com/sensors-modules/gps-receiver-
module
The system can be miniaturized to make it more [11] K. Sharman, C. Castellini, E.L. van den Broek, A. Ablu-Scheffr, F.
concealing. The efficiency of the system can be increased Schwenker. A dataset of continuous affect annotations and
when it uses a dataset which has been developed by physiological signals for emotion analysis. Scientific Data, 6(1):196,
2019.
monitoring BVP, GSR and temperature of children. By
[12] D. Jones , ‘The Blood Volume Pulse – Biofeedback Basics’,
tuning the parameters of the machine learning model, this 2018.[Online]. Avaible :
work can also be extended as a potential device for ensuring https://www.biofeedback-tech.com/articles/2016/3/24/the-blood-
women safety. volume-pulse-biofeedback-basics
[13] A. Navlani, ‘Decision Tree Classification using Python’,
2018.[Online]. Available :
https://www.datacamp.com/community/tutorials/decision-tree-
classification-python

Authorized licensed use limited to: Chaitanya Bharathi Institute of Tech - HYDERABAD. Downloaded on October 17,2024 at 08:51:25 UTC from IEEE Xplore. Restrictions apply.

You might also like