Professional Documents
Culture Documents
Now a day's every system is automated in order to face new challenges in the
present day situation. Automated systems have less manual operations, so that the
flexibility, reliabilities are high and accurate. Hence every field prefers automated control
systems. Especially in the field of electronics automated systems are doing better
performance.
Probably the most useful thing to know about the global system for mobile
communication is that it is an international standard. If you travel in parts of world, GSM
is only type of cellular service available. Instead of analog services, GSM was developed
as a digital system using TDMA technology.
The main aim of this project is to detect the fire in the Trains and also control the
fire using water pump. L293D is used as a Driver IC for Motor and LCD is used for
Display. Fire is detected by using IR Receiver. Whenever Fire is detected water pump
will be turned on.
A liquid crystal display (LCD) is a flat panel display, electronic visual display,
or video display that uses the light modulating properties of liquid crystals (LCs). LCs
does not emit light directly.When ever the fire will be detected in the trains and then
automatically engine will be totally stop and by sending message using GSM .
This project uses regulated 5V, 500mA & 12V, 500mA power supply. 7805 and
7812 three terminal voltage regulators are used for voltage regulation. Bridge type full
wave rectifier is used to rectify the ac output of secondary of 230/12V step down
transformer.
Block Diagram: Rx
MAX232
Power
Supply
Micro Controller
Water
pump
Fire
Sensor
LCD
GSM
INTRODUCTION
An embedded system is a combination of software
and hardware to perform a dedicated task.
Some of the main devices used in embedded
products are Microprocessors and Microcontrollers.
Microprocessors are commonly referred to as
general purpose processors as they simply accept the
inputs, process it and give the output.
In contrast, a microcontroller not only accepts the
data as inputs but also manipulates it, interfaces the
data with various devices, controls the data and thus
finally gives the result. In this project we use RF module
as well as the DTMF decoder for communication. Now
when we dial the numbers in the mobile phone from the
controlling side then it automatically recognizes which
number has been recorded and it follows with the
corresponding next step to be taken i.e., movement of
the robot in water.
example
is
the
microwave
oven.
Almost
every
on
the dashboard.
In
some
cases,
these
network,
but
that
is
certainly
not
requirement.
At the possible risk of confusing you, it is important
to point out that a general-purpose computer is itself made
up of numerous embedded systems. For example, my
computer consists of a keyboard, mouse, video card,
modem, hard drive, floppy drive, and sound card-each of
which is an embedded system. Each of these devices
contains a processor and software and is designed to
perform a specific function. For example, the modem is
designed to send and receive digital data over analog
telephone line. That's it and all of the other devices can be
summarized in a single sentence as well.
If an embedded system is designed well, the
existence of the processor and software could be completely
unnoticed by the user of the device. Such is the case for a
microwave oven, VCR, or alarm clock. In some cases, it
traffic
lights,
and
aircraft
flight
control
of
the
microcomputer
age
and
brought
corrupt
data
packet.
The
more
severe
the
Real-time
systems
at
the
other
end
of this
automation,
biomedical
engineering,
wireless
control,
air-conditioning,
navigation
etc.
Even
automation:Today
lot
of
industries
use
electricity
generation
and
transmission.
The
radiation,
colonscopy,
endoscopy
etc.
as
networking:Computer
bridges,
routers,
networking
Integrated
Services
products
Digital
equipments,
other
than
the
end
systems
cameras
are
embedded
systems.
The
network
systems
that
provide
very
low-cost
voice
technologies:Advances
communications are
paving way
for
in
mobile
many interesting
communication
infrastructure
such
as
base
station
and
measurement
are
the
logic
analyzer,
protocol
analyzer,
radio
computer.
However,
there
are
significant
specific
to
that
application.
For
applications
is
used
mainly
for
applications
in
which
signal
Communication interfaces:
The embedded systems may need to, interact with other
embedded systems at they may have to transmit data to a
desktop. To facilitate this, the embedded systems are
provided with one or a few communication interfaces such as
RS232, RS422, RS485, Universal Serial Bus (USB), IEEE 1394,
Ethernet etc.
Application-specific circuitry:
Conclusions:
Embedded Systems plays a vital role in our day today
life. They are used for household appliances like microwave
oven to the satellite applications. They provide good man to
machine interface.
Automation
is
the
further
step
in
the
world
of
MICROCONTROLLERS:
Description:
The AT89C51 is a low-voltage, high-performance CMOS 8-bit microcomputer
with 4K bytes of Flash programmable memory. The device is manufactured using
Atmels high-density nonvolatile memory technology and is compatible with the
industry-standard MCS-51 instruction set. 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.
In addition, 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.
Pin diagram
PIN DESCRIPTION:
Vcc
Pin 40 provides supply voltage to the chip. The voltage source is +5V.
GND
Pin 20 is the ground.
XTAL1 and XTAL2
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that
can be configured for use as an on-chip oscillator, as shown in Figure 11. Either a quartz
crystal or ceramic resonator may be used. To drive the device from an external clock
source, XTAL2 should be left unconnected while XTAL1 is driven, as shown in the
below figure. There are no requirements on the duty cycle of the external clock signal,
since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but
minimum and maximum voltage high and low time specifications must be observed.
RESET
Pin9 is the reset pin. It is an input and is active high. Upon applying a high pulse to this
pin, the microcontroller will reset and terminate all the activities. This is often referred to
as a power-on reset.
EA (External access)
Pin 31 is EA. It is an active low signal. It is an input pin and must be connected to either
Vcc or GND but it cannot be left unconnected.
The 8051 family members all come with on-chip ROM to store programs. In
such cases, the EA pin is connected to Vcc. If the code is stored on an external ROM, the
EA pin must be connected to GND to indicate that the code is stored externally.
PSEN (Program store enable)
This is an output pin.
ALE (Address latch enable)
ALE/PROG
Address Latch Enable is an 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. 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.
for internal program executions. This pin also receives the 12-volt programming enable
voltage (VPP) during Flash programming when 12-volt programming is selected.
Ports 0, 1, 2 and 3
The four ports P0, P1, P2 and P3 each use 8 pins, making them 8-bit ports. All the ports
upon RESET are configured as input, since P0-P3 have value FFH on them.
Port 0(P0)
Port 0 is also designated as AD0-AD7, allowing it to be used for both address and data.
ALE indicates if P0 has address or data. When ALE=0, it provides data D0-D7, but when
ALE=1, it has address A0-A7. Therefore, ALE is used for demultiplexing address and
data with the help of an internal latch.
When there is no external memory connection, the pins of P0 must be connected
to a 10K-ohm pull-up resistor. This is due to the fact that P0 is an open drain. With
external pull-up resistors connected to P0, it can be used as a simple I/O, just like P1 and
P2. But the ports P1, P2 and P3 do not need any pull-up resistors since they already have
pull-up resistors internally. Upon reset, ports P1, P2 and P3 are configured as input ports.
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 because of the internal pull-ups.
Some Port 1 pins provide additional functions. P1.0 and P1.1 can be configured to be the
timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input
(P1.1/T2EX), respectively. Furthermore, P1.4, P1.5, P1.6, and P1.7 can be configured as
the SPI slave port select, data input/output and shift clock input/output pins. Port 1 also
receives the low-order address bytes during Flash programming and verification.
Port 2
With no external memory connection, P2 are used as simple I/O. With external
memory connections, port 2 must be used along with P0 to provide the 16-bit address for
the external memory. Port 2 is designated as A8-A15 indicating its dual function. While
P0 provides the lower 8 bits via A0-A7, it is the job of P2 to provide bits A8-A15 of the
address.
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 because of the pull-ups. Port 3
receives some control signals for Flash programming and verification.
Port 3 also serves the functions of various special features of the AT89S8252, as
shown in the following table.
Program Memory
The oldest models of the 8051 microcontroller family did not have any internal program
memory. It was added from outside as a separate chip. These models are recognizable by
their label beginning with 803 (for ex. 8031 or 8032). All later models have a few Kbytes
ROM embedded, Even though it is enough for writing most of the programs, there are
situations when additional memory is necessary. A typical example of it is the use of so
called lookup tables. They are used in cases when something is too complicated or when
there is no time for solving equations describing some process. The example of it can be
totally exotic (an estimate of self-guided rockets meeting point) or totally common
(measuring of temperature using non-linear thermo element or asynchronous motor speed
control). In those cases all needed estimates and approximates are executed in advance
and the final results are put in the tables (similar to logarithmic tables).
How does the microcontroller handle external memory depend on the pin EA logic state?
EA=0In this case, internal program memory is completely ignored, only a program stored
in external memory is to be executed.
EA=1In this case, a program from built-in ROM is to be executed first (to the last
location). Afterwards, the execution is continued by reading additional memory.
in both cases, P0 and P2 are not available to the user because they are used for data and
address transmission. Besides, the pins ALE and PSEN are used too.
Data Memory
As already mentioned, Data Memory is used for temporarily storing and keeping data and
intermediate results created and used during microcontrollers operating. Besides, this
microcontroller family includes many other registers such as: hardware counters and
timers, input/output ports, serial data buffers etc. The previous versions have the total
memory size of 256 locations, while for later models this number is incremented by
additional 128 available registers. In both cases, these first 256 memory locations
(addresses 0-FFh) are the base of the memory. Common to all types of the 8051
microcontrollers. Locations available to the user occupy memory space with addresses
from 0 to 7Fh. First 128 registers and this part of RAM is divided in several blocks.
The first block consists of 4 banks each including 8 registers designated as R0 to R7.
Prior to access them, a bank containing that register must be selected. Next memory
block (in the range of 20h to 2Fh) is bit- addressable, which means that each bit being
there has its own address from 0 to 7Fh. Since there are 16 such registers, this block
contains in total of 128 bits with separate addresses (The 0th bit of the 20h byte has the
bit address 0 and the 7th bit of the 2Fh byte has the bit address 7Fh). The third groups of
registers occupy addresses 2Fh-7Fh (in total of 80 locations) and does not have any
special purpose or feature.
Additional Memory Block of Data Memory
In order to satisfy the programmers permanent hunger for Data Memory, producers have
embedded an additional memory block of 128 locations into the latest versions of the
8051 microcontrollers. Naturally, its not so simpleThe problem is that electronics
performing addressing has 1 byte (8 bits) on disposal and due to that it can reach only the
first 256 locations. In order to keep already existing 8-bit architecture and compatibility
with other existing models a little trick has been used.
Using trick in this case means that additional memory block shares the same addresses
with existing locations intended for the SFRs (80h- FFh). In order to differentiate
between these two physically separated memory spaces, different ways of addressing are
used. A direct addressing is used for all locations in the SFRs, while the locations from
additional RAM are accessible using indirect addressing.
From the users perspective, everything functions quite simple if properly connected
because the most operations are performed by the microcontroller itself. The 8051
microcontroller has two separate reading signals RD#(P3.7) and PSEN#. The first one is
activated byte from external data memory (RAM) should be read, while another one is
activated to read byte from external program memory (ROM). These both signals are
active at logical zero (0) level. A typical example of such memory extension using special
chips for RAM and ROM is shown on the previous picture. It is called Hardward
architecture.
Even though the additional memory is rarely used with the latest versions of the
microcontrollers, it will be described here in short what happens when memory chips are
connected according to the previous scheme. It is important to know that the whole
process is performed automatically, i.e. with no intervention in the program.
When the program during execution encounters the instruction which resides in
external memory (ROM), the microcontroller will activate its control output ALE
and set the first 8 bits of address (A0-A7) on P0. In this way, IC circuit
74HCT573 which "lets in" the first 8 bits to memory address pins is activated.
A signal on the pin ALE closes the IC circuit 74HCT573 and immediately
afterwards 8 higher bits of address (A8-A15) appear on the port. In this way, a
desired location in additional program memory is completely addressed. The only
thing left over is to read its content.
Pins on P0 are configured as inputs, the pin PSEN is activated and the
microcontroller reads content from memory chip. The same connections are used
both for data and lower address byte.
Similar occurs when it is a needed to read some location from external Data Memory.
Now, addressing is performed in the same way, while reading or writing is performed via
signals which appear on the control outputs RD or WR.
Addressing
While operating, processor processes data according to the program instructions. Each
instruction consists of two parts. One part describes what should be done and another part
indicates what to use to do it. This later part can be data (binary number) or address
where the data is stored. All 8051 microcontrollers use two ways of addressing depending
on which part of memory should be accessed:
Direct Addressing
On direct addressing, a value is obtained from a memory location while the address of
that location is specified in instruction. Only after that, the instruction can process data
(how depends on the type of instruction: addition, subtraction, copy). Obviously, a
number being changed during operating a variable can reside at that specified address.
For example:
Since the address is only one byte in size ( the greatest number is 255), this is how only
the first 255 locations in RAM can be accessed in this case the first half of the basic
RAM is intended to be used freely, while another half is reserved for the SFRs.
Indirect Addressing
On indirect addressing, a register which contains address of another register is specified
in the instruction. A value used in operating process resides in that another register. For
example:
Only RAM locations available for use are accessed by indirect addressing (never in the
SFRs). For all latest versions of the microcontrollers with additional memory block
(those 128 locations in Data Memory), this is the only way of accessing them. Simply,
when during operating, the instruction including @ sign is encountered and if the
specified address is higher than 128 (7F hex.), the processor knows that indirect
addressing is used and jumps over memory space reserved for the SFRs.
On indirect addressing, the registers R0, R1 or Stack Pointer are used for specifying 8-bit
addresses. Since only 8 bits are available, it is possible to access only registers of internal
RAM in this way (128 locations in former or 256 locations in latest versions of the
microcontrollers). If memory extension in form of additional memory chip is used then
the 16-bit DPTR Register (consisting of the registers DPTRL and DPTRH) is used for
specifying addresses. In this way it is possible to access any location in the range of 64K.
Register
(Accumulator)
This is a general-purpose register which serves for storing intermediate results during
operating. A number (an operand) should be added to the accumulator prior to execute an
instruction upon it. Once an arithmetical operation is preformed by the ALU, the result is
placed into the accumulator. If a data should be transferred from one register to another, it
must go through accumulator. For such universal purpose, this is the most commonly
used register that none microcontroller can be imagined without (more than a half 8051
microcontroller's instructions used use the accumulator in some way).
B Register
B register is used during multiply and divide operations which can be performed only
upon numbers stored in the A and B registers. All other instructions in the program can
use this register as a spare accumulator (A).
During programming, each of registers is called by name so that their exact address is not
so important for the user. During compiling into machine code (series of hexadecimal
numbers recognized as instructions by the microcontroller), PC will automatically,
instead of registers name, write necessary addresses into the microcontroller.
R Registers (R0-R7)
This is a common name for the total 8 general purpose registers (R0, R1, R2 ...R7). Even
they are not true SFRs, they deserve to be discussed here because of their purpose. The
bank is active when the R registers it includes are in use. Similar to the accumulator, they
are used for temporary storing variables and intermediate results. Which of the banks will
be active depends on two bits included in the PSW Register. These registers are stored in
four banks in the scope of RAM.
Description:
The AT89C51 is a low-voltage, high-performance CMOS 8-bit microcomputer
with 4K bytes of Flash programmable memory. The device is manufactured using
Atmels high-density nonvolatile memory technology and is compatible with the
industry-standard MCS-51 instruction set. 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.
In addition, 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.
Machine cycle for the 8051
The CPU takes a certain number of clock cycles to execute an instruction. In the 8051
family, these clock cycles are referred to as machine cycles. The length of the machine
cycle depends on the frequency of the crystal oscillator. The crystal oscillator, along with
on-chip circuitry, provides the clock source for the 8051 CPU.
The frequency can vary from 4 MHz to 30 MHz, depending upon the chip rating and
manufacturer. But the exact frequency of 11.0592 MHz crystal oscillator is used to make
the 8051 based system compatible with the serial port of the IBM PC.
In the original version of 8051, one machine cycle lasts 12 oscillator periods. Therefore,
to calculate the machine cycle for the 8051, the calculation is made as 1/12 of the crystal
frequency and its inverse is taken.
It is important to know that each diode will be immediately destroyed unless its current is
limited. This means that a conductor must be connected in parallel to a diode. In order to
correctly determine value of this
conductor, it is necessary to know
diodes voltage drop in forward
direction, which depends on what
material a diode is made of and what
colour it is. Values typical for the most
frequently used diodes are shown in
table below: As seen, there are three
main types of LEDs. Standard ones get
ful brightness at current of 20mA. Low Current diodes get ful brightness at ten times
lower current while Super Bright diodes produce more intensive light than Standard ones.
Since the 8051 microcontrollers can provide only low input current and since their pins
are configured as outputs when voltage level on them is equal to 0, direct connectining to
LEDs is carried out as it is shown on figure (Low current LED, cathode is connected to
output pin).
Switches and Pushbuttons
There is nothing simpler than this! This is the simplest way of controlling appearance of
some voltage on microcontrollers input pin. There is also no need for additional
explanation of how these components operate.
The simplest solution is to connect simple RC circuit which will suppress each quick
voltage change. Since the bouncing time is not defined, the values of elements are not
strictly determined. In the most cases, the values shown on figure are sufficient.
If complete safety is needed, radical measures should be taken! The circuit, shown on the
figure (RS flip-flop), changes logic state on its output with the first pulse triggered by
contact bounce. Even though this is more expensive solution (SPDT switch), the problem
is definitely resolved! Besides, since the condensator is not used, very short pulses can be
also registered in this way. In addition to these hardware solutions, a simple software
solution is commonly applied too: when a program tests the state of some input pin and
finds changes, the check should be done one more time after certain time delay. If the
change is confirmed it means that switch (or pushbutton) has changed its position. The
advantages of such solution are obvious: it is free of charge, effects of disturbances are
eliminated too and it can be adjusted to the worst-quality contacts.
SWITCH INTERFACING:
CPU accesses the switches through ports. Therefore these switches are connected
to a microcontroller. This switch is connected between the supply and ground terminals.
R
P2.0
Gnd
Fig: Interfacing switch with the microcontroller
Thus now the two conditions are to be remembered:
1. When the switch is open, the total supply i.e., Vcc appears at the port pin P2.0
P2.0 = 1
2. When the switch is closed i.e., when it is pressed, the total supply path is
provided to ground. Thus the voltage value at the port pin P2.0 will be zero.
P2.0 = 0
By reading the pin status, the microcontroller identifies whether the switch is
pressed or not. When the switch is pressed, the corresponding related to this switch press
written in the program will be executed.
Alphanumeric LCD
Liquid Crystal Display also called as LCD is very helpful in providing user interface as
well as for debugging purpose. The most commonly used Character based LCDs are
based on Hitachi's HD44780 controller or other which are compatible with HD44580.
The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 Line
LCDs which have only 1 controller and support at most of 80 characters, whereas LCDs
supporting more than 80 characters make use of 2 HD44780 controllers.
Pin Description
Pin No.
Name
Description
VSS
VCC
VEE
RS
Contrast adjust
0 = Instruction input
R/W
1 = Data input
0 = Write to LCD module
1 = Read from LCD module
EN
Enable signal
D0
D1
D2
10
D3
11
D4
12
D5
13
D6
14
D7
15
LED+
16
LED-
dots, eight character patterns can be written, and for 5 x 10 dots, four character patterns
can be written.
BF - Busy Flag
Busy Flag is a status indicator flag for LCD. When we send a command or data to the
LCD for processing, this flag is set (i.e. BF =1) and as soon as the instruction is executed
successfully this flag is cleared (BF = 0). This is helpful in producing and exact amount
of delay for the LCD processing.
To read Busy Flag, the condition RS = 0 and R/W = 1 must be met and The MSB of the
LCD data bus (D7) act as busy flag. When BF = 1 means LCD is busy and will not accept
next command or data and BF = 0 means LCD is ready for the next command or data to
process.
Instruction Register (IR) and Data Register (DR)
There are two 8-bit registers in HD44780 controller Instruction and Data register.
Instruction register corresponds to the register where you send commands to LCD e.g.
LCD shift command, LCD clear, LCD address etc. and Data register is used for storing
data which is to be displayed on LCD. When send the enable signal of the LCD is
asserted, the data on the pins is latched in to the data register and data is then moved
automatically to the DDRAM and hence is displayed on the LCD. Data Register is not
only used for sending data to DDRAM but also for CGRAM, the address where you want
to send the data, is decided by the instruction you send to LCD.
Commands and Instruction set
Only the instruction register (IR) and the data register (DR) of the LCD can be controlled
by the MCU. Before starting the internal operation of the LCD, control information is
temporarily stored into these registers to allow interfacing with various MCUs, which
operate at different speeds, or various peripheral control devices. The internal operation
of the LCD is determined by signals sent from the MCU. These signals, which include
register selection signal (RS), read/write signal (R/W), and the data bus (DB0 to DB7),
make up the LCD instructions (Table 3). There are four categories of instructions that:
Although looking at the table you can make your own commands and test them. Below is
a brief list of useful commands which are used frequently while working on the LCD.
No.
Instruction
Hex
Decimal
1
2
3
4
5
0x30
0x38
0x20
0x28
0x06
48
56
32
40
6
0x08
7
8
9
10
12
13
14
15
content)
Display on Cursor on
Display on Cursor off
Display on Cursor blinking
Shift entire display left
Shift entire display right
Move cursor left by one character
Move cursor right by one character
Clear Display (also clear DDRAM content)
Set DDRAM address or cursor position on
0x0E
0x0C
0x0F
0x18
0x1C
0x10
0x14
0x01
14
12
15
24
30
16
20
1
0x80+add
128+add
16
display
17
0x40+add
64+add
To send commands we simply need to select the command register. Everything is same as
we have done in the initialization routine. But we will summarize the common steps and
put them in a single subroutine. Following are the steps:
THEORY OF DC MOTOR
The speed of a DC motor is directly proportional to the supply voltage, so if we reduce
the supply voltage from 12 Volts to 6 Volts, the motor will run at half the speed. How can
this be achieved when the battery is fixed at 12 Volts? The speed controller works by
varying the average voltage sent to the motor. It could do this by simply adjusting the
voltage sent to the motor, but this is quite inefficient to do. A better way is to switch the
motor's supply on and off very quickly. If the switching is fast enough, the motor doesn't
notice it, it only notices the average effect.
When you watch a film in the cinema, or the television, what you are actually seeing is a
series of fixed pictures, which change rapidly enough that your eyes just see the average
effect - movement. Your brain fills in the gaps to give an average effect.
Now imagine a light bulb with a switch. When you close the switch, the bulb goes on
and is at full brightness, say 100 Watts. When you open the switch it goes off (0 Watts).
Now if you close the switch for a fraction of a second, then open it for the same amount
of time, the filament won't have time to cool down and heat up, and you will just get an
average glow of 50 Watts. This is how lamp dimmers work, and the same principle is
used by speed controllers to drive a motor. When the switch is closed, the motor sees 12
Volts, and when it is open it sees 0 Volts. If the switch is open for the same amount of
time as it is closed, the motor will see an average of 6 Volts, and will run more slowly
accordingly. The graph below shows the speed of a motor that is being turned on and off
H-BRIDGE:
An H-bridge is an electronic circuit which enables DC electric motors to be run forwards
or backwards. These circuits are often used in robotics. H-bridges are available as
integrated circuits, or can be built from discrete components.
The two basic states of a H-bridge.The term "H-bridge" is derived from the typical
graphical representation of such a circuit. An H-bridge is built with four switches (solid-
state or mechanical). When the switches S1 and S4 (according to the first figure) are
closed (and S2 and S3 are open) a positive voltage will be applied across the motor. By
opening S1 and S4 switches and closing S2 and S3 switches, this voltage is reversed,
allowing reverse operation of the motor.
Using the nomenclature above, the switches S1 and S2 should never be closed at the
same time, as this would cause a short circuit on the input voltage source. The same
applies to the switches S3 and S4. This condition is known as shoot-through.
Operation
The H-Bridge arrangement is generally used to reverse the polarity of the motor, but can
also be used to 'brake' the motor, where the motor comes to a sudden stop, as the motors
terminals are shorted, or to let the motor 'free run' to a stop, as the motor is effectively
disconnected from the circuit. The following table summarizes operation.
S
1
S2
S
3
S4
1 0 0 1
0 1 1 0
Result
Motor moves
right
Motor moves
left
0 1 0 1 Motor brakes
H-Bridge Driver:
The switching property of this H-Bridge can be replace by a Transistor or a Relay or a
Mosfet or even by an IC. Here we are replacing this with an IC named L293D as the
driver whose description is as given below.
Features:
PER CHANNEL
PER CHANNEL
ENABLE FACILITY
OVERTEMPERATURE PROTECTION
DESCRIPTION
The Device is a monolithic integrated high voltage, high current four channel driver
designed toaccept standard DTL or TTL logic levels and drive inductive loads (such as
relays solenoides, DCand stepping motors) and switching power transistors. To simplify
use as two bridges each pair of channels is equipped with an enable input. A separate
supply input is provided for the logic, allowing operation at a lower voltage and internal
clamp diodes are included. This device is suitable for use in switching applications at
frequencies up to 5 kHz. The L293D is assembled in a 16 lead plastic packaage which has
4 center pins connected together and used for heatsinkingThe L293DD is assembled in a
20 lead surface mount which has 8 center pins connected together and used for
heatsinking.
BLOCK DIAGRAM
PIN CONNECTIONS
FIRE SENSOR:
Flame detection is the technology for detecting flames, using a flame
detector. Flame detectors are optical equipment for the detection of flame
phenomena of a fire. There are two categories of flame detection:
1.1 Ultraviolet
2 Emission of radiation
3 Sunlight
4 Heat radiation
5 Cone of vision
Spectrum
Ultraviolet
An ultraviolet (UV) sensor is often sensitive for radiation in the 185 to
260 nm range. This frequency range is the least sensitive for
natural background radiation sources like cosmic radiation and especially
sunlight. The sunlight is, in the higher frequencies, absorbed by almost all
vapours and gases; especially by ozone and smoke but also by an oil or
grease film on the window of a flame detector. Almost every fire
radiates UV light, and the UV sensor is a good all round flame detector. A
disadvantage is that quite a few artificial false-alarm sources occur;
like halogen and quartz lighting (without regular glass), electrical welding,
corona and static arcs.
Visible light
A visible light sensor (for example a camera: 0.4 to 0.7 m) is able to
present an image, which can be understood by a human being. Furthermore
complex image processing analysis can be executed by computers, which
can recognize a flame or even smoke. Unfortunately, a camera can be
blinded, like a human, by heavy smoke and by fog. It is also possible to mix
visible light information (monitor) with UV or Infrared information, which
in this case is made visible. The corona camera is an example of this
equipment. In this equipment the information of an UV camera mixed with
visible image information. It is used for tracing defects in high
voltage equipment and fire detection over high distances.
Near Infrared
A near Infrared(IR) sensor (0.7 to 1.1 m) is especially able to monitor
flame phenomena, without too much hindrance from water and water
vapour. Pyroelectric sensors operating at this wavelength can be relatively
cheap. Multiple channel or pixel array sensors monitoring flames in the near
IR band are arguably the most reliable technologies available for detection
of fires. Light emission from a fire forms an image of the flame at a
particular instant. Digital image processing can be utilized to recognize
flames through analysis of the video created from the near IR images.
Wideband infrared
A wideband infrared sensor (1.1 m and higher) monitors especially the heat
radiation of a fire. A special frequency range is 4.3 to 4.4 m. This is a
resonance frequency of [[CO2]]. During burning of ahydrocarbon (for
example, wood or fossil fuels such as oil and natural gas) much heat and
CO2 is released. The hot CO2 emits much energy in its resonance frequency
of 4.3 m. This causes a peak in the total radiation emission and can be well
detected. Moreover, the "cold" CO2 in the air is taking care that the sunlight
and other IR radiation is filtered. This makes the sensor in this frequency
"Solar blind", however sensitivity is reduced by sunlight. By observing the
flicker frequency of a fire (1 to 20 Hz) the detector is made less sensitive to
false alarms, caused by heat radiation, for example caused by hot machinery.
Multi-Infrared detectors make use of algorithms to suppress the effects of
background radiation (blackbody radiation), again sensitivity is reduced by
this radiation.
A severe disadvantage is that almost all radiation can be absorbed by water
or water vapour, but particularly this is valid for infrared flame detection in
the 4.3 to 4.4 m region. From approx. 3.5 m and higher the absorption by
water or ice is practically 100%. This makes the infrared sensor for use in
outdoor applications very unresponsive to fires. The biggest problem is our
ignorance, some infrared detectors have an (automatic) detector window self
test, but this self test only monitors the occurrence of water or ice on the
detector window.
A salt film is also harmful, because salt absorbs water. However, water
vapour, fog or light rain also makes the sensor almost blind, without the user
knowing. The cause is similar to what a fire fighter does if he approaches a
hot fire: he protects himself by means of a water vapour screen against the
enormous infrared heat radiation. The presence of water vapor, fog, or light
rain will then also "protect" the monitor causing it to not see the fire. Visible
light will, however be transmitted through the water vapour screen, as can
easily been seen by the fact that a human can still see the flames through the
water vapour screen.
Emission of radiation
Emission of radiation
A fire emits radiation, which human eye experiences as the visible yellow
red flames and heat. In fact, during a fire, relatively sparsely UV energy and
visible light energy is emitted, as compared to the emission of Infrared
radiation. A non-hydrocarbon fire, for example, one from hydrogen, does not
show a CO2 peak on 4.3 m because during the burning of hydrogen no
CO2 is released. The 4.3 m CO2 peak in the picture is exaggerated, and is in
reality less than 2% of the total energy of the fire. A multi-frequencydetector with sensors for UV, visible light, near IR and/or wideband IR thus
have much more "sensor data" to calculate with and therefore are able to
detect more types of fires and to detect these types of fires better:
hydrogen, methanol, ether orsulphur. It looks like a static picture, but in
reality the energy fluctuates, or flickers. This flickering is caused by the fact
that the aspirated oxygen and the present combustible are burning and
concurrently aspirate new oxygen and new combustible material. These little
explosions cause the flickering of the flame.
Sunlight
Sunlight transmission
Heat Radiation
Infrared flame detectors suffer from Infrared heat radiation which is not
emitted by the possible fire. One could say, that the fire can be masked by
other heat sources. All objects which have a temperature higher than the
absolute minimum temperature (0 kelvins or 273.15 C) emit energy and at
room temperature (300 K) is this heat already a problem for the infrared
flame detectors with the highest sensitivity. Sometimes a moving hand is
sufficient to get the IR flame detector in an alarm. At 700 K a hot object
(black body) already starts to emit visible light (glowing). Dual- or multiinfrared detectors suppress the effects of heat radiation by means of sensors
which detect just off the CO2 peak; for example on 4.1 m. Here it is
Detection Range
The range of a flame detector is highly determined by the mounting location.
In fact, when making a projection, one should imagine in what the flame
detector sees. A rule of thumb is, that the mounting height of the flame
detector is twice as high as the highest object in the field of view. Also the
accessibility of the flame detector must be taken into account, because of
maintenance and/or repairs. A rigid light-mast with a pivot point is for this
reason recommendable. A roof on top of the flame detector (30 x 30 cm, 1
x 1-foot) prevents quick pollution in outdoor applications. Also the shadow
effect must be considered. The shadow effect can be minimized by mounting
a second flame detector in the opposite of the first detector. A second
advantage of this approach is, that the second flame detector is a redundant
one, in case the first one is not working or is blinded. In general, when
mounting several flame detectors, one should let them look to each other
not let them look to the walls. Following this procedure blind spots (caused
by the shadow effect) can be avoided and a better redundancy can be
achieved than if the flame detectors would look from the central position
into the to be protected area. The range of flame detectors to the 30 x 30 cm,
1 x 1-foot industry standard fire is stated within the manufacturers data
sheets and manuals, this range can be affected by the previously stated desensitizing effects of sunlight, water, fog, steam and blackbody radiation.
The square law
Square Law
The square law applies to flame detection and relates the flame area and the
distance from the flame to the flame detector: If a flame detector can detect a
fire with an area A on a certain distance, then a 4 times bigger flame area is
necessary if the distance between the flame detector and the fire is doubled.
In short:
Double distance = four times bigger flame area (fire).
This law is valid for all flame detectors, also for the ones, which are based
on camera technique. It is a law, which is valid for all optical detectors. The
maximum sensitivity can be determined by dividing the maximum flame
area A by the square of the distance between the fire and the flame
detector: c =A/d2. With this constant c can, for the same flame detector and
the same type of fire, the maximum distance or the minimum fire area be
calculated:A = cd2 and d = (A/c). It must be emphasized, however, that the
square root in reality is not valid anymore at very high distances. At long
distances other parameters are playing a significant part; like the occurrence
of water vapour and of cold CO2 in the air. In the case of a very small flame,
on the other hand, the decreasing flickering of the flame will play an
increasing part.
GSM-Introduction
Architecture
Technical Specifications
Frame Structure
Channels
Security
Characteristics and features
Applications
Definition:
Global System for Mobile (GSM) is a second generation cellular standard
developed to cater voice services and data delivery using digital modulation.
GSM-History
Developed by Group Special Mobile (founded 1982) which was an
initiative of
GSM IN WORLD
GSM IN INDIA
GSM SERVICES
Tele-services
Bearer or Data Services
Supplementary services
Tele-services
Telecommunication services that enable voice communication
via mobile phones
Offered services
- Mobile telephony
- Emergency calling
Include various data services for information transfer between GSM and other
networks like PSTN, ISDN etc at rates from 300 to 9600 bps
Short Message Service (SMS)
Supplementary services
Call related services :
Call Forwarding- Calls can be sent to various numbers defined by the user
contains
IMSI,MSISDN,prepaid/postpaid,roaming
restrictions,and
supplementary services.
Visitor Location Registers (VLR)
-
Database
contains
IMSI,TMSI,MSISDN,MSRN,Location
Area,authentication key
AuthenticationCenter (AUC)
-
Made up of three sub-classes: The White List, The Black List and
the Gray List
GSM Specifications-1
RF Spectrum
GSM 900
Mobile to BTS (uplink): 890-915 Mhz
BTS to Mobile(downlink):935-960 Mhz
Bandwidth : 2* 25 Mhz
GSM 1800
Mobile to BTS (uplink): 1710-1785 Mhz
BTS to Mobile(downlink) 1805-1880 Mhz
Bandwidth : 2* 75 Mhz
GSM Specification-II
Carrier Separation : 200 Khz
Duplex Distance
: 45 Mhz
: TDMA/FDMA
OPERATION OF GSM
Call Routing
Call Originating from MS
Call termination to MS
Outgoing Call
MSC checks VLR if MS is allowed the requested service. If so,MSC asks BSS
7, 8,
9, 10
Answer back (ring back) tone is routed from called user to MS via
GMSC,MSC,BSS
Incoming Call
GSM-R
Telemetry System
- Fleet management
- Automatic meter reading
- Toll Collection
- Remote control and fault reporting of DG sets
Value Added Services
RELAYS
Relay and Switch:
1. Mechanical relay:
Typical Mechanical Relay connection pin
This is a very important section. The introduction to this electrical control switch, call a
Relay. It is basically a device to activate a mechanical switch, by electrical means. This is
unlike a switch which is
activated manually. In another words it is a device that convert electrical signal to a
mechanical energy back to electrical signal again.Similar to mechanical switch, they can
be described as 2P2T, single
pole double throw, etc...
How it works? A electrical voltage will be applied to activate a coil in the relay. The
coil being powered up, will generate a magnetic force that will attract the lever. This lever
will be pulled towards the magnetized coil, causing an action that will switch the
mechanical contact.
Why on earth this relay is for? Why is there a need to convert electrical to mechanical
to electrical again?
A example would be that you may want to switch on your home 230Vac power remotely
from your friend house 1km away. To do this, one possibility is to lay cables thick
between your friend's home and your home. The cable must be thick enough to handle the
high current and 230Vac voltage. Using a 230Vac rated switch, which is relatively bigger
in size, it can be mounted in your friends home in order
to do the switching.
Another cool method is that you can deploy a relay to help switching the 230Vac in
your own house, while a thinner wire and lower rating
switch laid across your friend's house. This is one of the use of a relay.To be exact, the
relay helps to control energy from a electrical signal to
a mechanical energy to electrical power. Other application can be, controlling a high
power motor using tiny switch, or to switch on the house lightings using your computer
system digital signal.
The application of relay is important, as it is still widely used in control application. It
can be thought of as a amplifier. A powered signal can be produced by using a small
signal. This principle is similar to the use of a transistor as a switch. Knowledge in the
relay will certainly aid understanding the transistor, commonly seen in circuit interfacing.
Another common use of relay is to act as a isolator output for communication or I/O
between unknown electrical system. This isolated output acts as a mean for electronic
hardware to communicate
without affecting another electronics system. System design will be simpler, while
integration/troubleshooting work will be easier and
faster, because system can be isolated easily.
For example, one company may have a robotic application which require mobility
and high current discharge. A 12V SLA sealed lead acid battery would certainly meet this
requirement. A mobile phone
company is following the market trend and will be designing a 3.3V electronics circuits
which has the advantage of size and energy efficiency. Another one may choose to deploy
5V system, because they have been using some critical component which requires 5V.
How are their design able to communicate or control another system using a different
voltage system. They may use communication standard like
RS232 to communication between systems. However the design will be considerably too
complex if the communication requires only 1 bit of information, either on or off.
The operation of a relay as an isolated output is simple. The system X that activate the
relay provides a switch contact to indicate logic 1 or 0 to the receiving system Y. Y
provides its own power and interfacing circuit to sense if the switch is close or open.
Since there is no voltage interaction between the two system, some people defined this as
a "Dry Contact interface". System X activating the relay has provides a "Dry Contact" or
a switch contact output without any electrical signal transmitted to system Y. Dry contact
does not mean that no electrical current flow. It simply mean that Y will provide its own
electrical circuit to obtain the output signal from X. For further information on detecting
switch status, you can refer to the section on mechanicalswitch.
2. Reed relay :
Reed Relay is a smaller version of relay. Package is inplastic. It is about the same
size as a 14 pin DIP IC socket. It has a slightly different magnetize structure,however the
principle is the same as a mechanical relay. Since it is small, this reed relay is suitable for
handling signal, and not high power or high current drawing load. Switching sound is
hardly noticeable. You can still be able to hear some tick tick sound when it is activate.
Switching speed is considerable faster than a relay because the switch mechanism inside
the package is small.
Application for a reed relay can be for output signal isolation purposes or for
switching on small current load. Example of small load devices that can be switched on
might be LED, DC buzzer, relay, circuit or sensors. Typical current handling capacity is
of about 0.5A load.
Reed relay comes in different type of forms. Forms
refers to the nature of the switch contact. For further
information on "contact forms", refer to the switch
section above.
Switch:
1.Wire connection:
Long long time ago, circuit connection is achieved usingmuscular means. The
telephone network is one of a majorcommunication system in the early days. To Call your
buddynext block, the first step you have to do is to pick up the phone. A human operator
will attend to your pick up. Speakto her about the intention to talk to your buddy. The
operator will manually plunk in wire connector linking your home telephone to your
buddy phone. And Yes, you can now talk to your friend because there are operator doing
the switching at the end of your telephone line.
Sounds a lot of manual work. Yes, this is the good old days. The telephone operators in
the central telephone exchange house, are making the circuit connection manually. This is
what this page is all about. All about switches.All about making a good short circuit. Not
all short circuit is bad. In fact they are the fundamental building blocks in digital
electronics. Many electronic design/interface are as simple as a switch.In the articles that
follows, it will be about the various type of electronics components that can help you in
the creation of the perfect short circuits.
2.Mechanical switch:
Mechanical switches is a simple type of interface to control electrical stuff using the
means of some mechanical action. In short, a switch is a mechanical to electrical
conversion device. I can't find any history on the evolution of the mechanical switches. I
guess people might have become smarter. Rather than using a jumper wire to make
connection manually, human invented switch to make short circuiting task more efficient.
Tedious and time consuming work. Plucking the wires in and out
takes a lot more effort, compare to toggling switches.Of course mechanical switches are
not suitable for telephone exchange application for the millions of household. However
understand the roles of switches..
The greatest thing to understand about switches is allabout the component/device
rating. Some people
refer it as the power handling capacity, which is the voltage and the current. The voltage
it can handle across the switch terminals without destroying itself. Sometimes refer to as
the breakdown voltage. The maximum amount of current that can flow through, without
destroying itself. Sometimes refer to as the load current the switch can support.
In fact, the whole idea of this "switch" thingy is aboutunderstanding the rating and
capabilities of the various type of electronics components. I mean it applies to all the
electronics devices, includingeven wires. To me, this is also the most important concept
towards understanding of all other electronics. It is so important. Fortunately it is also
easy to understand, if you pay enough attention in this topic. Not just switch have rating.
Wire also have it's rating, since we know that switch is in fact another form of wire, or to
be precise we call it a conductor. Like the size of a water pipe, there is a limit on the
water flow rate. If the pipe diameter size is small, flow rate will be small too. Larger
diameter pipe more water can flow. This is what they mean by the term "current rating".
Larger wire size can carry more current. Small wire may also carry the same current at
the expense of increase temperature. When it gets too hot, the wire will just burn off, just
like what a fuse do.
KEIL SOFTWARE:
Keil compiler is software used where the machine
language code is written and compiled. After compilation,
the machine source code is converted into hex code which is
to be dumped into the microcontroller for further processing.
Keil compiler also supports C language code.
STEPS TO WRITE AN ASSEMBLY LANGUAGE PROGRAM
IN KEIL AND HOW TO COMPILE IT:
1. Install the Keil Software in the PC in any of the drives.
2. After installation, an icon will be created with the name
Keil uVision3. Just drag this icon onto the desktop so
that it becomes easy whenever you try to write
programs in Keil.
3. Double click on this icon to start the keil compiler.
4. A page opens with different options in it showing the
project workspace at the leftmost corner side, output
window in the bottom and an ash coloured space for
the program to be written.
5. Now to start using the keil, click on the option project.
6. A small window opens showing the options like new
project, import project, open project etc. Click on New
project.
and
now
the
family
of
microcontrollers
10.
17.
mode.
21.
Procedure Steps
Step-1:
Install Keil MicroVision-2 in your PC, Then after Click on
that Keil UVision-2 icon. After opening the window go
to toolbar and select Project Tab then close previous
project.
Step-2:
Next select New Project from Project Tab.
Step-3:
Then it will open Create New Project window. Select
the path where you want to save project and edit project
name.
Step-4:
Next it opens Select Device for Target window, It
shows list of companies and here you can select the device
manufacturer company.
Step-5:
For an example, for your project purpose you can select
the chip as 89c51/52 from Atmel Group. Next Click OK
Button, it appears empty window here you can observe left
side a small window i.e, Project Window. Next create a new
file.
Step-6:
From the Main tool bar Menu select File Tab and go to
New, then it will open a window, there you can edit the
program.
Step-7:
Here you can edit the program as which language will
you prefer either Assembly or C.
Step-8:
After editing the program save the file with extension as
.c or .asm, if you write a program in Assembly Language
save as .asm or if you write a program in C Language save
as .c in the selected path. Take an example and save the
file as test.c.
Step-9:
Then after saving the file, compile the program. For compilation go to project
window select source group and right click on that and go to Add files to Group.
Step-9:
Here it will ask which file has to Add. For an example
here you can add test.c as you saved before.
Step-9:
After adding the file, again go to Project Window and
right click on your c file then select Build target for
compilation. If there is any Errors or Warnings in your
program you can check in Output Window that is shown
bottom of the Keil window.
Step-10:
Here in this step you can observe the output window for
errors and warnings.
Step-11:
If you make any mistake in your program you can check
in this slide for which error and where the error is by clicking
on that error.
Step-12:
After compilation then next go to Debug Session. In Tool
Bar menu go to Debug tab and select Start/Stop Debug
Session.
Step-13:
Here a simple program for Leds Blinking. LEDS are
connected to PORT-1. you can observe the output in that
port.
Step-14:
To see the Ports and other Peripheral Features go to
main toolbar menu and select peripherals.
Step-15:
In this slide see the selected port i.e, PORT-1.
Step-16:
Start to trace the program in sequence manner i.e, step
by step execution and observe the output in port window.
Step-17:
After completion of Debug Session Create an Hex file
for Burning the Processor. Here to create an Hex file go to
project window and right click on Target next select Option
for Target.
Step-18:
It appears one window; here in target tab modify the
crystal frequency as you connected to your microcontroller.
Step-19:
Next go to Output tab. In that Output tab click on
Create HEX File and then click OK.
Step-16:
Finally Once again compile your program. The Created
Hex File will appear in your path folder.
1
Project implementation