107
ABSTRACT This project idea & concept is completely new & authentic. You will not found any installation of this system. So this is best topic to choose. The aim is to minimize the time & energy which we expend in getting a local train ticket. There are off course two different type of systems installed in railway viz. Coupon Validation and Instant Ticket Printer which accepts 5Rs. & 1Rs. Coins. The drawback of Coupon Validation system is that user has to validate no. of coupons to sum-up the required amount. This becomes more time consuming & frustrating if he/she has only remaining with 1Rs. Coupons. The same is applicable for the second system in which one has to insert considerable no. of coins. What if he/she has no change at all? Due to these drawbacks the current solution hardly reduces the queuing problem at the counter. Here we are proposing & developing such a system which will overcome all the drawbacks of existing system and will act as the fastest ticketing system ever. Our system will be consisting of a Card Insertion Socket, µC, LCD, RTC, Keypad and a Thermal Printer. The basic concept is that user will have a pre-paid card which he/she can purchase from the counter worth fixed amount. Now for getting a ticket,

RPORT BK2

  • Upload
    b11star

  • View
    115

  • Download
    2

Embed Size (px)

Citation preview

Page 1: RPORT BK2

ABSTRACT

This project idea & concept is completely new & authentic. You will not

found any installation of this system. So this is best topic to choose.

The aim is to minimize the time & energy which we expend in getting a

local train ticket. There are off course two different type of systems installed in

railway viz. Coupon Validation and Instant Ticket Printer which accepts 5Rs. &

1Rs. Coins. The drawback of Coupon Validation system is that user has to

validate no. of coupons to sum-up the required amount. This becomes more time

consuming & frustrating if he/she has only remaining with 1Rs. Coupons. The

same is applicable for the second system in which one has to insert considerable

no. of coins. What if he/she has no change at all? Due to these drawbacks the

current solution hardly reduces the queuing problem at the counter. Here we are

proposing & developing such a system which will overcome all the drawbacks

of existing system and will act as the fastest ticketing system ever.

Our system will be consisting of a Card Insertion Socket, µC, LCD, RTC,

Keypad and a Thermal Printer. The basic concept is that user will have a pre-

paid card which he/she can purchase from the counter worth fixed amount. Now

for getting a ticket, just insert the card in our system, enter the desired amount

and press the Print key. The µC will print Date, Time, and Starting Place &

Amount on a paper with the help of the thermal printer. The amount will be

deducted from the card.

Page 2: RPORT BK2

CHAPTER 1

1. INTRODUCTION

E-TICKETING SYSTEM is a project which replaces the coupon system. The

main purpose of the E-TICKETING SYSTEM is to minimize the effort which

needed to buy a ticket via coupon validating machine. In E-TICKETING

SYSTEM we don’t need to punch each and every ticket of different values as in

coupon validating machine. Thus this process is a time saving process.

There will be a smart card which is allotted to the users by inquiring

his personal details. Each and every user’s smart card is protected by his

personal password. So in case of robbery or in lost case the card can be blocked

if required. The card needs to be refilled regularly to maintain the validity.

The user need to insert the card and to follow the procedure as stated:

1. The user should have the card with sufficient balance

2. Insert the card into the socket.

3. Check the previous amount.

4. If the balance is sufficient then enter the total amount

5. Press “print” key and wait for 10 second.

6. The date ,time and name of the source station will be printed on the ticket

7. Collect the ticket.

8. If the balance is insufficient then refill it with the help of downloader and repeat from step 4 onwards.

PROCEDURE FOR PURCHASING THE CARD:

1. Submit your documents and amount to the railway officer.

2. Follow up all the formalities

3. Collect the card.

Page 3: RPORT BK2

CHAPTER 2

LITERATURE SURVEY

In our day to day life lakes of people travel by train. Some have their railway pass while many of them buy tickets for traveling. Up till now there are three methods of buying tickets:

I. TICKET COUNTER:In ticket counter we have to be in a queue which is very time consuming & if we don’t have proper change then we have to first ask for change to some one & then buy the ticket.

II. COIN OPERATING MACHINE:In some of the main station these machines are used. But if we don’t have the perfect

coins that coin of Rs 5 we can’t buy the ticket & thus we have to be in long queue. iIn this system one has to insert considerable no. of coins. This system preferred only

for limited destination.

Page 4: RPORT BK2

III. COUPON VALIDATING MACHINE:In this method if the coupons of Rs 5 are over & if we left with Rs 1 & Rs 2

coupons then it become a very irritated & time consuming job to buy a ticket of long journey

Figure: COUPON VALIDATING MACHINE

IV. SHOW AND GO: In this system there required a card to show every time at the starting station & at

the destination. Deduction of maximum fare if somebody forgets to show at destination

Page 5: RPORT BK2

2.1 EXISTING SYSTEMS

The existing systems that are in use are:-

1) Buying of tickets by paying on the counter.2) Coupon system3) Coin machine4) Internet booking

1. Buying of tickets by paying on the counter: - This is the oldest method of buying tickets. In this method the customer has to pay the required amount on the counter and purchase the ticket. The main drawback of this system is that firstly in country like India there is not only one customer waiting for the ticket. Thus the queue for purchasing the ticket is too long and thus the whole process for the person standing at the end becomes very hectic. Secondly the customer has to give the exact amount of money required for the ticket, if he or the person sitting on the counter runs short of the change required then it should be arranged from somewhere else. This takes minimum 2 to 5 mins for the customer. So if we consider 2mins per customer and if the queue consists of even 10 customers then the last person will get the ticket after 20mins and that to if all goes well.

2. Coupon system:- This system is a bit better as compared to the first one. But it has got drawbacks too. Its first drawback is that the coupon book consists of 15 coupons, 5 coupons of Rs.5, 5 coupons of Rs.3 and 5 coupons of Re.1 each. If the person has to punch the coupons of Rs.18 then he may take any possible combination of the tickets and get them punched. But this is also time consuming since if for example we take 3 coupons of Rs.5 and 1 coupon of Rs.3 then on average the time required to punch one coupon is 5secs thus the total time required will be 20secs just for punching of the coupons and finding for them from the coupon book will take minimum 10secs that is 30 to 45secs for each person that is over half a minute and if there are again say 10 people standing in the queue then it will take say near about 10 mins for the last customer to get the cards punched. The second main drawback of this system is that people are able to erase the ink printed on the coupon and reuse it.

3. Coin machine: - This is a better option of purchasing ticket if the amount of the ticket is low. The main drawback of this system is that only coins of Rs5 and 1 can be used. One has to gather a lot of change if the amount of the ticket is high.

4. Internet:- This method can be used only if one has to do reservation of tickets. Its next drawback is that the person willing to do the reservation has to be a computer

Page 6: RPORT BK2

literate. The next drawback is that the use of internet is quite expensive an its also not so very reliable.

Thus we are planning to make a project which overcomes all these disadvantages and which will be Convenient for each & everyone.And thus we came out with the idea of STVM (Smart ticket vending machine) or E-TICKETING SYSTEM.

E-TICKETING SYSTEM is a technique which overcomes the disadvantage like:1) It is not time consuming2) In this there is no problem of coupons3) No problem of change

E-TICKETING SYSTEM:

In STVM the person will be having a card known as SMART CARD, in which he will be already having the balance. With that balance the person will be buying the tickets. Smart card has its own personal ID no. It will be useful to block the card in case if the card robbed or lost. Smart cards can be used for identification, authentication, and data storage.

Smart cards provide a means of effecting business transactions in a flexible, secure, standard way with minimal human intervention.

CHAPTER 3

Page 7: RPORT BK2

BLOCK DIAGRAM AND DISCRIPTION

The block diagram is divided into two different main blocks:

DOWN LOADER

THE ACTUAL SYSTEM

3.1 DOWN LOADER:

Fig 3.1 DOWN LOADER

3.1.1 EXPLAINATION:

Page 8: RPORT BK2

This block deals with the refilling of the card. The card needs to

have some prescribed amount in the card to operate. Refilling is done via

controlling with the help of computer.

The card is to be inserted in the socket. The card works of IC

protocol i.e. 93C46 which is a memory IC. The card usually stores the

information regarding the amount and the user ID password.

When the card is inserted in the socket which is connected to

microcontroller; then microcontroller gets interrupted an ISR is generated and

microcontroller recognizes that the card is inserted. Microcontroller is used to do

all the calculation and controlling part. The microcontroller then communicates

with the PC via level converter IC i.e. MAX 232.

To have communication between microcontroller and computer

we use RS 232 level converter which converts TTL logic to computer logic. The

baud rate is 9600 bps.

For the refilling purpose the PC with the VB software is required. This

made refilling process easy and time consuming. When the card inserted in the

socket microcontroller read it and connect to the PC. In the VB code there

already window is opened we just need to feel the amount. After that we can see

the balance in the card by just click the add button and also we can take a print

after completing refilling process.

The cable is connected to either com1; com2.Or if those

ports are already busy then we can connect to USB port. In the computer the

amount of the card will display and the amount to be entered will be inserted.

Page 9: RPORT BK2

3.2 ACTUAL SYSTEM :

Fig 3.2 ACTUAL SYSTEM

Page 10: RPORT BK2

3.2.1 EXPLAINATION:

This part of the circuit is placed at railway station counter available to the user.

The microcontroller 89c51 is the heart of the total circuit. It controls and

synchronizes all the peripherals connected to it.

The circuit can be classified as follows:

1) Power section

2) Input section

3) Output section

4) Controller section

5) Clock section

1) POWER SECTION:

