Description
Abstract
RFID Petrol Pump System using AT89S52 Microcontroller
Introduction
In the present day, automation and security are becoming essential in almost every industry, and the petroleum sector is no exception. The process of dispensing fuel at petrol pumps traditionally involves manual handling, cash transactions, and human supervision. While functional, these systems are prone to several issues such as inaccurate fuel measurement, human error, fraud, unauthorized usage, and even theft. To address these problems, the RFID Petrol Pump System using an AT89S52 microcontroller has been designed and implemented to provide a reliable, secure, and fully automated fuel dispensing solution.
The system uses Radio Frequency Identification (RFID) technology for user authentication, ensuring that only authorized individuals can access and operate the fuel pump. The integration of RFID with a microcontroller-based control system automates the process of price calculation, fuel quantity measurement, and pump motor control, thereby increasing accuracy and efficiency.
System Overview
The heart of the system is the AT89S52 microcontroller, a member of the 8051 family, which coordinates all operations, from reading the RFID card to controlling the fuel pump motor. The basic sequence of operation is as follows:
- The user brings their RFID card near the RFID reader.
- The reader scans the card and sends the unique ID code to the microcontroller.
- The microcontroller checks the received ID against stored authorized card numbers in its program memory.
- If the card is authorized:
- The LCD displays the current fuel price.
- The system prompts the customer to enter the payment amount.
- The controller calculates the equivalent fuel quantity in liters.
- The motor control circuit is activated to start dispensing fuel.
- Once the calculated quantity has been dispensed, the controller stops the motor automatically.
If the card is not recognized as authorized, the system denies access, and the LCD displays an “Unauthorized Card” or “Access Denied” message.
RFID Authentication
The RFID module used in the system operates in the 125 kHz frequency range and contains an internal antenna coil to detect passive RFID tags. Each RFID card has a unique ID that cannot be altered. When placed near the reader, the electromagnetic field powers the card?s chip, enabling it to transmit its stored ID back to the reader.
The microcontroller compares this ID with its internal database of authorized users. This step ensures that only pre-registered users can access the fuel dispensing mechanism. This feature is particularly useful in environments where fuel is to be accessed only by authorized personnel, such as company fleets, government vehicles, or restricted service stations.
LCD Interface and User Interaction
The system uses a 16×2 LCD to display messages to the user. Typical messages include:
- “Swipe Card”
- “Access Granted”
- “Enter Amount”
- “Fuel Price: XX.XX”
- “Fuel Dispensing…”
- “Access Denied”
The LCD ensures that the user is guided step-by-step throughout the transaction process, reducing confusion and eliminating the need for manual instruction from pump attendants.
Motor Control Mechanism
The microcontroller is connected to a motor driver circuit which controls the petrol pump motor. Upon successful authentication and payment entry, the microcontroller calculates the time needed to pump the required amount of fuel, based on the pump’s flow rate.
For example, if the flow rate is known to be 1 liter per 10 seconds and the customer pays for 5 liters, the motor will run for 50 seconds before being automatically turned off. This timing-based dispensing method ensures precise fuel quantity delivery without the need for expensive flow sensors.
Operation Flow
- Idle State:
The system waits for a card to be scanned. - Card Detection:
Once a card is scanned, the ID is read and checked. - Authorization:
If the ID matches a stored number, access is granted. Otherwise, the process ends. - Payment Entry:
The system prompts for the amount to be paid (via keypad or preset value for testing). - Calculation:
The system uses the fuel price per liter to calculate the quantity to be dispensed. - Fuel Dispensing:
The motor driver is activated for the calculated duration. - Completion:
The motor stops automatically, and the LCD displays ?Thank You? or ?Transaction Complete.?
Advantages of the System
- Real-Time Authentication:
Only authorized users can operate the pump, reducing misuse. - Automated Fuel Dispensing:
Eliminates manual handling, reducing manpower requirements. - Accurate Fuel Measurement:
Automated timing control ensures precise fuel delivery. - Prevention of Theft:
Unauthorized card use is denied, preventing unapproved fuel access. - Cost-Effective Maintenance:
Fewer moving parts and simplified electronics reduce the need for frequent repairs. - Scalable Design:
The same principle can be applied to multiple pumps and stations.
Applications
- Commercial Fleets:
Companies can issue RFID cards to drivers for authorized fuel access. - Government Vehicles:
Prevents misuse of public funds for unauthorized fuel filling. - Private Petrol Pumps:
Ensures that only paying customers can access fuel. - Industrial Sites:
Controls fuel usage for machinery and generators.
Technical Components Used
- AT89S52 Microcontroller: Core system controller.
- RFID Reader Module: For card detection and ID transmission.
- RFID Cards: Passive tags containing unique IDs.
- 16×2 LCD Display: User interface for messages and transaction details.
- Motor Driver Circuit: Controls the petrol pump motor based on MCU signals.
- Keypad (Optional): For payment entry or admin control.
- Power Supply: Step-down transformer, rectifier, regulator circuits.
- Relay Module: Isolates motor from microcontroller.
Security Considerations
The system?s security lies in the uniqueness of RFID card IDs and the microcontroller?s authentication algorithm. Each card must be registered with the system before it can be used. In case of a lost card, the administrator can remove its ID from the authorized list, immediately preventing misuse.
For added security, future designs can integrate two-factor authentication, requiring both a card swipe and a PIN code.
Future Enhancements
- GSM Integration: Send fuel transaction details via SMS to the admin.
- Database Connectivity: Store transaction logs in a centralized system.
- Multiple Pump Control: Expand the design to manage multiple pumps from one MCU.
- Flow Sensor Feedback: Replace timing method with real-time flow measurement.
- Rechargeable Smart Cards: Deduct fuel cost directly from card balance.
Conclusion
The RFID Petrol Pump System using AT89S52 microcontroller is a practical and efficient approach to fuel dispensing automation. By integrating RFID-based authentication with automated motor control and user-friendly LCD interaction, it significantly improves operational accuracy, security, and efficiency.
The system is cost-effective, easy to implement, and adaptable to various environments, making it an ideal solution for both private and commercial fuel management needs. With future enhancements, it can be expanded into a fully networked, IoT-enabled fuel management system for large-scale deployment.






Reviews
There are no reviews yet.