Académique Documents
Professionnel Documents
Culture Documents
The Microcontroller based put coin and draw power is latest technology for distribution of electric power for paying guest house, lodges and trains. It can be effectively used to operate to the equipments. Built on the lines of payphones, here is an automatic coin collection devise for pay loads like lamps and air-conditioners to be used on a private electrical line.
This type of systems are not available in the market, Their ICS may not be easily available. Moreover, for simply functions. The system makes use of a sensor for detecting the coin and a microcontroller that counts the coins and shows the count on a 7-segment display; when you close the load switch provided in the circuit, the energize to connect the load and the coin count on display starts decrementing. When the count decrements to zero, the relay deenergize to disconnect the load.
SOURCE OF IDEA
Now-a-days almost every person carries more than one electronic gadgets. Due to the continuous use of these gadgets these require frequent charging which is not possible when we are not at home for eg. Railway station, bus stand, parks etc. Moreover there are some places where power supply is available but due to the lack of maintenance these outlets are in poor conditions. These will be better maintained if they could generate some revenue this can be achieved by building such an intelligent device which operates on the principle of paid energy usage. This led to idea of Put Coin Draw Power. We researched on this idea and found that the construction of such a device is feasible.
PROCEDURE
The working of the device starts with the insertion of coin in coin box.A inserted coin is sensed by the coin box and it sends signal to IC NE556 timer which is a dual timer which are independent of each other using only common ground and supply.The timer circuit sends signal to ATMEGA processor through BJT BC337 which inverts the signal before sending it to the microprocessor.Now microprocessor works according to its programme and sends signal to the decoder according to the logic stored in it.Microprocessor also sends a signal to the relay circuit for its operation. The BJT BC 337 ampilfies the signal sent by the microprocessor and then forwards it to the relay for its operation.If we have inserted n number of coins then display will show the number of coins inserted.With the completion of time of each coin the display will decrease lets say with the completion of time of nth coin the dislay will decrease by (n-1).With dislay showing zero the microprocessor will disconnect the relay from the supply.
Voltage regulator maintains the supply as 5 Volt coming from a battery of 9 volt.This component can be easily identified by its large heat sink.
Step 2: Coin is detected by the sensor and it sends a signal to the timer NE556.
3
Step 3: The timer generates pulses which are sent to the microprocessor AT89.
Step 5: The microprocessor sends a signal to decoder. The decoder decodes it and start the timer and displays on the 7 Segment Display.
Step 6: When timer ends the relay is disconnected from the supply.
Step 7: When another coin is inserted the complete process repeats itself.
PROGRAMME
$mod51
; p3.2monostable pulse(time
; p1.0monostable triggering
signal
mov r7,#000h
set high
off
clr p1.1
; relay de-energised
setb p1.0
clr p1.4
clr p1.5
; 7 seg display 0
clr p1.6
clr p1.7
;-INITIALISATION OVERacall
7
delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
cjne a,#000h,tstpwrsw
clr p1.1 ; i f r 3 = 0
8
denergise relay
sensed
STARTmov
detected
rl a
rl a
rl a ;
no of coins count in MS of r2
rl a
movb,a ; copy in b
mov a,p1
9
orla,b
;countored in a
mov p1,a
tstcount
add a,#005h
clr c
in r2
inc a
clr c
10
mov a,#9
acall coin ;
sjmptstcount
clr p1.1
sjmpcoindet
dec r3
dec r6 ;
mov a,r6
cjne a,#000h,bypssr2
dec r2 ; 1
mov a,r2
jz min
rl a
rl a
rl a
rl a
clr c
movb,a
mov a,p1
anl a,#00fh
orla,b
12
mov p1,a
mov r6,#005h ; i n i t i a l
count of 5 in r6
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay ;
mono triggered
setb p1.0
13
ajmptstcount
ajmptstcount
;-ROUTINESdelay:
mov r0,#0c8h
loop1: nop
nop
nop
5 X 200=1msec
ret
acall delay
acall delay
acall delay
acall delay
clr p3.7
acall delay
acall delay
acall delay
acall delay
ret
end
15
HARDWARE DESIGN
16
PROCESS
PCB Layout Designing
PCB is the most important part of any instrument because working of any instrument depends upon the correctness of PCB. When we completed the designing of the circuits, then we have to prepare the first of all PCBs layout by which we fabricate the PCBs. For proper fabrication of PCB layout should be proper. We used software PROTEUS 6.9 for preparing the layout. When we design the PCB layout, we remember that layout should be as compact as possible for reducing the size of PCB as well as instrument which also reduces the costs. After preparing the PCB layout, we have to take the printout of the layout for fabrication of PCBs.
17
18
PCB FABRICATION
The term PCB stands for Printed Circuit Board which is used for drawing the circuit so that component mounting is made. A PCB is used to mechanically support and electrically connect electronic components using conductive pathways, or traces, etched from copper sheets laminated onto a non-conductive substrate. It is also referred to as printed wiring board (PWB) or etched wiring board (EWB). A PCB populated with electronic components is a printed circuit assembly (PCA), also known as a printed circuit board assembly (PCBA). PCBs are rugged, inexpensive, and can be highly reliable. They much more layout effort and higher initial cost than either wire-wrapped or point-to-point constructed circuits, but are much cheaper and faster for high-volume production. After the circuit diagram of the project was made then we were made to draw the circuit diagram on the PCB. For this purpose, we used a copper clad laminate & then we did the following processes: Pre-processing Photolithography Etching Drilling Board Testing
19
Pre-processing
Firstly the layout is drawn in software known as PROTEUS 6.9 taking in account of all the considerations. Then the printout of this layout has been taken out on the plain text paper. Then the photocopy of this layout has been taken out on the transparent sheet. After that the copper clad plate is cut up into the required size of the layout of the project for making PCBs.
Photolithography
First of all we rub the copper clad plate to clean the copper surface for make proper circuit. After that the copper plate has been dipped into a Film Register Solution for a few seconds so that it can take effect of the circuit from the transparent sheet. This process has been done in Dip Coat Machine. After that dried the copper clad plate in Dry Machine for approx 10mins. Now a black transparent sheet has been cut out of the circuit size to make the negatives of the original circuit. This black transparent sheet & circuit transparent sheet put in the Film Maker Machine as overlap to each other for making negatives.
20
This negative then dipped into the developer solution for approx 10mins. Developer is a mixture of A & B solution in water. In this the circuit is displayed on the film.
After that negative is washed in water. Now the negative is dipped into the Film Fixer solution for a minute. This fixes the circuit on the negative film.
After that negative is washed in water & dried in dry machine for few minutes. Now the copper plate & negative impose in the Ultra Violet Light. This process has been done in UV Machine. By this the circuit from negative puts onto the copper plate same as on negative.
21
Fig. UV Exposure
This copper plate has been dipped into the Liquid Phase Register (LPR) for approx 10mins. This solution fixes the circuit on the copper plate.
After that Blue Ink is dropped on the copper plate. This doesnt remove the copper path in etching process with extra copper. Use the gloves for protection.
ETCHING
Etching process is the process to remove the unwanted copper from the copper clad laminate. Ferric Chloride (FeCl3) is use to etch away copper surface on the PCB board. It is a very toxin chemical and is harmful to the environment.
22
Remember to wear protective gloves while handling FeCl3. Chemical is toxin and will cause skin irritation. Wash skin with running water immediately when in contact with skin.
This etching solution is kept in an Etching Machine large enough to enclose the PCB. The PCB is then drowned in the etching solution & is kept for 20-30mins.
Gradually the unwanted copper gets removed from the PCB & we obtained only the painted tracks on the PCB.
These tracks are then cleaned with rubbing so that we get copper tracks. After that we put the layer of Lacquer solution on the PCB by protecting the corrosion & provide the shine.
DRILLING
After lacking, PCB is taken for drilling the holes on PCB. Needle used in the drilling machine should be of appropriate diameter. Drilling should be done correctly.
23
BOARD TESTING
After the drilling is made the board is tested that the copper tracks we have made are working properly or not & the drilled holes are properly placed or not. The testing usually consists of the visual inspection & continuity testing. Visual testing is carried out to ensure proper track width & proper conductor pattern. Continuity testing will ensure proper connections between different points.
24
damage the component or whole PCB. Always mount the small components like Resistors, Capacitors etc. first on PCB then large components. Before mounting the components test all the components that are correct or not. First of all which components you want to mount adjust it legs according to the holes. For resistors & diodes bend their legs to put into the hole according to the distance of hole. After that put the component into the hole. Now the soldering is done. Soldering is a technique by which we attach the component & connection with the paths of components. After that cut the extra legs of all components.
TESTING OF CIRCUIT
After completion the assembly of all components we have to require checking the complete circuit. This is a very important for proper operation of project because it can affect the project working. First of all, provide the power supply to the circuit. Then check the output of power supply which should be correct for further processing. If power supply output is correct then check the other component otherwise repairing the power supply.
25
After the testing this whole assembly was mounted on a mechanical setup to give it a presentable look.
26
CONCLUSION
Through our personal experiences and research on this topic it was clear that the need for such a device is inevitable as it provides a good and satisfactory service to the consumer and revenue to the owner at a very low initial cost along with high returns. It will also reduce energy wastage due to the chargers which remains on due to the ignorance of user by its timer feature. It would be very handy in places like bus stands, railway stations, trains and even in buses with minor changes in the design. One can also install it as PCOs which are installed at various places in towns and cities. With the development of its design in future owner can also set the price for which he/she wanted to give energy to the consumer thus making it more profitable commercially. This device is a simple way to provide an effective power supply in areas where it is needed.
27
SCOPE OF UTILIZATION
Simple to use
Less maintenance
Automatic working
2. Lodges
3. Trains.
4. Fairs.
5. Hotels.
28
APPENDIX A
WORK DISTRIBUTION
In this project we have worked as a team and have divided our work according our different skills and work interest although we have sport each other for each work. Division of work for each team member is as follows
Aditya Kulshreshtha(8th SEM EE) Assembly work PCB Designing Prepared Report for Project Circuit Testing along with the final testing Ashish Indolia (8th SEM EE) Mounting the components Soldering Drilling
Testing and troubleshooting the circuitry and connections
Purchased components required Arrangement of material Soldering Prepared the Report Abhishek Srivastava (8th SEM EE) Fabricated the PCB in project Lab Prepared the Report Drilling
30
APPENDIX B BUDGET
S.NO. 1. 2. 3. 4. 5. 6. 7. 8. 9.
NON RECURRING
COMPONENTS IC NE556 TIMER BCD To 7-Segment Decoder Capacitor PC board Large wooden board 7-Segment Display Mega32 Voltage Regulator 7805 Resistor QUANTITY 1 1 8 1 1 1 1 1 20 1 1 4 2 1 4 PRICE(RUPEES) 900 90 75 250 65 650 300 20 2 50 800
10. Small solder board 11. Coin Assembly 12. LED 13. BJT 14. SPDT RELAY 15. DIODE
RECURRING
1. Man Power not required 2. Consumables solder wire (Rs. 25) 3. Contingency not required 4. Travel Rs. 300
31
BIBILOGRAPHY
1.www.scribd.com
2. www.engineersforum.com
32
DESCRIPTION OF COMPONENTS
1. Microcontroller AT89C2051
The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read-only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industrystandard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a power-ful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 is designed with static logic for opera-tion down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The power-down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.
33
GND: - Ground
Port 1: - The Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide internal pull-ups. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1 also serve as the positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip precision analog comparator. The Port 1 out-put buffers can sink 20 mA and can drive LED displays directly. When 1s are written to Port 1 pins, they can be used as inputs. When pins P1.2 to P1.7 are used as inputs and
34
are externally pulled low, they will source current (IIL) because of the internal pull-ups. Port 1 also receives code data during Flash programming and verification.
Port 3: -Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal pull-ups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is not accessible as a gen-eral-purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups.
RST: -Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST pin high for two machine cycles while the oscillator is running resets the device. Each machine cycle takes 12 oscillator or clock cycles.
XTAL1: - Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
Oscillator Characteristics :-The XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 5-1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in
35
Figure 5-2. There are no require-ments on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.
Special Function Registers: -A map of the on-chip memory area called the Special Function Register (SFR) space is shown in the table below. Note that not all of the addresses are occupied, and unoccupied addresses may not be imple-mented on the chip. Read accesses to these addresses will in general return random data, and write accesses will have an indeterminate effect. User software should not write 1s to these unlisted locations, since they may be used in future products to invoke new features. In that case, the reset or inactive values of the new bits will always be 0.
2. NE 556
The NE556 dual monolithic circuit is a highlystable controller capable of producing accurate delaysor oscillation. The NE556 is the dual of NE555; timing is provided an external resistor andcapacitor for each function. The two timers operateindependently of each other, sharing only Vcc andGND. The circuits may be triggered and reset on fallingwave forms. The output structures may sink or source200mA.
36
FEATURES: 1. High current driver capability(=200mA) 2. Adjustable duty cycle 3. Timing from _Sec to Hours 4. Temperature stability of 0.005%/ C 5. TTL compatible 6. Operates in both Astable and Monostable modes APPLICATIONS:1. Precision timing. 2. Pulse width modulation. 3. Pulse generator, shaping.
37
4. Traffic light control. 5. Time delay generator. 6. Touch tone encoder. 7. Sequential timing.
3. CD4511
The CD4511BC BCD-to-seven segment latch/decoder/driver is constructed with complementary MOS (CMOS)enhancement mode devices and NPN bipolar output driversin a single monolithic structure. The circuit provides thefunctions of a 4-bit storage latch, an 8421 BCD-to-sevensegment decoder, and an output drive capability. Lamp test(LT), blanking (BI), and latch enable (LE) inputs are used totest the display, to turn-off or pulse modulate the brightnessof the display, and to store a BCD code, respectively. It canbe used with seven-segment light emitting diodes (LED),incandescent, fluorescent, gas discharge, or liquid crystalreadouts either directly or indirectly.Applications include instrument (e.g., counter, DVM, etc.)display driver, computer/calculator display driver, cockpit display driver, and various clock, watch, and timer uses.
38
FEATURES: 1. Low logic circuit power dissipation 2. High current sourcing outputs (up to 25 mA) 3. Latch storage of code 4. Blanking input 5. Lamp test provision 6. Readout blanking on all illegal input combinations 7. Lamp intensity modulation capability 8. Time share (multiplexing) facility
39
4. Transistor BC337
We know that the transistor is a "CURRENT" operated device and that a large current (Ic) flows freely through the device between the collector and the emitter terminals. However, this only happens when a small biasing current (Ib) is flowing into the base terminal of the transistor thus allowing the base to act as a sort of current control input. The ratio of these two currents (Ic/Ib) is called the DC Current Gain of the device and is given the symbol of hfe or nowadays Beta, (). Beta has no units as it is a ratio. Also, the current gain from the emitter to the collector terminal, Ic/Ie, is called Alpha, (), and is a function of the transistor itself. As the emitter current Ie is the product of a very small base current to a very large collector current the value of this parameter
40
is very close to unity, and for a typical low-power signal transistor this value ranges from about 0.950 to 0.999.
FEATURES: -
5. 7 Segment Display
It consist of a 5-stage Johnson decade counter and an output decoder which converts the Johnson code to a 7-segment decoded output for driving one stage in a numerical display.These devices are particularly advantageous in display applications where low power dissipation and /or low package count are important.Inputs common to both types are CLOCK, RESET, & CLOCK INHIBIT; common outputs are CARRY OUT and the seven decoded outputs (a, b, c, d, e, f, g). Additional inputs and outputs for the CD4026B include
41
DISPLAY ENABLE input and DISPLAY ENABLE and UNGATED "C-SEGMENT" outputs. Signals peculiar to the CD4033B are RIPPLE-BLANKING INPUT AND LAMP TEST INPUT and a RIPPLE-BLANKING OUTPUT.
signals and indicators) as well as in traffic signals. The compact size, the possibility of narrow bandwidth, switching speed, and extreme reliability of LEDs has allowed new text and video displays and sensors to be developed, while their high switching rates are also useful in advanced communications technology.
Resistors are elements of electrical networks and electronic circuits and are ubiquitous in most electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome).The primary characteristics of a resistor are the resistance, the tolerance, the maximum working voltage and the power rating. Other characteristics include temperature coefficient, noise, and inductance. Less well-known is critical resistance, the value below which power dissipation limits the maximum permitted current, and above which the limit is applied voltage. Critical resistance is determined by the design, materials and dimensions of the resistor.Resistors can be integrated into hybrid and printed circuits, as well as integrated
43
circuits. Size, and position of leads (or terminals), are relevant to equipment designers; resistors must be physically large enough not to overheat when dissipating their power.
8. Non-electrolytic Capacitor
Capacitors are components that are used to store an electrical charge and are used in timer circuits. A capacitor may be used with a resistor to produce a timer. Sometimes capacitors are used to smooth a current in a circuit as they can prevent false triggering of other components such as relays. When power is supplied to a circuit that includes a capacitor the capacitor charges up. When power is turned off the capacitor discharges its electrical charge slowly.Non-electrolytic capacitors usually have a lower capacitance. They are not polarised (do not have a positive and negative lead) and can be placed anyway round in a circuit. They are normally used to smooth a current in a circuit.
9. RELAY
Subminiature 10 ampere power PCB Relay
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
44
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.The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot provide this current and a transistor is usually used to amplify the small IC current to the larger value required for the relay coil. The maximum output current for the popular 555 timer IC is 200mA so these devices can supply relay coils directly without amplification.
Relays are usuallly SPDT or DPDT but they can have many more sets of switch contacts, for example relays with 4 sets of changeover contacts are readily available. For further information about switch contacts and the terms used to describe them please see the page on switches.Most relays are designed for PCB mounting but you can solder wires directly to the pins providing you take care to avoid melting the plastic case of the relay.The supplier's catalogue should show you the relay's connections. The coil will be obvious and it may be connected either way round. Relay coils produce brief high voltage 'spikes' when they are
45
switched off and this can destroy transistors and ICs in the circuit. To prevent damage you must connect a protection diode across the relay coil.
Less than 10ms Less than 5 ms 1,000 mega ohms min, at 500VDC, 50%RH 5000 Vrms, 1 min. between coil and contacts 1000 Vrms, 1 min. between o pen contacts 2500 Vrms, 1 min. between contact poles
Shock Resistance Vibration Resistance Power Consumption Ambient Temperature Range Weight
10 g, 11ms, functional ; 100 g, destructive DA 2 mm, 10- 55 Hz .25 Watts -40 to 85 C, -40 to 130 C storage 8 grams approx.
46
11.Diode
A diode is a semiconductor diode which allows current to flow through it in only one direction. Although a transistor is also a semiconductor device, It does not operate the way a diode does. A diode is specifically made to allow current to flow through it in only one direction. DIODE CHARACTERISTIC:
Figure shows combined forward bias and reverse bias V-I characteristics ofGe and Si diodes. From this figure we can easily see that leakage current of Ge diode junction is much more than Si diode junction.
47
48