The objective of this project is inserting the coin to charge your mobile phone in public places. People who are all using mobile phones in outside of home or office without charging condition, the coin based mobile phone charger is very useful to that person for using coin to charge that mobile. The IR (infrared) transmitter and IR receiver is used to transmit and receive the IR signal in the receiver side. Between the IR transmitter and receiver, a coin is to be inserted to change the polarity of pulse in SCU input. The relay will ON to activate the 230v charger, we will use charger to charge for our mobile phone. Power supply is an integral parts a vital role in every electronic system and hence their design constitutes a major part in every application. In order to overcome mal-operation which results due to fluctuations in the load and discontinuity in the supply proper choice of power supply is indeed a great need in this hour. The aim of this project is to provide a solution for charging of mobile at public places. The person who wants to charge his/her mobile has to insert a coin and connect his/her mobile with the charger. Mobile will be charged at a particular amount of time depending on the number of coins inserted by the person. As soon as the Coin Sensor detects the coin, it sends a pulse to the 8051 Microcontroller. The Controller turns ON the relay(Electromechanical Switch) to provide 230V,50Hz signal to the charging socket and the user can charge his/her mobile phone from the socket. A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and they are double throw (changeover) switches. Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits; the link is magnetic and mechanical.
3) IR sensor
4) Single channel relay module
5) +12v power supply
6) Any plastic or card board box
7) 16×2 LCD
In the block diagram, you can able to came to the idea that the microcontroller is the heart of the entire project. their are lot of microcontroller in the market like PIC, ARM, ARduino and so on.. but for this project, 8051 microcontroller is most preferable for me. since 8051 doesn’t have flash memory, i used 89c51 microcontroller from Atmel Corporation. IR sensor with transmitter and receiver module is presented on the coin box. The relay can be energized with both uln2003 and transistors, you can use any type of module to switch the mobile charger. i used the relay triggered with transistors. 16×2 is interfaced with the microcontroller to show the timing on the display to charge the mobile.
In the circuit diagram, you have to change some little modification. Change the input on P1.0 from bush button with IR sensor. Change the led on P1.7 with single channel relay module. Control pins of the LCD is connected to the P3.2, P3.3, P3.4 of the microcontroller. Data pins of the LCD is connected to the P2 of the microcontroller.
Basic Hardware construction:-
Fix the LCD on the 8051 development board for user convenience. So that NO separate board for LCD.
I prefer 8051 development board due to the internal Bridge rectifiers, filter circuits, reset button, 7805 regulators.
The terminals for power supply available on the development board used to connect external hardware like sensors, motor drives and so on..
How to make a coin box and how to integrate the sensor inside the coin box to read the coin. Follow the picture below.
IR sensor has been fixed with tags to fix non movable.
Single channel relay which i have used in this project.
I have interfaced all the sensors and relay module as per the circuit diagram. This is my final hardware setup.
sbit rs = P3^2;
sbit rw = P3^3;
sbit en = P3^4;
void delay(unsigned int dela)
unsigned int l,m;
void cmdwrt_lcd(unsigned char cmd)
P2 = cmd;
rs = 0;
rw = 0;
en = 1;
en = 0;
void datawrt_lcd(unsigned char datas)
P2 = datas;
rs = 1;
rw = 0;
en = 1;
en = 0;
void display_lcd(unsigned char *lcdstr)
while (*lcdstr !=’\0′)
void dec2ascii(unsigned int data1)
unsigned int x,y,z;
x=x + 48;
y=y + 48;
z=z + 48;
unsigned int i;
display_lcd(“Mob charging by”);
display_lcd(“coin pay system”);
display_lcd(“insert the coin “);
Result and observation:-
Power ON the hardware
You can watch the Title on the display
Insert the Coin
The relay will turn ON for 1 minutes and the counting will be shown on the LCD Display.
Feel free to comment your doubts and en queries.