SUGISAKAMASANORI

Journal of Robotics, Networking and Artificial Life
Vol. 9(3); December (2022), pp. 295–302
ISSN (Online):2352-6386; ISSN (Print):2405-9021
https://alife-robotics.org/jrnal.html

Research Article

Smart Interactive Virtual Assistant System for Office Door
Applications in the Situation of the COVID-19 Pandemic
Muhammad Zharif Aiman Alias, Wan
Norsyafizan W. Muhamad, Nurain Izzati Shuhaimi,
Darmawaty Mohd Ali, Azlina Idris 2
School of Electrical Engineering, College of Engineering, University Teknologi MARA, Malaysia

ARTICLE INFO
Article History
Received 19 November 2021
Accepted 26 September 2022
Keywords
Smart virtual assistantInternet of things
Google assistant
Voice command and raspberry Pi

ABSTRACTCOVID-19 has now spread to every continent around the world. The virus is spread through thetransmission of close contact with the infected person as well as by touching a surface that has
been contaminated with the virus. Touchless switches must be utilized especially in office andhome environments to reduce the spread of COVID-19. This paper presents the Smart Interactive
Virtual Assistant for Smart Office Door Application. The proposed system uses voice recognition
and artificial intelligence by applying the open-sourced API of Google Assistant to control thesmart door contactless. The user can give the command to the system via voice to either open or
close the door. This smart interactive voice assistant system uses Raspberry Pi as the brain orcomputer for the interface and Python is used as the software for running the coding script. The
components used such as LED lights and DC motors are connected through the General-Purpose
Input Output of Raspberry Pi and the relay module. One of the DC motors is used for controlling
the lock and another one is used for controlling the door. Blue LED is used as a locked door
notification while a green LED is used as an unlocked notification. A pair of microphones andspeakers are also connected with the Raspberry Pi as input and output voice commands througha USB port and Bluetooth. With the smart interactive virtual assistant solution, office spaces will
move towards a more touch-free control which could prevent the spread of COVID-19.
© 2022 The Author. Published by Sugisaka Masanori at ALife Robotics Corporation Ltd
This is an open access article distributed under the CC BY-NC 4.0 license(http://creativecommons.org/licenses/by-nc/4.0/)

1.

command with the help of a smart virtual assistant,
Internet of Things (IoT) and smart controller [1]. The
smart interactive virtual assistant is a speech recognition
technology that allows people to interact with a computer,smartphone, or other devices through voice commands[2][3]. Smart virtual assistants such as Amazon Alexa,
Apple’s Siri, Samsung’s Bixby and Google Assistant areprimarily used for daily tasks [4].
Google Assistant is an artificial intelligencepowered virtual assistant developed by Google [5][6].
Users interact with the Google Assistant throughkeyboard input or natural voice. The Google Assistant iscommonly used for daily tasks such as searching theInternet, scheduling events and alarms, adjusting
hardware settings on the user's device, and showing

INTRODUCTION

Nowadays, the novel coronavirus, also known as
COVID-19, became unpredictable and caused a massive
loss to people worldwide. Coronavirus can be spreadthrough the surface appliances that have been touched by
the infected person. The virus can live on that surface forat most 48 hours. People can get affected by the virus
when using the same appliances at the workplace such as
doors, water dispensers, switches and photostat machines.
In order to minimize the chance of people getting
infected due to touching appliance surfaces, the voiceassistant or speech recognition technology has been
implemented. The appliance can be controlled by voice
Corresponding author’s E-mail: syafizan@uitm.edu.my295

information from the user's Google account. In the future,
Google says that the Google Assistant will identify
objects, gather visual information through the device's
camera, support purchasing products and identify songs.
For this project, Google Assistant is used as a voice forinnovations[7]. IoT is a system that integrates with voicecommand to control the office door with the help of IoTtechnology.
The technology of IoT brings a new node to amarketplace and knocks on the door with new choices ofcomputers, and digital devices via the internet andinteracts with each other to exchange and transfer
information through special Identifications (IDs). The
emphasis on automation technology has risen
significantly with the new invention of automation
appliances[8]. Some automation technology apply voicecommands as input because it is more efficient comparedto the sensors. In IoT, the voice command signal must betransmitted immediately between adjacent nodes
throughout the IoT-enabled network. Thus, the nodes
must be in the overlapping communication range of one
another for this to occur. The IoT-based system helps theuser to control the smart office system without everhaving any physical contact [9][10]. It emphasizes theuse of ambient technology, robotics and reduce screenbased interaction, meaning that the user interface isblended with the physical gadget.
Besides IoT,
microcontroller such as Raspberry Pi plays a central rolein the whole system. Raspberry Pi is a Linux single-board
computer which uses an SD card as storage. It has two
USB interfaces, a USB interface, an Ethernet, HDMI
(support sound output) and RCA terminal output support.
One of the applications of Raspberry Pi is to operate asystem that operates itself and can access the wirelessnetwork and Bluetooth chips[11].In addition to that, theRaspberry Pi has also been used as a processing chip andunderlying architecture to activate a personal
assistant[3][12][13]. The proposed voice-operated
personal assistant which uses a Raspberry Pi gives
individuals more comfort and ease.
Few works in literature proposed the smart virtualassistant system to control appliances. Mtshali et al
proposed a smart home appliance control system forphysically disabled people[14]. The system consists of asmart plug, smart camera, smart power strips and digitalassistants such as Siri, Google Assistant, or Alexa. Thissystem captured the voice command from the user andprovides the output signal to control the targeted
appliances, such as turning it on or off. Having thissystem could be very advantageous for those withdisabilities. In addition to that, this system also helps toenhance the quality of nondisabled people. Next, Yash
Mittal et al presented a voice-controlled multi-functional
smart home automation system[2]. This system allows

users to use voice commands to control home appliancesand gadgets for different functions and purposes. Thissystem can adapt to the user’s voice and recognize thevoice command, depending on the speakers’ accents.
Arduino microcontroller and dedicated hardware module
used in this system for commands processing and controlof the appliances. This system aims to be affordable,
flexible, and robust.
Another study by Nefy Puteri Novani and Mohamad
Hafiz proposed electrical household appliances control
using voice command based on a microcontroller [1]. In
this system, EasyVR Commander has been used as asensor that can receive voice input to control electricalappliances such as fans, lights, and doors. Then, the voicerecognition method was implemented to a captured voice
signal to recognize the type of voice pattern. This method
is important to provide a safety feature to the system. Thissystem only allows the homeowner to give the command
to control electrical appliances in that house.
Mummaka et al [15] proposed an interactive smart
home automation system using voice recognition system
which applied the Google assistant SDK. The proposedsystem uses voice commands to automatically control theappliances for the smart home such as lighting, airconditioner, TV as well as communicates to google
assistant to get news and information.
This project proposes a smart interactive virtualassistant system to control the office door. The proposedsystem will help people to eliminate the need to touch thesurface. To develop a voice-based command controller, amicrophone is used in data transmission, data
communication and a voice signal processor to
implement the voice recognition approach.
For this proposed work, the office door,
microcontroller, motor driver, DC motor, LED andmicrophone are integrated as a smart door control system.
The proposed system provides users with a feature thatcan control the office door contactless using a voicecommand. This system consists of several modules
which are LED, DC motor, motor driver, microphone,
IoT, operating system device, smart virtual assistant andRaspberry pi. The Raspberry Pi 400 is the
microcontroller for the whole system. The Google
Assistant is implemented into the microcontroller andprovides the ability of a voice command controller withthe help of IoT. For the door system, there will be twoparts that will be controlled by the user, which are thelock of the door and the door itself. Users can control thesystem’s lock through the voice command system bygiving a specific command and opening the door only
when the door is unlocked by giving a specific command.
There will be an LED notification to let the user knowwhether the door is locked or unlocked. This system296

provides a touchless feature for opening or closing thedoor which prevents the spread of the COVID-19 virus.
2

this command is detected, the lock motor will rotate to
the right to unlock the door. The GPIO pin 3 will produce
a high output signal, and GPIO pin 2 will produce thePWM wave output signal with half of the max value for
0.7 seconds. These output signals will be sent to the
L298N motor driver to rotate the lock motor in the right
direction with half of the speed for 0.7 seconds to unlock
the door. Next, GPIO pin 2 will produce the PMW wave
signal with zero value, and this signal will be sent to themotor driver to stop the lock motor rotation. Then, GPIO
pin 21 will produce the low output signal to turn off the
LED notification for the locked door, and GPIO pin 20
will produce the high output signal to turn on the LED
notification for the unlocked door. This LED notification
will let the user know that the door is unlocked.

METHODS2.1. Block Diagram
Figure 1 shows the block diagram of the proposedsystem consisting of several modules which are voicecommand, Raspberry Pi, Cloud, Google Server, LED,
motor driver and DC motor. In the beginning, amicrophone will capture the voice command from theuser and converts it into an input signal for the system.
The Raspberry Pi will receive the input signal and send it
to the Cloud through the internet. Next, the Cloud will
directly transfer the signal to the Google Server forprocessing. Google Server's function is to execute thecoding script when the event fulfils the condition. In thissystem, when Google Server received the signal, it
executes the output signal based on the function setup.
The output signal will be sent to the Raspberry Pi via aninternet connection. Following that, the microcontroller
distributes the output signal to the user and the targetedcomponents such as LED and DC motor to execute thecommand given by users. For controlling the DC motor,
the signal should be sent to the L298N motor driver as it
controls the movement of the motor.

Next, the user needs to give the command “Open the
Door” to open the smart door. The door will be opened
once this command is detected by the system, andfollowing few seconds, the smart door will automaticallyclose. The GPIO pin 22 will produce a high output signal,
and GPIO pin 7 will produce a PWM wave output signal
with half of the max value for duration of 0.8 seconds.
Both signals will be sent to the motor driver to rotate thedoor motor in the left direction with half the speed for 0.8
seconds to open the door. Next, the GPIO pin 7 willproduce the PWM wave output signal with zero value for
2 seconds. This signal will be sent to the motor driver tostop the door motor rotation for 2 seconds. Then, the
GPIO pin 22 will produce the low output signal, GPIO
pin 25 will produce the high output signal, and GPIO pin
7 will produce the PWM wave output signal with half ofthe max value for 0.8 seconds. These signals will be sent
to the motor driver to rotate the door motor in the right
direction with half of the speed for 0.8 seconds to closethe door. Lastly, GPIO pin 7 will produce the PMW wave
signal with zero value, and this signal will be sent to themotor driver to stop the door motor rotation.

Figure 1: Block diagram of the proposed smart virtualassistant system

Further, the user needs to give the command “Lockthe Door” to lock the smart door. When the system
detects this command, the lock motor will rotate to theleft side to lock the smart door. The GPIO pin 3 willproduce a low output signal, GPIO pin 4 will produce
high output signal and GPIO pin 2 will produce the PWM
wave output signal with half of the max value forduration of 0.7 seconds. These signals will be sent to themotor driver to rotate the lock motor in the left direction
for 0.7 seconds to lock the smart door. Next, GPIO pin 2
will produce the PMW wave signal with zero value, andthis signal will be sent to the motor driver to stop the lockmotor rotation. Then, the GPIO pin will produce a highoutput signal to turn on the LED notification of the

2.2. Flowchart of the System
While Figure 2 illustrates the flowchart of the
proposed system. To access the smart office door system,
the user needs to say “Hello Friend”. This command isused as a password for security purposes for the system.
When a password command has been detected by thesystem, GPIO pin 21 at Raspberry Pi will produce thehigh output signal to turn on the LED notification for the
locked door and give the user access to the system. This
LED notification will let the user know the door is locked.
After getting access to the system, the user needs to givethe command “Unlock the Door” to the system. When297

this system has one input which is the microphone. A
microphone is used to capture the voice command fromthe user and it will be connected to the Raspberry Pi 400
using a USB port. As for the internet connection, thesystem will use the build-in Wi-Fi receiver in Raspberry
Pi to interact with the Google server in order to executethe user’s command.

locked door, and GPIO pin 20 will produce the low
output signal to turn off the LED notification for theunlocked door. This LED notification will notify the userthat the door is locked.

For the output part, this system will have four outputs
including two LEDs for notification and two DC motors
for locking and unlocking the door. LEDs notification
will be connected to GPIO pins 20 and 21, and DC
motors will be connected to the motor driver. Then, themotor driver will connect to GPIO pins 2, 3 and 4 tocontrol the lock motor and connect to the GPIO pins 7,
22 and 25 to control the door motor. The resistor used inthis circuit reduces the voltage that is received by theLEDs' notification.

Figure 2: Circuit diagram of the proposed smart virtualassistant system

3 RESULTS AND DISCUSSIONS
3.1. Hardware Development
For hardware development, the initial stage is shownin Figure 4 where the DC motors are connected to themotor driver. The motor driver, microphone and LEDs
are connected to the microcontroller. This system used a
power supply of 5A from the power socket to run thesystem. As for controlling the DC motors, the motor
driver will be connected to an extra power supply with
6V batteries, as shown in Figure 5. Next, DC motors areconnected to the door and lock using gears as a connecter
to transfer the rotation movement from motors to the door
and lock. The connection of the DC motor with the door
is shown in Figure 6 and the connection for the DC motorwith the lock is shown in Figure 7. LEDs notification isplaced above the door, as shown in Figure 8. Next, theconnection between LEDs and motor driver with

Figure 1: Flowchart of the proposed smart virtualassistant system
2.3 Circuit Diagram
Figure 3 illustrates the circuit diagram of the
proposed smart virtual assistant system. As stated earlier,298

Raspberry Pi is executed using a breadboard as shown in
Figure 9 where the breadboard and motor driver are
mounted at the bottom. Lastly, Figure 10 shows the
microphone that is being connected to Raspberry Pi via
the USB port.

Figure 7: DC motor connected to the lockFigure 4: Hardware before mounted to smart office door
model

Figure 8: Office room model with LEDs positioned
above the door

Figure 5: Batteries supplied to the motor driver

Figure 9: The circuit connection in the model

Figure 6: DC motor connected to the door

299

Figure 12: Position of the lock in locked door state
Figure 10: Microphone is connected to a Raspberry Pi

3.3. In the Condition of Unlocked State

3.2. In the Condition of Locked State

Next, Figure 13 and Figure 14 illustrate the model ofthe system in an unlocked state. For this condition, theblue LED is turned off and the green LED is turned on toalert the user that the door has been unlocked. Here,Figure 14 illustrates the lock's position which permits thedoor to be opened. This state is executed with the voiceuser’s command “Unlock the Door”. In the unlocked
state, the user can give the command to open the door.
When the command “Open the Door” has been detected,
the door will be opened as shown in Figure 15 and it will
be closed automatically after 2 seconds, as set in thealgorithm.

The model of the smart virtual assistant system in thelocked condition is shown in Figure 11 and Figure 12.
The blue LED notifies users that the door has been locked.
Here, Figure 12 demonstrates the lock's position, in
which the door is in the locked state. This state is
executed with the voice user’s command “Lock theDoor”. When this command is detected, the green LED
is turned off and the blue LED is turned on to notify theuser that the door has been locked.

Figure 13: Notification for unlocked door condition

Figure 11: Notification for locked door condition300

by everyone, mute people cannot talk thus they will havedifficulties when using this system.

4. REFERENCES[1] N. P. Novani, M. H. Hersyah, and R. Hamdanu, “Electricalhousehold appliances control using voice command basedon microcontroller,” 2020 Int. Conf. Inf. Technol. Syst.
Innov. ICITSI 2020 - Proc., pp. 288–293, 2020,[2] S. Sharma, D. Singhal, and R. Gupta, “A Voice-Controlled
Multi-Functional Smart Home Automation System,” pp.
1–6, 2015[3] D. Yang, L. Ma, and F. Liao, “An Intelligent Voice
Interaction System Based on Raspberry Pi,” Proc. - 201911th Int. Conf. Intell. Human-Machine Syst. Cybern.
IHMSC 2019, vol. 1, pp. 237–240, 2019,[4] V. Kepuska and G. Bohouta, “Next-generation of virtual
personal assistants (Microsoft Cortana, Apple Siri,Amazon Alexa and Google Home),” 2018 IEEE 8th Annu.
Comput. Commun. Work. Conf. CCWC 2018, vol. 2018Janua, no. c, pp. 99–103, 2018,[5]
K. Bhanuabhiram, L. T. Kumar, and N. Srinivasan,“Google assistant controlled home automation,” J.
Comput. Theor. Nanosci., vol. 16, no. 8, pp. 3259–3264,
2019,[6] L. K. Vanathi, B. Mahalakshmi, S. Madhusudan, M.
Srinivasaperumal, S. Srikanth, and R. Sathish Kumar,“Smart Control of Home Amenities Using Google
Assistant and Clap Switch Circuit,” 2019 5th Int. Conf.
Adv. Comput. Commun. Syst. ICACCS 2019, pp. 350–
352, 2019,[7] S. Chaudhary, R. Johari, R. Bhatia, K. Gupta, and A.
Bhatnagar,“CRAIoT:
Concept,
Review
andApplication(s) of IoT,” Proc. - 2019 4th Int. Conf. InternetThings Smart Innov. Usages, IoT-SIU 2019, pp. 2–5,
2019,}[8] S. K. Vishwakarma, P. Upadhyaya, B. Kumari, and A. K.
Mishra, “Smart Energy Efficient Home Automation
System Using IoT,” Proc. - 2019 4th Int. Conf. InternetThings Smart Innov. Usages, IoT-SIU 2019, pp. 17–20,
2019,[9] A. K. Gupta and R. Johari, “IOT based Electrical Device
Surveillance and Control System,” Proc. - 2019 4th Int.
Conf. Internet Things Smart Innov. Usages, IoT-SIU 2019,2019,[10] A. Jain, P. Tanwar, and S. Mehra, “Home Automation
System using Internet of Things (IOT),” Proc. Int. Conf.
Mach. Learn. Big Data, Cloud Parallel Comput. Trends,
Prespectives Prospect. Com. 2019, pp. 300–305, 2019[11] P. Vashistha, J. P. Singh, P. Jain, and J. Kumar,“Raspberry Pi based voice-operated personal assistant(Neobot),” Proc. 3rd Int. Conf. Electron. Commun. Aerosp.
Technol. ICECA 2019, pp. 974–978, 2019,[12] P. Singh, P. Nayak, A. Datta, D. Sani, G. Raghav, and R.
Tejpal, “Voice Control Device using Raspberry Pi,” Proc.
- 2019 Amity Int. Conf. Artif. Intell. AICAI 2019, pp.
723–728, 2019,