This section provides power to entire circuitry. The SMPS is

designed purposely to provide stable +5V output to protect the thermal printer

from exceeding voltage.

SMPS:

A switched-mode power supply, switch-mode power supply, or SMPS, is an electronic power supply unit (PSU) that incorporates a switching regulator — an internal control circuit that switches power transistors (such as MOSFETs) rapidly on and off in order to stabilize the output voltage or current. Switching regulators are used as replacements for the linear regulators when higher efficiency, smaller size or lighter weight is required. They are, however, more complicated and their switching currents can cause noise problems if not carefully suppressed. As with any offline electronic systems employing peak-hold AC-DC conversion, simple SMPS designs may have a poor power factor. The power output to cost crossover point between SMPS and linear regulating alternatives has been falling since the early 1980s as SMPS technology was developed and integrated into dedicated silicon chips. In early 2006 even very low power linear regulators became more expensive than SMPS when the cost of copper and iron used in the transformers increased abruptly on world markets.

SMPS can also be classified into four types according to the input and output waveforms, as follows.

1. AC in, DC out: rectifier, off-line converter

Page 11: RPORT BK2

2. DC in, DC out: voltage converter, or current converter, or DC to DC converter 3. AC in, AC out: frequency changer, cycloconverter 4. DC in, AC out: inverter 5. AC and DC are abbreviations for alternating current and direct current.6. SMPS and linear power supply comparison

7. There are two main types of regulated power supplies available: SMPS and Linear. The reasons for choosing one type or the other can be summarized as follows.

8. Size and weight — Linear power supplies use a transformer operating at the mains frequency of 50/60 Hz. This low-frequency transformer is several times larger and heavier than a corresponding transformer in an SMPS, which runs at typical frequencies of 50 kHz to 1 MHz.

9. Output voltage — Linear power supplies regulate the output by using a higher voltage in the initial stages and then expending some of it as heat to produce a lower, regulated voltage. This voltage drop is necessary and can not be eliminated by improving the design, even in theory. SMPSs can produce output voltages which are lower than the input voltage, higher than the input voltage and even negative to the input voltage, making them versatile and better suited for widely variable input voltages.

10. Efficiency, heat, and power dissipation — a linear supply regulates the output voltage or current by expending excess power as heat, which is inefficient. A regulated SMPS will regulate the output using duty cycle control, which draws only the power required by the load. In all SMPS topologies, the transistors are always switched fully on or fully off. Thus, ideally, an SMPS is 100% efficient. The only heat generated is in the non-ideal aspects of the components. Switching losses in the transistors, on-resistance of the switching transistors, equivalent series resistance in the inductor and capacitors, and rectifier voltage drop will lower the SMPS efficiency. However, by optimizing SMPS design, the amount of power loss and heat can be minimized. A good design can have an efficiency of 95%.

11. Complexity — A linear regulator ultimately consists of a power transistor, voltage regulating IC and a noise filtering capacitor. An SMPS typically contains a controller IC, one or several power transistors and diodes as well as power transformer, inductor and filter capacitors. Multiple voltages can be generated by one transformer core. For this an SMPS has to use duty cycle control. Both need a careful selection of their transformers. Due to the high operating frequencies in SMPS, the stray inductance and capacitance of the printed circuit board traces become important.

12. Radio frequency interference — The current in a SMPS is switched on and off sharply, and contains high frequency spectral components. Long wires between the components may reduce the high frequency filter efficiency provided by the capacitors at the inlet and outlet. This high-frequency current can generate undesirable electromagnetic interference. EMI filters and RF shielding are needed to reduce the disruptive interference. Linear PSUs generally do not produce

Page 12: RPORT BK2

interference, and are used to supply power where radio interference must not occur.

13. Electronic noise at the output terminals — Inexpensive linear PSUs with poor regulation may experience a small AC voltage "riding on" the DC output at twice mains frequency (100/120 Hz). These "ripples" are usually on the order of millivolts, and can be suppressed with larger filter capacitors or better voltage regulators. This small AC voltage can cause problems or interference in some circuits; for example, analog security cameras powered by switching power supplies may have unexpected brightness ripples or other banded distortions in the video they produce. Quality linear PSUs will suppress ripples much better. SMPS usually do not exhibit ripple at the power-line frequency, but do have generally noisier outputs than linear PSUs. The noise is usually correlated with the SMPS switching frequency.

14. Acoustic noise — Linear PSUs typically give off a faint, low frequency hum at mains frequency, but this is seldom audible (vibration of windings in the transformer is responsible). SMPSs, with their much higher operating frequencies, are not usually audible to humans (unless they have a fan, in the case of most computer SMPSs). A malfunctioning SMPS may generate high-pitched sounds, since they do in fact generate acoustic noise at the oscillator frequency.

15. Power factor — Linear PSUs have low power factors because current is drawn from the mains at the peaks of the voltage sinusoid. The current drawn by simple SMPS is uncorrelated to the the supply's input voltage waveform, so the early SMPS designs have a mediocre power factor as well and their use in personal computers and compact fluorescent lamps present a growing problem for power distribution. A SMPS with Power factor correction (PFC) can reduce this problem greatly, and are required by some electric regulation authorities(European in particular).

16. Electronic noise at the input terminals — In a similar fashion, very low cost SMPS may couple electrical switching noise back onto the mains power line. Linear PSUs rarely do this.

How an SMPS works

Fig.3.2.1.1 Block diagram of SMPS

Page 13: RPORT BK2

Block diagram of a mains operated AC-DC SMPS with output voltage regulation Input rectifier stage AC, half-wave and full wave rectified signals.

If the SMPS has an AC input, then its first job is to convert the input to DC. This is called rectification. The rectifier circuit can be configured as a voltage doubler by the addition of a switch operated either manually or automatically. This is a feature of larger supplies to permit operation from nominally 120 volt or 240 volt supplies. The rectifier produces an unregulated DC voltage which is then sent to a large filter capacitor. The current drawn from the mains supply by this rectifier circuit occurs in short pulses around the AC voltage peaks. These pulses have significant high frequency energy which reduces the power factor. Special control techniques can be employed by the following SMPS to force the average input current to follow the sinusoidal shape of the AC input voltage thus the designer should try correcting the power factor. A SMPS with a DC input does not require this stage. A SMPS designed for AC input can often be run from a DC supply, as the DC passes through the rectifier stage unchanged. (The user should check the manual before trying this, though most supplies are quite capable of such operation even though no clue is provided in the manual!)If an input range switch is used, the rectifier stage is usually configured to operate as a voltage doubler when operating on the low voltage (~120 VAC) range and as a straight rectifier when operating on the high voltage (~240 VAC) range. If an input range switch is not used, then a full-wave rectifier is usually used and the downstream inverter stage is simply designed to be flexible enough to accept the wide range of dc voltages that will be produced by the rectifier stage. In higher-power SMPSs, some form of automatic range switching may be used.

Inverter stage

The inverter stage converts DC, whether directly from the input or from the rectifier stage described above, to AC by running it through a power oscillator, whose output transformer is very small with few windings at a frequency of tens or hundreds of kilohertz (kHz). The frequency is usually chosen to be above 20 kHz, to make it inaudible to humans. The output voltage is optically coupled to the input and thus very tightly controlled. The switching is implemented as a multistage (to achieve high gain) MOSFET amplifier. MOSFETs are a type of transistor with a low on-resistance and a high current-handling capacity. This section refers to the block marked "Chopper" in the block diagram.

Voltage converter and output rectifier

If the output is required to be isolated from the input, as is usually the case in mains power supplies, the inverted AC is used to drive the primary winding of a high-frequency transformer. This converts the voltage up or down to the required output level on its secondary winding. The output transformer in the block diagram serves this purpose.If a DC output is required, the AC output from the transformer is rectified. For output voltages above ten volts or so, ordinary silicon diodes are commonly used. For lower voltages, Schottky diodes are commonly used as the rectifier elements; they have the advantages of faster recovery times than silicon diodes (allowing low-loss operation at higher frequencies) and a lower voltage drop when conducting. For even lower output

Page 14: RPORT BK2

voltages, MOSFET transistors may be used as synchronous rectifiers; compared to Schottky diodes, these have even lower "on"-state voltage drops.The rectified output is then smoothed by a filter consisting of inductors and capacitors. For higher switching frequencies, components with lower capacitance and inductance are needed.Simpler, non-isolated power supplies contain an inductor instead of a transformer. This type includes boost converters, buck converters, and the so called buck-boost converters. These belong to the simplest class of single input, single output converters which utilise one inductor and one active switch (MOSFET). The buck converter reduces the input voltage, in direct proportion, to the ratio of the active switch "on" time to the total switching period, called the Duty Ratio. For example an ideal buck converter with a 10V input operating at a duty ratio of 50% will produce an average output voltage of 5V. A feedback control loop is employed to maintain (regulate) the output voltage by varying the duty ratio to compensate for variations in input voltage. The output voltage of a boost converter is always greater than the input voltage and the buck-boost output voltage is inverted but can be greater than, equal to, or less than the magnitude of its input voltage. There are many variations and extensions to this class of converters but these three forms the basis of almost all isolated and non-isolated DC to DC converters. By adding a second inductor the Ćuk and SEPIC converters can be implemented or by adding additional active switches various bridge converters can be realized.Other types of SMPS use a capacitor-diode voltage multiplier instead of inductors and transformers. These are mostly used for generating high voltages at low currents. The low voltage variant is called charge pump.

Regulation

