Coin Based Mobile Charging System Using Arduino For
Coin Based Mobile Charging System Using Arduino For
mobile phones run out of battery while they are away from home or office. This poses a significant
inconvenience as people rely heavily on their smartphones for communication, information, and
various daily tasks. While carrying chargers is an option, individuals may not always find accessible
power sockets in public places even if they have their chargers with them. Therefore, there is a need
for a project that addresses this issue by developing a smart mobile charging system for public places.
ABSTRACT
The usage of mobile phones have been increased a lot in last few decades. In this generation mobile phones
have become a part of life. When we are in public places all of sudden our mobile battery get drain off at
that situation we don’t have an alternative to charge phone. To overcome this problem we are proposing the
mobile charging system through this we can charge our mobile by paying some amount. This system
consists of Arduino, Coin Acceptor , LCD display, Relay Module, Charging Module, Buzzer and a inbuilt
Timer. When a user inserts a coin, the coin acceptor module recognizes whether the coin is valid or not. If a
valid coin is detected, it signals the Arduino to start the mobile charging mechanism, providing a 5V supply
to the mobile phone. The Arduino also starts a reverse countdown timer to display the charging time on the
LCD screen. If the user inserts another coin within the remaining charging time, the microcontroller adds
the time to the currently remaining charging time and starts the reverse countdown again.
MOTIVATION
Once I was travelling in metro my mobile charge has been drained I was in need of my mobile to download
necessary documents but I couldn’t because their we no sockets to charge my phone. Then I thought of
building a system with which we can charge our mobiles through some money.
The experience of attending an event in my college highlighted the inconvenience of running out of battery
on my phone without a compatible charger. Despite having access to sockets in the college and being
surrounded by friends, their chargers were not suitable for my phone's port. This situation left me with a
nearly depleted battery by midnight, forcing me to rely on my bus mates' phones for crucial calls. This
incident made me realize the need for convenient charging solutions in public spaces, events, conferences,
and business trips where travelers often encounter the situation of having low battery. A coin-based mobile
charging system that accommodates various chargers would alleviate such situations.
PROBLEM DOMAIN
ANALYSIS
The domain of embedded systems is highly suitable for implementing this project. This project requires
the integration of various hardware components such as the programmable coin acceptor, Arduino
microcontroller, relay module, LCD display. Embedded systems excel in hardware integration making it
well-suited for implementing this project. Additionally, embedded systems excel in real-time operations,
enabling the system to respond promptly to coin recognition, charging activation, and countdown timer
updates. Further more, Embedded systems are designed to be compact and portable, making them suitable
for deployment in public places.
LITERATURE REVIEW
In one paper, the system uses a programmable coin acceptor to detect valid coins, specifically two types of BDT
(Bangladeshi Taka) 5 coins. When a valid coin is inserted, the microcontroller (Arduino) unlocks the door,
allowing the user to place their cellphone in a charging slot. An infrared (IR) sensor pair detects the presence of
the cellphone in the slot, and the microcontroller connects the charger port to the power supply using a relay.
Additionally, a servo motor is used to handle an RFID tag, which is required to unlock the box and retrieve the
cellphone. The system locks the door, starts a countdown timer, and automatically and automatically stops
charging after thirty minutes[1].
In our proposed project, we have integrated an Arduino, a programmable coin acceptor, and a relay module
However, we have implemented an additional feature to enhance the user experience. When a user inserts another
coin within the remaining charging time, our system intelligently adds the additional time to the existing charging
duration and initiates a reverse countdown once again. This capability enables users to extend their charging time
without any interruptions. With this improvement, our system provides a more convenient and user-friendly
mobile charging solution in public places.
OBJECTIVES
To provide a simple and cost-effective solution for mobile charging in public places, making it accessible to a wide
range of users.
To create a scalable system that can be deployed in various public locations, such as airports, shopping malls,
To ensure compatibility with various types of mobile devices and chargers, accommodating different user needs.
To create an automated charging process where users can simply insert a coin, and the system takes care of the rest,
eliminating the need for manual intervention or monitoring during the charging process.
METHODOLOGY
SYSTEM MODEL
DISPLAY
POWER SUPPLY
RELAY MOBILE PHONE
ARDUINO
COIN RECOGNITION
MODULE
CHARGING
COIN CIRCUIT
REQUIREMENTS
SOFTWARE REQUIRED HARDWARE REQUIREMENTS
Arduino IDE Coin Acceptor
Arduino Uno
Relay Module
Charging Module
LCD Display
ARDUINO CODE
CODE EXPLANATION
1. Variable Initialization: In the setup() function, the code initializes various parameters. It sets up serial
communication, defines an interrupt pin (pin 2) for pulse detection, attaches an interrupt service routine
(fun) to the interrupt pin, and sets pin 8 as an output for controlling relay that manages the connection
between the charging circuit and the mobile device.
2. Interrupt Handling: The code uses an interrupt to detect pulses generated by the coin acceptor module.
When a valid coin is inserted, the coin acceptor generates pulses based on the coin's value. The fun()
function is called each time a falling edge is detected on the interrupt pin. Inside fun(), the pulseCount
variable is incremented to keep track of the number of pulses received, and the lastPulseTime variable
is updated to record the time of the last pulse.
CODE EXPLANATION
1. Main Loop: In the loop() function, the code continuously checks for the duration of time since the last pulse (millis() –
lastPulseTime).If no pulses have been received for 2.5 seconds (2500 milliseconds) or longer, it assumes that the coin insertion
process for the most recent set of coins is complete. This delay ensures that multiple pulses, generated closely together when
coins are inserted in rapid succession, are properly counted. Subsequently, the code proceeds to calculate the charging time
based on the number of pulses received. Each pulse is considered to represent a specific coin denomination: 1 pulse for a 1
rupee coin, 2 pulses for a 2 rupee coin, and 5 pulses for a 5 rupee coin. The code assumes a charging rate of 1 minute per rupee.
x stores the number of pulses received during the last coin insertion, which corresponds to the coin denomination.
y accumulates the total number of pulses received
If y is greater than zero, it prints the remaining time on the serial monitor, and it activates the relay by setting pin 8 LOW. This
action establishes a connection between the charging circuit and the mobile device, allowing charging to commence.
After activating the relay, the code introduces a delay of 60 seconds to simulate a one-minute decrement in the charging time. It
then decrements y by 1.
If y reaches zero (indicating that either no more coins are inserted or the charging time has elapsed), it deactivates the relay by
setting pin 8 HIGH. This action disconnects the charging circuit from the mobile device, stopping the charging process.
PROGRAMMING COIN ACCEPTOR
Setting Up Coin Acceptor:
Ports of Coin Acceptor
1. DC12
2. GND
3. COIN
4. COUNTER
Modes in Coin Acceptor
1. fast(20ms)
2. medium(50ms)
3. slow(100ms)
Pins Used in Programming Coin Acceptor
1. Setup button
2. Plus and Minus buttons
3. LED display
4. LED indicators
PROGRAMMING COIN ACCEPTOR
Programming a Coin Acceptor
1. First connect the DC12 pin of the Coin Acceptor to 12V DC supply and ground to ground.
2. Press the plus and minus buttons at a time for 2 seconds them the LED indicators glow and LED display
displays 0.
3. After 0 is displayed press plus and minus buttons at a time ‘A’ is displayed.
4. Then Press setup button ‘E’ will be displayed.
5. Now set the number of coins you want to program in the Coin Acceptor by using the plus and minus signs
and then press setup button ‘H1’ will be displayed.
6. Put H1 values as number of samples you want to give as input and press setup button ‘P1’ will be
displayed.
7. If you want to recognize 5rupee coin set ‘P1’ 5 and press setup ‘F1’ will be displayed.
8. Set ‘F1’ value as 10 and again press setup button ‘H2’ will be displayed.
9. Repeat the above process until the last coin to be programmed and after that power off and on the Coin
Acceptor.
10.Press the setup button LED indicators glow and LED display displays ‘A’.
11.After ‘A’ is displayed press plus and minus buttons at a time ‘A1’ is displayed.
12.Now enter the coins into coin slot after completion of the coins then ‘A2’ is displayed.
13.Repeat the process until the last coin is programmed.
14.Now enter a coin into coin slot then the output will be displayed on LED display.
REFERENCES
[1] M. E. Alam, M. A. Kader, M. Hossain, F. Noushin, M. S. Alam and S. Farid, "IoT Based
Smart and Secured Mobile Charging Station in Public Place," 2021 3rd International Conference
on Sustainable Technologies for Industry 4.0 (STI), Dhaka, Bangladesh, 2021, pp. 1-6, doi:
10.1109/STI53101.2021.9732560.
[2] W. Na, J. Park, C. Lee, K. Park, J. Kim, and S. Cho, “Energy- Efficient Mobile Charging for
Wireless Power Transfer in Internet of Things Networks,” IEEE Internet of things journal, Vol.
5, Iss. 1, pp. 79-92, 2018.
[3] P. Goyal and P. S. Sharma, ”Coin Detection based Mobile Charging System,” 2019 6th
International Conference on Computing for Sustainable Global Development (INDIACom),
2019, pp. 60-63.
THANK YOU