Anda di halaman 1dari 67

GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

CHAPTER-1

HITS-COE 1 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

INTRODUCTION TO EMBEDDED SYSTEMS

1.1 WHAT IS AN EMBEDDED SYSTEM

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:

· Embedded systems do a very specific task, they cannot be programmed to do different


things. . Embedded systems have very limited resources, particularly the memory. Generally,
they do not have secondary storage devices such as the CDROM or the floppy disk. Embedded
systems have to work against some deadlines. A specific job has to be completed within a
specific time. In some embedded systems, called real-time systems, the deadlines are stringent.
Missing a deadline may cause a catastrophe-loss of life or damage to property. Embedded
systems are constrained for power. As many embedded systems operate through a battery, the
power consumption has to be very low.Some embedded systems have to operate in extreme
environmental conditions such as very high temperatures and humidity.

1.2 OVERVIEW OF EMBEDDED SYSTEM ARCHITECTURE :

Every embedded system consists of custom-built hardware built around a Central


Processing Unit (CPU). This hardware also contains memory chips onto which the software is
loaded. The software residing on the memory chip is also called the ‘firmware’. The embedded
system architecture can be represented as a layered architecture as shown in Fig.

HITS-COE 2 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

Figure: 1.2.1 Layered architecture of an embedded system

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;

 Central Processing Unit (CPU)


 Memory (Read-only Memory and Random Access Memory)
 Input Devices
 Output devices
 Communication interfaces
 Application-specific circuitry

HITS-COE 3 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

Figure: 1.2.2 Hardware of embedded system

Central Processing Unit (CPU):

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.

1.3 APPLICATION AREAS :

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 :

Micro controller : AT89S52

Crystal : 11.0592 MHz

LCD : HD44780

GSM modem : sim300

DC motor

Driver IC : L293D

Power supply

Transformer : 12V step down

Filter : 1000uf/25V

Voltage Regulator : 7805

SOFTWARE :

KEIL MICROVISION

PROTEUS

APPLICATIONS:

 Industrial applications
 Robotic applications
 Railways

HITS-COE 6 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

1.5 BLOCK DIAGRAM

Figure: 1.5 Block Diagram

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.

Figure: 2.1 8051 Microcontroller

HITS-COE 9 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

2.2 FEATURES OF AT89S52:


 8K Bytes of Re-programmable Flash Memory.
 RAM is 256 bytes.
 4.0V to 5.5V Operating Range.
 Fully Static Operation: 0 Hz to 33 MHz’s
 Three-level Program Memory Lock.
 256 x 8-bit Internal RAM.
 32 Programmable I/O Lines.
 Three 16-bit Timer/Counters.
 Eight Interrupt Sources.
 Full Duplex UART Serial Channel.
 Low-power Idle and Power-down Modes.
 Interrupt recovery from power down mode.
 Watchdog timer.
 Dual data pointer.
 Power-off flag.
 Fast programming time.
 Flexible ISP programming (byte and page mode).

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

Figure : 2.2.1 8051 Pin Diagram

HITS-COE 11 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

Figure : 2.2.2 8051 Block Diagram

HITS-COE 12 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

2.3 PIN DESCRIPTION:

VCC

Supply voltage

GND

Ground

Port 0

Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs.

Port 0 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.

Table 2.3 Port 3 Pin Functions

Port Alternate Functions


pin

P3.0 RXD(serial input port)

P3.1 TXD(serial input port)

P3.2 INT0(external interrupt 0)

P3.3 INT1(external interrupt 1)

P3.4 T0(timer 0 external input)

P3.5 T1(timer 1 external input)

P3.6 WR(external data memory write


strobe)

RD(external data memory read


strobe)

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.

2.4 OPERATING DESCRIPTION:

The detail description of the AT89C51 included in this description is:

• Memory Map and Registers

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

2.5 FLASH MEMORY:

Flash memory (sometimes called "flash RAM") is a type of constantly-powered non


