BRIEF INTRODUCTION
The Anytime Medicine Vending Machine is an automated system designed to dispense medicines securely and efficiently. Users are authenticated through RFID cards, ensuring that only authorized individuals can access the machine. Once authenticated, users interact with a keypad to select the desired medicine and specify the quantity. The Arduino Mega controls the dispensing mechanism via relays, managing stock levels and tracking sales data to prevent shortages. Meanwhile, an ESP8266 Wi-Fi module connects the system to the Blynk IoT platform, allowing remote monitoring of inventory, user activity, and transaction status through a smartphone app. This integration facilitates real-time updates and management, making medicine vending convenient, contactless, and reliable.
COMPONENTS LIST
Transmitter (Arduino Mega) Components
|
Description
|
Arduino Mega 2560
|
Main microcontroller for control
|
RFID Module (MFRC522)
|
User authentication via RFID cards
|
4x4 Keypad
|
User input for medicine selection
|
LiquidCrystal I2C LCD (16x2)
|
Display user info and menu
|
Relay Modules (4 channels)
|
Control dispensing motors/solenoids
|
Jumper wires
|
Connections between components
|
Power supply (e.g., 12V/5V adapter)
|
Power the system
|
Receiver (ESP8266) Components
|
Description
|
ESP8266 Wi-Fi Module
|
Connects vending machine to Blynk cloud
|
USB/Serial connection
|
For programming and serial communication
|
Power supply (3.3V)
|
Power the ESP8266 module
|
BLOCK DIAGRAM

WORKING
The Anytime Medicine Vending Machine uses an Arduino Mega as the transmitter to authenticate users via RFID, allowing only authorized individuals to select and purchase medicines through a keypad interface. The system displays medicine options, stock levels, and pricing on an LCD, lets users select quantities, and confirms purchases before activating relays to dispense the medicines. All transaction details—including user information, selected medicines, quantities, costs, stock updates, and purchase status—are sent via serial communication to an ESP8266 receiver, which uploads the data to the Blynk cloud platform for real-time remote monitoring and management through a mobile app.
Transmitter (Arduino Mega) Side:
-
User Authentication:
-
When a user taps their RFID card, the RFID reader scans the card's unique ID.
-
The Arduino Mega checks if this UID is authorized.
-
Access Control:
-
If authorized, the LCD displays "Access Granted" and shows the medicine menu.
-
If not authorized, it displays "Access Denied."
-
Medicine Selection:
-
Quantity Selection:
-
Purchase Confirmation:
-
Dispensing Medicine:
-
Data Transmission:
-
All relevant data (user name, selected medicines, quantities, cost, stock levels, and purchase status) are sent via serial to the ESP8266 receiver.
Receiver (ESP8266) Side:
-
Data Reception:
-
Data Parsing and Display:
-
Incoming data tagged by identifiers (A, B, C, etc.) are parsed.
-
Data is forwarded to Blynk cloud virtual pins.
-
Remote Monitoring:
-
Using the Blynk app, users can monitor user access, selected medicines, quantities, stock availability, and purchase status remotely in real-time.
IMAGES USED ARE FOR SAMPLE PURPOSES ONLY !!!!!!