Академический Документы
Профессиональный Документы
Культура Документы
Many lives & destinies are destroyed due to the lack of proper guidance,
directions & opportunities. It is in this respect we feel that we are in much better
condition today due to continuous process of motivation & focus provided by our
teachers in general. The process of completion of this project was a tedious job &
requires care & support at all stages. We would like to highlight the role played by
individuals towards this.
We are also thankful to all visible & invisible hands which helped us to complete
this project with a feeling of success.
Certificate
We hereby certify the work which is being presented in the project entitled “phase
control module” by “MD.Anis Alam, , sunil kumar kashayap, quazi md azam‘’ in
partial fulfillment of requirements for the award of degree B. Tech (Electronics &
Communication), submitted in the Department of Electronics & Communication
at F/O Engineering &Technology under Jamia Millia Islamia University, New
Delhi, is carried out during a period from July 2010 to December2010 under the
supervision of “prof. S.N. AHAMED” Department of Electronics &
Communication Engineering, Jamia Millia Islamia University. The matter
presented in this project has not been submitted by us in any other University/
Institute for the award of B. Tech. degree.
This is to certify that the above statement made by the candidates is correct to the
best of my knowledge. The B .Tech Viva Voce Examination of “Md. Anis Alam,
sunil kumar kashayap, Quazi md azam ” has been held on _____________ and
accepted.
ABSTRACT
This project is designed so that students can understand the technology used in the
now a day’s driver less metro train which is used in most of the developed
countries like Germany, France, and Japan etc. These trains are equipped with the
CPU, which control the train. The train is programmed for the specific path. Every
station on the path is defined; stoppage timing of the train and distance between the
two stations is predefined.
In this Project
In this project we try to give the same prototype for this type of trains. We are
using microcontroller 8051 as CPU. The motion of the train is controlled by the
Stepper Motor, for displaying message in the train we are using Intelligent LCD
Display of two lines. The train is designed for three stations, named as Aligarh,
Ghaziabad & New Delhi. The Stoppage time is of 3 Sec and time between two
consecutive stations is 6 sec. There is a LCD display for showing various messages
in the train for passengers. There are indicators, which are used to show the train
direction i.e. Up path and Down path. Before stopping at station the train blows the
buzzer. It also includes an emergency brake system due to which the train stops as
soon as the brakes are applied and resumes journey when the emergency situation
is over.
This paper describes a prototype that has been developed to demonstrate the
concept of integrated gaming and simulation for incident management.
Architecture for the purpose was developed and presented at the last conference. A
hypothetical emergency incident scenario has been developed for demonstrating
the applicability of integrated simulation and gaming. A number of simulation and
gaming modules have been utilized to model the major aspects of the hypothetical
scenario. The modules demonstrate the value of utilizing simulation for incident
management applications. They can be used to highlight the value of simulation
and gaming for training applications in particular. Two of the simulation modules
have been integrated using a modified implementation of the high level
architecture to give an idea of the advantages. Technical issues in integration are
identified.
LIST OF TABLES
LIST OF FIGURES
1.13 Diode 22
1.16 Capacitor 26
1.21 Buzzer 28
CONTENTS
CONTENTS Page No.
Acknowledgement (i)
Certificate
(ii)
Abstract (iii)
Chapter 1
Introduction 1-27
Chapter
Chapter 3
Working 36-37
Block Diagram 37
Circuit Diagram 38
Chapter 4
Cost Analysis 39
Chapter 5
Areas of Application 41
Future Scope 41
REFERENCES 42
Appendix
Datasheets 51-69
CHAPTER 1
INTRODUCTION
This project is designed so that students can understand the technology used in the
now a day’s unmanned metro train which is used in most of the developed
countries like Germany, France, and Japan etc. These trains are equipped with the
CPU, which control the train. The train is programmed for the specific path. Every
station on the path is defined; stoppage timing of the train and distance between the
two stations is predefined. This is very wonderful project to control the working of
the train without driver. These trains are equipped with the CPU which controls the
train. Its basic components are:
1. 8051 Microcontroller
2. ULN 2003
3. Stepper motor
4. LCD
In this project we try to give the same prototype for this type of trains. We are
using ATMEL microcontroller 8051 to control all the function as CPU.
Microcontroller controls the rotation of motor. First the motor is controlled and
name of each station is displayed over LCD and accordingly the different delay for
each station is provided. So this project works for metro train without driver. The
motion of the train is controlled by the Stepper Motor, for displaying message in
the train we are using Intelligent LCD Display of two lines. The train is designed
for three stations, named as New Delhi, Noida, and Greater Noida. The Stoppage
time is of 3 Sec and time between two consecutive stations is 6 sec. There is a
LCD display for showing various messages in the train for passengers. There are
indicators, which are used to show the train direction i.e. UP path and down path.
Before stopping at station the train blows the buzzer. It also includes an emergency
brake system due to which the train stops as soon as the brakes are applied and
resumes journey when the emergency situation is over.
APPLICATIONS
Telecom
Mobile phone systems (handsets and base stations), modems, routers
Automotive application
Braking system, traction control, airbag release system, management units and
steer-by-wire systems.
Domestic application
Dishwasher, television, washing machines, microwave ovens, Video recorders,
Security system, Garage door controllers, Calculators, Digital watches, VCRs,
Digital cameras, Remote Controls, Treadmills
Robotic
Fire fighting robot, Automatic floor cleaner, robotic arm
Aerospace application
Flight control system, Engine controllers, Autopilots, Passenger entertainment
system
Medical equipment
Anesthesia monitoring system, ECG monitors, Pacemakers, Drug delivery
systems, MRI scanners
Defense system
Radar systems, Fighter aircraft flight control system, Radio system, Missile
guidance systems
Office automation
Laser printers, Fax machines, Pagers, Cash registers, Gas pumps, Credit /Debit
card readers, Thermostats, Grain analyzers.
COMPONENTS
1 IC 8051 MC 1
2 IC ULN 2003 1
3 Transformer 1
6 Stepper Motor 1
7 Crystal Oscillator 1
8 Switch 2
9 LED 2
10 Resistor(220 , 4.7 K, 10 K) 10
12 Diode 2
13 Buzzer 1
COMPONENT DESCRIPTION
I. MICRO-CONTROLLER 8051
DESCRIPTION
The IC 8051 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 IC 8051 is a
powerful microcomputer which provides a highly-flexible and cost-effective
solution to many embedded control applications. The IC 8051 provides the
following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines,
two 16-bit timer/counters, a five vector two-level interrupt architecture, full duplex
serial port, on-chip oscillator and clock circuitry. In addition, the IC 8051 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.
PROCESSOR
A processor is an electronic device capable of manipulating data in a way specified
by a sequence of instructions.
INSTRUCTIONS
Instructions in a computer are binary numbers just like data. Different numbers,
when read and executed by a processor, causes different things to happen. The
instructions are also called opcodes or machine codes.
Different bit patterns activate or deactivate different parts of the processing core.
Every processor has its own instruction set varying in number, bit pattern and
functionality.
PROGRAM
The sequence of instructions is what constitutes a program. The sequence of
instructions may be altered to suit the application.
ASSEMBLY LANGUAGE
Writing and understanding such programs in binary or hexadecimal form is very
difficult, so each instructions is given a symbolic notation in English language
called as mnemonics. A program written in mnemonics Form is called an assembly
language program. But it must be converted into machine language for execution
by processor.
ASSEMBLER
An assembly language program should be converted to machine language for
execution by processor. Special software called ASSEMBLER converts a program.
PIN DESCRIPTION
External Access: EA 31
• Connected to VCC for on chip ROM
• Connected to Ground for external ROM containing the code Input Pin
PORT 0
• Pins 32-39
• Can be used as both input and output
• External pull up resistors of 10K need to be connected
• Dual role: 8051 multiplexes address and data through port 0 to save pins .AD0-
AD7
• ALE is used to de multiplex data and address bus.
PORT 1
• Pins 1 through 8
• Both input and output
• No dual function
• Internal pull up registers
• On RESET configured as output
PORT 2
• Pins 21 through 28
• No external pull up resistor required
PORT 3
• Pins 10 through 17
• No external pull up resistors required
PROCESSOR ARCHITECTURE
ALU
The Arithmetic Logic Unit (ALU) performs the internal arithmetic manipulation of
data line processor. The instructions read and executed by the processor decide the
operations performed by the ALU and also control the flow of data between
registers and ALU.
Operations performed by the ALU are Addition , Subtraction , Not , AND , NAND ,
OR , NOR , XOR , Shift Left/Right , Rotate Left/right , Compare etc. Some ALU
supports Multiplication and Division. Operands are generally transferred from two
registers or from one register and memory location to ALU data inputs. The result
of the operation is the placed back into a given destination register or memory
location from ALU output.
REGISTERS
Registers are the internal storage for the processor. The number of registers varies
significantly between processor architectures.
• WORKING REGISTERS: temporary storage during ALU Operations and data
transfers.
• INDEX REGISTERS: points to memory addresses.
• STATUS REGISTERS: stores the current status of various flags denoting
conditions resulting from various operations.
• CONTROL REGISTERS: contains configuration bits that affect processor
operation and the operating modes of various internal subsystems.
MEMORY
BUSES
A bus is a physical group of signal lines that have a related function. Buses allow
for the transfer of electrical signals between different parts of the processor
Processor buses are of three types:
• Data bus
• Address bus
• Control bus
CONTROLLER LOGIC
Processor brain decodes instructions and generate control signal for various sub
units. It has full control over the clock distribution unit of processor.
I/O Peripherals
The I/O devices are used by the processor to communicate with the external world
• Parallel Ports
• Serial Ports
• ADC/DAC
FEATURES
Output current 500mA per driver (600mA peak)
Output voltage: 50V
Integrated suppression diodes for inductive loads
Outputs can be paralleled for higher current
Inputs compatible with various types of logic such as
TTL/CMOS/PMOS/DTL
Inputs pinned opposite outputs to simplify Layout
DESCRIPTION
The ULN2001, ULN2002, ULN2003 and ULN2004 are monolithic, high
voltage, high current Darlington Arrays each contain seven open collector
Darlington pairs with common emitters. Each Channel rated at 500mA and
MAXIMUM RATING
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable
output voltages. The maximum current they can pass also rates them. Negative
voltage regulators are available, mainly for use in dual supplies. Most regulators
DESCRIPTION
These voltage regulators are monolithic circuit integrated circuit designed as fixed
voltage regulators for a wide variety of applications including local, on card
regulation. These regulators employ internal current limiting, thermal shutdown
and safe-area compensation. With adequate heat sinking they can deliver output
current in excess of 1.0 A. Although designed primarily as a fixed voltage
regulator, these devices can be used with external components to obtain adjustable
voltage and current.
FEATURES
GENERAL INFORMATION
A stepper motor system is an electro-mechanical rotary actuator that converts
electrical pulses into unique shaft rotations. This rotation is directly related to the
number of pulses. Motion Control, in electronic terms, means to accurately control
the movement of an object based on speed, distance, load, inertia or a combination
of all these factors. There are numerous types of motion control systems, including;
Stepper Motor, Linear Step Motor, DC Brush, Brushless, Servo, Brushless Servo
and more. Stepper motors are ideally suited for precision control. This motor can
be operated in forward/reverse with controllable speed from a BASIC Stamp or any
other microcontroller through a transistor driver circuit. Some of the applications
for this motor include educational experimentation, robotics and precision
mechanical control. There are three types of stepper motor, namely unipolar,
bipolar and universal stepper motor.
TECHNICAL SPECIFICATIONS
V. LCD DISPLAY
SCHEMATIC DIAGRAM
CIRCUIT DESCRIPTION
Above is the quite simple schematic. The LCD panel's Enable and Register Select
is connected to the Control Port. The Control Port is an open collector / open drain
output. While most Parallel Ports have internal pull-up resistors, there is a few
which don't. Therefore by incorporating the two 10K external pull up resistors, the
circuit is more portable for a wider range of computers, some of which may have
no internal pull up resistors. We make no effort to place the Data bus into reverse
direction. Therefore we hard wire the R/W line of the LCD panel, into write mode.
This will cause no bus conflicts on the data lines. As a result we cannot read back
the LCD's internal Busy Flag which tells us if the LCD has accepted and finished
OPERATION
During the positive half cycle of the input supply, the upper end A of the
transformer secondary becomes positive with respect to its lower point B. This
makes Point1 of bridge Positive with respect to point 2. The diode D1 & D2
become forward biased & D3 & D4 become reverse biased. As a result a current
starts flowing from point1, through D1 the load & D2 to the negative end. During
negative half cycle, the point2 becomes positive with respect to point1. Diodes
D1 & D2 now become reverse biased. Thus, current flows from point 2 to point1.
VIII. TRANSFORMER
IX. DIODE
The diode is a p-n junction device. Diode is the component used to control the
flow of the current in any one direction. The diode widely works in forward bias.
When the current flows from the p to n direction then it is forward biased. The
Zener diode is used in reverse bias function i.e. n to p direction. Visually the
identification of the diode`s terminal can be done by identifying he silver/black
line. The silver/black line is the negative terminal (cathode) and the other
terminal is the positive terminal (cathode).
APPLICATIONS
• Diodes: Rectification, free-wheeling, etc
• Zener diode: Voltage control, regulator etc.
X. RESISTORS
The flow of charge through any material encounters an opposing force similar in
many respects to mechanical friction .this opposing force is called resistance of
the material .in some electric circuit resistance is deliberately introduced in form
of resistor. Resistor used fall in three categories , only two of which are color
coded which are metal film and carbon film resistor .the third category is the wire
wound type ,where value are generally printed on the vitreous paint finish of the
component. Resistors are in ohms and are represented in Greek letter omega,
looks as an upturned horseshoe. Most electronic circuit require resistors to make
them work properly and it is obliviously important to find out something about
the different types of resistors available. Resistance is measured in Ω, the symbol
for ohm is an omega ohm. 1Ω is quite small for electronics so resistances are
often given in KΩ and MΩ. Resistors used in electronics can have resistances as
low as 0.1 Ω or as high as 10 MΩ.
FUNCTION
Resistor restricts the flow of electric current, for example a resistor is placed in
series with a light-emitting diode (LED) to limit the current passing through the
LED.
Another example for a Carbon 22000 Ohms or 22 Kilo-Ohms also known as 22K at
5% tolerance: Band 1 = Red, 1st digit
Band 2 = Red, 2nd digit
Band 3 = Orange, 3rd digit, multiply with zeros, in this case 3 zero's
Band 4 = Gold, Tolerance, 5%
TESTING
Resistors are checked with an ohm meter/millimeter. For a defective resistor the ohm-
meter shows infinite high reading.
XI. CAPACITORS
How Batteries work in a way, a capacitor is a little like a battery. Although they work
in completely different ways, capacitors and batteries both store electrical energy. If
you have come across, then you know that a battery has two terminals. Inside the
battery, chemical reactions produce electrons at one terminal and absorb electrons at
the other terminal.
BASICS
Like a battery, a capacitor has two terminals. Inside the capacitor, the terminals
connect to two metal plates separated by a dielectric. The dielectric can be air, paper,
plastic or anything else that does not conduct electricity and keeps the plates from
touching each other. You can easily make a capacitor from two pieces of aluminum
foil and a piece of paper. It won't be a particularly good capacitor in terms of its
storage capacity, but it will work. In an electronic circuit, a capacitor is shown like
this:
TESTING
To test the capacitors, either analog meters or special digital meters with the specified
function are used. The non-electrolyte capacitor can be tested by using the digital
meter.
Result Faulty OK
XII. LED
LED falls within the family of P-N junction devices. The light emitting diode (LED)
is a diode that will give off visible light when it is energized. In any forward biased
P-N junction there is, with in the structure and primarily close to the junction, a
recombination of hole and electrons. This recombination requires that the energy
possessed by the unbound free electron be transferred to another state. The process of
giving off light by applying an electrical source is called electroluminescence.
LED is a component used for indication. All the functions being carried out are
displayed by led .The LED is diode which glows when the current is being flown
through it in forward bias condition. The LEDs are available in the round shell and
also in the flat shells. The positive leg is longer than negative leg.
XIII. BUZZER
Buzzer is a device used for beep signal. This will help us to make understand
information or message. A buzzer is usually electronic device used in automobiles,
household applications etc.
CHAPTER 2
LITERATURE REVIEW
PREHISTORY: 8048
In fact, it should have started with chapter -2, the invention of microprocessor. Intel
introduced a single-chip processor, the 4004, in 1971. It was a 4-bit microprocessor,
with whopping processing speed of 100 thousand operations per second, and was
meant for an electronic calculator. There is a lot of 4-bit processing in calculators,
especially if the software is based on BCD arithmetic. Later Intel introduced the 8-
bitter 8008 and it's grown-up brother - the famous 8080 (which then was perfected by
an ex-Intel employee as Zilog Z80, one of the best 8-bit microprocessors of all
times). In 1976, Intel introduced its first microcontroller, 8048. It integrated the
processing core with code and data memory and certain peripherals. The code
memory was a 1kB mask ROM (defined by the last metallization mask during the
chip processing) or EPROM (after all, Intel invented EPROM), the data memory was
64 bytes of RAM (including the 8-level stack and two pages of eight general purpose
registers). Besides general-purpose I/O (see below), peripherals included a timer and
an external interrupt (plus the necessary interrupt system). Although the 8048 is
clearly an 8-bit architecture, it is said to be an ancestor of the 4-bit 4004 rather than
the 8080. Also it is said to bear remarkable similarities to Fairchild F8
microprocessor. Today, it is hard to say whether something of this is true, but one
thing is sure, the 8048 has a couple of strange features. Using four of its general
purpose input/output ports, and adding one or more 8243-type chip - and the I/O
expand into another four 4-bit ports. This expansion has not only support in the
hardware - dedicated pins on 8048 - but also in the instruction set, having dedicated
instructions for I/O operations (including AND and OR(!)) via the expander.
The 8048 already had a lot of useful features known well to 8051-users: external code
memory support; external data memory support (inherently only 256 bytes addressed
indirectly by R0 and R1 as there is no 16 bit pointer register such as the DPTR in
8051 - the 8051 inherited this 8-bit external data access); quasibidirectional I/O ports.
Maximum clock is 11MHz, but an instruction cycle takes 15 oscillator clocks. The
"A" version (advanced) introduced powerdown mode there were multiple variations
of the 8048 around, mostly with different numbering, but generally denoted as the
MCS-48 family. 8048 itself denoted a mask-ROM part, 8748 an EPROM part -
windowed (CERDIP - erasable) for development, and unwindowed (PDIP) OTP. The
ROMless part was a bit surprisingly marked 8035 (probably most of the parts sold as
ROMless were parts with unusable ROM, due to error in the "programmed"
firmware). There was a low-cost version with reduced pin count and omitted some of
the features as 8021, and versions with more ROM and RAM as 8049 (2kB
ROM/128B RAM) and 8050 (4kB ROM/256B RAM); with ROMless versions as
8039 and 8040; and 8049 had also an EPROM version 8749 (the funny thing is, that
8749 came in 1981, one year after 8051/8751). 8048's were second sourced by a
number of manufacturers, including NEC, Toshiba, and were cloned also behind the
then iron curtain in Czechoslovakia (Tesla MHB8048/8035) and USSR. Application
specific versions of 8048 were also built quite early, with adding of various
peripherals, such as 8-bit ADC in 8022 and a parallel-bus slave interface in
8041/8042.
The MCS-48 family was used in a quite wide range of applications. One of the first
applications of 8048 was in a gaming console (Magnavox Odyssey2), but there were
also more "serious" applications, for example in one of the first car engine
"computerized" control units. But the biggest hit came when IBM decided to use
8048 in its original PC keyboard. Although in the AT keyboard IBM used the
(presumably cheaper) 6805, it used 8042 as a co-processor on the mainboard,
communicating with the keyboard. The 8042 is still present in almost each and every
PC even today, but don't search for a chip with "8042" on it - it is integrated in the
chipset. It may come as a surprise to somebody, but thanks to this fact the 8048 with
its derivatives is most probably the most widespread microcontroller at all.
As in the 70s there were no pdf-s and no world-wide web, datasheets and other
documentation is hardly available over the internet. I believe Intel will give out a
copy if one really wants it (there is a "literature request" form at their "museum"
pages). However, there seems to be a couple of enthusiastic people, one of the
maintaining a wonderful document called “Grokking the MCS-48 System” at
http://home.mnet-online.de/al/mcs-48/mcs-48.pdf .
bytes), multiple and divide instructions. As for peripherals, second timer was added
and both were extended to 16 bits with multiple modes (including 8-bit autoreload
mode), and an UART (which was a luxury that many lower-end microcontrollers
didn't have even a couple of years ago). The raw clock frequency did not increase
considerably, being 12MHz, but an instruction cycle is 12 clocks now.
Similarly to 8048, also the 8051 had variants, but there was no cut-down "low-cost"
version (presumably because of the cost of ROM/RAM and the DIP40 package went
low enough). The ROMless version was 8031 and the EPROM version was 8751.
The "extended" version - 8052 (with 8032 and 8752) came 3 years later and featured
besides 8KB ROM and 256B RAM also an extra 16-bit timer. An unusual chip was
the 8052AH-BASIC, which according to Intel was "software-on-silicon version of
the 8052 microcontroller with a BASIC interpreter on-chip in 8K ROM". The whole
family was eventually called MCS-51 and was manufactured in NMOS, since 1986 in
CMOS. Intel provided all the needed initial tools and support with the 8051 -
assembler, application notes, example software, in-circuit emulator. Some of the
appnotes and software still can be found on Intel webpage’s and are of excellent
quality. The basic datasheet set - dubbed in the community as "the bible" - is still
THE reference source of information on 8051 and its derivatives, even today. So,
Intel did its job, providing everything needed to make 8051 successful, and the rest is
history.
Similar to 8048, also the 8051 has been licensed to various manufacturers worldwide.
Some of the early adopters include Philips, Signetics, MHS (Matra) and Siemens.
Most of these companies don't exist anymore, some have been taken over, others
have been renamed; but most of them still manufacture some derivative of 8051. The
licensees started to make fully compatible models. Naturally, they took over also the
datasheets, for example the "bible" is better used in the Philips version, which is a
verbatim copy of the Intel version, except that it is a true searchable pdf, while the
Intel is a scanned copy of paper document, unsearchable. More than that, the
manufacturers took over the annoying practice of Intel to include in datasheets only
the specific differences to the "bible", very confusing for the newbies (but there are
opinions on this, some of the users consider this arrangement better than having huge
datasheets containing all the “common” details). The manufacturers published their
own appnotes, which all together form a huge knowledge base and code library, but...
due to competition it is scattered across the manufacturers' sites, an another confusing
fact for the newbies. Later, the manufacturers rolled out their own derivatives and
variants with varying marking - there is no real standard in it (although there are
some idiosyncrasies present in the marking of most manufacturers). All types of
modifications described in the following chapters were applied; but the compatibility
to the original 8051 was usually maintained. This, together with the availability of
second-, third-,...,35th-,...-source of 8051 is the true source of its immortality.
EMBEDDED IN EMBEDDED
Intel and the licensees soon realized that 8051 is a nice core that can be embedded in
various ASIC chips to perform setup and control tasks. Typically, the resources of the
ASIC are mapped as external data memory, as if the ASIC would be connected to a
conventional 8051 chip. This approach allows to use an unmodified core, which
speeds up the chip development and decreases the chance for error; also the ASIC
could be breadboard-prototyped in this form easily.
As an example, Intel produced 80C51SL, a descendant of 8042. Philips has a line of
8051-based teletext controllers. In a particular USB web-camera, the chip interfacing
the CCD and USB was controlled by an embedded 8051. There are probably much
more examples around, but most of them never get public. In spite of this, the 8051 in
this form is produced probably in much higher volumes than as general-purpose
microcontrollers.
EXTRAS
When the 8051 was accepted widely enough, some of the applications started to grow
and soon required more power than the 8051 even with enhancements could provide.
There were 16-bit microcontrollers around (e.g. Intel had it's 80C196 line), but it
seemed a good idea to provide a more natural migration path by creating a 16-bit
version of 8051. Intel addressed the problem by introducing 80C251. It went all the
way to achieve compatibility - it was able to run 8051 binary code (being able to
switch to native 16-bit 251-mode) and had a package pin-compatible with 8051. It
was not a big success, most probably for bad market timing (although it is second
sourced by Temic/Atmel). Philips on the other hand employed source-compatibility
for its XA family, which seems to be adequate for most of the applications, where
legacy code has to be maintained or parallel development with 8051 is needed; and
poses little constraint on the chip design itself. All in all, the 16-bit versions of 8051
gained far less popularity than the 8051 and are less widespread.
In the 90s, Atmel introduced a derivative of 8051 with Flash code memory, enabling
fast erasure and reprogramming. It enabled to use the production-grade chip in
development, and enabled the chips used in the product to be reprogrammed when
upgrade or a bugfix was needed, cutting down costs. It brought down the 8051 to the
masses - the small "garage" companies and hobbyists. Besides that, Atmel introduced
also 89C2051 with decreased pin count (and price).This was a smart move, the chip
proved to be extremely popular in many small applications. Today, virtually all
manufacturers produce 8051 derivatives with Flash, most of them able to be
programmed via some few-pin serial interface (called in-situ programming (ISP),
SPI-style or UART-style) and the higher-end versions also able to reprogram
themselves (in-application programming, IAP). MaskROM and EPROM - windowed
or OTP - seems to become extinct, at least in the mainstream applications.
The need for higher processing power, addressed unsuccessfully by the 16-bit
versions, has been solved by introducing the high speed derivatives of 8051. The
original 12-clock instruction cycle scheme is obviously inefficient and also the
technology progressed enough to achieve higher clock rates than the original 12MHz.
The first derivative addressing this in a radical way is the now legendary Dallas
DS80C320. It featured a 4-clocker core with incompatible timing, and could be
clocked as high as 33MHz. Unfortunately, it was produced as ROMless only. The
following step was taken by Cygnal, where a single-clock core has been developed.
In the top-range models, the clocking is as high as 100MHz, being the fastest 8051s
around. Today, there are many 8051 derivatives with sped-up cores available. They
can be divided into two groups: the 6-clockers (e.g. the 8xC51RD2) and 2-clockers
(Philips LPC9xx) have the same number of instruction cycle per instruction as the
original; while the 4-clockers and singleclockers are incompatible in this way,
requiring recalculation of timing loops if used.
WHERE IS IT GOING?
The 8051 is a sound µcu core with rich history. However, it seems that it is already
over its peak, although it might take quite a lot of time until it will be completely
replaced by most modern microcontrollers. So we now have superfast 8051
derivatives with loads of internal FLASH and RAM. ISP and IAP seem to be the
standard these days. There are the 8051s built around advanced analog circuits,
mainly high resolution ADC. There are derivatives suitable for extreme applications
– high temperature, radiation hardened. There are softcores around, tuned up, and
even open source. There is a wealth of knowledge and experience, however, it is
scattered around and the newbies tend to get the easier path - competing 8-bit
microcontrollers usually do have a single-stop information resource site, so this
knowledge and experience seems to die out as the "old boys" retire gradually. The
price difference between the high-end 8-bitters and the much more powerful low-end
32-bit RISCs (such as the ARMs) seems to decrease rapidly and will change
eventually, as the 32-bitters are becoming the standard in all but the least demanding
applications. So there is perhaps still a need for the 8051s, but this need is decreasing
and 8051s life cycle is slowly approaching its end.
CHAPTER 3
P.C.B. DESIGNING & WORKING
The entire circuit can be easily assembled on a general purpose P.C.B. board
respectively. Layout of desired diagram and preparation is first and most important
operation in any printed circuit board manufacturing process. First of all layout of
component side is to be made in accordance with available components dimensions.
The following points are to be observed while forming the layout of P.C.B.
1. Between two components, sufficient space should be maintained.
2. High voltage/max dissipated components should be mounted at sufficient distance
from semiconductor and electrolytic capacitors.
3. The most important points are that the components layout is making proper
compromise with copper side circuit layout.
Printed circuit board (P.C.B.s) is used to avoid most of all the disadvantages of
conventional breadboard. These also avoid the use of thin wires for connecting the
components; they are small in size and efficient in performance.
First of all the actual size circuit layout is to be drawn on the copper side of the
copper clad board. Then enamel paint is applied on the tracks of connection with the
help of a shade brush. We have to apply the paints surrounding the point at which the
connection is to be made. It avoids the disconnection between the leg of the
component and circuit track. After completion of painting work, it is allowed to dry.
DRILLING
After completion of painting work, holes 1/23 inch (1mm) diameter are drilled at
desired points where we have to fix the components.
ETCHING
The removal of excess of copper on the plate apart from the printed circuit is known
as etching. From this process the copper clad board with printed circuit is placed in
the solution of FeCl3 with 3-4 drops of HCL in it and is kept so for about 10 to 15
minutes and is taken out when all the excess copper is removed from the P.C.B. After
etching, the PCB is kept in clean water for about half an hour in order to get P.C.B.
away from acidic, field, which may cause poor performance of the circuit. After the
PCB has been thoroughly washed, paint is removed by soft piece of cloth dipped I
thinner or turbine. Then PCB is checked as per the layout, now the PCB is ready for
use.
SOLDERING
Soldering is the process of joining two metallic conductor the joint where two metal
conductors are to be join or fused is heated with a device called soldering iron and
then as allow of tin and lead called solder is applied which melts and converse the
joint. The solder cools and solidifies quickly to ensure is good and durable
connection between the jointed metal converting the joint solder also present
oxidation.
The surface to be soldered must be cleaned & fluxed. The soldering iron switched on
and bellowed to attain soldering temperature. The solder in form of wire is allied hear
the component to be soldered and heated with iron. The surface to be soldered is
filled, iron is removed and joint is cold without disturbing.
The 230 AC supply is converted into 9 volts by the power supply section in which
four Elements are used.
1. TRANSFORMER
2. 7805 REGULATOR
3. DIODES 4007 (in bridge shape)
4. CAPACITOR OF 100 µF & 470 µF
CHAPTER 4
COST ANALYSIS & TROUBLESHOOTING
1 IC 8051 MC --- 1 80
3 Transformer 9-0-9 1 45
4 Voltage 7805 1 5
Regulator
7 Crystal 12 MHz 1 10
Oscillator
8 Switch --- 2 10
9 LED --- 2 4
12 Diode --- 4 12
13 Buzzer --- 1 20
14 PCB --- 1 60
15 Variable 10KΩ 1 8
Resistance
Total 545
TROUBLESHOOT
First problem that may arise in making of the circuit of “METRO TRAIN
PROTOTYPE” is that, it is difficult to match time with rotation of stepper
motor & LCD.
Second problem that may arise is the redundancy in handling the rotation of
STEPPER MOTOR
We have to take extra care while soldering 2 line LCD
During soldering, many of the connection may become short circuited so we
will have to de-solder the connection and resolder them.
Crystal Oscillator must be carefully handled.
Microcontroller is an expensive device, so proper care must be taken before
making any connection to it.
Care should be taken while soldering. There should be no shorting of joints.
Proper power supply should maintain.
Project should be handled with care since ICs are delicate
Foul components should be immediately changed and the circuit should be
rechecked.
CHAPTER 5
CONCULSION
AREAS OF APPLICATION
The theme of the project when merged with certain established technologies can be
quite effective as in number of countries like Germany, France & Japan etc. where
the railway network is fully automated. The train is programmed for the specific path.
Every station on the path is defined; stoppage timing of the train & distance between
the two stations is predefined. The circuit diagram is shown in the figure. Here LCD
display is connected with the P1 of the MC. Control lines are connected with port 3
of the microcontroller. The contrast of the LCD is controlled by 10K variable resistor.
Unipolar Stepper motor is used for running of the train. This motor has 5 wires,
which are named as A1, B1, B2, and COM. Common line is given at +5V. The other
lines can be connected with port 2 of microcontroller. The stepper motor is driven by
the ULN 2003 chip. This driver’s chip includes Darlington pairs, so as to prevent the
microcontroller from back emf produced while starting motor. This chip required pull
up at inputs.
FUTURE SCOPE
This Project is useful in developing countries & this project has a bright future as it is
being used in countries like Germany, France & Japan. This project helps us to
control train without a manual driver and name of the stations are displayed on the
LCD so that passengers don’t have any inconvenience. This project will lead to
increase in technological trends & this will help to improve our railway system in
many ways.
REFERENCES
2. Engel berg, S.; Kaminsky, T.; Horesh, M.; “Instrumentation notes - A USB-
Enabled, FLASH-Disk-Based DAS”, Instrumentation & Measurement Magazine,
IEEE, Vol. 10, Issue 2, April 2007 Page(s):63 – 66.
4. Kuchta, R.; Stefan, P.; Barton, Z.; Vrba, R.; Sveda, M, “Wireless temperature data
logger”, ‘Sensors and the International Conference on new Techniques in
Pharmaceutical and Biomedical Research, 2005 Asian Conference’ on 5-7 Sept. 2005
Page(s):208 – 212.
5. Lee Tat Man, “Recording power demand characteristics and harmonic pollution by
a general-purpose data logger”, ‘Advances in Power System Control, Operation and
Management, 1991. APSCOM-91., 1991 International Conference’ on 5-8 Nov 1991
Page(s):737 - 743 vol.2.
WEBSITES
www.atmel.com
www.seimens.com
www.philipsemiconductors.com
www.howstuffworks.com
www.alldatasheets.com
www.efyprojects.com
www.thomson.com/learning
www.circuitstoday.com
www.google.com
APPENDIX
CODING
$mod51
data equ p1 ; p0
busy equ p0.7 ; p0.7
rs equ p3.2
rw equ p3.1
en equ p3.0
org 400h
show0: db 'Welcome To All','0'
show1: db 'Current Station','0'
show2: db 'Next Station','0'
show3: db 'Aligarh','0'
show4: db 'Ghaziabad','0'
show5: db 'New Delhi','0'
org 0000h
here: mov p2,#00h
acall ini
mov dptr,#show0
acall read
clr p3.3 ;p1.0
acall delay
mov a,#01h
acall command; Now make memory clear cursor home
mov dptr,#show1
acall read
mov a,#0c0h
acall command
mov dptr,#show3
acall read
acall delay ; Stopage1 time 3 sec new Delhi
acall delay
acall delay
mov a,#01h
acall command
mov dptr,#show2
acall read
mov a,#0c0h
acall command
mov dptr,#show4
acall read ;
acall delay ; Stopage1 time 3 sec new Delhi
acall stepperf
mov a,#01h
acall command
mov dptr,#show1
acall read
mov a,#0c0h
acall command
mov dptr,#show4
acall read
acall delay ; Stopage2 time 3 sec Noida
acall delay
acall delay
mov a,#01h
acall command
mov dptr,#show2 ; display ne
acall read
mov a,#0c0h
acall command
mov dptr,#show5
acall read ;
acall delay
acall stepperf
mov a,#01h
acall command
mov dptr,#show1
acall read
mov a,#0c0h
acall command
mov dptr,#show5
acall read
acall delay ; Stopage2 time 3 sec greater Noida
acall delay
acall delay
setb p3.3 ; p1.0 ; off led at p1.0 for forward journey
clr p3.4 ; p1.1 ; 0n Led for back ward journey
mov a,#01h
acall command
mov dptr,#show2 ; display ne Noida
acall read mov a,#0c0h
acall command
mov dptr,#show4
acall read acall stepperb
mov a,#01h
acall command
mov dptr,#show1
acall read
mov a,#0c0h
acall command
mov dptr,#show4
acall read
acall delay ; Stopage2 time 3 sec Noida
acall delay
acall delay
mov a,#01h
acall command
mov dptr,#show2 ; display ne new Delhi
acall read
mov a,#0c0h
acall command
mov dptr,#show3
acall read ;
acall delay
acall stepperb
mov a,#01h
acall command
mov dptr,#show1
acall read
mov a,#0c0h
acall command
mov dptr,#show3
acall read
setb p3.4 ;p1.1
ljmp here ;
+++++++++++++++routine for stepper motor+++++++++++++++++
Delay Routine
delay:
push acc
push 00h
push 01h
push p0
push p1
mov r0,#0eh
loopr: mov a,#0ffh
loopb:mov b,#0ffh
loopa: djnz b,
loopa: djnz 0e0h,
loopb: djnz r0,
loopr: pop p1
pop p0
pop 01h
pop 00h
pop acc
ret ;dlay stepper
delays:
push acc
push 00h
push 01h
push p0
push p1
mov a,#0ffh
loopa1: mov b,#0ffh
loopb1: djnz b,loopb1
djnz 0e0h,loopa1
pop p1
pop p0
pop 01h
pop 00h
pop acc
ret ;
++++++++++++Routine to read data from program memory +++++++++++++
read:
nex: clr a
movc a,@a+dptr
cjne a,#'0',aga
sjmp down
aga: acall display ;
acall delay
inc dptr
sjmp nex
down: ;acall delay
ret ;
================ stepper routine ====================
stepperf:
push acc
push p1
mov a,#88h ;
mov p2,a
mov r0,#0e0h
mov r1,#01h
loop: mov p2,a
acall delays
rr a
dec r0
cjne r0,#00h,loop
dec r1
cjne r1,#00h,loop
pop p1
pop acc
ret
stepperb: push acc
push p1
mov a,#88h ;
mov p2,a
mov r0,#0e0h
mov r1,#01h
loop1:
mov p2,a
acall delays
rl a
dec r0
cjne r0,#00h,loop1
dec r1
cjne r1,#00h,loop1
pop p1
pop acc
ret
end
DATASHEET