A feedback circuit monitors the output voltage and compares it with a reference voltage, which is set manually or electronically to the desired output. If there is an error in the output voltage, the feedback circuit compensates by adjusting the timing with which the MOSFETs are switched on and off. This part of the power supply is called the switching regulator. The "Chopper controller" shown in the block diagram serves this purpose. Depending on design/safety requirements, the controller may or may not contain an isolation mechanism (such as opto-couplers) to isolate it from the DC output. Switching supplies in computers, TVs and VCRs have these opto-couplers to tightly control the output voltage.Open-loop regulators do not have a feedback circuit. Instead, they rely on feeding a constant voltage to the input of the transformer or inductor, and assume that the output will be correct. Regulated designs work against the parasitic capacity of the transformer or coil, monopolar designs also against the magnetic hysteresis of the core.The feedback circuit needs power to run before it can generate power, so an additional non-switching power-supply for stand-by is added.

Power factor

Early switched mode power supplies incorporated a simple full wave rectifier connected to a large energy storing capacitor. Such SMPS draws current from the AC line in short pulses when the mains instantaneous voltage exceeds the voltage across this capacitor.

Page 15: RPORT BK2

During the remaining portion of the AC cycle the capacitor provides energy to the power supply. As a result, the input current of such basic switched mode power supplies has high harmonic content and relatively low power factor. This creates extra load on utility lines, increases heating of the utility transformers, and may cause stability problems in some applications such as in emergency generator systems or aircraft generators. In 2001 the European Union put into effect the standard IEC/EN61000-3-2 to set limits on the harmonics of the AC input current up to the 40th harmonic for equipment above 75W. The standard defines four classes of equipment depending on its type and current waveform. The most rigorous limits (class D) are established for personal computers, computer monitors, and TV receivers. In order to comply with these requirements modern switched-mode power supplies normally include an additional power factor correction (PFC) stage.Switched-mode PSUs in domestic products such as personal computers often have universal inputs, meaning that they can accept power from most mains supplies throughout the world, with rated frequencies from 50 Hz to 60 Hz and voltages from 100 V to 240 V (although a manual voltage "range" switch may be required). In practice they will operate from a much wider frequency range and often from a DC supply as well. In 2006, Intel proposed the use of a single 12 V supply inside PCs, due to the high efficiency of switch mode supplies directly on the PCB. Most modern desktop and laptop computers already have a DC-DC converter on the motherboard, to step down the voltage from the PSU or the battery to the CPU core voltage -- as low as 0.8V for low voltage CPU to typically 1.2-1.5V for desktop CPU as of 2007. Most laptop computers also have a DC-AC inverter to step up the voltage from the battery to drive the backlight, typically around 1000 Vrms.

Certain applications, such as in automobile industry and in some industrial settings, DC supply is chosen to avoid hum and interference and ease the integration of capacitors and batteries used to buffer the voltage. Most small aircraft use 24 volt DC, but larger aircraft often use 120V AC at 400Hz, though they often have a DC bus as well.In the case of TV sets, for example, one can test the excellent regulation of the power supply by using a variac. For example, in some models made by Philips, the power supply starts when the voltage reaches around 90 volts. From there, one can change the voltage with the variac, and go as low as 40 volts and as high as 260, and the image will show absolutely no alterations.

Page 16: RPORT BK2

2) INPUT SECTION:

1) Keyboard

2) Socket and IC 93C46

1) Keyboard:

Fig.3.2.1.2 4*3 matrix keyboard

It is a 4*3 matrix keyboard used to enter the amount of rupees for the ticket. If any key is pressed without inserting the card, the LCD will show the instruction “INSERT THE CARD”.

2) Socket and IC 93C46:

IC 93C46 is the memory IC which is used in the card. The

card is inserted into the socket.

Fig.3.2.1.3 Memory IC 93C46

FEATURES:

Page 17: RPORT BK2

1) Low Voltage and Standard-Voltage Operation

2) User Selectable Internal Organization, Word or Byte 3-wire

3) Serial Interface

4)2MHzClockRate

5) Self-timed Write Cycle (10mS max)

6) High-Reliability, 1 Million Write Cycles, 100 Year Data Retention

The At 93c46 provides 1024 bits of serial electrically erasable programmable

read only memory, organized as 64 words of 8 bits each. The device is optimized

where low power and low voltage operations are essential.

The At 93c46 is enabled through chip select pin (CS) and accessed via a three

wire serial consisting of data input (DI), and data output(DO),and shift

clock(SK).Upon receiving a read instruction at DI, the address is decoded and data is

clocked out serially on DO pin. The write cycle is completely self timed, and no

separate Erase cycle is required before Write. The Write cycle is only enabled when

the part is in the Erase /writes enable state .The At 93c46 is available in 2.7V to 5.5V

and 1.8V to 5.5V versions.

Fig. 3.1.2.4 Interfacing with IC89c51

3) OUTPUT SECTION:

Page 18: RPORT BK2

It consists the following blocks:

1. LCD

2. Thermal printer

1) LCD:

It is used to display the amount. In the case of pressing any key

without inserting the card, then LCD will display the instruction “INSERT THE

CARD”.

3.1.2.5 Liquid Crystal Display

LCD’s are passive display having low power consumption and contrast ratio. The characteristic of LCD’s are given below:

1. LCD’s operate on the principle of light scattering. They can be operated either in a reflective or trans missive configuration. There operation dependent on ambient or back lightering as they do not generate there own light. It operates on low voltage around 1v-5v and

Page 19: RPORT BK2

the power required by LCD to the scatter or absorbs light is very low in the order of the few micro-watts/cm.

2. A trans missive LCD has better visual characteristic than a reflective LCD.

3. The operation of LCD is base on the use of certain organic material, which retains a regular crystal like structure even when they have been melted.

4. Nematic and cholestric are to important liquid crystal material used in display out of these two NLC has a particular crystal structure. The liquid is normally transparent, but if subjected to a strong electric field, an ion moves through it and disturbs the well-ordered crystal structure. The liquid is normally transparent, but if subjected to a strong electric field, ions moves through it and disturbs the well ordered crystal structure causing the liquid to polarized and hence turn opaque.

5. Basically, LCD consist of thin layer of NLC liquid about 10 micron thick placed between two glass plates having an electrode at list one electrode is transparent.

6. The trans missive type LCD has two transparent glass plates, where as a reflective type LCD has only one electrode transparent.

WHY THE LCD IS USED?

The LCD is used because of following features:

1) The deelining prices of LCD‘s

2) The ability to display numbers, characters and graphics. This is in contrast to LED’s, which are limited to numbers and a few characters.

3) A character is made up of number of pixels and each pixel is a cavity. We use ASCII value for LCD. 4) Graphic controller IC converts the ASCII value into signals to dark or bright the signals.

FEATURES OF LCD:

1. 5 x 8 dots includes cursor

2. Built - in controller (KS 0066 or Equivalent)

3. + 5V power supply

4. LED can be driven by pin 1, pin 2 or A and K

5. Drive method: 1/16 duty cycle

Page 20: RPORT BK2

6. Display size: 16 character * 2 lines

7. Character structure: 5*8 dots.

8. Display data RAM: 80 characters (80*8 bits)

9. Character generate ROM: 192 characters

10. Character generate RAM: 8 characters (64*8 bits)

2) THERMAL PRINTER:

A thermal printer (or direct thermal printer) produces a printed

image by selectively heating coated thermochromic paper, or thermal paper as it

is commonly known, when the paper passes over the thermal print head. The

coating turns black in the areas where it is heated, producing an image. A

thermal printer (or direct thermal printer) produces a printed image by

selectively heating coated thermochromic paper, or thermal paper as it is

commonly known, when the paper passes over the thermal print head. The

coating turns black in the areas where it is heated, producing an image. Two-

color direct thermal printers are capable of printing both black and an additional

color (often red), by applying heat at two different temperatures. Thermal

transfer printing is a related method that uses a heat-sensitive ribbon instead of

heat-sensitive paper.

Fig.3.2.1.6 Thermal Printer

Page 21: RPORT BK2

Essential mechanisms

A thermal printer comprises these key components: Thermal head — generates heat; prints on paper Platen — a rubber roller that feeds paper Spring — applies pressure to the thermal head, causing it to contact the thermo-

sensitive paper Controller boards — for controlling the mechanism

In order to print, one inserts thermo-sensitive paper between the thermal head and the platen. The printer sends an electrical current to the heating resistor of the thermal head, which in turn generates heat in a prescribed pattern. The heat activates the thermo-sensitive coloring layer of the thermo-sensitive paper, which manifests a pattern of color change in response. Such a printing mechanism is known as a thermal system or direct system.The paper is impregnated with a solid-state mixture of a dye and a suitable matrix; a combination of a fluoran leuco dye and an octadecylphosphonic acid is an example. When the matrix is heated above its melting point, the dye reacts with the acid, shifts to its colored form, and the changed form is then conserved in metastable state when the matrix solidifies back quickly enough. See thermochromism.Controller boards are embedded with firmware to manage the thermal printer mechanisms. These controller boards’ features are designed to meet the needs in terms of functionalities and specifications.Controller boards can drive various sensors like paper low, paper out, door open, top of form etc., and they are available with the most commonly used interfaces (RS232, Parallel, USB, wireless). For POS application some boards can also control the cash drawer.

Applications

