Internet of Things Based Smart Vending Machine Using Digital Payment System
Internet of Things Based Smart Vending Machine Using Digital Payment System
net/publication/355041630
CITATIONS READS
0 1,195
5 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Mohammad Jahangir Alam on 04 October 2021.
Corresponding Author:
Sohrab Hossain,
Department of Computer Science & Engineering,
School of Science, Engineering, and Technology,
East Delta University, Chittagong, Bangladesh.
Email: [email protected]
1. INTRODUCTION
The Internet of Things (IoT) incorporates various devices into networks to offer progressed and
intelligent services. The concept of intelligent gadgets, smart homes, smart cities and so on, the Internet of
Things (IoT) has risen as a region of unfathomable effect, potential, and development, with Cisco Inc.
foreseeing by 2020, the approximate number of intelligent devices will be 50 billion in the market. The present
organizations mean to enhance customer engagement by thinking of different business models and promoting
strategies as innovation keeps on developing at tumultuous speeds. The fourth industrial revolution and the
expanding reception of the IoT have transformed current corporate strategies. Actualizing sensors in existing
merchandise update them to an object. This system is fit for getting a response from its atmosphere through
sensing with other devices and fine-tuning its behaviour consequently, at the end of the day, a cyber-physical
system (CPS) [1-4]. Big data analytics methods have also been remembered for the critical purposes of the
present organizations, be that as it may, a few deterrents and restrictions have restricted their amalgamation in
rehearsal. Present big data analytics procedures should be improved to manage the ever-expanding utilization
of speed and veracity of captured data [5, 6].
The vending machine is essentially an IoT-enabled automated machine that dispenses items like
drinks, snacks, foods and so forth. The vending machine can assist shopkeepers with reducing their expenses
by paying a lower rental charge with 24 hours of working time each day, thereby maximizing their profit
margin. A customer can buy products easily with the help of digital payment systems through the vending
machine. Vending machines are extensively and frequently used in many technologically advanced nations
like the USA, UK, China, Japan and more [7-10].
Vending machine business is an exceedingly divided and competitive business with many small and
medium ventures per country and only two or three multinational organizations. Without a doubt, the vending
margins are not very high to the point that any interest in trend-setting innovations bringing operational cost
investment funds expects high legitimize the Return on Investment (ROI). In this manner, small vending
operators are ordinarily reluctant to put resources into new advances [11-13].
With the immense importance of vending machines, this paper presented a locker-based smart
vending machine connected to the Internet that is implemented with IoT technology, which will allow
customers to buy any product 24/7 and be cost-effective. It includes features digital platform on the web for
the vendors, refillers and admins to operate and track the business on a fingertip. As digital payment systems
are prevalent nowadays and commenced a new potentiality of payment methods, the developed smart vending
machine is locker-based, and customers can buy products by making payments using their digital payment
wallet with the help of a mobile application. The prime objective of our methodology is to diminish the overall
cost of the business and make this model suitable to draw in a more significant number of vending machine
operators that could apply this innovation, simultaneously improve the customer buying experience.
Table 1. Taxonomy of related works for IoT Based Vending Machine
References Specification Method Limitation
[14] Focuses on developing a smart vending Smart shopping-based Cyber- Do not explain the payment
machine which is an open and interoperable Physical system. method.
IoT platform.
[15] Focuses on IoT smart classroom Internet of Things based Resource The domain of the system is very
environment based smart vending machine Management System narrow.
[16] Focuses on pollution prevention caused due Reverse vending machine based Focus only on environmental
to plastic items pollution management system issues like pollution.
[17] Focuses on Designing Human Mistake-Free Human-centred design process Try to design a human
Machine involvement-free system.
From Table 1, it is observed that none of the papers focuses on mobile banking payment systems. Our
system developed an IoT-based smart vending machine where customers can make payments using their
mobile phones.
2. RESEARCH METHOD
The main goal of our research is to empower a cost-effective platform for vending machine business
with the assistance of the state of the art technology and IoT solutions. Figure 1 depicts the underlying high-
level scenario (SCN) amongst the key different components and users.
2.1 SCN-1
Customers will be connected to the Internet in their smartphones provided by the Mobile Network.
2.2 SCN-2
Each vending machine has a unique QR code (Quick Response code) printed to its body, containing
a specific URL connected to a web-based system that gives a virtual representation name Virtual Vending
Machine to the customer. In this way, the client can see the list of products of that particular vending machine
and select the items to purchase the items from the machine.
2.3 SCN-3
A mobile application has been developed to interact with the Virtual Vending Machine, which needs
to be installed in the customer's smartphone. It comes up with the advantage of enabling greater security in
payment from the user's wallet and provides a comfortable user experience to the customer to interact with the
machine to purchase the product.
2.4 SCN-4
An IoT Gateway is installed inside the physical vending device and connected through the Internet.
This built-in electronic board is designed and assembled with Arduino compatible modules with meagre costs.
After completing a successful payment, the machine gets the request to dispense the item in the locker.
2.5 SCN-5
Digital Payment Service receives the customer payment that has been paid through the app. On the
Internet of Things-based vending machine, mobile proximity payment can be applied using a smartphone app
in a fully contactless way [18].
2.6 SCN-6
The payment goes to the Merchant Account legitimately after deducting a particular percentage as a
commission that the vending machine operator agreed to receive from the merchant.
3. IMPLEMENTATION
In our proposed framework, a user has to install a mobile application that we have developed to
communicate with the vending machine. Through this application, a customer needs to sign in by giving a
mobile number.
For the first time, a customer needs to verify the account by providing a verification number that has
been generated and sent by the system to the customer's mobile number. After the successful login customer
needs to scan the printed QR code in the machine; if the internet connection is available on the customer's
phone, the list of products with the price of the particular machine will be displayed in the app. Customers can
choose the products and make the payment through their Digital Payment Service account integrated with the
mobile app. In this system, we used bKash, a top-rated Bangladeshi digital payment service, for the simulation
[19]. After a successful transaction, the products will be dispensed from the lockers for collection.
The way toward buying items in our framework is straightforward, and it tends to be finished in three
stages, as shown in figure 2.
How it works:
▪ Scan the QR code printed on the vending machine.
▪ Choose the product and pay through a digital payment account.
▪ Collect the purchased item.
Customers can even now discard any item from the list subject to their tendency. These features are
giving a decent user experience in terms of purchasing items from the vending machine. By tapping the "Buy
with bKash" button down, the customer will continue to make the payment through the bKash payment
system. Ensuing to pick things customers need to pay by bKash by utilizing their bKash credentials is shown
in figure 5.
3.1.3 The Process of the payment is saved and issued using real money.
To make a successful payment, customers must have a sufficient balance in their bKash wallet and provide a
valid bKash PIN. Once the payment is successful, the amount issued for the purchased items will be deducted
from the customer's bkash wallet, which is entirely handled by a digital payment company (bKash). All the
necessary information of payment, such as items, number of items, customer, transaction id, etc., are saved in
the database as payment history, which is helpful to track the payment and manage the inventory.
Internet of Things Based Smart Vending Machine using Digital Payment System (Wahidul Alam et al)
724 ISSN:2089-3272
Figure 6 describes the building blocks of the architecture of the software application that has been
designed. This high-level diagram depicts the relationship between the components and the scenarios (SCN)
of their interactions. It also shows the three primary services of the system are Application, API and Data
Storage, where Application and API together play a role as one block.
The web application has three types of users. Customers are passive users of the system. In SCN-1,
the mobile customer application interacts with the web application through the API provided by the web
system. Customers can create accounts using OTP (one-time-password) verification code in the system and get
the list of the product of the intended vending machine. Also, the web application can store the user payment
information to give a seamless experience to the customer while purchasing. This web application bridges the
digital payment system and the customer application enabling all the business logic and securities.
SCN-2 vendors can use the web application to manage all their vending machines. Each vendor gets
a dedicated account and a dashboard to monitor the business, as shown in figure 7. Vendors can refill the
lockers when they are empty or the product of the locker has sold out, as in figure 8, can check all the
transactions and business progress using the dashboard panel as figure 9.
The SCN-3 is the interface of the Admin and the web application. Admin will also have a dedicated
panel and dashboard, as in figure 10, where they can manage and monitor all the vending machines and vendors
in one place.
The web application provides the API to communicate between users and the applications, as depicted
in SCN-4.
Internet of Things Based Smart Vending Machine using Digital Payment System (Wahidul Alam et al)
726 ISSN:2089-3272
3.4. Process of security applied for this whole system, as it is using cashless payment
i. Digital payments: As our system uses the secure digital payment API of bKash, the security measures of
cashless digital payment are almost dealt with by the company. Therefore, as long as the user is authorized
and uses the personal account, the payment is highly secure.
ii. Secure Web communications: included SSL (Secure Socket Layer) in the system so that our web
application uses HTTPS to make sure the data traded on the web are secured.
Figure 15 shows that ATmega 2560 is used, which operates at 16 MHZ frequency, 256KB flash, 8KB
RAM is the master microcontroller (MCU), or the brain of the whole system peripherals are connected to it.
Esp8266 wi-fi module [27] is used for convenience and affordability compared to the SIM900,800 GPRS
module [28]. SIM Card wi-fi router has been used in this module to provide a wi-fi access point to connect
more than one device within a specific range, saving cost and working more efficiently. LED light represents
the locker of a real vending machine that has been used to simulate our method to determine if the locker is
open or not. Figure 15 shows the main components used in the prototype.
Figure 17(a). Electric Cabinate Locker Figure 17(b). RS485 Control Board
The Electric Cabinet Lockers are plugged in RS485 Control Board as figure 17(b), which connects the lockers
with the Arduino's power supply and controls the voltage supply to the lockers. As soon as customers purchase
specific products using Digital Payment through Mobile App, the payment record has been saved, and the
vending machine receives the request to dispense the ordered items. The status of specific lockers containing
ordered products will be updated from "off" to "on" in the database, as shown in figure 18.
Table 2 summarizes the performance test result of 150 consecutive API calls. Figure 20 represents the
average response time of the API request calls. The average time to complete a whole purchasing process has
been depicted in Table 1. The user gets the list of products of a particular vending machine. The average time
takes 2100 milliseconds, mainly fetching from the database with a GET request. The user selects the products
from the list and presses the payment button. After providing the user payment pin, it takes 6300 milliseconds
to process the payment in the digital payment method system (bKash) and update the payment status on the
database.
Internet of Things Based Smart Vending Machine using Digital Payment System (Wahidul Alam et al)
730 ISSN:2089-3272
In addition, in the prototype vending machine, we simulated the purchasing experience as shown in Figure 21.
After a successful transaction with the bKash digital payment system using the mobile app, the specific lockers
have been opened to dispense the products to the customer.
5. CONCLUSION
In this paper, a presentation of an innovative IoT platform has been aimed to be supported, covering
a wide range of industries, devices and applications. We designed an intelligent application of vending machine
for our country Bangladesh, which will be pretty efficient and helpful for many aspects. This paper's novel and
cost-effective approach integrates mobile applications and payment gateway and securely purchases
smartphones with digital payment methods. This IoT solution will provide a new experience to the customers'
buying products at their convenience, is cost-effective, user-friendly, and easy to operate. Moreover, the same
application incorporates a digital payment (bKash) method that makes a trouble-free experience, unlike the
traditional approaches. Thus, this innovation can be extended significantly in various industries to take it to the
next level of technological advancement in IoT sectors.
REFERENCES
[1] Y. Zhou, F. R. Yu, J. Chen and Y. Kuo, "Cyber-Physical-Social Systems: A State-of-the-Art Survey, Challenges
andOpportunities," IEEE Communications Surveys & Tutorials, vol. 22, no. 1, pp. 389-425, 2020.
[2] A. Sajid, H. Abbas and K. Saleem, "Cloud-Assisted IoT-Based SCADA Systems Security: A Review of the State of
the Art and Future Challenges," IEEE Access, vol. 4, pp. 1375-1384, 2016.
[3] M. Dimitris, V. Ekaterini, and V. Zogopoulos, "An IoT-based Platform for Automated Customized Shopping in
Distributed Environments," Procedia CIRP, vol. 72, pp. 892-897.
[4] V. Sharma, I. You, K. Yim, I. Chen and J. Cho, "BRIoT: Behavior Rule Specification-Based Misbehavior Detection
for IoT-Embedded Cyber-Physical Systems," IEEE Access, vol. 7, pp. 118556-118580, 2019.
[5] Y. Sun, H. Song, A. J. Jara and R. Bie, "Internet of Things and Big Data Analytics for Smart and Connected
Communities," IEEE Access, vol. 4, pp. 766-773, 2016.
[6] M. Marjani et al., "Big IoT Data Analytics: Architecture, Opportunities, and Open Research Challenges," IEEE
Access, vol. 5, pp. 5247-5261, 2017.
[7] M. K. Korucu, O. Kaplan, O. Buyuk, and M. K. Gullu, "An investigation of the usability of sound recognition for
source separation of packaging wastes in reverse vending machines," Waste Management, Article vol. 56, pp. 46-
52, Oct 2016.
[8] G. Mann, K. Hosig, A. G. Zhang, S. M. Shen, and E. Serrano, "Smart Snacks in School Legislation Does Not Change
Self-Reported Snack Food and Beverage Intake of Middle School Students in Rural Appalachian Region," Journal
of Nutrition Education and Behavior, Article vol. 49, no. 7, , 2017.
[9] Y. B. Park and H. S. Park, "Smart vending machine systems: operation and performance," European Journal of
Industrial Engineering, Article vol. 9, no. 4, pp. 409-431, 2015.
[10] Y. Shoji, K. Nakauchi, W. Liu, and Ieee, Community-based wireless IoT infrastructure using ubiquitous vending
machines (2016 Cloudification of the Internet of Things). New York: Ieee, 2016.
[11] P. K. D. Pramanik, S. Pal, and P. Choudhury, "Beyond Automation: The Cognitive IoT. Artificial Intelligence Brings
Sense to the Internet of Things," Cognitive Computing for Big Data Systems over Iot: Frameworks, Tools and
Applications, vol. 14, 2018.
[12] R. A. Sowah et al., "Interoperability of Heterogeneous Appliances in Home Automation Using the AllJoyn
Framework,"2018 Ieee 7th International Conference on Adaptive Science &Technology (IEEE International
Conference on Adaptive Science and Technology, New York: Ieee, 2018.
[13] G. Zadorozhko, Y. Nikolaev, O. Barabash, and O. Goncharenko, "Problems and Prospects for the Implementation
and Development of Smart Accounting System at Municipal Transport," Marketing and Management of Innovations,
Article no. 3, pp. 208-215, 2018.
[14] M. Dimitris, V. Ekaterini, and V. Zogopoulos, "An IoT-based Platform for Automated Customized Shopping in
Distributed Environments," in 51st Cirp Conference on Manufacturing Systems, vol. 72, pp. 892-897, 2018
[15] V. P. R. Enugala and S. Vuppala,"Internet of Things - based Smart Classroom Environment",2018 Fifth International
Conference on Parallel, Distributed and Grid Computing, New York: Ieee, 2018, pp. 193-198.
[16] S. Sambhi, P. J. I. J. o. S. A. E. Dahiya, and Management, "Reverse vending machine for managing plastic waste,"
International Journal of System Assurance Engineering and Management, pp. 1-6, 2020.
[17] A. Ramos, N. Adrielly, A. Soler, I. Francisca, F. M. Idalia, and L. M. J. P. M. Jéssica, "Designing Human Mistake-
Free Machine: a Mexico City Public Transport Commuters' Approach,"Procedia Manufacturing, vol. 42, pp. 399-
405, 2020.
[18] A. Solano, N. Duro, R. Dormido, and P. Gonzalez, "Smart vending machines in the era of internet of things",Future
Generation Computer Systems-the International Journal of Escience, vol. 76, pp. 215-220, Nov 2017.
[19] S. R. Maliha, M. N. J. I. J. o. B. Aziz, and M. Future, "User Perspective Towards M-banking in Bangladesh: A Case
Study Based on University Students," International Journal of Business and Management Future, vol. 4, no. 2, pp.
1-5, 2020.
[20] R. H. Cao, Z. Tang, C. B. Liu, and B. Veeravalli, "A Scalable Multicloud Storage Architecture for Cloud-Supported
Medical Internet of Things," Ieee Internet of Things Journal, vol. 7, no. 3, pp. 1641-1654, Mar 2020.
[21] K. L. Xiao, Z. P. Gao, W. S. Shi, X. S. Qiu, Y. Yang, and L. L. Rui, "EdgeABC: An architecture for task offloading
and resource allocation in the Internet of Things," Future Generation Computer Systems-the International Journal
of Escience, vol. 107, pp. 498-508, Jun 2020.
[22] M. M. Rana, "IoT-Based Electric Vehicle State Estimation and Control Algorithms Under Cyber Attacks," Ieee
Internet of Things Journal, vol. 7, no. 2, pp. 874-881, Feb 2020.
[23] R. Palanivelu and P. S. S. Srinivasan, "Safety and security measurement in industrial environment based on smart
IOT technology based augmented data recognizing scheme",Computer Communications, vol. 150, pp. 777-787, Jan
2020.
[24] A. Bogdanowicz, M. Zacharewicz, and J. J. S. J. o. P. N. A. Król, "The use of a microcontrollers in hygrometric
measurements application," Scientific Journal of Polish Naval Academy, vol. 61, 2020.
[25] L. Zhou, Z. Qiu, and Y. J. T. o. t. A. He, "Application of WeChat Mini-Program and wi-fi SoC in Agricultural IoT:
A Low-Cost Greenhouse Monitoring System," vol. 63, no. 2, pp. 325-337, 2020.
[26] L. Du, A. J. Prasad, M. Gänzle, and M. J. F. R. I. Roopesh, "Inactivation of Salmonella spp. in wheat flour by 395
nm pulsed light emitting diode (LED) treatment and the related functional and structural changes of gluten,"Food
Research International, vol. 127, p. 108716, 2020.
[27] H. D. Ahlawat and R. Chauhan, "Detection and Monitoring of Forest Fire Using Serial Communication and wi-fi
Wireless Sensor Network",Handbook of Wireless Sensor Networks: Issues and Challenges in Current Scenario's:
Springer, 2020, pp. 464-492.
[28] R. Alvianda, A. Triayudi, and D. J. J. M. Hidayatulloh, "Detection of Blood and Rhesus With Arduino Uno Mega
2560," JurnalMantik, vol. 3, no. 4, pp. 211-221, Feb 2020.
BIOGRAPHY OF AUTHORS
Wahidul Alam received his MSc in Advance Computing with Full Funded Chinese
Govt. Scholarship from the Tsinghua University, Beijing, China 2018. He is a Senior
Lecturer & Program Coordinator at the Department of Computer Science and
Engineering, Faculty of Science, Engineering and Technology, University of Science
& Technology Chittagong. His research interests include Internet of Things, Machine
Learning and Blockchain.
Dhiman Sarma is presently the Department Chair and Assistant Professor of Computer Science
and Engineering at Rangamati Science and Technology University, Bangladesh. He received his
MSc in Information and Communication Systems Security (ICSS) from the Royal Institute of
Technology [KTH], Stockholm, Sweden. He is a PhD fellow at Chittagong University of
Engineering and Technology, Bangladesh. His research interests span across Cyber Security,
Machine Learning, Sentiment Analysis and IoT.
Rana Jyoti Chakma is an Associate Professor in the Dept of Computer Science and Engineering
at Rangamati Science and Technology University, Bangladesh. He obtained his Master's degree
in Computer Science from the University of New South Wales (UNSW), Sydney, with a
scholarship from the Australian Govt. He has more than 26 years of working experience both in
industry and tertiary education. He has teaching experience in New Zealand, United Arab
Emirates, and Bangladesh. His research interest includes AI. ML and IoT. He authored two
textbooks in ICT and published numerous articles in various journals and magazines.
Mohammad Jahangir Alam completed post graduation (MSc in CSIT) in 2008 from Southern
University Bangladesh, Chittagong. He is an Assistant Professor and Coordinator at the
Department of Computer Science and Information Technology in Southern University
Bangladesh, Chittagong. He has published more than 22 technical research papers in reputed
national, international journals and conferences. His research interests include Cloud Computing,
Mobile apps design, Health Informatics, Bid Data analytics among many other fields.
Sohrab Hossain received his MSc in Data Warehousing and Data Mining with Merit from the
University of Greenwich, London, UK in 2008. Currently, he is a PhD fellow at Chittagong
University of Engineering and Technology, Bangladesh. He has published more than 20 technical
research papers in reputed national, international journals and conferences. His research interests
include Natural Language Processing, Sentiment Analysis, and Medical Sentiment Analysis.
Internet of Things Based Smart Vending Machine using Digital Payment System (Wahidul Alam et al)