volatile that can be erased and reprogrammed in units of memory called blocks. It is a variation
of electrically erasable programmable read-only memory (EEPROM) which, unlike flash
memory, is erased and rewritten at the byte level, which is slower than flash memory updating.
Flash memory is often used to hold control code such as the basic input/output system (BIOS)
in a personal computer. When BIOS needs to be changed (rewritten), the flash memory can be
written to in block (rather than byte) sizes, making it easy to update. On the other hand, flash
memory is not useful as random access memory (RAM) because RAM needs to be addressable
at the byte (not the block) level. Flash memory gets its name because the microchip is
organized so that a section of memory cells are erased in a single action or "flash." The erasure
is caused by Fowler-Nordheim tunneling in which electrons pierce through a thin dielectric
material to remove an electronic charge from a floating gate associated with each memory cell.

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.

2.6 MEMORY TYPES:

Table 2.6 Memory Types

Memory Type Features

FLASH Low-cost, high-density, high-speed


architecture; low power; high
reliability

ROM Mature, high-density, reliable, low


Read-Only Memory cost; time-consuming mask required,
suitable for high production with
stable code

SRAM Highest speed, high-power, low-


Static Random-Access Memory density memory; limited density
drives up cost

EPROM High-density memory; must be


Electrically Programmable Read-Only exposed to ultraviolet light for erasure
Memory

EEPROM or E2 Electrically byte-erasable; lower


Electrically Erasable Programmable reliability, higher cost, lowest density
Read-Only Memory

DRAM High-density, low-cost, high-speed,


Dynamic Random Access Memory high-power

HITS-COE 17 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

2.7 MEMORY MAP AND REGISTERS

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.

Figure : 2.7 Memory Map And Registers

HITS-COE 18 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

2.8 SPECIAL FUNCTION REGISTERS

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)

ACC is the Accumulator register. The mnemonics for Accumulator-specific


instructions, however, refer to the Accumulator simply as A.

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.

Program Status Word (PSW)

The PSW register contains program status information.

Stack Pointer (SP)

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.

Data Pointer (DPTR)

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

Serial Data Buffer (SBUF)

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

3.1 BLOCK DIAGRAM:

Figure: 3.1 Power Supply

3.2: CIRCUIT DIAGRAM:

Figure: 3.2 Circuit diagram

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.

Figure: 3.3.1 Transformer Symbol

(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

3.4 TRANSFORMER WORKING:

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.

Figure: 3.4 Basic Transformer

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.

3.5 CLASSIFICATION OF TRANSFORMER:

 Step-Up Transformer
 Step-Down Transformer

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

Figure 3.5.1 Step-Down Transformer


HITS-COE 25 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

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

3.5.2 STEP-UP TRANSFORMER:

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

Figure 3.5.2 Step-Up Transformer

Applications:

Generally these Step-Up Transformers are used in industries applications only.

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.

Figure:3.5.3 Diode Symbol

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.

Figure:3.5.4 Capacitor Filter

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.

Figure:3.5.5 Centered Tapped Full-Wave Rectifier with a Capacitor Filter

HITS-COE 28 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

3.6 VOLTAGE REGULATOR:

A voltage regulator is an electrical regulator designed to automatically maintain a


constant voltage level. It may use an electromechanical mechanism, or passive or active
electronic components. Depending on the design, it may be used to regulate one or more AC or
DC voltages. There are two types of regulator are they.

 Positive Voltage Series (78xx) and


 Negative Voltage Series (79xx)

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.

These regulators consists the three pins there are

Pin1: It is used for input pin.

Pin2: This is ground pin for regulator

Pin3: It is used for output pin. Through this pin we get the output.

Figure:3.6 Voltage Regulator

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.

Figure:3.7 HC-05 Bluetooth Module

The module could be used in many different applications Example:

• Hand held terminals

• Industrial devices

• Point-of-Sale systems

• PCs

• Personal Digital Assistants (PDAs)

• Computer Accessories

• Access Points

• Automotive Diagnostics Units


HITS-COE 30 2014-2018
GAS DETECTION ROBOT FOR ATOIMIC POWER STATION

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.

If your application requires to be operated at 5V then use a LM1117-3.3 regulator to


convert the 5V level to 3V3 level as required by module. Also protect the RXD pin against 5V
TXD signal by inserting 1K resistor in series to module RXD pin. If you wish to connect this
module to PC’s Serial port which is at RS232 level, then you need to add MAX232 circuit as
shown above. Status LED flashes at different rates to indicate different status like searching,
config, connected.

Table:3.7 Pin Specifications

Pin name I/O


GND GND Ground
3V3 VDD Power supply
connection
PIO2 I/O Programmable I/O
lines
PIO3 I/O Programmable I/O
lines
NRTS O UART RTS
(internal pull-up,
active low)
RXD I UART RX
(internal pull
down)
PCMO O Synchronous 8
kbps data out
(internal Pull
down)
USB_D+ A USB data plus

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

up, active low)