Thermal printers print faster and more quietly than dot matrix printers. They are also more economical since their only consumable is the paper itself. Even though the paper is more expensive, printers can be rapidly refilled, leading to almost zero downtime. Possible commercial applications of thermal printers include filling station pumps, information kiosks, point of sale systems, and voucher printers in slot machines.. Toward the beginning of the 21st century, however, thermal wax transfer, laser, and inkjet printing technology largely supplanted thermal printing technology in fax machines in order to allow plain-paper printouts.Early formulations of the thermo-sensitive coating used in thermal paper were sensitive to incidental heat, abrasion, friction (which can cause heat, thus darkening the paper), light (which can fade printed images), and water..Experience shows that as of 2006, plenty of newly-made thermal prints (sales receipts, invoices printed by service-engineers on briefcase laptop and printer etc.) will fade completely to white in under 12 months even if kept in the dark. Where documents are to be archived, a toner-based (or other permanent ink) photocopy should be made.

Page 22: RPORT BK2

Hospitals commonly record fœtal ultrasound scan images on thermal paper. This can cause problems if the parents wish to preserve the image by laminating it using a traditional laminator, as the heat will cause the entire page to darken. It is advisable to test the laminator using thermal fax paper, or an unwanted thermal POS receipt to see if this happens. As before, an option is to make a permanent ink duplicate of the image, and laminate that, testing first to ensure that the copying process won't darken the image either

4) CONTROLLER SECTION:

The 89C52 receives the input from card and the keyboard.

On pressing the key that an interrupt will be generated, ISR will be executed and

the microcontroller will recognize the amount, then the ticket will be given out

of that amount and that amount will be deducted from the card and the card will

be modified with the amount.

Introduction to Microcontrollers

Definition

An embedded microcontroller is a chip which has a computer processor with all

its support functions (clock & reset), memory (both program and data), and I/O

(including bus interface) built into the device. These built in functions minimize the need

for external circuits and devices to be designed in the final application.

Types of Microcontroller

Creating applications for microcontrollers is completely different than any other

development job in computing and electronics. In most other applications one probably

have a number of subsystem and interfaces already available for his/her use. This is not

the case with a microcontroller where one is responsible for –

1. Power distribution

2. System clocking

Page 23: RPORT BK2

3. Interface design and wiring

4. System programming

5. Application programming

6. Device programming

Before selecting a particular device for an application, it’s important to understand what

the different options and features are and what they can mean with regard to developing

application.

Embedded Microcontroller

When all the hardware required to run the application is provided on the chip,

it is refer to as an Embedded Microcontroller. All that is typically required to operate the

device is power, reset, and a clock. Digital I/O pins are provided to allow interfacing with

external devices.

External Memory Microcontroller

Sometimes, the program memory is insufficient for an application or, during

debug; a separate ROM (or even RAM) would make the work easier. Some

microcontrollers including the 8051 allow the connection of external memory.

An external memory microcontroller seems to primarily differ from a

microprocessor in the areas of built-in-peripheral features. These features could include

memory device selection (avoiding the need for external address decoders or DRAM

address multiplexers), timers, interrupt controllers, DMA, and I/O devices like serial

ports.

Microcontroller Memory Types

There are number of different types of control store (Program Memory) that are

available in different versions and different manufacturers’ 8051s. There is a fairly

simple convention that is used to identify what type of control store a device has.

The following is the list of conventions used for 8X51-

“X” value Control Store Type

Page 24: RPORT BK2

0 None

3 Mask ROM

7 EPROM

9 EEPROM/FLASH

The 89C51 microcontroller

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K

bytes of Flash programmable and erasable read only memory (PEROM). The device is

manufactured using Atmel’s high-density nonvolatile memory technology and is

compatible with the industry-standard MCS-51 instruction set and pin out. The on-chip

Flash allows the program memory to be reprogrammed in-system or by a conventional

nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a

monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a

highly-flexible and cost-effective solution to many embedded control applications.

The AT89C51 is designed with static logic for operation 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.

Features of 89C51:

1. Compatible with MCS-51™ Products

2. 4K Bytes of In-System Reprogrammable Flash Memory Endurance: 1,000

Write/Erase Cycles

3. Fully Static Operation: 0 Hz to 24 MHz

4. Three-level Program Memory Lock

Page 25: RPORT BK2

5. 128 x 8-bit Internal RAM

6. 32 Programmable I/O Lines

7. Two 16-bit Timer/Counters

8. Six Interrupt Sources

9. Programmable Serial Channel

10. Low-power Idle and Power-down Modes

Architecture of 89C51

Page 26: RPORT BK2

Block Diagram

Fig 3.2.1.8 Architecture of 89C51

Pin Diagram of 89C51:

Page 27: RPORT BK2

Fig 3.2.1.7 Pin Diagram of 89C51

Basic Reset Ckt.

Page 28: RPORT BK2

Power On Reset Value.

Brief Description

Page 29: RPORT BK2

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K

bytes of Flash programmable and erasable read only memory (PEROM). The device is

manufactured using Atmel’s high-density nonvolatile memory technology and is

compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip

Flash allows the program memory to be reprogrammed in-system or by a conventional

nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a

monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a

highly-flexible and cost-effective solution to many embedded control applications.

Pin Description

VCC

Supply voltage.

GND

Ground.

Port 0

Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink

eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high

impedance inputs. Port 0 may also be configured to be the multiplexed low order

address/data bus during accesses to external program and data memory. In this mode P0

has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and

outputs the code bytes during program verification. External pull-ups are required during

program verification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1

output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they

are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins

that are externally being pulled low will source current (IIL) because of the internal pull-

ups. Port 1 also receives the low-order address bytes during Flash programming and

verification.

Page 30: RPORT BK2

Port 2

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2

output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they

are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins

that are externally being pulled low will source current (IIL) because of the internal pull-

ups. Port 2 emits the high-order address byte during fetches from external program

memory and during accesses to external data memory that uses 16-bit addresses (MOVX

@ DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During

accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits

the contents of the P2 Special Function Register.

Port 2 also receives the high-order address bits and some control signals during Flash

programming and verification.

Port 3

Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers

can sink/source four TTL inputs. 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. Port 3 also

serves the functions of various special features of the AT89C51 as listed below:

Port Pin Alternate Functions –

P3.0 RXD (serial input port)

P3.1 TXD (serial output port)

P3.2 INT0 (external interrupt 0)

P3.3 INT1 (external interrupt 1)

P3.4 T0 (timer 0 external input)

P3.5 T1 (timer 1 external input)

P3.6 WR (external data memory write strobe)

P3.7 RD (external data memory read strobe)

Port 3 also receives some control signals for Flash programming and verification.

Page 31: RPORT BK2

RST

Reset input. A high on this pin for two machine cycles while the oscillator is running

resets the device.

ALE/PROG

Address Latch Enable output pulse for latching the low byte of the address during

accesses to external memory. This pin is also the program pulse input (PROG) during

Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the

oscillator frequency, and may be used for external timing or clocking purposes. Note,

however, that one ALE pulse is skipped during each access to external Data Memory. If

desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit

set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is

weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in

external execution mode.

PSEN

Program Store Enable is the read strobe to external program memory. When the

AT89C51 is executing code from external program memory, PSEN is activated twice

each machine cycle, except that two PSEN activations are skipped during each access to

external data memory.

EA/VPP

External Access Enable. EA must be strapped to GND in order to enable the device to

fetch code from external program memory locations starting at 0000H up to FFFFH.

Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.

EA should be strapped to VCC for internal program executions. This pin also receives the

12-volt programming enable voltage (VPP) during Flash programming, for parts that

require 12-volt VPP.

XTAL1

Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

Page 32: RPORT BK2

XTAL2

Output from the inverting oscillator amplifier.

Memory Organization:

Program Memory

The TEMIC C51 Microcontroller Family has separate address spaces for program

Memory and Data Memory. The program memory can be up to 64 K bytes long. The

lower 4 K for the 80C51 (8 K for the 80C52, 16 K for the 83 C154 and 32 K for the

83C154D) may reside on chip.

Data Memory

The C51 Microcontroller Family can address up to 64 K bytes of Data Memory to

the chip. The “MOVX” instruction is used to access the external data memory (refer to

the C51 instruction set, in this chapter, for detailed description of instructions). The

80C51 has 128 bytes of on-chip-RAM (256 bytes in the 80C52, 83C154 and 83C154D)

plus a number of Special Function Registers (SFR). The lower 128 bytes of RAM can be

accessed either by direct addressing (MOV data addr). Or by indirect addressing (MOV

@Ri).

Page 33: RPORT BK2

Figure .2 Data Memory

Internal Data Memory Organization

Internal data memory is shown in Figure. The memory space is divided into three

blocks, which are generally referred to as the Lower 128, the Upper 128, and SFR space.

Figure .3 Internal Data Memory Organization

Internal data memory addresses are always 1 byte wide, which implies an address space

of only 256 bytes. However, the addressing modes for internal RAM can in fact

accommodate 384 bytes. Direct addresses higher than 7FH access one memory space and

indirect addresses higher than 7FH access a different memory space. Thus, Figure 7

shows the Upper 128 and SFR space occupying the same block of addresses, 80H

through FFH, although they are physically separate entities.

Page 34: RPORT BK2

Scratch Pad RAM Organization

Figure shows how the lower 128 bytes of RAM are mapped. The lowest 32 bytes

are grouped into 4 banks of 8 registers. Program instructions call out these registers as R0

through R7. Two bits in the Program Status Word (PSW) select which register bank is in

use. This architecture allows more efficient use of code space, since register instructions

are shorter than instructions that use direct addressing.

Figure.4 Scratch pad RAM Organization

The SFR

Figure gives a brief look at the Special Function Register (SFR) space. SFRs include Port

latches, timers, peripheral controls, etc. These registers can only be accessed by direct

addressing. In general, all Atmel microcontrollers have the same SFRs at the same

addresses in SFR space as the AT89C51 and other compatible microcontrollers.

However, upgrades to the AT89C51 have additional SFRs. Sixteen addresses in SFR

space are both byte- and bit addressable. The bit-addressable SFRs are those whose

address ends in 000B. The bit addresses in this area are 80H through FFH.

The 128 Byte Memory

The next 16 bytes above the register banks form a block of bit-addressable

memory space. The microcontroller instruction set includes a wide selection of single-bit

instructions, and these instructions can directly address the 128 bits in this area. These bit

Page 35: RPORT BK2

addresses are 00H through 7FH. All of the bytes in the Lower 128 can be accessed by

either direct or indirect addressing. The Upper 128 (Figure 9) can only be accessed by

indirect addressing. The Upper 128 bytes of RAM are only in the devices with 256 bytes

of RAM.

Figure.5 Special Function Resistor

5) CLOCK SECTION:

Page 36: RPORT BK2

RTC (REAL TIME CLOCK)

RTC (Real time clock) unit can be operated by the back up battery while the

system power is off. The RTC can transmit 8-bit data to CPU as BCD values using

STRB/LDRB ARM operation. The data include second, minute, hour, data, day,

month and year. The RTC unit works with an external 32.768 KHz crystal and also

can perform the alarm function.

FEATURES:

1. BCD number: second, minute, hour, data, day, month, year.

2. Leap year generator

3. Alarm function: alarm interrupt or wake up from power down mode.

4. Independent power pin(RT(VDD))

5. Supports millisecond tick time interrupt for RTOS kemel time tick

6. Round reset function

Fig.3.2.1.8 REAL time clock operation

3.3 SERIAL PORT RS- 232:

Page 37: RPORT BK2

The Serial Port is harder to interface than the Parallel Port. In most cases, any

device you connect to the serial port will need the serial transmission converted back

to parallel so that it can be used. This can be done using a UART. On the software

side of things, there are many more registers that you have to attend to than on a

Standard Parallel Port. (SPP) RS-232, the connector used must be a standard 25-pin

D-subminiature connector. The male version of this connector is commonly known

as the ‘DB-25’ (pin) connector and the ‘female’ version the ‘DB-25S’ (socket)

connector (these are not EIA OR CCITT).

The RS-232 standard defines the voltage levels that correspond to

logical zero levels. Valid signals are plus or minus 3 to 15 volts. Logic one is

defined as a negative voltage, the signal condition is called marking, and has

the functional significance of OFF. Logic zero is positive the signal condition

is spacing, and has the function ON

3.4 MAX232, DUAL RS-232 converter IC:

MAX232, dual RS-232 converter IC. 16 pin DIP package. The max232 is used to for

converting TTL/CMOS levels to RS232 levels. Commonly used to connect

microcontrollers to PCs. The Max232 contains the necessary drivers (two) and

receivers (also two), to adapt the RS-232 signal voltage levels to TTL logic. It just

needs one voltage (+5V) and generates the necessary RS-232 voltage levels

internally.

Fig.3.2.1.9 MAX232, DUAL RS-232 converter IC

Page 38: RPORT BK2

3.4.1 Communicating with the PC - The MAX232 IC:

We have the 8 bit value in the 89c51; we want to send that value to the PC. The

89c51 have a built in serial port that makes it very easy to communicate with the PC's

serial port but the 89c51 outputs are 0 and 5 volts and we need +10 and -10 volts to meet

the RS232 serial port standard. The easiest way to get these values is to use the MAX232.

The MAX232 acts as a buffer driver for the processor. It accepts the standard

digital logic values of 0 and 5 volts and converts them to the RS232 standard of +10 and -

10 volts. It also helps protect the processor from possible damage from static that may

come from people handling the serial port connectors.

The MAX232 requires 5 external 1uF capacitors. These are used by the internal

charge pump to create +10 volts and -10 volts. For the first capacitor, the negative leg

goes to ground and the positive leg goes to pin 16.For the second capacitor, the negative

leg goes to 5 volts and the positive leg goes to pin 2. The MAX232 includes 2 receivers

and 2 transmitters so two serial ports can be used with a single chip. We will only use one

transmitter for this project.The only connection that must be made to the 2051 is one

jumper from pin 3 of the 2051 to pin 11 of the MAX232. To power the MAX232,

Connect pin 16 to 5 volts. Connect pin 15 to ground.

CHAPTER 4

Page 39: RPORT BK2

HARDWARE DESIGN

Fig 4.1 Circuit Diagram of STVM

4.1EXPLANATION:

Page 40: RPORT BK2

In above circuit diagram the main components are as follows.

1) IC 89c51

2) MAX 232

3) RTC

4) Thermal printer

5) LCD

6) Power supply

When the system is turned on LED and buzzer indicates that

the system has turned on. All the IC’s get initiated.

As LCD’s read select (RS) and read write (RW) is connected to

P3.4 and P3.5 respectively of microcontroller. Enable pin is connected to P3.6

and the data line to port 1.Thus after initializing the LCD will display

“WELCOME”. If any button on the keypad is pressed without inserting the card

then “INSERT THE CARD” will be displayed. After the card is inserted in the

card socket which is connected to port 0 of microcontroller then message appear

on the LCD is “ENTER THE AMOUNT”. Otherwise it will display that

“PLEASE INSERT THE CARD”.

The user will enter the amount through keyboard which is

connected to Port 2. If the amount in the card is less than the amount then LCD

will displayed “LOW BALANCE” ”PLEASE REFILL THE CARD”. And if the

amount is sufficient then it does all the internal calculations using ALU, sends

the command to the thermal printer which is connected to serial port. i.e. P3.0

and P.3.1 of microcontroller.

The ticket will be printed with the following details i.e. source

station which is already mentioned in the main program. It will also display

current date, day, and time which being updated regularly by RTC, connected to

the second port of controller.

CHAPTER 5

Page 41: RPORT BK2

SOFTWARE DEVLOPMENT

5.1 Introduction to C51 Cross Compiler:

The Keil C51 Cross Compiler is an ANSI C Compiler that is written specifically

to generate fast, compact code for the 8051 microcontroller family. The C51 Compiler

generates object code that matches the efficiency and speed of assembly programming.

Using a high-level language like C has many advantages over assembly language

programming:

1. Knowledge of the processor instruction set is not required. Rudimentary

knowledge of the memory structure of the 8051 CPU is desirable (but not

necessary).

2. Details like register allocation and addressing of the various memory types and

data types is managed by the compiler.

3. Programs get a formal structure (which is imposed by the C programming

language) and can be divided into separate functions. This contributes to source

code reusability as well as better overall application structure.

4. The ability to combine variable selection with specific operations improves

program readability.

5. Keywords and operational functions that more nearly resemble the human thought

process may be used.

6. Programming and program test time is drastically reduced.

7. The C run-time library contains many standard routines such as: formatted output,

numeric conversions, and floating-point arithmetic.

8. Existing program parts can be more easily included into new programs because of

modular program construction techniques.

9. 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.

5.1.1 Software Development Cycle in Keil

Page 42: RPORT BK2

When we use the Keil Software tools, the project development cycle is roughly

the same as it is for any other software development project.

1. Create a project, select the target chip from the device database, and configure the tool settings.

2. Create source files in C or assembly.

3. Build your application with the project manager.

4. Correct errors in source files.

5. Test the linked application. A block diagram of the

complete 8051 tool set may best illustrate the

development cycle.

Fig. 5.1.1 Software Development Cycle in

Keil

5.2 VISUAL BASIC:

5.2.1 Introduction to Visual Basic

Welcome to Microsoft Visual Basic, the fastest and easiest way to create

applications for Microsoft Windows®. Whether you are an experienced professional or

brand new to Windows programming, Visual Basic provides you with a complete set of

tools to simplify rapid application development.

The "Visual" part refers to the method used to create the graphical user interface

(GUI). Rather than writing numerous lines of code to describe the appearance and

location of interface elements, you simply add rebuilt objects into place on screen. If

you've ever used a drawing program such as Paint, you already have most of the skills

necessary to create an effective user interface.

The "Basic" part refers to the BASIC (Beginners All-Purpose Symbolic

Instruction Code) language, a language used by more programmers than any other

Page 43: RPORT BK2

language in the history of computing. Visual Basic has evolved from the original BASIC

language and now contains several hundred statements, functions, and keywords, many

of which relate directly to the Windows GUI. Beginners can create useful applications by

learning just a few of the keywords, yet the power of the language allows professionals to

accomplish anything that can be accomplished using any other Windows programming

language.

The Visual Basic programming language is not unique to Visual Basic. The

Visual Basic programming system, Applications Edition included in Microsoft Excel,

Microsoft Access, and many other Windows applications uses the same language. The

Visual Basic Scripting Edition (VBScript) is a widely used scripting language and a

subset of the Visual Basic language. The investment you make in learning Visual Basic

will carry over to these other areas.

1. Whether your goal is to create a small utility for yourself or your work group, a

large enterprise-wide system, or even distributed applications spanning the globe

via the Internet, Visual Basic has the tools you need.

2. Data access features allow you to create databases, front-end applications, and

scalable server-side components for most popular database formats, including

Microsoft SQL Server and other enterprise-level databases.

3. ActiveX™ technologies allow you to use the functionality provided by other

applications, such as Microsoft Word word processor, Microsoft Excel

spreadsheet, and other Windows applications. You can even automate

applications and objects created using the Professional or Enterprise editions of

Visual Basic.