Figure 14: Position of the lock in an unlocked state

Figure 15: The door position when been opened
4 CONCLUSION AND RECOMMENDATION
There are many ways to control the office door, suchas using an infrared sensor or using a weight sensor. In
this project, a smart virtual assistant for a smart officedoor had been proposed to control the office door using
voice command. The use of IoT technology in this systemprovides the feature of controlling the office door just byusing voice commands with the help of Google Assistant.
This system helps to eliminate the need for the workers
to touch the appliances. This system also helps to preventthe spread of coronavirus among the workers andprovides a safer environment for working in the officeduring this pandemic. For the recommendation, thissystem still has a room that can be further upgraded bylinking the system with the apps that allow the user tomonitor the appliances from long distances and control
them for emergency purposes. This system also needs to
add a special controller for mute people to use. As known
301

[13] C. Y. Peng and R. C. Chen, “Voice recognition by Google
Home and Raspberry Pi for smart socket control,” Proc. 2018 10th Int. Conf. Adv. Comput. Intell. ICACI 2018, pp.
324–329, 2018[14] P. Mtshali and F. Khubisa, “A smart home appliance
control system for physically disabled people,” 2019 Conf.
Inf. Commun. Technol. Soc. ICTAS 2019, pp. 1–5, 2019,[15] M. D. A. P. Mummaka Sai Srinath, Manepalli Nanda
Kishore, “Interactive Home Automation System With
Google Assistant,” Int. J. Pure Appl. Math., vol. Vol 119,no. 12, p. Page 12, 2018.