SCLK I/O SPI Clock (internal
pull down)
MISO O SPI data output
(pull down)
MOSI I SPI data input (pull
down)
PIO5 I/O Programmable I/O
lines

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.

Figure. 4.1 Gas Sensor

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

Figure 4.2 Crystal Oscillator

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):

Figure: 4.3 Pin Diagram Of L293D

4.4 FEATURES OF L293D:


 Wide Supply-Voltage Range: 4.5 V to 36 V
 Separate Input-Logic Supply
 Internal ESD Protection
 Thermal Shutdown
 High-Noise-Immunity Inputs
 Functionally Similar to SGS L293 and SGS L293D
 Output Current 1 A Per Channel (600 mA for L293D)
 Peak Output Current 2 A Per Channel (1.2 A for L293D)
 Output Clamp Diodes for Inductive Transient Suppression (L293D)
Description
The L293 and L293D are quadruple high-current half-H drivers. The L293 is
designed to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V.
The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages
from 4.5 V to 36 V. Both devices are designed to drive inductive loads such as relays,
solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads
in positive-supply applications.
All inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with a
Darlington transistor sink and a pseudo- Darlington source. Drivers are enabled in pairs,
with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN. When an
enable input is high, the associated drivers are enabled and their outputs are active and in

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.

Figure: 4.4.1 Block Diagram Of L293D

Table: 4.4 Function OF L293D(Each Table)

HITS-COE 38 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION

Figure: 4.4.2 Logic Diagram


This chip contains 4 enable pins. Each enable pin corresponds to 2 inputs. Based on the
input values given, the device connected to this IC works accordingly.

4.5 L293D INTERFACING WITH 8051:

Figure: 4.5 L293D Interfacing With 8051

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:

 Electric motor, a machine that converts electricity into a mechanical motion


o AC motor, an electric motor that is driven by alternating current
 Synchronous motor, an alternating current motor distinguished by a
rotor spinning with coils passing magnets at the same rate as the
alternating current and resulting magnetic field which drives it
 Induction motor, also called a squirrel-cage motor, a type of
asynchronous alternating current motor where power is supplied to
the rotating device by means of electromagnetic induction
o DC motor, an electric motor that runs on direct current electricity
 Brushed DC electric motor, an internally commutated electric motor
designed to be run from a direct current power source
 Brushless DC motor, a synchronous electric motor which is
powered by direct current electricity and has an electronically

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

 Easy to understand design


 Easy to control speed
 Easy to control torque
 Simple, cheap drive design

 Easy to understand design

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

If the field is created by permanent magnets, the motor is said to be a "permanent


magnet DC motor" (PMDC). If created by electromagnetic windings, the motor is often
said to be a "shunt wound DC motor" (SWDC). Today, because of cost-effectiveness and
reliability, the PMDC motor is the motor of choice for applications involving fractional
horsepower DC motors, as well as most applications up to about three horsepower. At five
horsepower and greater, various forms of the shunt wound DC motor are most commonly
used. This is because the electromagnetic windings are more cost effective than
permanent magnets in this power range.
Opposing the stator field is the armature field, which is generated by a changing
electromagnetic flux coming from windings located on the rotor. The magnetic poles of
the armature field will attempt to line up with the opposite magnetic poles generated by
the stator field. If we stopped the design at this point, the motor would spin until the poles
were opposite one another, settle into place, and then stop -- which would make a pretty

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.

 Easy to control speed

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.

 Easy to control torque

In a brushed DC motor, torque control is also simple, since output torque is


proportional to current. If you limit the current, you have just limited the torque which

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.

 Simple, cheap drive design

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.

Large DC drives are available up to hundreds of horsepower. However, over about 10


