Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

SIR M VISVESVARAYA INSTITUTE OF TECHNOLOGY

(Affiliated to VTU, Recognized by AICTE and Accredited by NBA, NAAC


and an ISO 9001-2008 Certified Institution)
Bengaluru – 562157

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

21CS43-MICRO CONTROLLER AND EMBEDDED SYSTEMS

ASSIGNMENT-2
(Academic Year 2022-23)

CASE STUDY ON

VENDING MACHINE

Name: DENNIS M B

USN: 1MV21CS029 Branch: CSE

Semester: 4th Section: A SECTION

Faculty in charge: REKHA B N


Submission date:
TABLE OF CONTENTS

SL NO CONTENTS PAGE NO

1. INTRODUCTION/SIGNIFICANCE OF THE 1-3


DEVICE

2. FEATURES OF THE DEVICE 4-5

3 BLOCK DIAGRAM OF THE DEVICE 6

4. FLOW CHART INDICATING THE 7-8


WORKING OF DEVICE

5 SOFTWARE PROGRAM USED IN THE 9-11


DEVICE

(C++ CODE OR ASSEMBLY CODE)

6 EXPLANATION OF THE LOGIC USED IN 12-13


THE WORKING OF THE DEVICE

7 ADVANTAGES OF THE DEVICE 14-15

8 LIMITATIONS OF THE DEVICE 16-17

9. APLLICATION OF THE DEVICE 18-19

10 REFERENCES 20
CHAPTER-1 INTRODUCTION

CHAPTER-1
INTRODUCTION

VENDING MACHINE
An embedded system is a specialized computing system designed to perform
dedicated functions or tasks. Unlike general-purpose computers, embedded
systems are tightly integrated into the products they control and are optimized for
specific applications. Vending machines, while seemingly straightforward,
exemplify the intricate nature of embedded systems.

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |1


CHAPTER-1 INTRODUCTION

SIGNIFICANCE OF ELECTRIC WHEELCHAIR:

The significance of vending machines as embedded systems lies in their ability to


seamlessly blend hardware, software, and real-time operations to deliver a
convenient and efficient user experience. Here are the key significances of vending
machines as embedded systems:

 Improved Mobility and Independence: Electric wheelchairs empower


individuals with mobility challenges to move freely and independently,
reducing reliance on caregivers or assistance.

 Customization and Adaptability: Embedded systems allow for tailored


configurations and control options to accommodate individual user needs,
including speed adjustments, joystick sensitivity, and alternative control
methods.

 Precise Control: Electric wheelchairs utilize embedded systems to provide


precise control over movement, enabling users to navigate tight spaces, turn
smoothly, and operate the chair with minimal effort.

 Obstacle Detection and Avoidance: Advanced sensors integrated into


electric wheelchairs detect obstacles in the environment, helping users
navigate safely and avoid collisions.

 Enhanced Safety: Embedded safety features such as anti-tip systems,


emergency stop functions, and speed limiters protect users from accidents
and provide peace of mind to both users and caregivers.

 Battery Management: Embedded systems efficiently manage the chair's


battery, optimizing its usage and providing users with information on battery
status and remaining range

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |2


CHAPTER-1 INTRODUCTION

 Accessibility: Electric wheelchairs equipped with embedded systems make it


possible for users to access a wider range of environments, including homes,
workplaces, and public spaces.

 Reduced Physical Strain: Users with limited upper body strength or


endurance benefit from the embedded systems' assistance, reducing the
physical strain of manual wheelchair propulsion.

 Improved Quality of Life: Electric wheelchairs significantly enhance the


overall quality of life by enabling users to participate in social activities,
pursue education and employment opportunities, and engage in recreational
pursuits.

 Increased Social Inclusion: Electric wheelchairs facilitate social interactions


by granting users the ability to engage with peers, family, and friends in
various settings.

 Long-Term Cost Savings: Although electric wheelchairs may have a higher