Dr, Darmawaty Mohd Ali
She is an Associate Professor in the
DepartmentofCommunication
Engineering, Universiti Teknologi
MARA (UiTM). She obtained her
Ph.D in 2012 from Universiti Malaya,
Malaysia. She has received the Masterof Engineering in Electrical in 2002
from Universiti Teknologi Malaysia. Previously, sheobtained her first degree from Universiti Kebangsaan
Malaysia with Honours, in Electrical, Electronic andSystem, graduating in 1999. She is a member of WirelessCommunication Technology (WiCOT) Research Interest
Group (RIG) and her research interests include WirelessAccess Technology and Quality of Service in WirelessBroadband.

__________________________________________________

Authors Introduction
Mr. Muhammad Zharif Aiman bin Alias
He received his B. Eng. degree inElectrical Engineering from MARA
University of Technology in 2021. He
is currently a Technical Trainee under
BriTay MyStep programme at BriTay
Asia (M) Sdn Bhd. His final year
project about Voice User Interface(VUI) SMART Office Door.

Dr. Azlina Idris
She is a Senior Lecturer in the
Universiti
Teknologi
MARA(UiTM). She obtained her Ph.D in2012 from Universiti Malaya (UM),Malaysia. She has received theMaster of Engineering in Electricalfrom Universiti Teknologi Malaysia(UTM). Previously, she obtained her first degree from Leeds
Metropolitan University, United Kingdom with Honours, inApplied Computer. She is a member of WirelessCommunication Technology (WiCOT) Research Interest
Group (RIG) and her research interests include
OFDM/OFDMA transmission, single and multiuser
precoding, modulation, MIMO transmission techniques andreceivers, channel coding, interference management andmitigation, and channel modelling (channel estimation).
___________________________________________________

Dr. Wan Norsyafizan W. Muhamad
She received her Bachelor inElectrical Engineering from the
Universiti Malaya, Malaysia in 2002.
She completed her Master ofElectricalEngineering
fromUniversiti Malaya, Malaysia in 2009.
She obtained her Ph.D in 2017 from
University of Newcastle, Australia.
Currently, she is a Senior Lecturer in Faculty of ElectricalEngineering at Universiti Teknologi MARA, Shah Alam,
Malaysia. Her current research interests are in the area of
wireless communication (Physical and MAC cross layer
optimization),
Dr. Nurain Izzati Shuhaimi
She received her PhD in ElectricalEngineering and Informatics from
Institut Teknologi Bandung (ITB),
Indonesia in 2016. She also received
her M.Eng. degree in ElectricalEngineering of Telecommunicationfrom Universiti Kebangsaan Malaysia(UKM) in 2012. Her research interests
include data networking, vehicular adhoc network and network simulation.

302