horsepower careful consideration should be given to the price/performance tradeoffs with
AC inverter systems, since the AC systems show a price advantage in the larger systems.
(But they may not be capable of the application's performance requirments).

Disadvantages

 Expensive to produce
 Can't reliably control at lowest speeds
 Physically larger
 High maintenance
 Dust

4.7 WORKING OF DC MOTOR

In any electric motor, operation is based on simple electromagnetism. A current-


carrying conductor generates a magnetic field; when this is then placed in an external
magnetic field, it will experience a force proportional to the current in the conductor, and to
the strength of the external magnetic field. As you are well aware of from playing with
magnets as a kid, opposite (North and South) polarities attract, while like polarities (North
and North, South and South) repel. The internal configuration of a DC motor is designed to
harness the magnetic interaction between a current-carrying conductor and an external
magnetic field to generate rotational motion.

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

A commutator is used to reverse the direction of flow of current. Commutator is a


copper ring split into two parts C1 and C2. The split rings are insulated form each other and
mounted on the axle of the motor. The two ends of the coil are soldered to these rings.
They rotate along with the coil. Commutator rings are connected to a battery. The wires
from the battery are not connected to the rings but to the brushes which are in contact with
the rings.

Brushes

Two small strips of carbon, known as brushes press slightly against the two split
rings, and the split rings rotate between the brushes.

The carbon brushes are connected to a D.C. source.

HITS-COE 45 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION

Figure:4.7.2 Parts Of DC Motors

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.

Figure:4.7.3 Simple Electric Motor

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.

Parameters Of The DC Motors

1. Direction of rotation
2. Motor Speed
3. Motor Torque
4. Motor Start and Stop

4.8 BUZZER-AUDIO INDICATION:

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.

Figure 4.8 Buzzer Audio Indication

HITS-COE 47 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION

The operation of this circuit is as follows:

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

4.9 BUZZER INTERFACING WITH THE MICROCONTROLLER:

Figure 4.9 Buzzer Interfacing With The Microcontroller

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

5.1 SOFTWARE REQUIRED

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.

 Building an Application in µVision2:


To build (compile, assemble, and link) an application in µVision2, you must:

1. Select Project -(forexample,166\EXAMPLES\HELLO\HELLO.UV2).


2. Select Project - Rebuild all target files or Build target.
3. µVision2 compiles, assembles, and links the files in your project.

5.1.1 KEIL COMPILER:


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.

HITS-COE 50 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION

Figure :5.1 Run the compiled program in Keil

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

Figure 5.2 ATMEL 8051 Device Programmer

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.

Figure 5.4.1 Hex file sent to mcu program loader

5.5 PROGRAMMING SOFTWARE


Computer side software called 'Proload V4.1' is executed that accepts the Intel HEX
format file generated from compiler to be sent to target microcontroller. It auto detects the
hardware connected to the serial port. It also auto detects the chip inserted and bytes used.
Software is developed in Delphi 7 and requires no overhead of any external DLL.

HITS-COE 53 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION

Figure: 5.5.Writing Program Bytes To Microcontroller

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.

Figure: 6.1 Kit Is In ON Condition

HITS-COE 56 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION

Figure: 6.2 GAS DETECTED

HITS-COE 57 2014-2018
GAS DETECTION ROBOT FOR ATOMIC POWER STATION

Figure: 6.3 NO GAS DETECTED

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.

7.2 FUTURE SCOPE


We live in a digital age where many areas of monitoring are electronic. However, the
very first portable gas leak detection units were in fact completely organic. Canaries were
taken underground and into mines to check for Carbon Monoxide (CO) and Methane
(CH4) gases.

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 lcd_rs = P2^0;


sbit lcd_en = P2^1;

sbit m1a = P0^0;


sbit m1b = P0^1;

sbit m2a = P0^2;


sbit m2b = P0^3;

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);
}

void ser() interrupt 4


{
unsigned char rec=0;
EA=0;
if(RI==1)
{
rec = rx();

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

 The 8051 microcontroller: Hardware, Software and Interfacing


 James stewart, kai mia. 1998, Volume -1

 Embedded System Design


 Arnold S. Berger, 2001 Fundamentals of Microprocessors and
Microcomputers, Volume -3

 Advanced Embedded Wireless Robot


 MA. Wajeed, K. Varun Kumar – International Journal of
Communication Network Security , ISSN: 2231 – 1882, Volume-2

 WWW.Wikipedia.Com

HITS-COE 67 2014-2018

Anda mungkin juga menyukai