Smart Helmet Iot Base
Smart Helmet Iot Base
Smart Helmet Iot Base
Department of Electrical Engineering and Computer Science, University of Tennessee, Knoxville, Tennessee, USA
2
paper, an inexpensive architecture is proposed for a smart door PC server that also implemented a MATLAB-GUI platform to con-
sensor that will utilize an Elegoo Mega 2560 microcontroller board, trol the temperature, lights, and fans. The PIR sensor also acted as a
Raspberry Pi 2, a web server, and an Android application. security component by detecting possible intrusions and setting off
a buzzer to alert the residents.
2. RELATED WORK Howedi et al. [23] proposed a low-cost smart home system built
upon a similar architecture using the Arduino Uno board, PIR
Prior work in IoT-enabled home security system has proposed sensors, DHT11 temperature sensors, INA219 high side DC cur-
architectures that focused on the use of low-cost open-source hard- rent sensor and servo motors that control doors and windows.
ware components like the Arduino and Raspberry Pi MCU boards The Arduino IDE is used to implement the control and monitor-
and a combination of sensors. Passive Infrared (PIR) sensors are ing module of the system while the MIT App Inventor is used to
used to detect motion and can work in sync with a webcam that develop a simple Android application.
captures images to alert users of trespassing.
Panwar et al. [24] implemented the Eyrie smart home automation
Kodali et al. [18] describe a cost-effective wireless home security system using the Raspberry Pi 3 MCU as the central hub. Their
and automation system based on the TI-CC3200 LaunchPad: a proposed architecture connected several Arduino Nano boards
battery-powered Microcontroller Unit (MCU) with built-in Wi-Fi located around the house to various types of sensors and NRF24L
connectivity. PIR motion sensors are placed at the entrances to a trans-receivers that eliminated the need for Ethernet or Wi-Fi con-
building and connect to a digital input–output pin of the MCU. nectivity. Mosquito Broker, an open-source message broker used
The MCU is programmed using Energia Integrated Development for relaying messages to the Raspberry Pi 3, operates using the
Environment (IDE) and Wi-Fi enabled. Kodali et al.’s configura- Debian OS. Eclipse SmartHome framework was used to implement
tion allows mobile phones without Internet connectivity to receive a web interface and a smartphone app for end-users.
security alerts and control IoT devices connected to the microcon-
In Baraka et al. [25], a home automation system with smart task
troller. Tanwar et al. [19] describe an inexpensive home security
scheduling is developed making use of wireless ZigBee to connect
system that implements a real-time email alert system. The system
appliances and wired X10 technology to connect light and switch
uses a PIR module and a Raspberry Pi MCU. Security cameras
modules to an Arduino microcontroller. An Ethernet shield mounted
and PIR sensors are connected to the Raspberry Pi via USB ports
on the Arduino MCU allows communication between Arduino and
and general purpose input/output pins respectively. The system
a web-based Android application which is then used to remotely
assumes that homes have Internet access; it uses the Internet to
add and manage devices and view recommended scheduling.
send e-mails to the resident in real-time. The system’s intrusion
detection logic identifies motion by comparing signal inputs from ShariqSuhail et al. [26] implemented a prototype for smart home
the PIR sensors with their previous values. When current and pre- security system that uses PIR sensors for intrusion detection, MQ2
vious signals differ, the security camera captures an image that is sensors for detecting smoke and gas leaks, LM35 temperature sen-
stored temporarily on the Raspberry Pi and then automatically sors as input to an Arduino Mega 2560. A buzzer, LCD, LED strip
e-mailed to the resident. and a Global System for Mobile communication (GSM) module are
outputs to this MCU board while a Raspberry Pi 2 board is used
Gupta and Chhabra [20] describe a cost-effective Ethernet-based
to include a webcam that captures images upon motion detection.
smart home system for monitoring energy consumption, smoke
GSM, a wireless technology interfaces with the Arduino Mega to
and temperature levels and detecting trespassing. This system uses
send SMS notifications and calls to the user’s cell phone whenever
the Arduino-certified Intel Galileo 2nd generation microcontroller
potential intrusion, smoke or gas leak is detected.
board. Temperature, smoke and PIR sensors are connected directly
to the microcontroller, while four 220 V devices are connected via In Gunputh et al. [27], a similar architecture utilizes an Arduino
a relay module. An android based mobile app that connects to the Mega 2560 board with a Wi-Fi module to implement a voice-
Intel Galileo-based server over the Internet allows users to toggle controlled smart home system. The Elechouse V3 voice recognition
switching devices by tap-to-touch or voice commands through module allows users to send voice commands to adjust lighting,
Google API speech recognition tools. open or close windows and control a folding bed.
Piyare et al. [21] present a Bluetooth-based home automation Vineeth’s et al. [28] voice-controlled secure eHome also make use of
system where an Android cell phone running a Python script the V3 voice recognition module but use an RF module instead of
communicates with an Arduino BT board with digital and analog Wi-Fi for wireless communication between an Arduino UNO and
input/output ports to which sensors and appliances are connected. Raspberry Pi MCUs. The Raspberry Pi supports sensor connectiv-
The smartphone application has a toggle on and off feature for each ity to the Internet so all sensory data can be logged onto a Google
device. However, Bluetooth connectivity between the smartphone spreadsheet. There is no implementation of a mobile or web app thus
and the Arduino BT board required a range of 50 m or less within a confining the controlling of this system to the location of the mic.
concrete building and mobile platforms other than Symbian do not
Sunehra et al. [29] propose two schemes for a speech-based home
support the Pyhton application.
automation system. The first scheme uses HC-05 Bluetooth module
Behera et al. [22] designed and implemented a real-time smart along with Arduino Bluetooth controller mobile application to
home automation system using an Arduino Uno board along with control appliances when inside the house. GSM/GPRS technology
an Arduino Wi-Fi Shield and a PC home server. A PIR or motion is used to remotely control appliances and receive SMS alerts for
sensor, an light dependent resistor and an LM35 temperature possible intrusion detections. The ARM11 Raspberry Pi board acts
sensor were used to collect data which was made available on the as the central hub for receiving voice commands though the HC-05
M.A. Hoque and C. Davidson / International Journal of Networked and Distributed Computing 7(2) 85–92 87
3.2. Schematics
Figure 1 presents a diagram of the pinout of the Raspberry Pi 2
attached to an RF Receiver. The RF Receiver has leads to ground,
a 5 V power supply, and to pin 13 on the Raspberry Pi (used in
OpenDoor.cpp in repository). Note that there is a second Data pin
that is not to be utilized in this project and an antenna (not pic-
tured) was formed out of rolled aluminum foil.
Figure 2 | Mega 2560 board with magnetic reed switch and RF transmitter
Figure 2 describe the schematics for wiring the Elegoo Mega boards.
diagram.
In Figure 2, a magnetic reed switch and RF 433Hz transmitter is
attached to the Mega 2560 board. The ordering of the wires do not
matter for the reed switch. One wire leads to ground and for the code
located in the repository, pin 2 on the Mega 2560 board is where the
other wire will lead. The RF transmitter has leads to ground, a 5 V
power supply, and a lead to pin 10 on our board. The antenna used
for this project is a simple rolled piece of aluminum foil.
4. ALGORITHMS
In this section, we discuss the algorithms corresponding to the dif-
ferent programs running in different portion of the system. The
Raspberry Pi required a Python script for updating the NodeJS server
Figure 4 | Flowchart representing data flow through the system. (Algorithm 1) and a C++ program for receiving the code transmit-
ted by Arduino through the 433 MHz RF antenna (Algorithm 2). The
program in Arduino for sensing door opening and transmitting code
information, or receives GET requests from an Android application to Raspberry Pi was written in C++ (Algorithm 3). The Android appli-
to allow the end user to view the door open events by date and time. cation was implemented using Java. Due to complexity, the algorithm
All libraries mentioned in the following sections are open source. for the Android application is not presented in this paper.
1. Initialization:
2. RCSwitch mySwitch;
3. std::ofstream myfile;
4. int PIN = 2;
5. int pulseLength = 0;
6. mySwitch = RCSwitch();
7. int received = 0;
8. if wiringPiSetup() == -1 then
9. printf(“wiringPiSetup failed, exiting...”);
10. return 0;
11. if argv[1] != NULL then
12. pulseLength = atoi(argv[1];
13. if pulseLength != 0 then
14. mySwitch.setPulseLength(pulseLength);
15. mySwitch.enableReceive(PIN); while TRUE do
16. if mySwitch.available() then
17. int value = mySwitch.getReceivedValue();
18. if value == 0 then Figure 5 Setup for testing the door sensor.
19. printf(“Unknown encoding”);
20. value == received printf(“Duplicate”);
21. myfile.open(“openevents.txt”);
22. myfile << value << endl;
23. myfile.close();
24. printf(“Received %i”, value); received = value;
25. mySwitch.resetAvailable();
1. Initialization:
2. RCSwitch mySwitch = RCSwitch();
3. const int switchPin = 2;
4. const int ledPin = 13;
5. int code = 28728;
6. int just_transmitted = 0;
7. Configure:
8. Serial.begin(9600);
9. mySwitch.enableTransmit(10);
10. pinMode(switchPin, INPUT);
11. pinMode(ledPin, OUTPUT);
12. digitalWrite(switchPin, HIGH);
13. while system is operational do Figure 6 | Arduino LED is OFF indicating the door is closed.
14. if digitalRead(switchPin) == LOW then
15. if just_transmitted == 1 then
16. code++;
17. just_transmitted = 0;
18. digitalWrite(ledPin, LOW);
19. else
20. just_transmitted = 1;
21. digitalWrite(ledPin, HIGH);
22. mySwitch.send(code, 24);
Figure 8 | Raspberry Pi receiving code from Arduino upon door opening 6.3. Android Application Improvements
event.
The Android application for this project, written in Java, is a basic
application. Future work may involve adding time zone support
from the device so as not to depend solely on Unix timestamps.
Multiple options to view and display the data located in the MongoDB
database, can also be added. A calendar feature can be integrated so
users can have a more robust view of the door open events in their
household. The system can be enhanced to display alerts to users in
the form of SMS or email in the event of trespassing.
7. LIMITATIONS
Potential issues may arise through interference on the 433 Hz RF
frequency. Many home devices use RF signals to communicate and
at a given time there may be more than one RF receiver trying to
send signals to the Raspberry Pi or it could be picking up signals
that it was not intended to receive. An interference testing with the
RF units can be done as a part of future work. In the case of mul-
tiple transmitters attempting to communicate with the Raspberry
Pi, there would need to be a registration system in place on the
Raspberry Pi that kept track of incoming signals and their sources.
However, the architecture proposed here does not provide that
Figure 9 | Android App displaying the time of door opening. support.
CONFLICTS OF INTEREST [11] M.A. Hoque, X. Hong, B. Dixon, Methods and systems for
handling transportation reservation requests in a decentralized
There is no conflict of interest. environment, U.S. Patent Application 13/832,091, 2013.
[12] J. Liu, A.J. Khattak, Delivering improved alerts, warnings, and con-
trol assistance using basic safety messages transmitted between con-
REFERENCES nected vehicles, Transp. Res. C Emerg. Technol. 68 (2016), 83–100.
[13] M.A. Hoque, X. Hong, B. Dixon, Efficient multi-hop connectivity
[1] N. Carter, M.A. Hoque, M.S. Ahmed, Simulating vehicle move- analysis in urban vehicular networks, Veh. Commun. 1 (2014),
ment and multi-hop connectivity from basic safety messages, 78–90.
SoutheastCon 2018, IEEE, St. Petersburg, FL, USA, 2018, pp. 1–6. [14] M.A. Hoque, X. Hong, S. Ahmed, Parallel closed-loop connected
[2] M.S. Ahmed, M.A. Hoque, A.J. Khattak, Demo: real-time vehicle vehicle simulator for large-scale transportation network manage-
movement tracking on android devices through bluetooth com- ment: challenges, issues, and solution approaches, IEEE Intell.
munication with DSRC devices, 2016 IEEE Vehicular Networking Transp. Syst. Mag. 11 (2019), 1.
Conference (VNC), IEEE, Columbus, OH, USA, 2016, pp. 1–2. [15] M.A. Hoque, M.S. Khan, An experimental investigation of multi-
[3] M.S. Ahmed, M.A. Hoque, Partitioning of urban transporta- hop V2V communication delays using WSMP, Proceedings of
tion networks utilizing real-world traffic parameters for distrib- IEEE SoutheastCon 2019, Huntsville, Alabama, 2019.
uted simulation in SUMO, 2016 IEEE Vehicular Networking [16] M.A. Hoque, M. Kamrani, C. Davis, A. Khattak, Real-time alert-
Conference (VNC), IEEE, Columbus, OH, USA, 2016, pp. 1–4. ing of hazardous driving behavior using internet of things (IOT)
[4] M.S. Ahmed, M.A. Hoque, J. Rios-Torres, A. Khattak, Demo: and connected vehicles, 98th Annual Meeting of Transportation
freeway merge assistance system using DSRC, Proceedings of the Research Board, Transportation Research Board, The National
2nd ACM International Workshop on Smart, Autonomous, and Academies of Sciences, Engineering, and Medicine, 2019.
Connected Vehicular Systems and Services, Snowbird, UT, USA, [17] C. Davidson, T. Rezwana, M.A. Hoque, Smart home security
2017, pp. 83–84. application enabled by IoT, international conference on smart
[5] D. Jordan, N. Kyte, S. Murray, M.A. Hoque, M.S. Ahmed, grid and internet of things (SGIoT 2018), Springer, Cham, 2018,
A. Khattak, Poster: investigating doppler effects on vehicle-to- pp. 46–56.
vehicle communication: an experimental study, 2nd ACM Inter [18] R.K. Kodali, V. Jain, S. Bose, L. Boppana, IoT based smart security
national Workshop on Smart, Autonomous, and Connected and home automation System, 2016 International Conference on
Vehicular Systems and Services, 2017, pp. 77–78. Computing, Communication and Automation (ICCCA), IEEE,
[6] M. Hoque, X. Hong, B. Dixon, Innovative Taxi hailing system Noida, India, 2016, pp. 1286–1289.
using DSRC infrastructure, ITS America 22nd Annual Meeting [19] S. Tanwar, P. Patel, K. Patel, S. Tyagi, N. Kumar, M.S. Obaidat, An
& Exposition, ITS America (https://www.itsa.org/), National advanced internet of thing based security alert system for smart
Harbor, MD, USA, 2012, p. 4. home, 2017 international conference on computer, information
[7] M.S. Ahmed, M.A. Hoque, A.J. Khattak, Intersection approach and telecommunication systems (CITS), IEEE, Dalian, China,
advisory through vehicle-to-infrastructure communication using 2017, pp. 25–29.
signal phase and timing (spat) information at signalized intersec- [20] P. Gupta, J. Chhabra, IoT based smart home design using power
tion, 97th Annual Meeting of the Transportation Research Board, and security management, 2016 International Conference on
no. 18-05804, Transportation Research Board, The National Innovation and Challenges in Cyber Security (ICICCS-INBUSH),
Academies of Sciences, Engineering, and Medicine, Washington IEEE, Noida, India, 2016.
DC, USA, 2018. [21] R. Piyare, M. Tazil, Bluetooth based home automation system using
[8] M.A. Hoque, M.S. Ahmed, J. Rios-Torres, A.J. Khattak, R. Arvin, cell phone, 2011 IEEE 15th International Symposium on Consumer
Impact of vehicle-to-vehicle communication reliability on safety Electronics (ISCE), IEEE, Singapore, Singapore, 2011, pp. 192–195.
applications: an experimental study, 97th Annual Meeting of the [22] A.R. Behera, J. Devi, D.S. Mishra, A comparative study and
Transportation Research Board, no. 18-05532, Transportation implementation of real time home automation system, 2015
Research Board, The National Academies of Sciences, Engineering, International Conference on Energy Systems and Applications,
and Medicine, Washington DC, USA, 2018. IEEE, Pune, India, 2015, pp. 28–33.
[9] M.S. Ahmed, M.A. Hoque, J. Rios-Torres, A.J. Khattak, A coop- [23] A. Howedi, A. Jwaid, Design and implementation prototype of a
erative freeway merge assistance system using connected vehi- smart house system at low cost and multi-functional, 2016 Future
cles, 97th Annual Meeting of the Transportation Research Board, Technologies Conference (FTC), IEEE, San Francisco, CA, USA,
no. 18-05614, Transportation Research Board, The National 2017, pp. 876–884.
Academies of Sciences, Engineering, and Medicine, Washington [24] A. Panwar, A. Singh, R. Kumawat, S. Jaidka, K. Garg, Eyrie smart
DC, USA, 2018. home automation using internet of things, 2017 Computing
[10] M.A. Hoque, P. Pfeiffer, S. Gabrielle, E. Hall, E. Turbyfill, SAFARI- Conference, IEEE, London, UK, 2017, pp. 1368–1370.
Taxi: Secure, autonomic, fault-resilient, and intelligent taxi hailing [25] K. Baraka, M. Ghobril, S. Malek, R. Kanj, A. Kayssi, Low cost
system, 2017 IEEE 15th International Conference on Dependable, arduino/android-based energy-efficient home automation system
Autonomic and Secure Computing, 15th International with smart task scheduling, 2013 Fifth International Conference
Conference on Pervasive Intelligence and Computing, third on Computational Intelligence, Communication Systems and
International Conference on Big Data Intelligence and Computing Networks, IEEE, Madrid, Spain, 2013, pp. 296–301.
and Cyber Science and Technology Congress (DASC/PiCom/ [26] M. ShariqSuhail, G. ViswanathaReddy, G. Rambabu, C.V.R.
DataCom/CyberSciTech), IEEE, Orlando, FL, USA, 2017, DharmaSavarni, V.K. Mittal, Multi-functional secured smart
pp. 438–445. home, 2016 International Conference on Advances in Computing,
92 M.A. Hoque and C. Davidson / International Journal of Networked and Distributed Computing 7(2) 85–92
Communications and Informatics (ICACCI), IEEE, Jaipur, India, [29] D. Sunehra, V. Tejaswi, Implementation of speech based home
2016, pp. 2629–2634. automation system using bluetooth and GSM, 2016 International
[27] S. Gunputh, A. Prakash Murdan, V. Oree, Design and implemen- Conference on Signal Processing, Communication, Power and
tation of a low-cost arduino-based smart home system, 2017 IEEE Embedded System (SCOPES), IEEE, Paralakhemundi, India,
9th International Conference on Communication Software and 2016, pp. 807–813.
Networks (ICCSN), IEEE, Guangzhou, China, 2017, pp. 1491–1495. [30] A. Sivanathan, D. Sherratt, H.H. Gharakheili, V. Sivaraman,
[28] K.V. Sai Vineeth, B. Vamshi, V.K. Mittal, Wireless voice-controlled A. Vishwanath, Low-cost flow-based security solutions for
multi-functional secure Ehome, 2017 International Conference smart-home IoT devices, 2016 IEEE International Conference on
on Advances in Computing, Communications and Informatics Advanced Networks and Telecommunications Systems (ANTS),
(ICACCI), IEEE, Udupi, India, 2017, pp. 2235–2240. IEEE, Bangalore, India, 2016, pp. 1–6.