Vending Machine
Vending Machine
JIMMA UNIVERSITY
JIMMA INSTITUTE OF TECHNOLOGY
Group members
DECLARATION
We declare that this research entitled “Machine learning based mask and sanitizer vending
machine with plastic bottle waste disposal system” Is our own original work and has not been
submitted as a requirement for the award of any degree in our university or elsewhere.
As research advisor, I hereby certify that I have read and evaluated this project paper prepared
under my guidance, entitled Machine learning based mask and sanitizer vending machine with
plastic bottle waste disposal system.
Signature Date
Machine learning based mask and sanitizer vending machine
ACKNOWLEDGMENT
First and foremost, we would like to express our deepest gratitude for Jimma University Institute
of technology: faculty of electrical and computer engineering for preparing this interesting and
so much valuable project design which helped us improve our knowledge and have confidence as
well as for providing us the necessary materials to come up with a solution and meet the
requirements made. Next, we would like to express our great thanks to our advisor Mr. Boaz B.
who spent his time in giving suggestions, comments and his knowledge to develop our duty on
the design and implementation of this project. Last but not least the guidance and support
received from all the teachers and members who contributed to this project, was vital for the
success of this project and we are grateful for their support.
Machine learning based mask and sanitizer vending machine
ABSTRACT................................................................................................................................................. II
INTRODUCTION ........................................................................................................................................ 3
METHODOLOGY ..................................................................................................................................... 12
LIMITATIONS ........................................................................................................................................... 44
FUTURE WORKS...................................................................................................................................... 44
CONCLUSION ........................................................................................................................................... 45
RECOMMENDATION .............................................................................................................................. 46
REFERENCES ........................................................................................................................................... 47
APPENDIX ................................................................................................................................................. 48
Machine learning based mask and sanitizer vending machine
Acronyms
3D 3dimension
AI Artificial Intelligence
DC Direct Current
HD High Dimension
IR Infrared
KG Kilograms
I
Machine learning based mask and sanitizer vending machine
ABSTRACT
Sanitizers and masks have become the most commercial products of the year considering the
pandemic issue that has happened all around the world. Due to the rapidly rising population the
stress on the multiple resources of masks and sanitizers has been remarkable. The problems
encountered caused a change in people’s life style and thus needing a better modernized solution.
Vending machine is a system that helps to get/ acquire the items needed.
To avoid these problems this project titled “Machine learning based mask and sanitizer vending
machine with plastic bottle waste disposal system” is aimed at proposing a machine which can
vend the mentioned items to the customer with the appropriate methods of developing the
functionalities needed. This project is based on machine learning technology which is one way of
developing a system with image processing for the identification of birr currency note for the
country. This identification mechanism is done through an image processing technology which is
embedded to a raspberry simulation. The raspberry simulation has let a camera to interact with it
for the sake of identifying the input through the machine which after the camera takes in shot of
the input the camera, the raspberry validates the input. The fact that this project is based on
image processing minimizes the unnecessary costs of using different sensors for the validation/
assurance of the correct birr currency into the machine since image processing uses nothing but a
code done on a collected data. After validation process is completed via image processing the
next step which is done on proteus simulation shown on this project layout will be completed
based on the customer’s preferences.
The machine is helpful since it is convenient, efficient and user friendly to use. It is cost effective
to use compared to other vending machines as the tools used are reduced by way of machine
learning in this project thus providing a better vending method than others. Therefore this project
aims at developing a system whereby people’s way of life making it easy and interesting.
II
Machine learning based mask and sanitizer vending machine
CHAPTER ONE
INTRODUCTION
1.1 BACKGROUND
Sanitizers and masks have become the most commercial products of the year considering the
pandemic issue that has happened all around the world. Due to the rapidly rising population the
stress on the multiple resources of masks and sanitizers has been remarkable. The problems
encountered caused a change in people’s life style and thus needing a better modernized solution.
With the improvement in the technology there are many advanced machineries useful for
mankind. One of them is a coin operated telephone. This machinery has been very useful to the
community and has been giving service in our country for quite some time now. With the same
way and technology, the telephone machine operates, in this project the service is changed into
providing a mask and sanitizer for the individual requesting the items based on their preferences.
It has been designed to be used in public places where the scarcity might happen.
The demand for machineries like a vending machine has increased due to the change in the
lifestyle of people however there is a seldom usage in them. The machine has numerous input
and output to provide service to the customer. It accepts coins as well as plastics for recycling
purpose as an input to provide service to the customer. So this project not only provides an easy
access to the items but also avoids environmental pollution while doing so.
Looking at the specifications required for the vending machine and for the simplicity of our
application and the system, machine learning was used. Since the money currency that is used to
request for the items that are needed by the consumers need to be identified as a real currency to
give a service, Image processing is through machine learning is used to identify the real note.
After identifying, through a raspberry pi simulation it’s to be shown that the machine dispenses
the items that are required with a fixed annotation of Ethiopian currency notes (5 birr and 10
birr).
3
Machine learning based mask and sanitizer vending machine
In addition to the input of money, this project also explains how a plastic input system works /
functions the vending machine. This is done by measuring the weight of the recyclable plastics
which are inserted into the machine by the customer to get the service that is desired. For that
reason, a weight sensor is used to measure the weight of the plastics inserted into the machine to
identify whether the person have given sufficient amount of plastics. And once the person has
inserted enough amounts of plastics/ based on the programmed amount in KG, the machine will
easily make the items available to be dispensed.
In the recent time, the need for facial masks and sanitizers has increased tremendously due to the
pandemic that has caused millions to get infected and to die all around the world. Likewise, the
pandemic has caused social, political as well as economic disruption in our country. Among one
of the many mischiefs that has happened is the scarcity in supply of well-prepared masks and
sanitizers to the large community.
Currently, the majority people purchase these items which help prevent the pandemic through a
very harmful way. These items are being sold to the majority through hand by hand on the street
in the absence of sanitized area and since the facial masks and sanitizers are to be kept out of
contagion due to the feared viruses and bacteria which are very contagious. Because of this the
current marketing system is very endangering for the community with less income.
There is another concern for the community in regarding to plastics which is a disastrous
situation nowadays. Plastics are being thrown everywhere. It’s a well-known fact that the
disposal of plastics into the environment is very hazardous and it’s causing diverse associated
problems. Environmental pollution is a major environmental burden if not handled carefully. The
solution to this big concern is recycling the existent plastics and reducing the manufacturing
4
Machine learning based mask and sanitizer vending machine
capacity. When coming to the concept of recycling there is a little awareness of the
hazardousness of the plastics to the environment in our country and due to this majority of the
people has an unpleasant way of disposal.
In our country wasted plastics are one of main problem, by making the environment polluted and
unattractive. Especially, garbage’s that are made up of plastics are the main contributors of this
pollution. Plastics are harmful for environment because they take lots of years to degrade. They
take many years to decompose. If we collect those plastics and keep it somewhere, it cannot be a
solution. It leads to other pollution. Thus, the solution of this problem is recycling and rebuilding
those plastics to a useful material.
Solution proposed
This project proposes a solution for these problems by proposing a system where by a vending
machine works with 2 input systems (coin and plastics). It takes plastics as an input and delivers
the mask/sanitizer based on the consumer preference and the amount of the plastics that person
inserted into the machine. It is a machine which will provide service by itself and the customer
could easily purchase him/herself free from any contagion. In addition to that, it will accept
plastics as an input creating a motivation for the community to dispose plastics in the appropriate
manner. Thus, protecting the environment from new hazards every day.
1.3 SCOPE
The aim of this project is to design, develop and implement a vending machine that vends masks
and sanitizers. This machine is capable of scanning a 5 birr and 10 birr Ethiopian currency notes.
This project has three main parts. The first one is a part that gives a choosing option to the
customer while displaying the amount the customer needs to dispend into the machine to get the
service. The second is a part which accepts and validates birr/plastics, which is designed by
software that makes sure the note qualifies for the real currency. Developing software that is
used for the image processing is the third part of the project. This designing software will be able
to process the image through the camera that is going to be connected through the raspberry pi
port. Finally, after the data is validated the machine will dispense the desired product.
5
Machine learning based mask and sanitizer vending machine
1.4 OBJECTIVES
One of the core ideas in making the dispensable items masks and sanitizers in this project is due
to the incredibly high demand of usage in them at anytime and anyplace. And in addition to that,
these items need to be handled very cautiously to eliminate the contagion of any bacteria and
viruses. Due to that it requires a machine which is clean enough and free from any contagions to
deliver the items instead of when handling the transaction between people.
6
Machine learning based mask and sanitizer vending machine
These vending machines meet the requirement of the people since they do not need much
attention and time to work. Minimum time is required to keep them serviced and stocked with
product. When we come to the marketing business strategy of it, one of the greatest things is that
vending machines don’t have advertisement and marketing costs and no overheads cost as it
eliminates the need for the employees who sell products. And it can also work in a small working
space.
7
Machine learning based mask and sanitizer vending machine
CHAPTER TWO
LITERATURE REVIEW
History of Vending Machine
Although the practice of machines like a vending machine in our country is not well practiced,
there has been a practice of it all around the world with a different motive or purpose for using.
Even though it may be thought that vending machines are modern convenience they actually go
way back to ancient times. To take a note of the first vending machine that was invented was that
of the ancient Greek mathematician and engineer hero of Alexandra. It started with an invention
that took coins and dispenses holy water. Once the coin went into the machine, it would roll and
drop into a pan attached to a lever. The weight of that coin would release a flow of water. The
next form of vending machines came in England sixteen centuries later. The devices were made
of brass and sat in taverns to sell tobacco. Then, an English bookseller by the name of Richard
carlie sold banned books through a vending machine in 1882. The machines like we know them
today were created in the 1880s and were first introduced in the U.S. as items that sold postcards
and notepaper, among other things, in train stations and post offices [1].
Coin-operated machines
During the 1880’s, the first coin operated vending machines were introduced in London,
England. The machines were commonly found at railway stations and post offices because they
were convenient for purchasing envelops, postcards and notepaper. In 1887, the first vending
machine servicer, the sweetmeat automatic delivery co., was founded. And that’s how the
vending machine got introduced to the U.S. and installed on the elevated subway platforms in
New York and sold a gum. Following the coin operated gum dispense machine soon there was a
coin- operated restaurants in Pennsylvania which was opened in 1902 and lasted 1962.
The country most well-known for its usage of a vending machine is Japan. Japan has a reputation
for having some of the most innovative uses of automated vending, providing machines that
offer fresh fruits and vegetables, sake, hot foods, batteries, flowers and clothing. Japan has the
highest per capital rate of vending machines in the world. [2]
8
Machine learning based mask and sanitizer vending machine
The most popular dispensed item among all the items is considered to be drink and snacks. The
vending machines that dispense soda into cups came around in the early 1900s and in 1937, they
began dispensing bottles drinks. Coca-Cola was the first and Pepsi soon followed suit. Once the
technology was perfected, vending machine with snacks came about as well. In the mid-2000s,
companies began installing credit cards onto vending machines so customers wouldn’t have to
have the right change. They could also sell higher priced items like laundry items, over the
counter medications and other products [2].
Barsha Samantray (2019). Implementation of an automatic chocolate vending machine based on RFID
and arduino UNO. Electrical Engineering. This paper approaches an automatic chocolate vending
machine which uses a combination of arduino uno and RFID technology. The machine is useful on places
where people gather a lot and saves time. It provides 3 different types of chocolates and also involves 3
types of RFID cards. This work is based on coin that only accepts some particular coins as programmed
in microcontroller. Here rather than inserting the coin to buy the product, one has to scan the RFID card
9
Machine learning based mask and sanitizer vending machine
to buy the product. After reading the card by the reader some options of products come on the screen in
front of the user. Then user has to select one of those options, later some amount from the RFID card will
be deducted corresponding to the chosen product and machine provides the selected product at its output
[3].
Vishal, T. Sushmita, W. Nishant, J. (2017). medicine dispensing machine using raspberry pi and Arduino
controller. Electronics and communication engineering. They proposed a project whereby it presents a
machine designed to provide health care at areas where having a medical store may not be feasible or
possible. It allows the user to select a medicine, pay the required amount after it verifies the amount
received and dispense the medicine. It uses an image processing unit controlled by raspberry pi to
authenticate the amount. While the payment module and medicine dispensing modules are controlled by
the Arduino which is connected to the raspberry pi serially (USB cable) [4].
Shweta Dour, Rishikesh Shukla, Dishita Makwana, et el. (2017). Vending machine using 8051 Microcontroller.
Electrical and Electronics Department. This paper presents a vending machine which operates with coin meaning
that it is coin based. While these machines can be implemented using different methods this project paper used a
microcontroller 8051. Like the mentioned vending machines these machines also aim at making it easy for small
purchases [5].
D V Raagu, Gayaz Mohamed, Md Mohiyuddin Sharif, et el. (2016-2017). Design and fabrication of coin
operated portable water vending machine. Mechanical Engineering. This project is proposed to reduce the
stress on the multiple water resources due to the rapidly rising population and the increased need for fresh
water. It delivers the purified water to the public by using the sensors and microcontrollers based on the
mechatronics principles and operate with different coin [6].
K.R.Nimisha, K.Indumathi, R.Divyamani. et el. (2017). Smart Newspaper Vending Machine. Department
of ECE. This project titled “smart newspaper vending machine “is proposed to deliver the newspaper to
the public by using the better user interface and microcontrollers based on the mechatronics principles.
Which is cheap to deliver to college students It is designed to deliver the newspaper by scanning the
respective RFID tag which was given by the agent [7].
10
Machine learning based mask and sanitizer vending machine
This project paper takes the same approaches with some features added to it and the scope being defined
on the current issue. The fact that it vends a mask/sanitizer is very suitable for the large community. In
order to minimize the cost and the communities’ need of using a less costly system image processing is
used to identify the birr currency rather than additional sensors. The raspberrypi simulation is done by
having an image processing as to identify the birr currency. In addition to this main operating system, this
project also proposes an idea of a vending machine which operates by another input which is plastic by
measuring the weigh and providing service the same way as the coin does. This will be beneficial for the
environment as it helps prevent the improper damping of plastics and will help people have know-how
about the hazardousness of plastics on the environment and the good side of recycling plastics.
11
Machine learning based mask and sanitizer vending machine
CHAPTER THREE
METHODOLOGY
12
Machine learning based mask and sanitizer vending machine
Based on the steps shown above by the block diagram, we can classify the RAD method approach into 4
different steps.
Requirements planning: -
On this step of development, we agreed on the system goal and requirement such that the requirement
plan we did, does not restrict later development unnecessarily. And so, we have planned to do a vending
machine where anyone can easily request the item they need (mask or sanitizer) and get it. The machine is
supposed to vend the items after the verification process of the input money is assured. In addition to the
money this machine also goes through a verification process for plastic bottles. The verification process is
done by image processing. These requirements are essential in this project as these are the main
requirements that we need to fulfill in assembling a vending machine so as to modify the current existing
system in a better way.
User design: -
Next to planning the requirements, we have planned a better efficient and well organized way of meeting/
fulfilling those requirements by a method of brainstorming. Since we have worked on the project by
group the best way to design/develop the system is by using the ideas that emerge from different one of
us, analyze those ideas and coming into a specific way of path to developing the system.
Construction: -
After designing the system, we have received a comment/ suggestion to improve the work we have done
on the project. We first planned out the system material requirements based on the functional requirement
that needs to be done including the essential concept of reducing the overall cost of the system. Based on
that we then started coordinating the material specifications in an efficient and organized manner as
shown by the block diagram. After organizing the block diagram and briefly explaining the working
principles of each individual materials and the interacting principles of those materials with other
materials in the system, we then assembled it on the proteus software, simulated it and saw the output.
That’s why it has evolved into a better performing project than what it was first designed for.
Cut over: -
This is the final stage where we deliver the finished product/project by incremental deployment either to
the examiner or the department as this is a project on high level education and currently can’t be delivered
to the customers. On this model, the user design and construction phases overlap with the users constantly
providing adjustments to the developers in a sort of continuous feedback loop. The project iterates the
13
Machine learning based mask and sanitizer vending machine
user design and construction phases as needed. When the application has met all the requirements, it is
delivered to the users.
Such embedded systems are characterized by a single, well defined purpose at a definite point in time and
by generally long life time. This development stage cannot be carried out by trial and error method as the
damage is high leading to a higher cost. So before the overall deployment, our method of performing on
the hardware materials will be such that it will be carried out at completely as possible during the early
design phase step by step.
3.2.1 Observation
By observing we meant to say what we have saw because accuracy of observation is the equivalent of
accuracy of thinking. Particularly, we have tried to see the problems that are encountered and are in
involvement of every day to day lives of the community which helped 6 us to come up with the idea of
using vending machine and introducing to the community a smart way of life. In addition to observing the
problems we have also observed how easily the people are interacting to the materials we are going to
interface them to and also the availability range of the materials.
14
Machine learning based mask and sanitizer vending machine
3.2.3 Brainstorming
Brainstorming is the best approach when it comes to finding out a way to do and on bringing the system
requirements to success to come up with ideas on data collection as well as instrumentation.
Brainstorming is group creativity techniques by which efforts are made to find a conclusion for a specific
problem by gathering a list of unrestrained ideas contribute by the team members. This was the most
effective method when it comes to our project since we were able to think more freely and suggest new
15
Machine learning based mask and sanitizer vending machine
ideas and after that the suggested ideas were noted down and after the brain storming session ended those
ideas were evaluated.
Weeks/activities 1 2 3 4 5 6 7 8
Requirement
planning
User design
Construction
cutover
16
Machine learning based mask and sanitizer vending machine
General block diagram of mask/sanitizer vending machine using raspberry pi has been shown
above. It consists of three sections, these are: - input, the controller and output sections. First the
controller section remains at waiting state for receiving a signal from input section which
includes infrared sensor and the camera. . The controller section validates the input through the
camera and takes decision and activates the output section which includes LCD display, DC
Motors and Bulbs. The switch in this block diagram represents 5 / 10 birr. It is switched on/ off
to show valid / invalid birr in the simulation. Once the switch is on one of the motors starts
which indicate it will vend the item.
17
Machine learning based mask and sanitizer vending machine
18
Machine learning based mask and sanitizer vending machine
o Blender: - is a free and open-source 3D computer graphics software toolset used for
creating animated films, visual effects, arts, 3D printed models, motion graphics,
interactive 3D applications, virtual reality and computer games. We used this software
for design a 3D model for our vending machine. [9]
19
Machine learning based mask and sanitizer vending machine
Raspberry pi:
FIGURE: 3. 4 Raspberry pi
Raspberry pi is a series of small single-board computers which is a low cost, credit-card sized
computer that plugs into a computer monitor or TV and uses a standard keyboard and mouse. It
has a dedicated camera input port that allows users to record HD video and high-resolution
photos. It enables to use python and specific libraries written for the pi, making it easy to take
photos/videos, analyze them in real-time or save them for later processing. In this project this
credit card sized material was used in such a way as to identify the birr currency after the user
has entered the money in.
20
Machine learning based mask and sanitizer vending machine
Relay:
FIGURE: 3. 5 Relay
A relay is an electromagnetic switch that is used to turn on and turn off a circuit by a low power signal, or
where several circuits must be controlled by one signal. It is used to convert small electrical stimuli into
larger currents. These conversions occur when electrical inputs activate electromagnets to either form or
break existing current.
In this project, the relays are used to turn on the motor that is supposed to vend an item from the strage by
making a whirl turn. The program writes a high value top in 3, which activates the octocoupler which in
turn switches on the transistor. When the transistor turn on, the current flows through the relay coil
causing the relay to close, which connects 12v across the motor, causing it to spin.
21
Machine learning based mask and sanitizer vending machine
Servo Motor:
Servo motor is a self-contained electrical device that rotates parts of a machine with high efficiency and
with great precision. The output shaft of this motor can be moved to a particular angle, position and
velocity that a regular motor does not have. This motor is used in this project as it is the key element in
vending or moving the items to place.
22
Machine learning based mask and sanitizer vending machine
It is built in IR transmitter and receiver that sends out IR energy and looks to detect presence of any
obstacles in front of the sensor module. The module has on board potentiometer that lets user adjust
detection range. We use this sensor in order to detect inputs and initialize the camera for machine learning
process.
Liquid Crystal Display (LCD) is a flat panel or other electronically modulated optical devise that uses the
light-modulating properties of liquid crystals. Liquid crystals do not emit light directly, instead using
a backlight or reflector to produce images in color or monochrome. A 16x2 LCD display is very basic
module which is commonly used in various devices and circuits. A 16x2 LCD means it can display 16
characters per line and there are 2 such lines. This LCD is required in this project in order to display the
necessary information and guidance for the user on the screen.
23
Machine learning based mask and sanitizer vending machine
FIGURE: 3. 9 Flowchart
24
Machine learning based mask and sanitizer vending machine
The use case is a description of how users will perform tasks and outlines a system’s behavior as it
responds to a request. And it is represented as a sequence of simple steps beginning with a user’s goal and
ending when that goal is reached. As it can be seen from the diagrams, the customer/ user interacts to the
system and gets services which are labeled in a circle.
25
Machine learning based mask and sanitizer vending machine
The Sequence Diagram is interaction diagram that detail how the operation of a vending machine
mechanism is carried out and shows runtime interactions between the parts that make up the system
26
Machine learning based mask and sanitizer vending machine
o Collection of data sets: more than 1200 pictures of data were collected. The data include 5 birr,
10 birr and different kinds of plastic bottles. The data’s were different collected from different
angles, orientations and formation.
27
Machine learning based mask and sanitizer vending machine
o Splitting: The next process was splitting of the collected pictures to train and test classes. Since it
is a good practice to use validation split when developing the model, 20% of the pictures was
used for testing and the rest 80% was used to train. This percentage was used to make the
accuracy high.
o Choosing the appropriate tool: Following the split process we choose the appropriate tool for
labeling images and training the model which is custom vision AI software was used for both
labeling and training the plastic bottles and money.
o Training our model
o Testing the accuracy of our model and training the results. During this stage over fitting could
happen. Over fitting is when the difference in accuracy between training and validation accuracy
is noticeable meaning that the model will have a difficult time generalizing on a new dataset. To
solve this problem, we use data augmentation and add Dropout to our model. Data augmentation
takes the approach of generating additional training data from your existing examples by
augmenting those using random transformations that yield believable looking images and expose
the model to more aspects of the data and generalize better.
o Predicting on new data
o Finally, we were able to detect an image that was not included in the training dataset.
In order for the customer to interact with the system, we develop a graphical interface that is displayed on
the vending screen which interacts with the machine learning model.
The 3d modeling for the vending machine is developed to help for a better designing and for the end users
to visualize space requirements and improve accuracy. We used blender (3d model tool) to show how the
overall system would look like when it is assembled. The machine is required to have buttons for
choosing the items, birr and plastic entering dashboard, has a plastic collector and item placing slots,
spirals which are connected to the motor and used for rotating and dispensing and motors running for the
purpose of vending or dispensing. This overall requirement of the machine is to be designed by blender
and show the 3d model.
28
Machine learning based mask and sanitizer vending machine
CHAPTER FOUR
29
Machine learning based mask and sanitizer vending machine
The above figure shows the basic hardware interacting system. The user interacts with main
controlling unit by inserting money through the vending machine. And by interacting, vending of
items is possible.
30
Machine learning based mask and sanitizer vending machine
3D Model Explained
To visualize the system, blender (3d model tool) is used to show how the overall system would
look like when it is assembled.
This is the frontal view of the 3D model of vending machine as designed by the blender tool. It
shows how the items are arranged within the spiral spring like structure. It shows clearly what
item belongs to what button so that it can be user friendly and easy to use. It can also be seen
where a birr or plastic input space is and users can be assisted based on the display on the screen.
31
Machine learning based mask and sanitizer vending machine
32
Machine learning based mask and sanitizer vending machine
The GUI here shows guidance for the user on the screen. The interface shows three buttons
which are used in initializing the camera, processing , checking validity of the input then finally
integrate with the raspberry pi simulation to deliver the service.
33
Machine learning based mask and sanitizer vending machine
After inserting an amount of 5 birr as shown by the camera module, the system
will ask further confirmation by asking the user to press the process button.
The machine will validate the inserted birr which is 5 birr in this scenario and
34
Machine learning based mask and sanitizer vending machine
After inserting an amount of 10 birr as shown by the camera module, the system
will ask further confirmation by asking the user to press the process button.
The machine will validate the inserted birr which is 10 birr in this scenario and
35
Machine learning based mask and sanitizer vending machine
The 3rd scenario is when the user decides to use plastic bottles as an input and the
After validation of the plastic bottles the machine will dispense the previlage of the
items to the customer. In this project it is programmed to dispense 5 birr item which is a mask.
36
Machine learning based mask and sanitizer vending machine
If any input rather than 5 birr, 10 birr or plastic bottles are inserted into the machine, the machine
will not dispense anything and as it can be seen from the interface it declares it as an invalid
input.
37
Machine learning based mask and sanitizer vending machine
The LCD displays to choose the item, assuming the customer choose a 5 birr item/ mask, the LCD
displays to insert 5 birr to the customer. This is shown by pressing the 5 birr item1 on the proteus
software.
38
Machine learning based mask and sanitizer vending machine
After entering a valid birr of 5, the machine will vend a mask and the LCD displays dispensing mask on
the screen. This process is shown on the proteus software with a switch that denotes the 5 birr which
after being pressed it will give a signal to the raspberry pi that it is a valid 5 birr. After accepting the
money, the led switches on and the motor starts to run showing that it is vending the mask.
39
Machine learning based mask and sanitizer vending machine
vv
This simulation shows that after entering a plastic bottle, the machine will detect the validity of the
plastic and measure the weight. If it is the correct weight set by the system, it will vend mask from the
machine. The LCD also displays that it has detected a plastic bottle.
40
Machine learning based mask and sanitizer vending machine
Test Performed
Tests on functionality based on the requirements made on objectives were made. And the results
were as follows.
41
Machine learning based mask and sanitizer vending machine
42
Machine learning based mask and sanitizer vending machine
43
Machine learning based mask and sanitizer vending machine
CHAPTER FIVE
LIMITATIONS
The project that has been carried out has limitations of its own which limits the quality. The limitations
that are encountered are:
o The machine is not able to identify if a colored copy of the money was entered
o There was no automatic way of filling the items from the storage into the machine when there
was scarcity. The operator is supposed to open the slots and stuck the items into it.
o If by any case the items get stuck into the spiral rod and failed to deliver while the user ordered
the item, there is no way of detecting whether it is delivered or not.
FUTURE WORKS
There are some alterations that could be done to improve further work. These may include:
o The machine could be designed to operate based on a one-time storage per day to reduce the
hustle for the operator.
o The machine will be more convenient to use if it can accept different kinds of money including
coins.
o The machines feasibility would increase by creating a system whereby the machine differentiates
fake currency notes.
44
Machine learning based mask and sanitizer vending machine
CHAPTER SIX
CONCLUSION
This project called Machine learning based mask and sanitizer vending machine with plastic
bottle waste disposal system which is used for vending mask and sanitizer by using raspberry,
LCD, relay, obstacle infrared sensor, servo motor and camera is based on machine learning
technology which is one way of developing a system with image processing for the identification
of birr currency note and plastic bottle that is used as input for the vending machine and
integrated with raspberry to vend the mask/sanitizer to the user. The image identification used to
minimize the unnecessary costs of using different sensors for the validation/ assurance of the
correct birr currency into the machine since image processing uses nothing but a code done on a
collected data. The obstacle infrared sensor initiates the camera to capture the inputs photos and
the raspberry validates those input by using image processing. If the image taken is valid input
the obstacle infrared sensor initiate the servo motor to deliver the products based on type of
inputs by the customer otherwise the motor returns the inputs if it is an invalid input.
The machine is helpful since it is convenient, efficient and user friendly to use. It is cost effective
to use compared to other vending machines as the tools used are reduced by way of machine
learning in this project thus providing a better vending method than others. Therefore, this
project successfully met the objective requirements made and aims at developing a system
whereby people’s way of life making it easy and interesting.
45
Machine learning based mask and sanitizer vending machine
RECOMMENDATION
This project paper benefits the end-user since it is user friendly to use and has a guidance on
what to do next through the screen. Since it operates on a 24 hour basis without the involvement
of an operator, it is beneficial. It will also benefit the end-user since the items will be free from
any contagion and reduces handling of the items hand by hand creating a healthy environment. It
has variety of options and saves time as well as money for the customer.
Further improvements could be made to make the project more feasible. Finding a systematic
approach which can refill the items from a set of large stacked storage room would create a less
hustling working environment for both the operator and user. As it is mentioned the machine
operates at any time needing a convenient security system to be protected from theft. It could
also be improved by adding a feature which can identify fake currency notes. we recommend
further work to be done by accepting all currency notes including the coins and by creating a
database the operator to easily know the profit as well as the overhead.
46
Machine learning based mask and sanitizer vending machine
REFERENCES
[3] B. Samantray, "Implementation of an automatic chocolate vending machine based on RFID and
arduino uno," vol. 12, no. 12, p. 5, 2019.
[4] T. S. W. N. J. Vishal, "Medicine dispensing machine using raspberry pi and arduino controller," p. 50,
2017.
[5] R. S. D. M. e. e. Shweta Dour, "Vending Machine Using 8051 Microcontroller," vol. 6, no. 05, p. 188,
2017.
[6] G. M. M. M. S. e. e. D V Raagu, "Design and fabrication of coin operated portable water vending
machine," India, 2016-2017, p. 43.
[7] K. R. e. e. K.R.Nimisha, "Smart Newspaper vending machine," Asian Journal of A pplied science and
Technology , vol. 1, no. 1, p. 136, 2017.
47
Machine learning based mask and sanitizer vending machine
APPENDICES
RASPBERRY PI SIMULATION
# Modules D5 = 22
import time D7 = 18
#subprocess.Popen('C:/Users/Israel/Desktop/ID #---CONFIG_END---
EA-PythonProjects/try/try1.py')
# Main function
#import reader
def main () :
# make sure you update the address below
# Setup
# sys.path.insert(1, '<simulate initial files
address in your PC>') peripheral_setup()
48
Machine learning based mask and sanitizer vending machine
49
Machine learning based mask and sanitizer vending machine
pass pass
#time.sleep(1) time.sleep(1)
#lcd.clear() lcd.clear()
#pass pass
time.sleep(1) GPIO.output(motor3,GPIO.HIGH)
lcd.clear() time.sleep(1)
pass lcd.clear()
50
Machine learning based mask and sanitizer vending machine
time.sleep(1) GPIO.output(motor1,GPIO.LOW)
lcd.clear() GPIO.output(motor2,GPIO.LOW)
time.sleep(1) pass
51
Machine learning based mask and sanitizer vending machine
main()
def lcdNotValidBirr(): elif GPIO.input(26) ==1:
52
Machine learning based mask and sanitizer vending machine
button2ON() button4ON()
irBirrON() lcdNotvalidPlastic()
button3ON() #time.sleep(1)
processINValidBirr() main()
AllOFF() pass
if GPIO.input(21) == 1: irPlasticON()
Pswitch3ON()
53
Machine learning based mask and sanitizer vending machine
pass irPlasticOFF()
54
Machine learning based mask and sanitizer vending machine
super(tehseencode,self).__init__() cv2.imwrite("/home/grace/Pictures/camfeed/%s.
png"%(self.value),frame)
# loadUi("student3.ui",self)
self.logic = 1
loadUi("untitled1.ui",self)
self.TEXT.setText('Invalid Input or
self.logic = 0 no input is detected')
self.value = 1 cap.release()
self.SHOW.clicked.connect(self.onClicked) cv2.destroyAllWindows()
self.TEXT.setText("Dear customer press else:
start to purchase, make sure you inserted money
unfolded") print('not found')
# cap.release()
self.CAPTURE.clicked.connect(self.CaptureClic
ked) # cv2.destroyAllWindows()
55
qformat=QImage.Format_Indexed8
if len(img.shape)==3:
if(img.shape[2])==4:
qformat=QImage.Format_RGBA888
else:
qformat=QImage.Format_RGB888
img =
QImage(img,img.shape[1],img.shape[0],qformat
)
img = img.rgbSwapped()
self.imgLabel.setPixmap(QPixmap.fromImage(i
mg))
self.imgLabel.setAlignment(QtCore.Qt.AlignHC
enter | QtCore.Qt.AlignVCenter)
app = QApplication(sys.argv)
window=tehseencode()
window.show()
try:
sys.exit(app.exec_())
except:
print('excitng')