CHAPTER-1
HITS-COE 1 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
An embedded system can be defined as a computing device that does a specific focused
job. Appliances such as the air-conditioner, VCD player, DVD player, printer, fax machine,
mobile phone etc. are examples of embedded systems. Each of these appliances will have a
processor and special hardware to meet the specific requirement of the application along with
the embedded software that is executed by the processor for meeting that specific requirement.
The embedded software is also called “firm ware”. The desktop/laptop computer is a general
purpose computer. You can use it for a variety of applications such as playing games, word
processing, accounting, software development and so on. In contrast, the software in the
embedded systems is always fixed listed below:
HITS-COE 2 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
The operating system runs above the hardware, and the application software runs above
the operating system. The same architecture is applicable to any computer including a desktop
computer. However, there are significant differences. It is not compulsory to have an operating
system in every embedded system. For small appliances such as remote control units, air
conditioners, toys etc., there is no need for an operating system and you can write only the
software specific to that application. For applications involving complex processing, it is
advisable to have an operating system. In such a case, you need to integrate the application
software with the operating system and then transfer the entire software on to the memory
chip. Once the software is transferred to the memory chip, the software will continue to run for
a long time you don’t need to reload new software.
Now, let us see the details of the various building blocks of the hardware of an
embedded system. As shown in Fig. the building blocks are;
HITS-COE 3 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is a
low-cost processor. Its main attraction is that on the chip itself, there will be many other
components such as memory, serial communication interface, analog-to digital converter etc.
So, for small applications, a micro-controller is the best choice as the number of external
components required will be very less. On the other hand, microprocessors are more powerful,
but you need to use many external components with them. D5P is used mainly for applications
in which signal processing is involved such as audio and video processing.
Memory:
The memory is categorized as Random Access 11emory (RAM) and Read Only
Memory (ROM). The contents of the RAM will be erased if power is switched off to the chip,
whereas ROM retains the contents even if the power is switched off. So, the firmware is stored
in the ROM. When power is switched on, the processor reads the ROM; the program is
program is executed.
Input devices:
Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the embedded
system is no easy task. Many embedded systems will have a small keypad-you press one key
to give a specific command. A keypad may be used to input only the digits. Many embedded
systems used in process control do not have any input device for user interaction; they take
HITS-COE 4 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
inputs from sensors or transducers 1’fnd produce electrical signals that are in turn fed to other
systems.
Output devices:
The output devices of the embedded systems also have very limited capability. Some
embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status
of the system modules, or for visual indication of alarms. A small Liquid Crystal Display
(LCD) may also be used to display some important parameters.
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:
Sensors, transducers, special processing and control circuitry may be required fat an
embedded system, depending on its application. This circuitry interacts with the processor to
carry out the necessary work. The entire hardware has to be given power supply either through
the 230 volts main supply or through a battery. The hardware has to design in such a way that
the power consumption is minimized.
Nearly 99 per cent of the processors manufactured end up in embedded systems. The
embedded system market is one of the highest growth areas as these systems are used in very
market segment- consumer electronics, office automation, industrial automation, biomedical
engineering, wireless communication,data communication, telecommunications,
transportation, military and so on.
Consumer Appliances:
At home we use a number of embedded systems which include digital camera, digital
diary, DVD player, electronic toys, microwave oven, remote controls for TV and air-
conditioner, VCO player, video game consoles, video recorders etc. Today’s high-tech car has
about 20 embedded systems for transmission control, engine spark control, air-conditioning,
HITS-COE 5 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
navigation etc. Even wristwatches are now becoming embedded systems. The palmtops are
powerful embedded systems using which we can carry out many general-purpose tasks such as
playing games and word processing.
Office Automation:
The office automation products using em embedded systems are copying machine, fax
machine, key telephone, modem, printer, scanner etc.
1.4 HARDWARE :
LCD : HD44780
DC motor
Driver IC : L293D
Power supply
Filter : 1000uf/25V
SOFTWARE :
KEIL MICROVISION
PROTEUS
APPLICATIONS:
Industrial applications
Robotic applications
Railways
HITS-COE 6 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
HITS-COE 7 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
CHAPTER-2
HITS-COE 8 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
GENERAL DESCRIPTION
2.1 MICROCONTROLLER:
Microprocessors and microcontrollers are widely used in embedded systems products.
Microcontroller is a programmable device. A microcontroller has a CPU in addition to a fixed
amount of RAM, ROM, I/O ports and a timer embedded all on a single chip. The fixed amount
of on-chip ROM, RAM and number of I/O ports in microcontrollers makes them ideal for
many applications in which cost and space are critical.
The Intel 8051 is Harvard architecture, single chip microcontroller (µC) which was
developed by Intel in 1980 for use in embedded systems. It was popular in the 1980s and early
1990s, but today it has largely been superseded by a vast range of enhanced devices with 8051-
compatible processor cores that are manufactured by more than 20 independent manufacturers
including Atmel, Infineon Technologies and Maxim Integrated Products.8051 is an 8-bit
processor, meaning that the CPU can work on only 8 bits of data at a time. Data larger than 8
bits has to be broken into 8-bit pieces to be processed by the CPU. 8051 is available in
different memory types such as UV-EPROM, Flash and NV-RAM.
HITS-COE 9 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
Description:
The AT89s52 is a low-voltage, high-performance CMOS 8-bit microcomputer with 8K bytes
of Flash programmable memory. The device is manufactured using Atmel’s high density
nonvolatile memory technology and is compatible with the industry-standard MCS-51
instruction set. The on chip flash allows the program memory to be reprogrammed in system or
by a conventional non volatile memory programmer. By combining a versatile 8-bit CPU with
Flash on a monolithic chip, the Atmel AT89s52 is a powerful microcomputer, which provides
a highly flexible and cost-effective solution to many embedded control applications.In
addition, the AT89s52 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.
HITS-COE 10 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
HITS-COE 11 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
HITS-COE 12 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
VCC
Supply voltage
GND
Ground
Port 0
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs.
Port 0 can also be configured to be the multiplexed low order address/data bus during
access to external program and data memory. In this mode, P 0 has internal pull-ups. Port 0
also receives the code bytes during Flash programming and outputs the code bytes during
program verification. External pull-ups are required during program verification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The port 1output buffers
can sink/source four TTL inputs. When 1s are written to port 1 pins, they are pulled high by
the internal pull-ups can be used as inputs. As inputs, Port 1 pins that are externally being
pulled low will source current (1) because of the internal pull-ups.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The port 2 output buffers
can sink/source four TTL inputs. When 1s are written to port 2 pins, they are pulled high by
the internal pull-ups can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current because of the internal pull-ups.Port 2 emits the high-order
address byte during fetches from external program memory and during access to DPTR. In this
application Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external
data memory that use 8-bit data address (MOVX@R1), Port 2 emits the contents of the P2
Special Function Register. Port 2 also receives the high-order address bits and some control
signals during Flash programming and verification.
HITS-COE 13 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
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 can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will source current because of the internal pull-ups.
Port 3 also receives some control signals for Flash Programming and verification.
RST
Rest input A on this pin for two machine cycles while the oscillator is running resets the
device.
HITS-COE 14 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
ALE/PROG:
Address Latch Enable is an output pulse for latching the low byte of the address during
access 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/16 the oscillator frequency and may
be used for external timing or clocking purpose. Note, however, that one ALE pulse is skipped
during each access to external Data memory.
PSEN
Program Store Enable is the read strobe to external program memory when the AT89c51
is executing code from external program memory PSEN is activated twice each machine cycle,
except that two PSEN activations are skipped during each access to external data memory.
EA /VPP
External Access Enable (EA) must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000h up to FFFFH. Note,
however, that if lock bit 1 is programmed EA will be internally latched on reset. EA should be
strapped to Vcc for internal program executions. This pin also receives the 12-volt
programming enable voltage (Vpp) during Flash programming when 12-volt programming is
selected.
• Timer/Counters
• Interrupt System
Types of memory:
The 89C51 have three general types of memory. They are on-chip memory, external
Code memory and external Ram. On-Chip memory refers to physically existing memory on
HITS-COE 15 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
the micro controller itself. External code memory is the code memory that resides off chip.
This is often in the form of an external EPROM. External RAM is the Ram that resides off
chip. This often is in the form of standard static RAM or flash RAM.
Code memory
Code memory is the memory that holds the actual 89C51 programs that is to be run.
This memory is limited to 64K. Code memory may be found on-chip or off-chip. It is possible
to have 4K of code memory on-chip and 60K off chip memory simultaneously. If only off-chip
memory is available then there can be 64K of off chip ROM. This is controlled by pin
provided as EA
Internal RAM
The 89C51 have a bank of 128 of internal RAM. The internal RAM is found on-chip.
So it is the fastest Ram available. And also it is most flexible in terms of reading and writing.
Internal Ram is volatile, so when 89C51 is reset, this memory is cleared. 128 bytes of internal
memory are subdivided. The first 32 bytes are divided into 4 register banks. Each bank
contains 8 registers. Internal RAM also contains 128 bits, which are addressed from 20h to
2Fh. These bits are bit addressed i.e. each individual bit of a byte can be addressed by the user.
They are numbered 00h to 7Fh. The user may make use of these variables with commands
such as SETB and CLR.
HITS-COE 16 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
Intel offers a form of flash memory that holds two bits (rather than one) in each memory cell,
thus doubling the capacity of memory without a corresponding increase in price.
Flash memory is used in digital cellular phones, digital cameras, LAN switches, PC
Cards for notebook computers, digital set-up boxes, embedded controllers, and other devices.
HITS-COE 17 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
Memory
The AT89C51 has separate address spaces for program and data memory. The program
and data memory can be up to 64K bytes long. The lower 4K program memory can reside on-
chip. The AT89C51 has 128 bytes of on-chip RAM.The lower 128 bytes can be accessed
either by direct addressing or by indirect addressing. The lower 128 bytes of RAM can be
divided into 3 segments as listed below
1. Register Banks 0-3: locations 00H through 1FH (32 bytes). The device after reset defaults
to register bank 0. To use the other register banks, the user must select them in software. Each
register bank contains eight 1-byte registers R0-R7. Reset initializes the stack point to location
07H, and is incremented once to start from 08H, which is the first register of the second
register bank.
2. Bit Addressable Area: 16 bytes have been assigned for this segment 20H-2FH. Each one of
the 128 bits of this segment can be directly addressed (0-7FH). Each of the 16 bytes in this
segment can also be addressed as a byte.
3. Scratch Pad Area: 30H-7FH are available to the user as data RAM. However, if the data
pointer has been initialized to this area, enough bytes should be left aside to prevent SP data
destruction.
HITS-COE 18 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
The Special Function Registers (SFR's) are located in upper 128 Bytes direct addressing
area. The SFR Memory Map in shows that.
Not all of the addresses are occupied. Unoccupied addresses are not implemented on the
chip. Read accesses to these addresses in general return random data, and write accesses have
no effect. User software should not write 1s to these unimplemented locations, since they may
be used in future microcontrollers to invoke new features. In that case, the reset or inactive
values of the new bits will always be 0, and their active values will be 1.
Accumulator (ACC)
B Register (B)
The B register is used during multiply and divide operations. For other instructions it
can be treated as another scratch pad register.
The Stack Pointer Register is eight bits wide. It is incremented before data is stored
during PUSH and CALL executions. While the stack may reside anywhere in on chip RAM,
the Stack Pointer is initialized to 07H after a reset. This causes the stack to begin at location
08H.
The Data Pointer consists of a high byte (DPH) and a low byte (DPL). Its function is to
hold a 16-bit address. It may be manipulated as a 16-bit register or as two independent 8-bit
registers.
HITS-COE 19 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
The Serial Data Buffer is actually two separate registers, a transmit buffer and a receive
buffer register. When data is moved to SBUF, it goes to the transmit buffer, where it is held for
serial transmission. (Moving a byte to SBUF initiates the transmission.) When data is moved
from SBUF, it comes from the receive buffer.
Timer Registers
Register pairs (TH0, TL0) and (TH1, TL1) are the 16-bit Counter registers for
Timer/Counters 0 and 1, respectively.
Control Registers
Special Function Registers IP, IE, TMOD, TCON, SCON, and PCON contain control
and status bits for the interrupt system, the Timer/Counters, and the serial port.
HITS-COE 20 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
CHAPTER-3
HITS-COE 21 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
POWER SUPPLY
HITS-COE 22 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
3.3 TRANSFORMER:
A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled conductors—the transformer's coils. A varying current in the first
or primary winding creates a varying magnetic flux in the transformer's core, and thus a
varying magnetic field through the secondary winding. This varying magnetic field induces a
varying electromotive force (EMF) or "voltage" in the secondary winding. This effect is called
mutual induction.
(or)
Transformer is a device that converts the one form energy to another form of energy like a
transducer.
Figure:3.3.2 Transformer
HITS-COE 23 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
A transformer consists of two coils (often called 'windings') linked by an iron core, as
shown in figure below. There is no electrical connection between the coils, instead they are
linked by a magnetic field created in the core.
Transformers are used to convert electricity from one voltage to another with minimal
loss of power. They only work with AC (alternating current) because they require a changing
magnetic field to be created in their core. Transformers can increase voltage (step-up) as well
as reduce voltage (step-down).Alternating current flowing in the primary (input) coil creates a
continually changing magnetic field in the iron core. This field also passes through the
secondary (output) coil and the changing strength of the magnetic field induces an alternating
voltage in the secondary coil. If the secondary coil is connected to a load the induced voltage
will make an induced current flow. The correct term for the induced voltage is 'induced
electromotive force' which is usually abbreviated to induced e.m.f.The iron core is laminated to
prevent 'eddy currents' flowing in the core. These are currents produced by the alternating
magnetic field inducing a small voltage in the core, just like that induced in the secondary coil.
Eddy currents waste power by needlessly heating up the core but they are reduced to a
negligible amount by laminating the iron because this increases the electrical resistance of the
core without affecting its magnetic properties.
Transformers have two great advantages over other methods of changing voltage:
HITS-COE 24 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
1. They provide total electrical isolation between the input and output, so they can be
safely used to reduce the high voltage of the mains supply.
2. Almost no power is wasted in a transformer. They have a high efficiency (power out /
power in) of 95% or more.
Step-Up Transformer
Step-Down Transformer
Step down transformers are designed to reduce electrical voltage. Their primary voltage
is greater than their secondary voltage. This kind of transformer "steps down" the voltage
applied to it. For instance, a step down transformer is needed to use a 110v product in a
country with a 220v supply.Step down transformers convert electrical voltage from one level
or phase configuration usually down to a lower level. They can include features for electrical
isolation, power distribution, and control and instrumentation applications. Step down
transformers typically rely on the principle of magnetic induction between coils to convert
voltage and/or current levels.
Step down transformers are made from two or more coils of insulated wire wound
around a core made of iron. When voltage is applied to one coil (frequently called the primary
or input) it magnetizes the iron core, which induces a voltage in the other coil, (frequently
called the secondary or output). The turn’s ratio of the two sets of windings determines the
amount of voltage transformation.
Step down transformers can be considered nothing more than a voltage ratio device.
With step down transformers the voltage ratio between primary and secondary will
mirror the "turn’s ratio" (except for single phase smaller than 1 kva which have compensated
secondary). A practical application of this 2 to 1 turn’s ratio would be a 480 to 240 voltage
step down. Note that if the input were 440 volts then the output would be 220 volts. The ratio
between input and output voltage will stay constant. Transformers should not be operated at
voltages higher than the nameplate rating, but may be operated at lower voltages than rated.
Because of this it is possible to do some non-standard applications using standard transformers.
Single phase step down transformers 1 kva and larger may also be reverse connected to
step-down or step-up voltages. (Note: single phase step up or step down transformers sized less
than 1 KVA should not be reverse connected because the secondary windings have additional
turns to overcome a voltage drop when the load is applied. If reverse connected, the output
voltage will be less than desired.)
A step up transformer has more turns of wire on the secondary coil, which makes a
larger induced voltage in the secondary coil. It is called a step up transformer because the
voltage output is larger than the voltage input.Step-up transformer 110v 220v design is one
whose secondary voltage is greater than its primary voltage. This kind of transformer "steps
up" the voltage applied to it. For instance, a step up transformer is needed to use a 220v
product in a country with a 110v supply.
A step up transformer 110v 220v converts alternating current (AC) from one voltage to
another voltage. It has no moving parts and works on a magnetic induction principle; it can be
designed to "step-up" or "step-down" voltage. So a step up transformer increases the voltage
and a step down transformer decreases the voltage.The primary components for voltage
transformation are the step up transformer core and coil. The insulation is placed between the
turns of wire to prevent shorting to one another or to ground. This is typically comprised of
Mylar, nomex, Kraft paper, varnish, or other materials. As a transformer has no moving parts,
it will typically have a life expectancy between 20 and 25 years.
HITS-COE 26 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
Applications:
Diodes:
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol
shows the direction in which the current can flow. Diodes are the electrical version of a valve
and early diodes were actually called valves.
A diode is a device which only allows current to flow through it in one direction. In
this direction, the diode is said to be 'forward-biased' and the only effect on the signal is that
there will be a voltage loss of around 0.7V. In the opposite direction, the diode is said to be
'reverse-biased' and no current will flow through it.
HITS-COE 27 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
Capacitor Filter:
The capacitor-input filter, also called "Pi" filter due to its shape that looks like the
Greek letter pi, is a type of electronic filter. Filter circuits are used to remove unwanted or
undesired frequencies from a signal.
A typical capacitor input filter consists of a filter capacitor C1, connected across the
rectifier output, an inductor L, in series and another filter capacitor connected across the load.
1. The capacitor C1 offers low reactance to the AC component of the rectifier output while
it offers infinite reactance to the DC component. As a result the capacitor shunts an appreciable
amount of the AC component while the DC component continues its journey to the inductor L
2. The inductor L offers high reactance to the AC component but it offers almost zero
reactance to the DC component. As a result the DC component flows through the inductor
while the AC component is blocked.
3. The capacitor C2 bypasses the AC component which the inductor had failed to block.
As a result only the DC component appears across the load RL.
HITS-COE 28 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
78xx:’78’ indicate the positive series and ‘xx’indicates the voltage rating. Suppose 7805
produces the maximum 5V.’05’indicates the regulator output is 5V.
79xx:’79’ indicate the negative series and ‘xx’indicates the voltage rating. Suppose 7905
produces the maximum -5V.’05’indicates the regulator output is -5V.
Pin3: It is used for output pin. Through this pin we get the output.
HITS-COE 29 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
3.7 BLUETOOTH:
This module enables you to wireless transmit & receive serial data. It is a drop in
replacement for wired serial connections allowing transparent two way data communication.
You can simply use it for serial port replacement to establish connection between MCU or
embedded project and PC for data transfer. Bluetooth Core V2.0 compliant module with SPP.
The module is designed to be embedded in a host system which requires cable replacement
function. Typically the module could interface with a host through the UART port.
• Industrial devices
• Point-of-Sale systems
• PCs
• Computer Accessories
• Access Points
We supply module with 9600 baud rate in ready to use with PC. You will need a USB
Bluetooth Adapter at PC side or Bluetooth Enabled Laptop to connect to our Bluetooth
module. Module supplied by us with this setting: 9600 baud rate, Pair Code: 0000The
Bluetooth module works on 3.3V level only. High voltage like 5V will permanently damage
the module, so please take care in using it.
HITS-COE 31 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
(Internal 22 ohm
serial resistor)
USB_D- A USB data minus
(Internal 22 ohm
serial resistor)
NCTS I UART CTS
(internal pull
down, active low)
PCMI I Synchronous 8
kbps data in
(internal pull-
down)
PCMC I/O Synchronous data
clock (internal
pull-down)
PCMS I/O Synchronous data
strobe (internal
pull-down)
GND GND Ground
GND GND Ground
3V3 VDD Power supply
connection
RES I Reset input (active
low)
PIO6 I/O Programmable I/O
lines
PIO7 I/O Programmable I/O
lines
PIO4 I/O Programmable I/O
lines
NCSB I Chip selection for
SPI (internal pull
HITS-COE 32 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION
This module could both act a SPP master and a SPP slave. When in master mode, the
module could search for all the working SPP slave devices around and the host could select
which to connect. When it is in slave mode, it will listen for connection request from another
SPP master device. Bluetooth UART provides the main interface to exchange data with other
host system using the RS232 protocol. An external commands set is provided for the host
system to control and configure AUBTM-20. Four signals are provide for UART function.
TXD and RXD transmit data between AUBTM-20 and the host. NRTS and NCTS provides the
RS232 hardware flow control mechanism. All UART pins are CMOS logic with signal levels
of 0V to VDD. UART is initially configured to work at 9600 bps baud rate, 8-bit, no parity and
1 stop bit. The host could reconfigure the UART by issuing command.
HITS-COE 33 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
CHAPTER-4
HITS-COE 34 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
HARDWARE
4.1 GAS SENSOR:
In current technology scenario, monitoring of gases produced is very important.
From home appliances such as air conditioners to electric chimneys and safety systems at
industries monitoring of gases is very crucial. Gas sensors are very important part of such
systems. Small like a nose, gas sensors spontaneously react to the gas present, thus keeping
the system updated about any alterations that occur in the concentration of molecules at
gaseous state.
Gas sensors are available in wide specifications depending on the sensitivity levels,
type of gas to be sensed, physical dimensions and numerous other factors. This Insight
covers a methane gas sensor that can sense gases such as ammonia which might get
produced from methane. When a gas interacts with this sensor, it is first ionized into its
constituents and is then adsorbed by the sensing element. This adsorption creates a potential
difference on the element which is conveyed to the processor unit through output pins in
form of current. What is this sensing element? Is it kept in some chamber or is kept
exposed? How does it get current and how it is taken out? Let’s find out in this Insight.
The gas sensor module consists of a steel ex oskeleton under which a sensing element is
housed. This sensing element is subjected to current through connecting leads. This current
is known as heating current through it, the gases coming close to the sensing element get
ionized and are absorbed by the sensing element. This changes the resistance of the sensing
element which alters the value of the current going out of it.
HITS-COE 35 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
4.2 CRYSTAL OSCILLATOR:
The 8051 uses the crystal for precisely that: to synchronize it’s operation.
Effectively, the 8051 operates using what are called "machine cycles." A single machine
cycle is the minimum amount of time in which a single 8051 instruction can be executed.
Although many instructions take multiple cycles. 8051 has an on-chip oscillator. It needs
an external crystal that decides the operating frequency of the 8051. The crystal is
connected to pins 18 and 19 with stabilizing capacitors. 12 MHz (11.059MHz) crystal is
often used and the capacitance ranges from 20pF to 40pF. A cycle is, in reality, 12 pulses
of the crystal. That is to say, if an instruction takes one machine cycle to execute, it will
take 12 pulses of the crystal to execute. Since we know the we can calculate how many
instruction cycles the 8051 can execute per second:
11,059,000 / 12 = 921,583
11.0592 MHz crystals are often used because it can be divided to give you exact clock rates
for most of the common baud rates for the UART, especially for the higher speeds (9600,
19200).
RESET
RESET is an active High input When RESET is set to High, 8051 goes back to the
power on state.The 8051 is reset by holding the RST high for at least two machine cycles
and then returning it low. Initially charging of capacitor makes RST High, When capacitor
charges fully it blocks DC.
HITS-COE 36 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
4.3 DRIVER IC (L293D):
HITS-COE 37 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
phase with their inputs. When the enable input is low, those drivers are disabled and their
outputs are off and in the high-impedance state. With the proper data inputs, each pair of
drivers forms a full-H (or bridge) reversible drive suitable for solenoid or motor
applications. On the L293, external high-speed output clamp diodes should be used for
inductive transient suppression.
A VCC1 terminal, separate from VCC2, is provided for the logic inputs to minimize
device power dissipation. The L293 and L293D are characterized for operation from 0 to
70 degree Celsius.
HITS-COE 38 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
HITS-COE 39 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
Table : 4.5 Controlling the robot to obtain the different directions of movement
The DC motor description is carried out in the next section. The L293D output pins
will be connected to the two motors of Robot. Thus, the output of L293D depends on the
input provided from the microcontroller and the enable pins. It should be remembered that
unless the enable pins are not high, whatever input values given to L293D IC will not be
applied to the motors in any way.
4.6 MOTORS:
Motor is a device that creates motion, not an engine; it usually refers to either an
electrical motor or an internal combustion engine.
It may also refer to:
HITS-COE 40 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
controlled commutation system, instead of a mechanical
commutation system based on brushes
o Electrostatic motor, a type of electric motor based on the attraction and
repulsion of electric charge
o Servo motor, an electric motor that operates a servo, commonly used in
robotics
o Internal fan-cooled electric motor, an electric motor that is self-cooled by a
fan, typically used for motors with a high energy density
TYPES OF MOTORS
Industrial motors come in a variety of basic types. These variations are suitable
for many different applications. Naturally, some types of motors are more suited for
certain applications than other motor types are. This document will hopefully give
some guidance in selecting these motors.
AC Motors
The most common and simple industrial motor is the three phase AC induction
motor, sometimes known as the "squirrel cage" motor. Substantial information can be
found about any motor by checking its (nameplate).
Figure:4.6.1 AC Motors
Advantages
Simple Design
Low Cost
Reliable Operation
HITS-COE 41 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
Easily Found Replacements
Variety of Mounting Styles
DC Motors
The brushed DC motor is one of the earliest motor designs. Today, it is the motor
of choice in the majority of variable speed and torque control applications.
Advantages
The design of the brushed DC motor is quite simple. A permanent magnetic field is
created in the stator by either of two means:
Permanent magnets
Electro-magnetic windings
HITS-COE 42 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
useless motor! However, we are smarter than that. The section of the rotor where the
electricity enters the rotor windings is called the commutator. The electricity is carried
between the rotor and the stator by conductive graphite-copper brushes (mounted on the
rotor) which contact rings on stator. Imagine power is supplied:
The motor rotates toward the pole alignment point. Just as the motor would get to this
point, the brushes jump across a gap in the stator rings. Momentum carries the motor
forward over this gap. When the brushes get to the other side of the gap, they contact the
stator rings again and -- the polarity of the voltage is reversed in this set of rings! The
motor begins accelerating again, this time trying to get to the opposite set of poles. (The
momentum has carried the motor past the original pole alignment point.) This continues
as the motor rotates.In most DC motors, several sets of windings or permanent magnets
are present to smooth out the motion.
Controlling the speed of a brushed DC motor is simple. The higher the armature
voltage, the faster the rotation. This relationship is linear to the motor's maximum speed.
The maximum armature voltage which corresponds to a motor's rated speed (these motors
are usually given a rated speed and a maximum speed, such as 1750/2000 rpm) are
available in certain standard voltages, which roughly increase in conjuntion with
horsepower. Thus, the smallest industrial motors are rated 90 VDC and 180 VDC. Larger
units are rated at 250 VDC and sometimes higher.
Specialty motors for use in mobile applications are rated 12, 24, or 48 VDC. Other
tiny motors may be rated 5 VDC. Most industrial DC motors will operate reliably over a
speed range of about 20:1 -- down to about 5-7% of base speed. This is much better
performance than the comparible AC motor. This is partly due to the simplicity of control,
but is also partly due to the fact that most industrial DC motors are designed with variable
speed operation in mind, and have added heat dissipation features which allow lower
operating speeds.
HITS-COE 43 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
the motor can achieve. This makes this motor ideal for delicate applications such as
textile manufacturing.
The result of this design is that variable speed or variable torque electronics are easy to
design and manufacture. Varying the speed of a brushed DC motor requires little more than
a large enough potentiometer. In practice, these have been replaced for all but sub-
fractional horsepower applications by the SCR and PWM drives, which offer relatively
precisely control voltage and current. Common DC drives are available at the low end (up
to 2 horsepower) for under US$100 -- and sometimes under US$50 if precision is not
important.
Disadvantages
Expensive to produce
Can't reliably control at lowest speeds
Physically larger
High maintenance
Dust
HITS-COE 44 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
Figure:4.7.1 DC Motors
PARTS OF A DC MOTOR
Armature
A D.C. motor consists of a rectangular coil made of insulated copper wire wound on
a soft iron core. This coil wound on the soft iron core forms the armature. The coil is
mounted on an axle and is placed between the cylindrical concave poles of a magnet.
Commutator
Brushes
Two small strips of carbon, known as brushes press slightly against the two split
rings, and the split rings rotate between the brushes.
HITS-COE 45 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
Working of a DC Motor
When the coil is powered, a magnetic field is generated around the armature. The left
side of the armature is pushed away from the left magnet and drawn towards the right,
causing rotation.
When the coil turns through 900, the brushes lose contact with the commutator and the
current stops flowing through the coil.
HITS-COE 46 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
However the coil keeps turning because of its own momentum.
Now when the coil turns through 1800, the sides get interchanged. As a result the
commutator ring C1 is now in contact with brush B2 and commutator ring C2 is in contact
with brush B1. Therefore, the current continues to flow in the same direction.
1. Direction of rotation
2. Motor Speed
3. Motor Torque
4. Motor Start and Stop
Digital systems and microcontroller pins lack sufficient current to drive the circuits
like relays, buzzer circuits etc. While these circuits require around 10milli amps to be
operated, the microcontroller’s pin can provide a maximum of 1-2milli amps current. For
this reason, a driver such as a power transistor is placed in between the microcontroller and
the buzzer circuit.
HITS-COE 47 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
The input to the base of the transistor is applied from the microcontroller port pin
P1.0. The transistor will be switched on when the base to emitter voltage is greater than
0.7V (cut-in voltage). Thus when the voltage applied to the pin P1.0 is high i.e., P1.0=1
(>0.7V), the transistor will be switched on and thus the buzzer will be ON.
When the voltage at the pin P1.0 is low i.e., P1.0=0 (<0.7V) the transistor will be in off
state and the buzzer will be OFF. Thus the transistor acts like a current driver to operate the
buzzer accordingly
HITS-COE 48 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
CHAPTER-5
HITS-COE 49 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
SOFTWARE DESCRIPTION
Keil µv3, Proload are the two software tools used to program microcontroller. The
working of each software tool is explained below in detail.
µVision3
µVision3 is an IDE (Integrated Development Environment) that helps you write, compile,
and debug embedded programs. It encapsulates the following components:
A project manager.
A make facility.
Tool configuration.
Editor.
A powerful debugger.
HITS-COE 50 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
5.2 PROLOAD:
Proload is software which accepts only hex files. Once the machine code is
converted into hex code, that hex code has to be dumped into the microcontroller and this
is done by the Proload. Proload is a programmer which itself contains a microcontroller in
it other than the one which is to be programmed. This microcontroller has a program in it
written in such a way that it accepts the hex file from the Keil compiler and dumps this hex
file into the microcontroller which is to be programmed. As the Proload programmer kit
requires power supply to be operated, this power supply is given from the power supply
circuit designed above. It should be noted that this programmer kit contains a power supply
section in the board itself but in order to switch on that power supply, a source is required.
Thus this is accomplished from the power supply board with an output of 12volts.
HITS-COE 51 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
5.3 FEATURES
Supports major Atmel 89 series devices
Auto Identify connected hardware and devices
Error checking and verification in-built
Lock of programs in chip supported to prevent program copying
20 and 40 pin ZIF socket on-board
Auto Erase before writing and Auto Verify after writing
Informative status bar and access to latest programmed file
Simple and Easy to use
Works on 57600 speed
5.4 DESCRIPTION
It is simple to use and low cost, yet powerful flash microcontroller programmer for
the Atmel 89 series. It will Program, Read and Verify Code Data, Write Lock Bits, Erase
and Blank Check. All fuse and lock bits are programmable. This programmer has
intelligent onboard firmware and connects to the serial port. It can be used with any type of
computer and requires no special hardware. All that is needed is a serial communication
ports which all computers have.All devices have signature bytes that the programmer reads
to automatically identify the chip. No need to select the device type, just plug it in and go!
All devices also have a number of lock bits to provide various levels of software and
programming protection. These lock bits are fully programmable using this programmer.
Lock bits are useful to protect the program to be read back from microcontroller only
HITS-COE 52 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
allowing erase to reprogram the microcontroller. The programmer connects to a host
computer using a standard RS232 serial port. All the programming 'intelligence' is built
into the programmer so you do not need any special hardware to run it. Programmer comes
with window based software for easy programming of the devices.
HITS-COE 53 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
HITS-COE 54 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
CHAPTER-6
HITS-COE 55 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
RESULTS
Assemble the circuit on the PCB as shown in figure 6.1. After assembling the circuit on the
PCB, checked for proper connections before switching on the power supply.
HITS-COE 56 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
HITS-COE 57 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
HITS-COE 58 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
Fig 6.4 Output Of Gas Detection & No Gas Detection Can Be Seen In Mobile Phone
HITS-COE 59 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
CHAPTER-7
HITS-COE 60 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
CONCLUSION AND FUTURE SCOPE
7.1 CONCLUSION
Gas detection robot for atomic power station provide an artificial sense of
smell for a robot to track an airborne gas/odor plume and locate its source. However, a
slow response of gas sensors has been the major factor limiting the development of plume-
tracking robots. This paper describes a new control algorithm that breaks the limitation.
The basic idea is to detect onsets of gas sensor response and starts of recovery by
monitoring the relative change in each sensor output. contrast to the previous algorithm,
based on the absolute sensor output levels, the detection of output change also leads to
reliable plume detection, since it is insusceptible to drift in the gas sensor
outputs.A robot is a mechanical or virtual artificial agent. In practice, it is usually an
electro-mechanical system which, by its appearance or movements, conveys a sense that it
has intent or agency of its own. The word robot can refer to both physical robots
and virtual software agents, but the latter are usually referred to as Robots. There is no
consensus on which machines qualify as robots, but there is general agreement among
experts and the public that robots tend to do some or all of the following: move around,
operate a mechanical arm, sense and manipulate their environment, and exhibit intelligent
behavior, especially behavior which mimics humans or animals.
This project is built on 8051 micro controller with a robotic base on which a gas
sensor is placed. The robot is moves autonomously, whenever the robot senses the
presence of gas the micro controller activates a buzzer o go high to inform the nearest
personnel.This project uses regulated 5V, 500mA power supply. 7805 three terminal
voltage regulator is used for voltage regulation. Full wave bridge rectifier is used to rectify
the ac output of secondary of 230/12V step down transformer.
HITS-COE 61 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
We’re all largely familiar with how current gas leak detection units look and are used, but
what’s the future? As always, demand always dictates the direction of change and it’s not
just the ability to detect more types of gases. Trends would dictate that there is an emphasis
on greater safety and performance and most likely there will be a harmonisation across
performance standards. Wireless technology will also be instrumental in delivering
enhanced safety and helping to reduce ongoing costs which would be a welcome note to
many users. It would cut down costs and also eliminate a lot of causes for false alarms and
general faults (incorrect wiring, cables too long etc.).
Sensors and detection technology have come a very long way in the last 60 years with
portable options and whatever the future holds for the industry, the outlook is good for
those who will use the devices. And you can be sure the Murco will always be a market
leader for ensuring that you have the most up-to-date and advanced gas leak detection units
available. Our devices not only ensure a lower cost for you but the safety of your workers
and your premises are ensured within safe legislative boundaries.
HITS-COE 62 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
APPENDIX PROGRAM CODE
#include <reg51.h>
#define lcd_data P2
sbit smoke=P3^2;
sbit buzzer=P3^7;
void delay(unsigned int ch) //delay function
{
unsigned int i=0,j=0;
for(i=0;i<=ch;i++)
for(j=0;j<=i;j++);
}
void clcd(unsigned char ch)
{
lcd_data=ch&(0xf0); //send msb 4 bits
lcd_rs=0; //select command register
lcd_en=1; //enable the lcd to execute command
delay(25);
lcd_en=0;
lcd_data=((ch<<4)&(0xf0)); //send lsb 4 bits
lcd_rs=0; //select command register
lcd_en=1; //enable the lcd to execute command
delay(25);
lcd_en=0;
}
void dlcd(unsigned char ch)
{
lcd_data=ch&(0xf0); //send msb 4 bits
lcd_rs=1; //select data register
lcd_en=1; //enable the lcd to execute data
delay(25);
lcd_en=0;
lcd_data=((ch<<4)&(0xf0)); //send lsb 4 bits
lcd_rs=1; //select data register
lcd_en=1; //enable the lcd to execute data
delay(25);
lcd_en=0;
HITS-COE 63 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
delay(3);
}
void stringlcd(unsigned char ch,const unsigned char *chrt)
{
unsigned int ix=0;
if(ch==0x80) clcd(0x01);
clcd(ch);
for(ix=0;chrt[ix]!='\0';ix++)
{
dlcd(chrt[ix]);
}
}
void initlcd()
{
clcd(0x02);
clcd(0x02);
clcd(0x28);
clcd(0x28);
clcd(0x0e);
clcd(0x06);
clcd(0x01);
clcd(0x80);
}
void serialinit()
{
TMOD=0x20;// timer1,mode2
SCON=0x50;
TH1=-3;
TR1=1;
}
void tx(unsigned char ch)
{
SBUF=ch;
while(TI==0); //wait until TI=1
TI=0;
}
void txs(unsigned char *chr)
{
unsigned char i=0;
for(i=0;chr[i]!='\0';i++)
tx(chr[i]);
}
unsigned char rx()
{
unsigned char ch;
while(RI==0);
ch=SBUF;
RI=0;
return ch;
HITS-COE 64 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
}
void main()
{
m1a=m1b=0;
m2a=m2b=0;
buzzer=0;delay(100);buzzer=1;delay(100);
buzzer=0;delay(100);buzzer=1;delay(100);
serialinit();
EA=1;ES=1;
initlcd();
stringlcd(0x80,"MOBILE OPERATED");
stringlcd(0xc0," SMOKE SENSING ");
delay(500);
clcd(1);
stringlcd(0x80," ROBOT ");
delay(400);
clcd(1);
while(1)
{
if(smoke==0)
{
clcd(1);stringlcd(0x80,"GAS DETECTED ");
txs("GAS DETECTED\r\n"); delay(100);
buzzer=0;delay(100);buzzer=1;delay(100);
}
if(smoke==1)
{
clcd(1);
stringlcd(0x01,"NO GAS... ");
txs("NO GAS AT THIS PLACE \r\n"); delay(100);
}
delay(300);
}
if(rec == '2')
{
m1a=1;m1b=0;
HITS-COE 65 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
m2a=1;
m2b=0;
stringlcd(0x01,"FRONT");
txs("FRONT \r\n"); delay(100);
}
if(rec == '8')
{
m1a=0;m1b=1;
m2a=0;m2b=1;
stringlcd(0x01,"BACK");
txs("BACK \r\n"); delay(100);
}
if(rec == '4')
{
txs("LEFT \r\n"); delay(100);
m1a=1;m1b=0;
m2a=0;m2b=1;
stringlcd(0x01,"LEFT");
delay(250);
m1a=m1b=m2a=m2b=0;
}
if(rec == '6')
{
txs("RIGHT \r\n"); delay(100);
stringlcd(0x01,"RIGHT");
m1a=0;m1b=1;
m2a=1;m2b=0;
delay(250);
m1a=m1b=m2a=m2b=0;
}
if(rec == '5')
{
txs("STOP \r\n"); delay(100);
m1a=0;m1b=0;
m2a=0;m2b=0;
stringlcd(0x01,"STOP");
}
}
EA=1;
}
HITS-COE 66 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION
REFERENCES
WWW.Wikipedia.Com
HITS-COE 67 2014-2018