initial cost, their long-term benefits can lead to cost savings by reducing the
need for ongoing caregiver assistance and medical care related to manual
wheelchair use.

 Technological Advancements: The ongoing development of embedded


systems and related technologies continues to improve the capabilities and
features of electric wheelchairs, making them more user-friendly and
adaptable.

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |3


CHAPTER-2 FEATURES

CHAPTER-2
FEATURES OF VENDING MACHINE

Electric wheelchairs, as embedded system devices, are equipped with a wide range
of features that enhance mobility and usability for individuals with mobility
impairments. Here are some key features of electric wheelchairs:
 Efficiency and Speed: Embedded systems in vending machines are
designed for real-time operations. This ensures that customers can quickly
make selections, complete transactions, and receive their chosen items
without significant delays. This efficiency is essential in high-traffic
locations where time is of the essence.

 24/7 Accessibility: Vending machines equipped with embedded systems can


operate around the clock, providing access to products and services even
during non-business hours. This level of accessibility is especially valuable
in locations with limited or no access to traditional retail outlets.

 Reduced Labor Costs: Vending machines significantly reduce the need for
human intervention in the sales process. This leads to cost savings for
businesses, as they don't require on-site personnel to operate the machines
continuously.

 Reliability: Embedded systems are known for their reliability. Vending


machines must operate consistently and without interruption. The reliability
of embedded systems ensures that they can withstand diverse environmental
conditions and perform their functions consistently over time.

 Security: Embedded systems in vending machines incorporate security


measures to protect against theft, tampering, and fraud. This includes
physical security features like locks and alarms, as well as encryption and
secure data handling for payment transactions.

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |4


CHAPTER-2 FEATURES

 Inventory Management: Vending machines utilize embedded systems to


manage inventory efficiently. They monitor product levels, track sales, and
generate alerts when items need restocking. This reduces the risk of running
out of stock and improves the customer experience.

 Cashless Payments: Many modern vending machines as embedded systems


support cashless payment options, such as credit cards, debit cards, and
mobile wallets. This aligns with the trend toward digital payments and
enhances customer convenience and security.

 Data Analytics: Embedded systems capture valuable data on product sales,


customer behavior, and machine performance. This data can be analyzed to
optimize product offerings, pricing strategies, and overall vending machine
operations.

 Maintenance and Remote Monitoring: Embedded systems enable remote


monitoring and diagnostics of vending machines. Operators can receive real-
time alerts about issues, perform remote troubleshooting, and schedule
maintenance proactively, reducing downtime and service costs.

 Innovation: Vending machines as embedded systems are platforms for


innovation. They have incorporated advanced features such as machine
learning algorithms for predicting inventory needs, IoT connectivity for
remote management, and even touchless interfaces in response to the
COVID-19 pandemic.

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |5


CHAPTER-3 BLOCK DIAGRAM

CHAPTER-3
BLOCK DIAGRAM

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |6


CHAPTER-4 FLOW CHART

CHAPTER-4
FLOWCHART

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |7


CHAPTER-5 LOGIC USED

Start: The flowchart begins here.


Display Available Items: The vending machine displays a list of available items
to the customer.
Customer Selects Item: The customer selects an item they wish to purchase.

Is the Selected Item Valid? (Exists in Inventory): The vending machine checks if
the selected item is available in its inventory.

