Professional Documents
Culture Documents
CHAPTER 1
PLAN OF WORK
Weekly work
Page | 1
1.1.
WEEKLY WORK: Project Name selection Literature Survey Problem Definition Block diagram Details of individual block Rough circuit diagram Availability of parts in market Purchasing parts Testing individual Parts Finalizing circuit diagram PCB designing Soldering of parts Testing & troubleshooting each module Complete testing of final circuit Writing individual module of software Final testing of software module Final testing of hardware & software Finishing final project Report preparation
1st week 1st week 1st week 2nd week 3rd to 5th week 6th week 7th week 8th week 8th week 8th week 9th week 9th &10th week 11th week 12th week 13th week 14th &15th week 16th week 17th week 17th &18th week
Page | 2
CHAPTER 2
INTRODUCTION
Page | 3
2.1 Introduction:
With mobile phones becoming the major source of business/personal communication, the mobile phone business is currently worth billions of dollars, and supports millions of phones. The need to provide a public charging service is essential. Many critics argued that a public mobile phone charging service is not a lucrative business because most users can charge their phones at home, in their office or in their cars. Emergency Coin Operated Mobile Phone Charger is a new business milestone because many are attending business conventions and forgetting their charger at home or in hotel rooms. Students and many that use the public transportation that don't know that their level of their battery is low are prospective customers for coin operated mobile phone charger service. Recommended locations include: Hotels, conference centers, exhibition halls, serviced offices, exchange halls, motels, leisure centers, health clubs, training centers, golf clubs, retail outlets, shopping malls, Internet cafes, universities, colleges, hall of residence, airports, train terminals, etc., so that the mobile phone users can reactivate a low or dead battery by simply plugging in and charging for as low as one rupees.
Page | 4
The coin operated public cell phone charger is a cell phone charging station having four charging channels providing charging facility to various type of cell phones. The number of channels can be increased further. Each channel can be operated simultaneously. Each and every channel is having a select switch, which can be called as channel select switch with a red LED as an indicator for selected channel. Also there is a START switch and a COIN inlet which is common for all the channels. The operation of coin operated chargers is very simple. The user who wishes to charge his cell phone has to first check out for the compatible charger jack in a channel. Then he has to press select switch in order to make channel ready for charging, the selected channel will be indicated by a red LED. The channel will remain in selected mode for 30 sec. Hence within 30 sec the user has to first insert the predefined rupee coin and then has to press START switch which will finally start the charging process for a predefined time and is indicated by a green LED. If failing to do so within 1 min. will reset the channel and the user has to again follow the same procedure. Any other channel selection is not considered within 30 sec of previous channel if selected or until it has entered in to charging mode. Completion of charging will be indicated by an OFF green LED.
Page | 5
CHAPTER 3
Problem definition stage; Designing block diagram; Implementing circuits and components; Developing algorithm for software; Writing actual code for Microcontroller; Compiling the code; Burning the hex file into microcontroller with programmer; Testing and Running.
Page | 7
CHAPTER 4
Block Diagram
Brief Explanation
Page | 10
4.2.1. POWER SUPPLY: Power supply is used to deliver power to the circuit. It delivers +5Vdc to microcontroller and other peripherals and +12Vdc delivers power to relay. 4.2.2. COIN INPUT AND LEVEL CONVERTOR: Coin input is a sensor which senses a metal and produces an output voltage. This voltage is high as compared to the input required for microcontroller. Hence a level shifter is used to bring down the voltage level which could be readable to microcontroller.
RS 232 is a protocol used for communication between computer and microcontroller. It is also used for programming the microcontroller in its ISP (in system programming) mode.
4.2.5. CHANNEL READY INDICATOR:
Page | 12
Relay array consists of relays for each channel to provide electromechanical switching in between charger and mobile phone.
4.2.9. CHARGER ARRAY:
Charger array is used to provide charging power to the mobile phones through the electromechanical switches.
4.2.10. CELL PHONE TO CHARGE:
Channel select switch is used for selecting a channel on which the mobile phone is to be charged.
4.2.11. MICROCONTROLLER:
Microcontroller is used to control the whole operation of the device. Microcontroller reads input signal from input device and triggers the output device. According to the conditions defined in the microcontroller by the programmer.
Page | 13
CHAPTER 5
Page | 14
Page | 15
5.1.2. WORKING:
TRANSFORMER Bridge Rectifier Filter Voltage regulator Load
Transformer:
A step-down transformer is used to achieve our requirements of the power supply. It steps down high voltage ac mains to low voltage ac mains.
Bridge Rectifier:
A bridge rectifier makes use four diodes in a bridge arrangement to achieve full wave rectification. This is a widely used configuration, both with individual diodes wired and with single component bridges where the diode bridge is wired internally. It also converts ac to dc, but the dc output is varying. One advantage of a bridge rectifier over a conventional full-wave rectifier is that with a given transformer the bridge rectifier produces a voltage output that is nearly twice that of the conventional full-wave circuit.
Filter:
The output of the rectifier is a pulsating dc wave. We need a constant dc output. To do this, we need to filter out the oscillation from the pulsating dc wave. This is obtained with a diode capacitor combination.
Voltage Regulator:
P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 16
A voltage regulator is used for voltage regulation in the circuit. This provides a protection to the circuits in the case of fluctuations. It eliminates ripples by setting dc output to fixed voltages.
Load:
The load can be anything which wants to switch ON by using power supply.
the help of capacitor filter to get a smooth DC supply. The rating of the chosen capacitor filter is 1000F. The regulated DC output voltage is obtained by using regulator ICs. For regulated +12V DC supply, IC 7812 is used and for regulated -12V DC supply, IC 7912 is used. In the case of IC 7812 the unregulated DC voltage is applied to Pin 1, and the output is taken at Pin 3 and Pin 2 is grounded. The pair of capacitors of 10F is connected at the output as shown in figure to eliminate the voltage oscillations at the output due to the large voltage oscillations at the input of the regulator.
Page | 18
Fig 5.4.An Illustration graph of the charging function of constant battery charger
Page | 19
Constant-voltage chargers are most often used in two very different modes: as a fast charger to restore a high percentage of charge in a short time or as a float charger to minimize the effects of overcharge on batteries having infrequent discharges.
Page | 20
5.3.3. WORKING:
While taking Relay1 (RL1) into consideration we will discuss the working of relay card. Initially there is no signal or logic 0 on the pin1 of IC U1, hence the internal transistor of the IC are in cut off region which causes an open circuit so there is no current flow flowing through the relay coil ,hence the relay is inactive. When a high signal or logic 1 is applied to the two pin1 of IC U1 the internal transistor goes in to active region and completes the path i.e. provide ground to the relay coil so the current flows through the LED activating the relay. As the current flows through the relay coil it gets energized and switch over the contacts i.e. common and normally open contact get connected and provide a path to flow current from J11 i.e. charger into the load connected at J4 .hence the cell phone charging process starts. The same above process is applies for all relays. If LED is fused or
damaged the path will be open and relay will not be energized and if relay is damaged the led will not be illuminated. CHARGING ON indicator. P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 21 So the LED here is used as a FAULT indicator and a
Page | 22
Page | 23
CHANNEL SELECT SWITCH CH1 to CH4 are connected to port P0.0 to P0.3 with the help of relimate connector denoted as SW1 to SW4, COIN IN signal is connected to port P0.4 through J4 and START switch is connected to port P0.5 through SW5. Anodes of CHANNEL INDICATOR LED L1 to L4 are connected to port P1.0 to P1.3 and cathodes are connected to ground through 470 series resistor R2 to R5. Output for relay card is taken on port P1.4 to P1.7. Components C1, R1 and push button S1 forms reset circuit which provides a power on reset for the micro controller and even provide manual reset. Crystal XL1 is a 11.0592MHz crystal connected to pin 18 and 19 of microcontroller, capacitor C2 and C3 are 22pf capacitor used as loading capacitor for crystal. Port 0 and Port 1 is pulled up using a 4.7K SIP (Single Inline Package) RN1 and RN2 resistance network. IC U3 (4N33) is an OPTO-COUPLER which is used to provide isolation between the proximity switch and microcontroller and convert its output readable to microcontroller. IC U2 i.e. MAX232 and capacitor C6 to C9 forms a circuit used to establish communication between PC and a microcontroller through connector J3. Led L9 and L10 with a series resistor R6 and R7 indicates the ongoing communication process. Where C4 and C5 are used as filter capacitor, terminal block J1is used to facilitate power supply connection.
P0.0 = switch1 for channel 1 P0.1 = switch2 for channel 2 P0.2 = switch3 for channel 3 P0.3 = switch4 for channel 4 P0.4 = switch5 for coin input sensor (proximity switch) P0.5 = switch6 for start charging
P1.0 = channel 1 red LED1 (ready system) P1.1 = channel 2 red LED2 (ready system2) P1.2 = channel 3 red LED3 (ready system3) P1.3 = channel 4 red LED4 (ready system4)
P1.4 = channel 1 relay (start system1) P1.5 = channel 2 relay (start system2) P1.6 = channel 3 relay (start system3) P1.7 = channel 4 relay (start system4)
Page | 25
CHAPTER 6
Page | 26
Page | 27
CHAPTER 7
INTRODUCTION OF COMPONENTS
7.1. RESISTOR:
7.1.1. WORKING: Resistors limit current. Resistors are considered to be the most used and the most important component of all the electronic circuits. Resistors "resist" the flow of electrical current. The higher the value of resistance (measured in ohms) the lower the current will be. 7.1.2. TESTING: Read the indicated color code value then select the OHM-scale within but not way below the indicated value. A resistor is good if its resistance is close to the indicated. Tolerance should be considered with the ohmmeter reading. While, no resistance reading at all on the ohmmeter scale settings, the resistor is open. A zero resistance reading on all ohmmeter scale settings, resistor is shorted. 7.1.3. SPECIFICATIONS: To completely specify a resistors characteristics requires knowledge of the following parameters: Value Tolerance Temperature Coefficient Power Rating The specification of a resistor may be marked on its surface using either of two systems of coding. The first of these uses colored bands, known as the colour code, and the second, more recent, system uses a combination of alpha-numeric characters.
7. 2. CAPACITOR:
7.2.1. WORKING:
Page | 29
When DC voltage is applied to the capacitor, an electric charge is stored on each electrode. While the capacitor is charging up, current flows. The current will stop flowing when the capacitor has fully charged. Capacitors find use in circuits for a variety of purposes. They are used in time delay generation RC circuits. In power supplies for filtering and power supply decoupling, as blocking capacitors, for power factor correction and motor starting, in LC tank circuits and so on. 7.2.2. TESTING: To test a capacitor, set the multi-tester to Rx 10 or Rx1K scale. Connect the tester negative probe to the capacitor positive terminal, the positive probe to the negative terminal. A good indication for electrolytic capacitor shows the meter needle deflecting towards zero and moves back again to infinite resistance position. A defective indication for an electrolytic capacitor shows that the meter will rest on zero and remain stationary at a point which is an indication that the capacitor is shorted.
7.3.2. TESTING: The good and working LED will then light up or glow, a busted LED will not. LEDs must have a resistor in series to limit the current to a safe value, for quick testing purposes a P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 30
1k
resistor is suitable for most LEDs if your supply voltage is 12V or less. LED cannot be
directly connected to a battery or power supply. It will be destroyed the LED. 7.3.3. FEATURES: Single color High bright output Low power consumption High reliability and long life
Emitting Color: Super Bright White Device Outline5mm Round Type Lens Type: Water Clear
7.4. RELAY:
7.4.1. WORKING: 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 most have double throw (changeover) switch contacts Relays are like remote control switches and are used in many applications because of their relative simplicity, long life, and proven high reliability. 7.4.2. USES: The main operation of a relay comes in places where only a low-power signal can be used to control a circuit. It is also used in places where only one signal can be used to control a lot of circuits. P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 31
The application of relays started during the invention of telephones. They played an important role in switching calls in telephone exchanges. They were also used in long distance telegraphy. They were used to switch the signal coming from one source to another destination. 7.4.3. TESTING: A relay will usually have a coil, pole terminal and a set of contacts. The set of contacts that are open when the relay is not energized are called normally open (N/O) contacts and the set of contacts that are closed when the relay is not energized are called normally closed (N/C) contacts. The following steps can be used to perform the testing of the relay using a multimeter.
Keep the multimeter in the continuity check mode. Check for continuity between the N/C contacts and pole. Check for discontinuity between N/O contacts and the pole. Now energies the relay using the rated voltage. For example use a 9V battery for energizing a 9V relay. The relay will engage with clicking sound.
Now check for continuity between N/O contacts and pole. Also check for discontinuity between N/C contacts and pole. As a final test, measure the resistance of the relay coil using a multimeter and check whether it is matching to the value stated by the manufacturer.
If all the above tests are positive we can conclude that the relay is healthy.
7.5. TRANSFORMER:
7.5.1. WORKING: A transformer is a device that transfers electrical energy from one circuit to another through inductively coupled electrical conductors. A changing current in the first circuit (the primary) creates a changing magnetic field.
Page | 32
This changing magnetic field induces a changing voltage in the second circuit (the secondary). This effect is called mutual induction. If a load is connected to the secondary circuit, electric charge will flow in the secondary winding of the transformer and transfer energy from the primary circuit to the load. In an ideal transformer, the induced voltage in the secondary winding (VS) is a fraction of the primary voltage (VP) and is given by the ratio of the number of secondary turns to the number of primary turns. By appropriate selection of the numbers of turns, a transformer thus allows an alternating voltage to be stepped up by making NS more than NP or stepped down, by making it less. 7.5.2. TESTING: 1. The ohm meter is the deciding factor, Putting the ohm meter on the lowest scale and then adjusting the knob to verify its reading is an easy step to the reading of the ohm. 2. To check the resistance of the coil, unplug or unsolder the leads of the transformer from its circuit and measure the resistance of each coil. 3. The next step is to test each coil for shorts to other coils.
Page | 33
7.7. OSCILLATOR:
7.7.1. Working: An oscillator puts out an endless series of pulses. The output constantly goes from 0 volts to Vcc and back to 0 volts again. Almost all digital circuits have some type of oscillator. This stream of
output pulses is often called a clock. One of the most important features of any oscillator is its frequency stability, or in other words its ability to provide a constant frequency output under varying load conditions. Some of the factors that affect the frequency stability of an oscillator include: temperature, variations in the load and changes in the DC power supply. Frequency stability of the output signal can be improved by the proper selection of the components used for the resonant feedback circuit including the amplifier but there is a limit to the stability that can be obtained from normal LC and RC tank circuits In our project instead of 12MHz crystal 11.0592MHz is used because, it can be divided to give you exact clock rates for most of the common baud rates for the UART, especially for the higher speeds (9600, 19200). These crystals are readily available and commonly used.
7.8. SWITCH:
7.8.1. WORKING: The most familiar form of switch is a manually operated electromechanical device with one or more sets of electrical contacts. Each set of contacts can be in one of two states: either 'closed' meaning the contacts are touching and electricity can flow between them, or 'open', meaning the contacts are separated and the switch is non conducting. The mechanism actuating the transition between these two states (open or closed) can be either a "toggle" (flip switch for continuous "on" or "off") or "momentary" (push-for "on" or push-for "off") type. P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 34
7.8.2. USES: In electronics, a switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another. 7.8.3. TESTING: When the switch is ON it looks and acts like a wire. When the switch is OFF there is no connection. Switch can tested by using multimeter in continuity range.
with common-cathode clamp diodes for switching inductive loads. The collector-current rating of a single Darlington pair is 500 mA. The Darlington pairs may be paralleled for higher current capability.
Page | 36
This I.C. also includes two receivers and two transmitters in the same package. This is handy in many cases when we only want to use the Transmit and Receive data Lines. We don't need to use two chips, one for the receive line and one for the transmit. There are also many variations of these devices. The large value of capacitors are not only bulky, but also expensive. Therefore other devices are available which use smaller capacitors and even some with inbuilt capacitors. However the MAX-232 is the most common, and thus we will use this RS-232 Level Converter. Dual Charge-Pump Voltage Converter The first converter uses capacitor C1 to double the +5V input to +10V on C3 at the V+ output. The second converter uses capacitor C2 to invert +10V to -10V on C4 at the Voutput.
Page | 37
reed and mercury relays with advantages of long life, high speed switching and elimination of magnetic field.
Voltage Rating Current Rating Contact Resistance Insulation Resistance Dielectric Withstanding Crimp Terminal Wire Size
: 250V AC, DC : 3A AC, DC : 20mW max : 1000MW min. : 1000V AC/minute : 22-28 AWG (American wire gauge)
The connector used for relay card is 2 PIN and 4 PIN connector. Advantage of the connector is it provides a fast and easy connection and disconnection, it also avoids polarity conflicts.
Two common RS-232 Level Converters are the 1488 RS-232 Driver and the 1489 RS-232 Receiver. Each package contains 4 inverters of the one type, either Drivers or Receivers. The driver requires two supply rails, +7.5 to +15v and -7.5 to -15v. This may pose a problem in many instances where only a single supply of +5V is present.
Page | 39
CHAPTER 8
Developing or Etching the PCB Other operations like Drilling, Cutting, Tinning
size of diagram to that of the circuit, before proceeding we must know some rules regarding the designing :a. The space between the conductors must be strictly controlled to avoid the possibility of electrical discharges or unwanted capacitance. The amount by which the mater diagram is to reduce in size is thus a critical deign feature. b. The conductor must be wider in those part of the circuits that are going to handle large current must be handle without undue temperature of conductors. c. The minimum width of copper should not generally be less than about 1.5mm.This is related to mechanical strength rather than electrical properties and it also ensure that strips remains securely bounded to the base material. d. The points where the component holes for component lead wire occurs must be sited to suit the dimensions of the component and dimensions between lead-out wire, so that , the components can be situated correctly on finished board. The conductor is also main large at the point of holes.
and ensure that the input and output parts are sufficiently well isolated to avoid the possibility. We must also ensure that conductors and components carrying high frequency current are well separated from the part of the circuit. We are also to make sure that all components need to return to earth are properly connected and that possibility of common impedance arising earth returned. Circuit is totally eliminated by making all earth as substantial possible consistent with nature of design. Other factors that have to successfully studied include availability of adequate return points on board and its mounting from accessibility of switch connection made for mechanical fixing ventilation effect of vibration.
Resist:
Resist is nothing more than a substrate that is unaffected by presence etching chemicals. It is usually colored so that, it can be easily seen the copper surface. when plan is clearly worked on clean copper that are to be left in fact as the copper conductor must be covered when resists the leaguer type of paints possess good resist properties but
disadvantage of relatively long time taken for drying. It is essential to resist through hardening before etching is started. Nail polished are better as they quickly and are less difficult to remove. To overcome this drying effect and to achieve the sharp edge of the trace on the PCB. Now-a-days etching taps along with IC pads are commonly used. To this, chances of P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 43
short circulating due to paints are completely the avoid etching tapes and pads are available in different sizes.
Correcting Error:
When a result has been thoroughly hardened any errors that have been made can usually be corrected by gently scratching away with knife. To ensure clear out lines round edges of copper conductors on board the resist must be applied with steady band.
Etching:
Next comes etching of unwanted copper & whether a small single is all that is required as quantity of board to be produce certain precautions must be taken before operation is commenced the most used etch & I ferrite chloride to this is added small quantity of HCL to accelerate. But not critical as lab construction concerned. A good etchant can be produced by mixing 10grams of ferric chloride & 25 grams of HCL with 15 grams of water.
Agitation:
Small plastic bath is ideal for storing the etchant process. Depth of liquid for storing the etchant process. The depth of liquid must be sufficient to completely cover laminate, the laminated board carrying the resist patterns circuit is then cropped into etchant bath & the gentle agitation takes 5 to 20 minutes to complete depending on the strength of the enchant temperature and thickness of copper foil.
Finishing Off:
When all unwanted copper is dissolved from areas between conductor, board should be taken from an etchant & washed in water. The resist must be removed using proper solvent. After this the copper surface must be polished with any kind of cleaner. It should be seen that there is no slight incomplete etching between the conducting parts of the PCB. The PCBs are coated coating material for protection in lab coating material itself it a soldier. This process is called Tinning. This process of coating involve track with soldier. Advantage of tinning the effect of environment of conductors, then PCB is drilled i.e. holes for filling & mounting the component on PCB are drilled with suitable drill bit. P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 44
Assembling On PCB:
After the holes are drilled, the component have to be assembled on PCB before assembling the components it is necessary to clean soldering iron in order to get easy & accurate soldering. Removing impurity particles that are gathered on iron bit due to repetitive use cleans soldering iron.
CHAPTER 9
SOLDERING TECHNIQUE
Page | 45
The joint and the soldering iron is held such that molten solder should flow smoothly over the joint. When joint is completely covered with molten solder, the soldering iron is removed. The joint is allowed to cool, without any movement. The bright shining solder indicates good soldering. In case of dry solder joint, a air gap remains in between the solder material and the joint. It means that soldering is improper. This is removed and again soldering is done.
Page | 46
CHAPTER 10
PCB LAYOUTS
P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 47
P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Fig.10.1.1. Schematic diagram of power supply card
Page | 48
Page | 49
Page | 50
Page | 51
Page | 53
Page | 54
Page | 55
CHAPTER 11
INTRODUCTION OF SOFTWARE
Page | 56
Page | 57
The language C is a very portable language (based on the ANSI standard) that enjoys wide popular support and is easily obtained for most systems. Existing program investments can be quickly adapted to other processors as needed.
In this one can develop & design circuits for the required PCB.
Page | 59
CHAPTER 12
INTRODUCTION OF PROGRAMMING
P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 60
12.1. Flowchart:
Start
TIMER INITIALISATION TR0=0; TF0=0; TL0=0XFD; TH0=0X4B; TR0=1; Sw1_op (P0.0) ==0
My delay (10)
Page | 61
flag9==1
flag9=1;
flag11==1
flag11=1;
flag11=0; flag4=0;
REady_LED4=0;
P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Sw2_op Page | 62
My delay (10)
3 3
k1==0||k3==0| |k4==0]
flag5==1
flag5=1;
Page | 63
flag11==1
flag11=1;
Page | 64
flag5==1
flag5=1;
flag5=0; flag1=0;
REady_LED1=0;
REady_LED1=0;
flag7==1
My delay (10)
k1==0||k2==0| |k3==0
Page | 66
flag5==1
flag7==1
flag9==1
flag1==1
flag5=1; disp5=1;
flag2==1
flag7=1; disp5=1;
My delay (10)
flag2==1 &&
10
flag10=1; disp6=1
flag12=1; disp6=1
flag6==1
i++;
Page | 70
11
flag12==1
M++;
Stop
Page | 71
12.2. Program:
#include<stdio.h> #include<string.h> #include"IDA51.H" #include"REG52.H"
//////////////// setting of i/p switch for following operation///////////////// sbit sw1_op=P0^0;// sbit sw2_op=P0^1;// sbit sw3_op=P0^2;// sbit sw4_op=P0^3;// input SWITCH1 for sytem1 input SWITCH2 for sytem2 input switch3 for sytem3 input switch4 for sytem4
sbit sw5_op=P0^4;// input switch5 for coin sbit sw6_op=P0^5;// input switch for start sbit sw7_op=P3^7;// input switch for exit
////////////////////////////output Led for indication/////////////////// sbit REady_LED1=P1^0; //LED1 indication (ready system1) P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 72
sbit REady_LED2=P1^1; //LED2 indication(ready system2) sbit REady_LED3=P1^2; //LED3 indication(ready system3) sbit REady_LED4=P1^3; //LED4 indication(ready system4) sbit START_LED1=P1^4; //LED1 indication(start system1 ) sbit START_LED2=P1^5; //LED2 indication(start system2 ) sbit START_LED3=P1^6; //LED3 indication(start system3 ) sbit START_LED4=P1^7; //LED4 indication(start system4 ) ///////////////////function prototype declaration///////////////////// void my_delay(unsigned int value)// DELAY FUCTION void init_timer(); //timer 0 initialization function
//////////////////variable declaration//////////////////////// bit flag1,flag2,flag3,flag4,flag5,flag6,flag7,flag8,flag9,flag10,flag11,flag12; bit disp1=0,disp2=0,disp3=0,disp4=0,disp5=0,disp6=0,k1=1,k2=2,k3=1,k4=1; unsigned long int i=0,j=0,l=0,m=0,ii=0,ll=0,jj=0,mm=0; //k=390(1 minute) ,k=50 /////////////////////////////start of main programme/////////////////// void main() { init_timer();// call it timer initialization function
REady_LED1=0,REady_LED2=0,REady_LED3=0,REady_LED4=0; // clear Ready indication led START_LED1=0,START_LED2=0,START_LED3=0,START_LED4=0; // clear start indication led
while(1) // while loop with condition always equal to 1 to repeat loop infinite times unless and until we shut down the system { ////////////////condition for switch1//////////////////////////// ' if(flag1==1) // check swich1 pressed { if(disp1==1 ) { P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 73
if(flag5==1) //check coin is pressed { if(flag6==1) //START is pressed and start conversion {
if(i<k)
// loop will repeat for desired time of charging { if(i>=1000) { buzzer=1; if (ii==20) //turn on buzzer
} } } ///////////////////////condition for switch2////////////////////// if(flag2==1) // check swich2 pressed { if(disp2==1) { REady_LED2=1;// turn on ready 2 led indication } disp2=0; if(flag7==1) //check coin is pressed { if(flag8==1) //START is pressed {
if(j<k) { if(j>1000) { buzzer=1; if(jj==20) {REady_LED2=1;} else if(jj==40) {REady_LED2=0;jj=0;} } else { REady_LED2=0; START_LED2=1; }
Page | 75
/////////////////////////condition for switch 3//////////////////// if(flag3==1) // check swich3 pressed { if(disp3==1 ) { REady_LED3=1; } disp3=0; if(flag9==1) //check coin is pressed {
if(flag10==1) //START is pressed { if(l<k) { if(l>1000) { buzzer=1; if(ll==20) {REady_LED3=1;} else if(ll==40) {REady_LED3=0;ll=0;} }
{ REady_LED3=0; START_LED3=1; } } else { START_LED3=0; //LED2=0; k3=1; buzzer=0; REady_LED3=0; flag3=0; flag9=0; flag10=0; l=0;ll=0; } } } } ///////////////////////////// condition for switch 4////////////// if(flag4==1) // check swich4 pressed { if(disp4==1 ) { REady_LED4=1; } disp4=0; if(flag11==1) //check coin is pressed { if(flag12==1) //START is pressed {
if(m<k) { if(m>1000) { buzzer=1; if(mm==20) { REady_LED4=1; P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 77
buzzer=0; k4=1; REady_LED4=0; flag4=0; flag11=0; flag12=0; m=0;mm=0; } } } } } while(1); } //////////////////////end of main programme////////////////////// ///////////////timer delay//////////////// void init_timer() { TMOD=0x01; // timer 0 in mode 1 TL0=0xfd; // timer lower value TH0=0x4b; //timer higher value IE|=0x82; // interrupt control bit TR0=1; // start timer bit }
//whenever specific time the interrupt will generate control will go in following function
Page | 78
void timer0_isr(void)interrupt 1 using 2// timer 0 interrupt { TR0=0; // reset timer TF0=0; // reset over flow flag TL0=0xfd; // load value of TL0 TH0=0x4b; // LOAD VALUE OF TH0 TR0=1; // SET TIMER BIT OR TURN ON TIMER /////////IF SWITCH 1 IES PRESSEDE THEN IT WILL GO N TO FOLLOWING LOOP///////// if(sw1_op==0 ) { // ready switch flag for system1
my_delay(10);// CALL DELAY FUNCTION flag1=1; disp1=1; k1=0; // SET RESPECTIVE FLAG FOR NEXT OPERATION
if(k2==0||k3==0||k4==0) // IF SWITCH2OR SWITCH3 OR SWITCH 4 IS PRESSED THEN IT WILL GO INTO FOLLOWING LOOOP { if(flag7==1) // SET THE FLAG { flag7=1; } else { flag7=0; flag2=0; REady_LED2=0; // CLEAR READY 2 LED } if(flag9==1) { flag9=1; } else { flag9=0; flag3=0; REady_LED3=0; // CLEAR READY 3 LED } if(flag11==1) { flag11=1; } P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 79
/////////IF SWITCH 2 IS PRESSEDE THEN IT WILL GO N TO FOLLOWING LOOP///////// if(sw2_op==0 ) fready switch flag for system2 { my_delay (10); flag2=1; disp2=1; k2=0; if(k1==0||k3==0||k4==0) { if(flag5==1) { flag5=1; } else { flag5=0; flag1=0; REady_LED1=0; } if(flag9==1) { flag9=1; } else { flag9=0; flag3=0; REady_LED3=0; } if(flag11==1) { flag11=1; } else P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 80
{ flag11=0; flag4=0; REady_LED4=0; } } } /////////IF SWITCH 3 IS PRESSEDE THEN IT WILL GO N TO FOLLOWING LOOP///////// if(sw3_op==0 ) { my_delay(10); // ready switch flag for system3
flag3=1; disp3=1; k3=0; if(k2==0||k1==0||k4==0) { if(flag7==1) { flag7=1; } else { flag7=0; flag2=0; REady_LED2=0; } if(flag5==1) { flag5=1; } else { flag5=0; flag1=0; REady_LED1=0; } if(flag11==1) { flag11=1; } else { P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 81
} /////////IF SWITCH 4 IES PRESSEDE THEN IT WILL GO N TO FOLLOWING LOOP///////// if(sw4_op==0 ) // ready switch flag for system4 { my_delay(10); flag4=1; disp4=1; k4=0; if(k2==0||k1==0||k3==0) { if(flag7==1) { flag7=1; } else { flag7=0; flag2=0; REady_LED2=0; } if(flag5==1) { flag5=1; } else { flag5=0; flag1=0; REady_LED1=0; } if(flag9==1) { flag9=1; } else { flag9=0; P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 82
flag3=0; REady_LED3=0; } } } /////////IF SWITCH 5 IES PRESSEDE THEN IT WILL GO N TO FOLLOWING LOOP///////// if (sw5_op==0 ) { my_delay (10); if (flag1==1) { flag5=1; disp5=1; } // coin check
if(flag2==1 ) { flag7=1; disp5=1; } if(flag3==1 ) { flag9=1; disp5=1; } if(flag4==1 ) { flag11=1; disp5=1; } } /////////IF SWITCH 6 IES PRESSEDE THEN IT WILL GO N TO FOLLOWING LOOP///////// if(sw6_op==0 ) // start signal { my_delay (10); if((flag1==1 && flag5==1)) { flag6=1; disp6=1; } if((flag2==1 && flag7==1)) P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 83
{ flag8=1; disp6=1; } if((flag3==1 && flag9==1)) { flag10=1; disp6=1; } if((flag4==1 && flag11==1)) { flag12=1; disp6=1; } } if(flag6==1) { i++; if (i>1000) {ii++;} } if (flag8==1) { j++; if(j>1000) {jj++;} } if (flag10==1) { l++; if (l>1000) {ll++;} } if (flag12==1) { m++; if (m>1000) {mm++;} } }
/////////////////////DELAY FUNCTION///////////////// void my_delay(unsigned int value) { unsigned int x, y; for(x=0;x<1000;x++) P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 84
{ for(y=0;y<value; y++); } }
CHAPTER 13
TROUBLE SHOOT
Page | 85
Troubleshoot
circuit does not work due to bad soldering. Therefore, proper procedure is followed to have proper soldering. If faults are not observed during physical observations, one should proceed for Hot test i.e. Voltage measurement at different points for example at Input terminal etc. Resistance measurement is also done which is known as Dry test. During this project work, some green LEDs was not glow, then we checked it continuity and replace it. Also, relay was not properly worked, therefore we replaced it. Some ICs was get heated after starting the project. It happens because of some soldering points are shorted during soldering PCB. We solved that problem.
CHAPTER 14
Page | 87
Advantages
Page | 88
Simple to operate. Ease of mobility. Facilitates connectivity for 90% of cellular phones. Less expensive. Reduced man power. Low power consumption. It can offer emergency charging for 4sets of handsets synchronously.
Page | 89
CHAPTER 15
Disadvantages
Page | 90
Page | 91
CHAPTER 16
Application
Page | 92
The coin based mobile phone charger is very useful to public for using coin to charge for the mobile phone in any places.
It is used for emergency charging purposes. It can be installed in malls, railway stations, bus stops and other public places.
The charger offers a unique revenue opportunity for a vast range of businesses - from airports to pubs, from universities to health clubs; virtually any location where there is a high footfall, creating a large number of potential users.
Page | 93
CHAPTER 17
Page | 94
Page | 95
CHAPTER 18
Page | 96
1 1
R2 R1
1 1
1 1 2 2
C5 C1 C6 C4
C2 C3
10 10 1 1
2 1 1
BR2 U2 U1
BR1
10 8 8
2 1
J3 J1
J2
16 12
2 2
L1
L2
1 4 4
1 4
5.00 32.00
1 1 4 4 TOTAL
RELIM-4
7.00
Page | 98
16 pin ic socket
1 Total
4.00 189.00
2 4 2 1
C5 C9 C3 C1
C4 C8 C2
C7
C6
1 1 6
R1 R8 R7
R6
R5
R4
R3
R2
1 1 1
U3 U1 U2
9 2 1 1
46.00
8.00
1 1 4 4
L9 L10
10.00
Page | 99
1 1
5.00 4.00
1 1 1
RN1 XL1 S1
200.00
165.00
1 4 1 4 4 8 2 1 meter 1 19 5 2
200.00 40.00 10.00 8.00 8.00 16.00 40.00 15.00 30.00 90.00 37.50 20.00
mechanical items Enclosure Acrylic sheet 12mm cable gland Screw 3mm Screw 3.5mm
1 2' X 1' 1 33 6
Page | 100
100 50
CHAPTER 19
APPENDIX
APPENDIX
P.V.POLYTECHNIC, S.N.D.T. University, Mumbai-049. Page | 101
19.1. APPENDIX:
19.1.1. 78xx IC datasheet:
Page | 102
Page | 103
Notes * Indicates JEDEC registered data. 1. The current transfer ratio(IC/IF) is the ratio of the detector collector current to the LED input current with V CE @ 10 V. 2. Pulse test: pulse width = 300s, duty cycle 2.0% . 3. For test circuit setup and waveforms, refer to figure 7.. 4. IF adjusted to IC = 2.0 mA and IC = 0.7 mA rms. 5. The frequency at which IC is 3dB down from the 1 KHz value. 6. For this test, LED pins 1 and 2 are common, and phototransistor pins 4,5 and 6 are common.
Page | 106
Page | 107
Page | 108
Page | 109
Page | 110
Page | 111
Page | 112
CHAPTER 20
CONCLUSION
CONCLUSION
Page | 113
20.1. CONCLUSION:
The coin-operated mobile phone charger is already successfully installed in hundreds of locations worldwide, providing a unique service to the public and a source of revenue for site providers. The coin-operated mobile charger can be quickly and easily installed in any business premises. The charger offers a unique revenue opportunity for a vast range of businesses from airports to pubs, from universities to health clubs; virtually any location where there is a high footfall, creating a large number of potential users. The charger can charge up to 4 different mobile phones simultaneously. It will extend low mobile phone talk time, provide battery charging.
Page | 114
CHAPTER 21
Page | 115
Page | 116
Page | 117
Page | 118
Page | 119
Page | 120
CHAPTER 22
BIBILOGRAPHY
BIBLIOGRAPHY
Page | 121
22.1. BIBLIOGRAPHY:
BOOKS: Microprocessor Architecture, Programming Applications Gaonkar CMOS Integrated Circuits Data Book Sierra Optoelectronics Handbook National Microprocessor Data Handbook Micro-Controller - Keneth Ayala Electronic Devices Applications & Integrated Circuits-Mathur/Kulshreshtha/Chadha Electronic Devices And Circuits - J B Gupta Electronics For You Magazine
Page | 122