4. Internet capabilities make it easy to provide access to documents and applications

across the Internet or intranet from within your application, or to create Internet

server applications.

5. Your finished application is a true .exe file that uses a Visual Basic Virtual

Machine that you can freely distribute.

Page 44: RPORT BK2

5.3 Eagle (Easily Applicable Graphical Layout Editor)

The EAGLE is an editor, which is easy-to-use, yet powerful tool for designing

printed circuit boards (PCBs). It is a complete platform for the development of any type

of complicated & sophisticated multilayered PCBs. This software consists of the

following tools.

Schematic Editor:

In this one can develop and design circuits for the required PCB.

Layout Editor:

In this one can develop & design actual PCB structure required. This is done automatically by the software using the circuit in the schematic editor itself.

Library Editor:

This is very useful in case of customized component design that does not occur in the predefined library according to our need.

Auto Router:

This is an artificial intelligence based tool or subroutine that can do auto routing of the PCB tracks designed.

Cam Processor:

This is used to finally print the various layers of the designed PCB viz. Top Layer, Bottom Layer, Component Layer, Masking Layer etc.

CHAPTER 6

PRINTED CIRCUIT BOARD

Page 45: RPORT BK2

6.1 PCB LAYOUT:

Fig 6.1 Layout of microcontroller PCB

Page 46: RPORT BK2

Fig 6.3 PCB Layout of Power Supply

Fig 6.3 Component Layout of Power Supply PCB

Fig 6.4 Layout of IC93C46 PCB

Page 47: RPORT BK2

Fig 6.3 Layout of max232 PCB

6.2 INTRODUCTION OF PCB:-

PCB means printed circuit board. PCB is one of the most important elements in any electronic system. They accomplish the interconnection the between component mounted on them in particular manner PCB consist of conductive circuit pattern which is applied to one or both sided of an insulating base copper is most widely used for conductor material. Aluminium, nickel, silver, brass is used for same application. The thickness of conducting material depends upon the current carrying capacity of circuit.Thus a thicker conductor layer will have mare current carrying capacity, once the PCB is manufactured the current carrying capacity is depends on which of conductor track.

FUNCTION:-

The Printed Circuit Board usually serves there distinct functions are as follows: 1) It provides mechanical support for component mounted on it. 2) It provides necessary electrical interconnections. 3) It acts as a heat sink i.e. it provides a conduction path

leading to removal of most of the heat generate in the circuit.

Page 48: RPORT BK2

6.2.1 TYPES OF PCB:-

1) Single sided PCB.

2) Double sided PCB.

1) Single Sided PCB: -

This type of PCB consists of a natural coil of a copper on only one side of the

base material. This type of PCB frequently used when the manufacturing cost has to be

kept at minimum.

2) Double Sided PCB: -Double sided PCB is used when there is more number of

jumpers. This type of PCB has copper fail on both side of base material. The double-

sided PCB’s are used when insulation of PCB is very complicated i.e. if jumpers are

more in number and when it is difficult to fabricants the PCB ON a single sided PCB.

6.2.2 The various steps involved in PCB preparation are:

1) Layout Planning : -

For placing the component in the layout all the information about circuit needed

for the artwork Preparation. The layout should prepare from the component size.

Layout planning means planning for the placing of the components and input

output connection for a given circuit.

2) Rule for Layout : -

1) First rule is to prepare each and every PCB layout as viewed. From the

component side or topside.

2) Another important rule is not to start the designing of layout unless a clear

circuit diagram is available.

3) Develop the layout in the direction of the signal flow first and then

between this a smaller components larger size components to be place.

Page 49: RPORT BK2

4) Among the components larger size components should be place first and

then in between this smaller components to be place.

5) All the components are placed in such a manner that the disordering of the

other components is not necessary if they have to be replaced.

6) In designing of PCB layout it is very important to divide the circuit into

functional submit which helps in testing and serving.

7) Mask the input output and power connection of the appropriate point.

8) Use two different colors for drawing a layout of double sided PCB.

9) The rules for the width of the conductor is as follows width of the ground

> width of the supply > of the signal.

3) Artwork of PCB : -

The artwork is use to prepare the all tracks on the board. It is easier and less

expensive to draw the artwork, first an sheet or paper because the mistake are easily to

correct with an erasing while producing the artwork the first required is the complete

circuit diagram. The artwork consists of only the interconnection between the different

pins of the components.

4) Paining and Etching : -

To paint and etching of transferring artwork of given circuit. The apparatus

required are paint glass tray etching solution (FECL3) clad.

Painting: Cu tracks are filled with paint after and completion of artwork on Cu

clad etching is the process of remaining extra unwanted copper from the surface of cu

clad warm water is taken in a glass tray and two or three spoon fulls of Perica Chloride

are added to it the copper clad containing the circuit design is emerged in the tray having

the ferric chloride solution.

After some time the exposed copper gets etched the copper clad is now taken out

of the solution and washed with one dried paint on the copper clad can be removed with

kerosene or petrol.

Page 50: RPORT BK2

5) Drilling : -

Is the process of making opening at the proper places where the mounting of

components are required it is achieved by using different drill bits or different dimension

i.e. 0.5mm, 1m, 15mm drilling is done either by using hand drill or M / L drill.

6) For Mounting Resister : -

First the value of resistance is checked by using mom of cooler code then the

leads of resistors bending device. The body of resister should touch the PCB surface.

7) For Mounting Capacitor : -

First the capacitance value of capacitor is checked it polarities are given then it is

mounted is such a manner that the polarity should be correct then the leads are inserted in

the hole and bend property. If the length of lead is more then it should be cut for

mounting resistor.

8) Soldering Technique : -

To active the moderate joint of the component with PCB the soldering is used. There

are two method of soldering

1) IRON SOLDERING

2) MASK SOLDERING

9) Procedure of Soldering

The parts to be joined must be cleaned and fluxed. The metal parts, which are to

be joined, and the solder metal are heated with the help of soldering iron. The angle

made by soldering iron with the metal. Surface should be approximately, equals to 45˚.

As the melting point of the solder metal is us so It melt first. Then this melted putting of

the solder material if forms permanent joints.

The protection of PCB from atmospheric corrosion.

1) Cu tracks of PCB can be protected by means of lacquer coating.

2) Sometimes PCB can also be protected by using enamel varnish or tin or

gold platting done on Copper tracks.

Page 51: RPORT BK2

CHAPTER 7

ALGORITHM AND FLOW CHART

7.1 ALGORITHMM FOR VB CODE

7.1.1Responsibilities of microcontroller:

Steps to be followed:

1) To initialize all the peripheral devices.

2) To initialize serial port i.e. UART at the rate of 9600bps to wait for read or

write command from PC.

3) If read command found then get the balance from the card if write command

found then update the request amount in the card.

Fig. 7.1.1 Responsibilities of microcontroller:

Initialize all the peripherals.

Initialize serial port.B.R.9600bps

Read=?Get the balance from the card Update the request

amount in the card..

Start

End

Page 52: RPORT BK2

7.1.2 Responsibilities of VB code:

Steps to be followed:

1) To initialize serial port at the rate of 9600bps i.e. MS com

control.

2) To present GUI to the user.

3) To accept balance amount from the microcontroller and to

display on screen.

4) To transfer requested amount to the microcontroller.

Fig. 7.1.2 Responsibilities of VB code

Initialize all the peripherals.

Present GUI to the user

Transfer requested amount to the

controller

Display balance amount on the screen

Start

End

Page 53: RPORT BK2

FLOW CHART

7.2 PRINTING SYSTEM

Fig 7.1.3 Flow chart of printing system

Page 54: RPORT BK2

7.3 REFILLING SYSTEM

Fig 7.1.4 Flow chart of refilling system

Page 55: RPORT BK2

CHAPTER 8

ADVANTAGES AND PROBLEM DEFINATION

8.1 ADVANTAGES:-

1. Replaces the coupon system.2. Also there is no problem of change.3. Minimizes the effort. 4. Time saving process.5. Not required to punch every time6. Simple process with simple steps for obtaining ticket.7. Includes the advantages of other existing systems eradicating their

disadvantages and including additive features.

8.2 PROBLEM DEFINATION:

Design a system, which will reduce the tedious work of standing in a queue and buying railway tickets. This system should have: -

1. Smart card, which contains the necessary details of that particular individual.2. Scratch card box, which accept the smart card and will detect all the details.3. Keypad, through which one can enter the number of required tickets & their

amount.4. Micro controller, which processes on all the details, which are provided as

input, and gives the output to the screen and to the thermal printer.5. Switched mode power supply (SMPS), which helps in cooling down the

system temperature.6. Real time controller (RTC), which helps in controlling the time taken by the

whole procedure.7. Thermal printer, which helps in printing the output of the micro controller,

which we see in a form of a ticket.8. Screen, which displays the input given by an individual, and the balance in the

card before and after its use.

Page 56: RPORT BK2

CHAPTER 9

RISK ANALYSIS AND MANAGEMENT

RISK: -Risk can be defined as probability of occurrence of a problem

RISK ANALYSIS: -Risk Analysis is defined as series of steps to Analyze, Identify and Estimate Risk.

TECHNICAL RISK: - We are developing a project for RAILWAY TICKETING

SYSTEM using SMART CARD, which will be swapped when the customer requires a ticket and refilled when the balance in the card goes down. We are using VISUAL BASICS as front-end and EMBEDDED C as Back-end. The technical risk if any will be the failure of the hardware part due to may be over heating. The advanced version of the two languages or any other language, which supports interfacing and embedded systems. Other technical risks are data loss; Data will corrupt if proper security is not there.