No (Invalid Selection): If the selected item is not valid (e.g., out of stock or
doesn't exist), the vending machine displays an "Invalid Selection" message and
ends the transaction
.
Yes: If the selected item is valid, the vending machine proceeds to accept payment.

Accept Payment: The customer inserts money or makes a payment using various
methods.

Is Payment Sufficient?: The vending machine checks if the payment covers the
cost of the selected item.

Is Change Required?: The vending machine checks if it needs to provide change


to the customer.
.

Transaction Complete: The vending machine displays a transaction completed


message, and the transaction ends.

End: The flowchart ends here.

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |8


CHAPTER-5 LOGIC USED

CHAPTER-5
SOFTWARE PROGRAM USED IN THE ELECTRIC
WHEELCHAIR
(C++ CODE)
#include <iostream>
#include <iomanip>
using namespace std;
// Define the items available in the vending machine
struct Item {
string name;
double price;
int quantity;
};
// Function to display the available items
void displayItems(const Item items[], int itemCount) {
cout << "Available Items:" << endl;
for (int i = 0; i < itemCount; i++) {
cout << i + 1 << ". " << items[i].name << " - $" << items[i].price;
if (items[i].quantity > 0) {
cout << " (" << items[i].quantity << " left)";
} else {
cout << " (Out of Stock)";
}
cout << endl;
}
}

int main() {

DEPT. OF CSE, SIR MVIT 2022 - 2023 Page |9


CHAPTER-5 LOGIC USED

// Initialize the vending machine items


Item items[] = {
{"Soda", 1.50, 5},
{"Chips", 1.00, 7},
{"Candy", 0.75, 0} // Out of stock for demonstration
};
const int itemCount = sizeof(items) / sizeof(items[0]);
// Display the available items
cout << "Welcome to the Vending Machine!" << endl;
displayItems(items, itemCount);
// Prompt the user to select an item
int choice;
cout << "Enter the item number you want to purchase: ";
cin >> choice; // Check if the selected item is valid
if (choice < 1 || choice > itemCount) {
cout << "Invalid choice. Please select a valid item." << endl;
return 1;
}
// Check if the selected item is out of stock
if (items[choice - 1].quantity <= 0) {
cout << "Sorry, the selected item is out of stock." << endl;
return 1;
}
// Calculate the total price
double totalPrice = items[choice - 1].price;

// Prompt the user to insert money


double moneyInserted;
cout << "Insert money ($" << fixed << setprecision(2) << totalPrice << " required): ";
cin >> moneyInserted;

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 10


CHAPTER-5 LOGIC USED

// Check if the user has inserted enough money


if (moneyInserted < totalPrice) {
cout << "Not enough money inserted. Please insert the required amount." << endl;
return 1;
}

// Dispense the item and calculate change


items[choice - 1].quantity--;
double change = moneyInserted - totalPrice;

// Give the item to the user


cout << "Enjoy your " << items[choice - 1].name << "!" << endl;

// Dispense change if necessary


if (change > 0) {
cout << "Change: $" << fixed << setprecision(2) << change << endl;
}

return 0;
}

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 11


CHAPTER-6 LOGIC USED

CHAPTER-6
EXPLAINANTION OF THE LOGIC USED IN VENDING
MACHINE

Initialization: When the vending machine is powered on, it initializes its software
and hardware components. This may include loading the inventory, setting up
payment processing systems, and configuring the user interface.

Display Available Items: The vending machine displays a list of available items
to the customer. This includes the name, price, and the number of items left in
stock for each product.

User Selection: The customer selects an item they wish to purchase by either
pressing buttons or using a touchscreen interface. The vending machine waits for
the customer's input.

Item Selection Validation: The vending machine checks if the selected item is
valid (i.e., it exists in the inventory). If the selected item is not valid (e.g., out of
stock or doesn't exist), an error message is displayed, and the transaction is
canceled.

Payment Processing: The customer inserts money or makes a payment using a


payment card (credit card, debit card) or a digital wallet (e.g., Apple Pay or Google
Wallet). The vending machine verifies the payment, ensuring that it covers the cost
of the selected item.

Payment Validation: If the payment is insufficient, the vending machine displays


an error message and prompts the customer to insert the correct amount.

Dispensing Item: If the payment is successful and sufficient, the vending machine
dispenses the selected item to the customer. This involves releasing the product
into the retrieval area.

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 12


CHAPTER-6 LOGIC USED

Change Dispensing: If the customer inserted more money than required, the
vending machine calculates and dispenses the correct change.

Inventory Update: After successfully dispensing an item, the vending machine


updates its inventory by reducing the quantity of the purchased item.

Transaction Completion: The vending machine displays a message indicating the


successful completion of the transaction and possibly offers a receipt.

Return Coin or Refund: If a customer cancels their purchase or encounters an


issue, the vending machine may need to refund the money inserted or return any
unused coins.

Error Handling: Throughout the process, the vending machine must handle
various error scenarios, such as coins getting stuck, bills being rejected, or system
malfunctions. It should display relevant error messages and take appropriate
actions, such as returning money or contacting maintenance.

Security: The vending machine includes security measures to prevent tampering,


theft, or fraudulent activities. This may include encryption for payment data,
physical locks, and security cameras.

Maintenance Alerts: If an issue arises that requires maintenance, the vending


machine can send alerts or notifications to the operator or service personnel.

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 13


CHAPTER-7 ADVANTAGES

CHAPTER-7
ADVANTAGES OF VENDING MACHINE AS EMBEDDED
SYSTEM DEVICE

Vending machines, when equipped with embedded systems, offer numerous


advantages, both for consumers and business operators. Here are some of the key
advantages of vending machines as embedded systems:
Advantages for Consumers:
Convenience: Embedded systems in vending machines enable quick and easy
access to products, eliminating the need for traditional retail staff or cashiers. This
convenience is especially valuable in high-traffic areas.
24/7 Accessibility: Vending machines with embedded systems operate round the
clock, providing access to products and services even during non-business hours.
This accessibility is crucial for people who need items outside regular store hours.
Speed and Efficiency: Embedded systems streamline the purchase process,
enabling customers to make selections, complete transactions, and receive their
chosen items rapidly. There's no need to wait in lines or deal with extended
checkout processes.
Variety: Vending machines can stock a wide range of products, catering to diverse
customer preferences. This variety includes snacks, beverages, personal hygiene
items, electronics, and more.

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 14


CHAPTER-7 ADVANTAGES

Advantages for Business Operators:

Revenue Generation: Vending machines equipped with embedded systems


provide a consistent source of income. They require minimal labor costs compared
to traditional retail stores and can generate revenue continuously.

Reduced Labor Costs: Embedded systems in vending machines minimize the


need for human intervention in sales and service roles. This leads to cost savings
for business operators, as they don't need on-site personnel to manage every
transaction.

Low Maintenance: Modern vending machines with embedded systems are


designed for reliability and require relatively low maintenance costs. Routine
maintenance includes restocking and machine servicing.

Inventory Management: Embedded systems efficiently manage inventory. They


track product levels, monitor sales, and generate alerts when items need restocking,
reducing the risk of running out of stock and optimizing inventory turnover.

Data Analytics: Embedded systems capture valuable data on product sales,


customer behaviour, and machine performance. This data can be analyzed to
optimize product offerings, pricing strategies, and overall vending machine
operations.

Security: Embedded systems in vending machines incorporate security measures


to deter theft, tampering, and fraud. This includes physical security features like
locks, surveillance cameras, and encryption for payment data.

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 15


CHAPTER-8 LIMITATIONS

CHAPTER-8
LIMITATIONS OF ELECTRIC WHEELCHAIR

1. Limited Product Selection:


Vending machines have limited space, which restricts the variety and quantity of
products they can stock. They may not offer a wide range of choices compared to
traditional stores.

2. Lack of Freshness:
Vending machines are not suitable for products that require freshness, such as
perishable foods. Items like fruits, vegetables, and dairy products are typically not
available in vending machines.

3. Limited Payment Options:


While modern vending machines offer cashless payment options, some older
machines may only accept coins and bills, limiting payment flexibility.

4. No Personal Interaction:
Vending machines lack the personal touch of human interaction. Customers cannot
ask questions, seek recommendations, or address concerns with a machine.

5. Reliability Issues:
Vending machines can experience technical issues, including product jams, coin or
bill acceptor malfunctions, or dispensing errors. These problems can inconvenience
customers and require maintenance.

6. Limited Customer Assistance:


When customers face issues with a vending machine, there is often limited on-site
assistance available. Operators may need time to respond to service requests.

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 16


CHAPTER-9 APPLICATIONS

7. Lack of Customization:
Vending machines may not offer customization options. Customers cannot request
special preparations or variations of products, which is possible in some traditional
stores.

8. Higher Prices for Convenience:


Vending machines often charge slightly higher prices for the convenience they
offer. Consumers may pay more for items compared to purchasing them from a
store.

9. Limited Payment Security:


While cashless payments are becoming more common, some vending machines
may have limited security for handling sensitive payment data, potentially making
them targets for fraud.

10. Inventory Management Challenges:


- Restocking vending machines can be challenging, especially if they are located in
remote or inaccessible areas.

11. Environmental Concerns:


- Vending machines can contribute to environmental concerns, as they often
generate waste from packaging materials and require energy to operate.

12. Lack of Personalization:


- Vending machines may not offer personalized recommendations or loyalty
programs that some traditional stores provide to regular customers.
DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 17
CHAPTER-9 APPLICATIONS

CHAPTER-9

APPLICATIONS OF VENDING MACHINE

Vending machines hold significant importance in various aspects of modern


society and business. Here are some of the key significances of vending machines:

Snacks and Beverages Vending:


Snack and beverage vending machines are ubiquitous in locations like offices,
schools, hospitals, and public places. Embedded systems allow these machines to
efficiently dispense a wide range of snacks, drinks, and even specialty items like
gourmet coffee.

Cigarette and Tobacco Vending:


Vending machines for cigarettes and tobacco products use embedded systems to
ensure age verification and facilitate sales while complying with legal restrictions.

Office Supplies and Stationery:


Vending machines in office buildings stock stationery items, office supplies, and
electronics. Employees can access essential items conveniently.

Healthcare Products:
Vending machines in healthcare facilities provide access to essential healthcare
products, such as over-the-counter medications, personal hygiene items, and first
aid supplies.

Electronics and Accessories:


Embedded systems enable vending machines to offer small electronic gadgets,
phone chargers, headphones, and accessories in airports, malls, and public transit
hubs.

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 18


CHAPTER-9 APPLICATIONS

Fresh Food and Meals:


Some vending machines are equipped with refrigeration and heating capabilities,
allowing them to dispense freshly prepared meals, sandwiches, salads, and even
hot beverages. They are common in airports and college campuses.

Automotive Supplies:
Vending machines in auto repair shops or gas stations provide essential automotive
supplies like oil, wiper blades, and light bulbs.

Personal Protective Equipment (PPE):

In response to the COVID-19 pandemic, vending machines stocked with PPE, such
as face masks, hand sanitizers, and gloves, have become more common in public
places.

Art and Collectibles:


Vending machines can dispense art prints, collectible items, or souvenirs in
museums, galleries, and tourist destinations.

Laundry and Dry Cleaning:


Vending machines in laundromats or apartment complexes offer detergents, fabric
softeners, and laundry accessories.

Entertainment and Gaming:


Vending machines provide access to entertainment options, such as DVDs, video
games, or arcade tokens, in entertainment venues and hotels.

Pharmaceuticals and Prescription Medications:


Specialized vending machines, often found in hospitals, dispense prescription
medications securely and accurately.

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 19


CHAPTER-10 REFERENCES

CHAPTER-10
REFERENCES
 https://en.wikipedia.org/wiki/Vending_machine

 https://www.britannica.com/money/vending-machine

DEPT. OF CSE, SIR MVIT 2022 - 2023 P a g e | 20

You might also like