PREDICTABLE RISK: -

Risk involved in this category is when we will run the project it should search and provide require data in less time as the main aim of the project is to minimize the time required for ticketing.

BUSINESS RISK: -

The only business risk is that if the people don’t turn towards this system in spite of its user friendliness and the main time saving factor and the same amount of cost factor then it will be a failure, which is having a very less possibility.

RISK PERCENTAGE OF OCCURANCETECHNICAL RISK 5-10%PRDICTABLE RISK 5-10%BUSINESS RISK 2%

Page 57: RPORT BK2

CHAPTER 10

MAINTAINANCE AND LIMITATION

10.1 MAINTAINANCE:

Maintenance of the hardware parts must be done in every 6

months to ensure the proper working of the system because failure of any part

may cause the entire system to fail. By proper maintenance of the hardware,

system becomes more reliable to be used and also reduces the chances of system

failure. In case of system failure the damaged hardware part must be replaced by

the new hardware so the system will give better results.

10.2 LIMTATIONS:

The only limitation is that if any system failure occurs the machine

stops working. If the keys in the keypad get stuck due to dust collection then

keypad stops working.

If the power supply is switched off then machine operates for a

limited period of time and then it gets switched off automatically. So there are

chances of losing any unsaved information or data. In case of system failure we

have to replace a temporary system which becomes very expensive.

Page 58: RPORT BK2

CHAPTER 11

FUTURE SCOPE

11.1 SCOPE:

IC can be installed in the card. So with the help of the IC we can exactly

track the location of the person who possesses that particular card. In the case of

emergences that particular person can be traced if he is not reachable through

other devices.

The refilling of the card can be done with the help of Internets,

mobile phones, MTNL landlines, Internet, scratch cards. Thus every time an

individual is not required to stand in big queues and perform the hectic task of

refilling the card. This will not only save the valuable time of the customer but

will be more reliable than the actual process.

In the case of mobile phones balance will be deducted from the

phone and the deducted amount will be brought to the notice of the customer

through sms.

MTNL: In case of refilling through MTNL landlines the amount

will be added to the monthly bills.

INTERNETS: In case of refilling through Internets the amount is

added to the credit card expenses.

SCRATCH CARDS: Simple mobile phone technique or the

number of the card can be submitted from the net. The bills of the use of the

smart card can be paid by the banks as in the case of a Credit card billing service

provided by the bank.

Page 59: RPORT BK2

11.2 FEATURES:

1) Takes maximum 10secs for one person to receive the ticket. Hence saves time

and energy of the customer.

2) Since the card has life long validity renewal of the card is not required.

3) Can be used as I- card since contains scanned photo image, name and signature

of the customer.

4) Every smart card has got its own password thus can be used by the customer to

stop all the transactions in case of card misplacement.

5) Password can also be used by the customer for proving his identity incases of

blurred photo image, signature or name.

Page 60: RPORT BK2

CHAPTER12

RESULT

Thus we get a printed ticket which consist of following things,DATE of the current dayTIME of the starting journeyBALANCE remaining in the cardAMOUNT required for travelingSTARTING STATION NAME

Fig.12 Printed ticket

Page 61: RPORT BK2

CHAPTER13

CONCLUSION

For interfacing with the microcontroller devices we need to install

embedded-C, Visual basic in our project. Visual basics provide serial board

interfacing which is required for our project.

We are interfacing hardware parts with the PC using Embedded-C. And

creating forms to be filled while refilling using Visual basics.

The interfacing of serial ports required for refilling circuitry is only

possible with help of Visual basics or C.

The other hardware parts used in the circuit of refilling are interfaced

with the PC and the output is shown on the PC screen in the form of the name of

the customer, his other details etc.

Only the required detail to be filled in will be the amount to be refilled,

and on the other circuit the only input to be given will be the amount of which

the ticket is to be purchased. The system will thus be completely user friendly

and it can be used by every common man.

Page 62: RPORT BK2

CHAPTER14

BIBILIOGRAPHY

The 8051 microcontroller and embedded system by Mazidi.

Basic Electronics – B. Ram

Digital Electronics – R. P. Jain

Electronics For You

ELECTRONIC CIRCUIT AND DEVICES-Boylstead,Nashalsky

WEBSITES

www.Fairchildsemi.com

http://www.redcircuits.com

http://www.elctronicsforu.com

http://www.stvm%20dwnld/ND4030%20Contactless%20Smart%20Ticket

%20Printer_files/nd4030.gif

http://www.stvm%20dwnld/Smart%20card%20%20Wikipedia,%20the%20free

%20encyclopdia.htm

www.phillipssemiconductor.com

http://www.alldatasheet.com

Page 63: RPORT BK2

www.Atmel.com

www.ieee.com

APPENDIX A

MAIN PROGRAM

Program for printing system:

#include <stdlib.h>#include <string.h>#include "89C51.h"#include "Delay.h"#include "LCD.h"#include "Serial.h"#include "Mem93CXX.h"#include "RTC.h"#include "KeyMatrix.h"#include "ThermalPrinter.h"

#define Buzzer P3_7

void Beep(unsigned char No,unsigned int Delay);unsigned char code StnName[]="Belapur";unsigned char Yr,Mon,Dte,Day,Hrs,Min,Sec;unsigned char FDis=1;unsigned char Key,i;unsigned char tAmount[15],idx;unsigned int cAmount,uAmount;unsigned char idata Temp[50];

void main(void){

Page 64: RPORT BK2

Beep(3,20000);

SetLCD();SetMem93CXX();SetSerial(9600,11059200,12);SetThermalPrinter();

if(P2_7==0){

SetRTC(0x09,0x04,0x14,0x01,0x13,0x10,0x00); //in BCD-Format only

LCD(1);printf("Date & Time.....");LCD(2);printf("Re-Setted.......");DelayL(30000);

}

Print("Welcome\nTo\nP.R.E.C. \n\n\n",31,0,0,0,2,0);

LCD(1);printf(" Welcome to ");LCD(2);printf(" P.R.E.C. ");DelayL(40000);LCD(1);printf("eTicketing......");LCD(2);printf("System..........");DelayL(40000);

LCD(1);printf("Project Done by.");LCD(2);printf("................");DelayL(40000);LCD(1);printf("Mayuresh Chalke ");LCD(2);printf("Bharat Kathe ");LCD(3);printf("Sagar Hekare");

DelayL(40000);LCD(1);printf("Under Guidance..");LCD(2);printf("Prof.S.V.Arote ");DelayL(40000);

LCD(1);printf("System Started..");LCD(2);printf("****************");DelayL(40000);

START:while(1){

if(FDis==1){

LCD(0);printf("Welcome to......");

Page 65: RPORT BK2

LCD(2);printf("%s.",StnName);}if(FDis==2){

ReadRTC(&Yr,&Mon,&Dte,&Day,&Hrs,&Min,&Sec);

LCD(0);printf("Date: %02bx/%02bx/%02bx",Dte,Mon,Yr);

if(Yr==0x00){Send('X');while(1);}if(Yr>0x09){Send('X');while(1);}if(Yr<0x09)goto X;if(Mon>0x06){Send('X');while(1);}if(Mon<0x06)goto X;if(Dte>=0x20){Send('X');while(1);}

X:LCD(2);printf("Time: %02bx:%02bx:

%02bx",Hrs,Min,Sec);

}if(FDis==3){

LCD(0);printf("Insert Your Card");LCD(2);printf("Enter Amount....");

FDis=0;}FDis++;

Key=ReadKey(30000);if(Key!=0&&Key!='P'&&Key!='C'){

SetMem93CXX();for(i=0;i<6;i++){

tAmount[i]=ReadMem93CXX(i);if((tAmount[i]<'0'||

tAmount[i]>'9')&&tAmount[i]!=' '&&tAmount[i]!='X'){ LCD(2);printf("Insert Card!!!!!");

Beep(2,20000);goto START;

}}tAmount[i+1]='\0';cAmount=atoi(tAmount);

Page 66: RPORT BK2

LCD(0);printf("Balance: %04d",cAmount);

idx=0;tAmount[idx]=Key;LCD(2);printf("%c",tAmount[idx]);

while(1){

idx++;Key=ReadKey(100000);if(Key=='P'){

tAmount[idx]='\0';uAmount=atoi(tAmount);//condition check on amount...if(uAmount>cAmount){ LCD(2);printf("Low

Balance!!!!!");Beep(2,20000);goto START;

}/////////////////////////////Deduct Amount From Mem...cAmount=cAmount-uAmount;sprintf(tAmount,"

%dXXXXX",cAmount);SetMem93CXX();for(i=0;i<6;i+

+)WriteMem93CXX(i,tAmount[i]);SetMem93CXX();for(i=0;i<6;i++){

tAmount[i]=ReadMem93CXX(i);if((tAmount[i]<'0'||

tAmount[i]>'9')&&tAmount[i]!=' '&&tAmount[i]!='X'){ LCD(2);printf("Update

Failure!!");Beep(2,20000);goto START;

}}tAmount[i+1]='\0';cAmount=atoi(tAmount);///////////////////////////

Page 67: RPORT BK2

LCD(0);printf("Balance: %04d",cAmount);

LCD(2);printf("Amount : %04d",uAmount);

//print the Ticket...Print("\nIndian Railway\

n",16,176,0,0,2,0);sprintf(Temp,"%02bx/%02bx/%02bx

%02bx:%02bx:%02bx",Dte,Mon,Yr,Hrs,Min,Sec); Print(Temp,20,0,1,0,2,0);

sprintf(Temp,"\n%s. % 4dRs.\n",StnName,uAmount);

Print(Temp,strlen(Temp),0,1,0,2,0);Print("Start Journey Within One

Hour.\n\n\n\n",34,0,0,0,3,0);////////////////////////////goto START;

}if(Key=='C'||Key==0||idx>=4){

LCD(2);printf("Canceled........");Beep(2,20000);goto START;

}tAmount[idx]=Key;printf("%c",tAmount[idx]);

}}

}}//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>void Beep(unsigned char No,unsigned int Delay){

unsigned char tNo;

for(tNo=1;tNo<=No;tNo++){ Buzzer=0;

DelayI(Delay);Buzzer=1;DelayI(Delay);

}}

Page 68: RPORT BK2

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Program for refilling system:

#include <stdio.h>//standard input output

#include "89C51.h"#include "Delay.h"#include "Serial.h"#include "Mem93CXX.h"

#define Buzzer P3_7

void Beep(unsigned char No,unsigned int Delay);unsigned char RChar,Amtfill,Amtbal,i;

void main(void)//execution starts here

{Beep(3,30000);SetSerial(9600,11059200,12);Beep(1,30000);

printf("\nWelcome to Railway Refilling System.");DelayL(30000);printf("\nSystem Restarted...");

while(1){ RChar=Read();

if(RChar=='R'){

SetMem93CXX();printf("\nBalance Amount is:");Send(0);for(i=0;i<6;i++)

Page 69: RPORT BK2

{Amtbal=ReadMem93CXX(i);printf("%c",Amtbal);

}}

if(RChar=='W'){

SetMem93CXX();printf("\nEnter Amount to Refill:");Send(0);for(i=0;i<6;i++){

Amtfill=getchar();WriteMem93CXX(i,Amtfill);Send(0);

}

}}

}//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>void Beep(unsigned char No,unsigned int Delay){

unsigned char tNo;

for(tNo=1;tNo<=No;tNo++){ Buzzer=0;

DelayI(Delay);Buzzer=1;DelayI(Delay);

}}//

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Page 70: RPORT BK2

APPENDIX B

COMPONENT LIST

SR.No Description Qty. Price

1 Transformer 15V,500A 1 35

2 Diode 1N4007 5 5

3 Capacitor2200microF,35V 1 5

4 Voltage regulator IC 7805 1 10

5 Capacitor 10uF 1 2

6 LED 6 12

7 Resistors 16 8

8 Disc capacitors 4 4

9 IC Base 4 12

10 PCB 5 250

11 Wires 2 25

12 Solder wire 1 25

13 Mains cord 1 10

14 AT 89C51 2 160

15 IC93C46 2 100

16 IC MAX232 1 25

17 Connector DB9 female 2 20

18 Connecting cord serial port 2 120

19 RTC(Real Time Controller) 1 500

Page 71: RPORT BK2

20 LCD (16*2) Line 1 150

21 SMPS 1 500

22 Thermal Printer 1 8000

23 BUZZER 1 20

24 SOFTWARE DEVELOPEMENT 1 500

25 ALU (Arithmetic & Logic Unit) 2 500

26 MICELLINUOUS 100

27 Keypad 1 200

APPENDIX C

Power supply design:-

Power supply is the first and the most important part of our project. For our

project we require +5V regulated power supply with maximum current rating 500Ma.

Following basic building blocks are required to generate regulated power supply.

Fig. a BLOCK DIAGRAM OF POWER SUPPLY

Step down Transformer:-

Step down transformer is the first part of regulated power supply. To step down the mains 230V A.C. we require step down transformer. Following are the main characteristic of electronic transformer.

Step-down transformer

Rectifier

FilterCkt.

ThreeTerminal

Voltage req.

Regulated O/P VoltageMains 230 V

A.C.

Page 72: RPORT BK2

1) Power transformers are usually designed to operate from source of low

impedance at a single freq.

2) It is required to construct with sufficient insulation of necessary dielectric

strength.

3) Transformer ratings are expressed in volt–amp. The volt-amp of each

secondary winding or windings are added for the total secondary VA. To this

are added the load losses.

4) Temperature rise of a transformer is decided on two well-known factors i.e.

losses on transformer and heat dissipating or cooling facility provided unit.

Rectifier Unit:-

Rectifier unit is a ckt. which converts A.C. into pulsating D.C. Generally semi-

conducting diode is used as rectifying element due to its property of conducting current in

one direction only. Generally there are two types of rectifier.

1) Half wave rectifier

2) Full wave rectifier.

Filter Circuit:-

Generally a rectifier is required to produce pure D.C. supply for using at various

places in the electronic circuit. However, the o/p of rectifier has pulsating character i.e. if

such a D.C. is applied to electronic circuit it will produce a hum i.e. it will contain A.C.

and D.C. components. The A.C. components are undesirable and must be kept away from

the load. To do so a filter circuit is used which removes (or filters out) the A.C.

components reaching the load. Obviously a filter circuit is installed between rectifier and

voltage regulator. In our project we use capacitor filter because of its low cost, small size

and little weight and good characteristic. Capacitors are connected in parallel to the

rectifier o/p because it passes A.C. but does not pass D.C. at all.

Page 73: RPORT BK2

Three terminal voltage regulator:-

A voltage regulator is a ckt. that supplies constant voltage regardless of change in

load current. IC voltage regulators are versatile and relatively cheaper. The 7800 series

consists of three terminal positive voltage regulator. These ICs are designed as fixed

voltage regulator and with adequate heat sink, can deliver o/p current in excess of 1A.

These devices do not require external component. This IC also has internal thermal

overload protection and internal short circuit and current limiting protection. For our

project we use 7805 voltage regulator IC.

FIGIRE 4.2 POWER SUPPLY CIRCUIT

Design of Step down Transformer

The following information must be available to the designer before he commences for the

design of transformer.

1) Power Output.

2) Operating Voltage.

3) Frequency Range.

4)Efficiency and Regulation.

Rectifier Design:-

Page 74: RPORT BK2

R.M.S. Secondary voltage at secondary of transformer is 12V.

So maximum voltage Vm across Secondary is

= Rms. Voltage x Ö2

= 12 x Ö2

= 16.97

D.C. O/p Voltage at rectifier O/p is

2 Vm

Vdc = ----------

p

2 x 16.97

= -----------------------

p

= 10.80 V

PIV rating of each diode is

PIV = 2 Vm.

= 2 x 16.97

= 34 V

& maximum forward current which flow from each diode is 500mA.

So from above parameter we select diode IN 4007 from diode selection manual.

Design of Filter Capacitor

Formula for calculating filter capacitor is,

Page 75: RPORT BK2

1

C = ----------------------

4Ö3 r f RL.

r = ripple present at o/p of rectifier.

(Which is maximum 0.1 for full wave rectifier.)

F = frequency of mains A.C.

RL = I/p impedance of voltage regulator IC.

1

C = ------------------------------

4Ö3 x 0.1 x 50 x 28

= 1030 mf

@ 1000 mf.

And voltage rating of filter capacitor is double of Vdc i.e. rectifier o/p which is 20V. So

we choose 1000 mf / 25V filter capacitor.

IC 7805 (Voltage Regulator IC.):

1 2 3

Specifications:

Available o/p D.C. Voltage = + 5V.

Line Regulation = 0.03

Load Regulation = 0.5

Page 76: RPORT BK2

Vin maximum = 35 V

Ripple Rejection = 66-80 (db)

1. INDEX

1. INTRODUCTION 2. LITERATURE SURVEY 2.1EXISTING SYSTEMS

3. BLOCK DIAGRAM AND DISCRIPTION

1.1 Block diagram DOWN LOADER1.1.1 Explanation of Down Loader

1.2 Block diagram of ACTUAL SYSTEMS1.2.1 Explanation of Actual System1.2.2 Introduction to Microcontrollers

1.3 SERIAL PORT RS- 232

1.4 MAX232, DUAL RS-232 converter IC

Page 77: RPORT BK2

4 HARDWARE DESIGN

4.1Explanation

5. SOFTWARE DEVLOPMENT

5.1 Introduction to C51 Cross Compiler

5.2 Visual Basic

5.3 Eagle (Easily Applicable Graphical Layout Editor)

6. PRINTED CIRCUIT BOARD

6.1PCB Layout of hardware

6.2 Introduction of PCB

6.2.1 Types of PCB

6.2.2 PCB Preparation

7. ALGORITHM AND FLOW CHART

7.1 Algorithm and flowchart for VB code

7.2 Flow chart of Printing System

7.3 Flow chart of Refilling System

8. ADVANTAGE AND PROBLEM DEFINATION

8.1 Advantages

8.2 Problem Defination

9. RISK ANALYSIS AND MANAGEMENT

10. MAINTAINANCE AND LIMITATION

11. FUTURE SCOPE

12. CONCLUSION

13. BIBLIOGRAPHY

APPENDIX A

MAIN PROGRAM

APPENDIX B

Page 78: RPORT BK2

COMPONENT LIST

APPENDIX C

POWER SUPPLY DESIGN

Page 79: RPORT BK2

SERIAL PROG. PORT

PROGRAMI

SERIAL PROG. PORT

PROGRAMI

IR DETECTORSIR DETECTORS

TO SERIAL PORT OF PCTO SERIAL

PORT OF PC

MEMORYMEMORY

RTCRTC

LCD DISPLAYLCD DISPLAY

STEPPER MOTOR DRIVER

STEPPER MOTOR DRIVER

ALARMALARM

MICROCONTROLLER

MICROCONTROLLER