Вы находитесь на странице: 1из 56

SVS INSTITUTE OF TECHNOLOGY

INTELLIGENT HELMET FOR COAL MINER


1. INTRODUCTION:
Underground mining is inherently dangerous and its safety monitoring is a complex,
interdisciplinary research area which spans several decades. In China, almost one third of
the local mine fatalities are caused by inadequate temperature changes. Therefore, the
essential function of mine safety monitoring system is to monitor the weather of the
working place of miners timely. Furthermore it should meet the requirements of low
latency, high data fidelity, fully and reliable coverage on the underground mining tunnels.
The current underground mine safety monitoring systems are of two kinds: wired systems
and wireless ones. The wired safety monitoring are more economic than wireless
systems.
The goal of this work is to develop a large scale, energy-saving, low cost,
reusable, and wired to meet the practical requirements for the mine safety monitoring. To
achieve this challenging goal we started by studying the existing underground mine
safety monitoring systems and identifying their requirements and constraints. We then set
up a hierarchical prototype system for underground mine safety monitoring, namely
INTELLIGENT HELMET FOR COAL MINERS.

DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

2. BLOCK DIAGRAM

Buzzer

Micro
Controller

ADC

Max
232

PC

MUX

Sensor1

RS
232

Sensor2

2.1 Block diagram description


8051 MICROCONTROLLER:
The AT89C51 is a low-power, high-performance CMOS 8-bit microcontroller
with 4k bytes of Flash Programmable and erasable read only memory (EROM).AT89C51
has many functions and to this microcontroller many other various components are
connected for the functioning of their particular operations and to get the particular
required output. This is very necessary in each and every embedded project.

DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

MAX 232:
Max 232 is used as a voltage converter, as 8051 microcontroller need TTL voltage level,
as fingerprint module voltage is cmos voltage level ,but by using the max232 we can
convert one voltage level to the other voltage level.
ADC:
The ADC0803 family is a series of three CMOS 8-bit successive approximation A/D
converters using a resistive ladder and capacitive array together with an auto-zero
comparator. These converters are designed to operate with the microprocessor-controlled
buses using a minimum of external circuitry. The 3-State output data lines can be
connected directly to the data bus.
MQ-2 GAS SENSOR:
MQ-2 gas sensor has high sensitivity to LPG , Methane , Propane and Hydrogen, also
could be used to and other combustible steam, it is with low cost and suitable for different
application.
POWER SUPPLY:
Power supply is needed for each and every IC and also the modules, so it supplies the
required amount of power to all the components and has major part the project, it supplies
a high power but by using the voltage regulator we can supply the required amount of
power to the components.
LM35:
The LM35 series are precision integrated-circuit temperature sensors with output voltage
is linearly proportional to centigrade temperature.
PC:
A personal computer is placed at monitoring center which looks after the entire sub-mine
and analysis environment by using sensor information send to it.

DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

2.2. Schematic diagram

DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

2.3 Working principle


Main idea is to develop a wireless based application through which coal mine engineers
can organize parameters like temperature and humidity in coal mines and take required
precautions based on the information
In our circuit board there are two supply wires coming from a transformer to a bridge
wave rectifier which converts an a.c signal to a pulsating d.c signal and this is further
Given to a filter capacitor which gives 12v pure d.c .And this 12v is given to a voltage
Regulator which regulates to a 5v d.c.And this 5v is the supply voltage to entire circuit

AT89C51 is a microcontroller used to control all types signals coming from different
components like.ADC,MAX-232,MUX,RS-232,BUZZER,and MQ-2 , LM35 sensors
These sensor inputs are controlled by microcontroller. There is a buzzer circuit which
is interfaced with microcontroller and there are specific values of gas and temperature
levels for which this buzzer alarms i.e 40C for temperature and 120 for gas levels.

So depending up on gas and temperature levels helmet gives a alarm and by this miner
goes out of mine .

DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

3. Hardware Description
3.1 AT89C51:
A microcontroller is a general purpose device, but that is meant to read data,
perform limited calculations on that data and control its environment based on those
calculations. The prime use of a microcontroller is to control the operation of a machine
using a fixed program that is stored in ROM and that does not change over the lifetime of
the system.
The microcontroller design uses a much more limited set of single and double
byte instructions that are used to move data and code from internal memory to the ALU.
The microcontroller is concerned with getting data from and to its own pins, the
architecture and instruction set are optimized to handle data in bit and byte size.
The AT89C51 is a low-power, high-performance CMOS 8-bit microcontroller
with 4k bytes of Flash Programmable and erasable read only memory (EROM). The
device is manufactured using Atmels high-density nonvolatile memory technology and is
functionally compatible with the industry-standard 80C51 microcontroller instruction set
and pin out. By combining versatile 8-bit CPU with Flash on a monolithic chip, the
Atmels AT89c51 is a powerful microcomputer, which provides a high flexible and costeffective solution to many embedded control applications.

DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

3.1.1 Pin Configuration of AT89c51 Microcontroller

DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

3.1.2 AT89C51 Block Diagram

3.2 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, Port0 has internal pullups. 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.
DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

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

DEPARTMENT OF ECE

SVS INSTITUTE OF TECHNOLOGY

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

Alternate Functions

P3.0

RXD(serial input port)

P3.1

TXD(serial input port)

P3.2
P3.3
P3.4
P3.5

INT0(external interrupt 0)
INT1(external interrupt 1)
T0(timer 0 external input)
T1(timer 1 external input)

P3.6
P3.7

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

DEPARTMENT OF ECE

10

SVS INSTITUTE OF TECHNOLOGY

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.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
XTAL 2
Output from the inverting oscillator amplifier.
OPERATING DESCRIPTION
The detail description of the AT89C51 included in this description is:
Memory Map and Registers
Timer/Counters
Interrupt System
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

DEPARTMENT OF ECE

11

SVS INSTITUTE OF TECHNOLOGY

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.

DEPARTMENT OF ECE

12

SVS INSTITUTE OF TECHNOLOGY

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.
The functions of the SFRs are outlined in the following sections.
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.

DEPARTMENT OF ECE

13

SVS INSTITUTE OF TECHNOLOGY

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 8bit registers.
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.

DEPARTMENT OF ECE

14

SVS INSTITUTE OF TECHNOLOGY

TIMER/COUNTERS
The IS89C51 has two 16-bit Timer/Counter registers: Timer 0 and Timer 1. All
two can be configured to operate either as Timers or event counters. As a Timer, the
register is incremented every machine cycle. Thus, the register counts machine cycles.
Since a machine cycle consists of 12 oscillator periods, the count rate is 1/12 of the
oscillator frequency.
As a Counter, the register is incremented in response to a 1-to-0 transition at its
corresponding external input pin, T0 and T1. The external input is sampled during S5P2
of every machine cycle. When the samples show a high in one cycle and a low in the next
cycle, the count is incremented. The new count value appears in the register during S3P1
of the cycle following the one in which the transition was detected. Since two machine
cycles (24 oscillator periods) are required to recognize a 1-to-0 transition, the maximum
count rate is 1/24 of the oscillator frequency. There are no restrictions on the duty cycle
of the external input signal, but it should be held for at least one full machine cycle to
ensure that a given level is sampled at least once before it changes.
In addition to the Timer or Counter functions, Timer 0 and Timer 1 have four operating
modes: 13-bit timer, 16-bit timer, 8-bit auto-reload, split timer.

SFRS USED IN TIMERS


The special function registers used in timers are,

TMOD Register

TCON Register

Timer(T0) & timer(T1) Registers

DEPARTMENT OF ECE

15

SVS INSTITUTE OF TECHNOLOGY

(i) TMOD Register:


TMOD is dedicated solely to the two timers (T0 & T1).

The timer mode SFR is used to configure the mode of operation of each of the
two timers. Using this SFR your program may configure each timer to be a 16-bit
timer, or 13 bit timer, 8-bit auto reload timer, or two separate timers. Additionally
you may configure the timers to only count when an external pin is activated or to
count events that are indicated on an external pin.

It can consider as two duplicate 4-bit registers, each of which controls the action
of one of the timers.

(ii) TCON Register:

The timer control SFR is used to configure and modify the way in which the
8051s two timers operate. This SFR controls whether each of the two timers is
running or stopped and contains a flag to indicate that each timer has overflowed.
Additionally, some non-timer related bits are located in TCON SFR.

These bits are used to configure the way in which the external interrupt flags are
activated, which are set when an external interrupt occurs.

(iii) TIMER 0 (T0):

TO (Timer 0 low/high, address 8A/8C h)


These two SFRs taken together represent timer 0. Their exact behavior
depends on how the timer is configured in the TMOD SFR; however, these timers
always count up. What is configurable is how and when they increment in value.

DEPARTMENT OF ECE

16

SVS INSTITUTE OF TECHNOLOGY


T H0

T L0

(iv) TIMER 1 (T1):

T1 (Timer 1 Low/High, address 8B/ 8D h)

These two SFRs, taken together, represent timer 1. Their exact behavior depends on how
the timer is configured in the TMOD SFR; however, these timers always count up. What
is Configurable is how and when they increment in value.

The Timer or Counter function is selected by control bits C/T in the Special Function
Register TMOD. These two Timer/Counters have four operating modes, which are
selected by bit pairs (M1, M0) in TMOD. Modes 0, 1, and 2 are the same for both
Timer/Counters, but Mode 3 is different.
The four modes are described in the following sections.
Mode 0:
Both Timers in Mode 0 are 8-bit Counters with a divide-by-32 pre scalar. In this
mode, the Timer register is configured as a 13-bit register. As the count rolls over from all
1s to all 0s, it sets the Timer interrupt flag TF1. The counted input is enabled to the Timer
when TR1 = 1 and either GATE = 0 or INT1 = 1. Setting GATE = 1 allows the Timer to
be controlled by external input INT1, to facilitate pulse width measurements. TR1 is a
control bit in the Special Function Register TCON. Gate is in TMOD.
The 13-bit register consists of all eight bits of TH1 and the lower five bits of TL1.
The upper three bits of TL1 are indeterminate and should be ignored. Setting the run flag
(TR1) does not clear the registers.

DEPARTMENT OF ECE

17

SVS INSTITUTE OF TECHNOLOGY

Mode 0 operation is the same for Timer 0 as for Timer 1, except that TR0, TF0
and INT0 replace the corresponding Timer 1 signals. There are two different GATE bits,
one for Timer 1 (TMOD.7) and one for Timer 0 (TMOD.3).
Mode 1
Mode 1 is the same as Mode 0, except that the Timer register is run with all 16
bits. The clock is applied to the combined high and low timer registers (TL1/TH1). As
clock pulses are received, the timer counts up: 0000H, 0001H, 0002H, etc. An overflow
occurs on the FFFFH-to-0000H overflow flag. The timer continues to count. The
overflow flag is the TF1 bit in TCON that is read or written by software
Mode 2
Mode 2 configures the Timer register as an 8-bit Counter (TL1) with automatic
reload; Overflow from TL1 not only sets TF1, but also reloads TL1 with the contents of
TH1, which is preset by software. The reload leaves the TH1 unchanged. Mode 2
operation is the same for Timer/Counter 0.
Mode 3
Timer 1 in Mode 3 simply holds its count. The effect is the same as setting TR1 =
0. Timer 0 in Mode 3 establishes TL0and TH0 as two separate counters. The logic for
Mode 3 on Timer 0. TL0 uses the Timer 0 control bits: C/T, GATE, TR0, INT0, and TF0.
TH0 is locked into a timer function (counting machine cycles) and over the use of TR1
and TF1 from Timer 1. Thus, TH0 now controls the Timer 1 interrupt.
Mode 3 is for applications requiring an extra 8-bit timer or counter. With Timer 0
in Mode 3, the AT89C51 can appear to have three Timer/Counters. When Timer 0 is in
Mode 3, Timer 1 can be turned on and off by switching it out of and into its own Mode 3.
In this case, Timer 1 can still be used by the serial port as a baud rate generator or in any
application not requiring an interrupt.

DEPARTMENT OF ECE

18

SVS INSTITUTE OF TECHNOLOGY

INTERRUPT SYSTEM
An interrupt is an external or internal event that suspends the operation of micro
controller to inform it that a device needs its service. In interrupt method, whenever any
device needs its service, the device notifies the micro controller by sending it an interrupt
signal. Upon receiving an interrupt signal, the micro controller interrupts whatever it is
doing and serves the device. The program associated with interrupt is called as interrupt
service subroutine (ISR).Main advantage with interrupts is that the micro controller can
serve many devices.
Baud Rate
The baud rate in Mode 0 is fixed as shown in the following equation. Mode 0
Baud Rate = Oscillator Frequency /12 the baud rate in Mode 2 depends on the value of
the SMOD bit in Special Function Register PCON. If SMOD = 0 the baud rate is 1/64 of
the oscillator frequency. If SMOD = 1, the baud rate is 1/32 of the oscillator frequency.
Mode 2 Baud Rate = 2SMODx (Oscillator Frequency)/64.In the IS89C51, the Timer 1
overflow rate determines the baud rates in Modes 1 and 3.
NUMBER OF INTERRUPTS IN 89C51:
There are basically five interrupts available to the user. Reset is also considered as
an interrupt. There are two interrupts for timer, two interrupts for external hardware
interrupt and one interrupt for serial communication.
Memory location

Interrupt name

0000H

Reset

0003H

External interrupt 0

000BH

Timer interrupt 0

DEPARTMENT OF ECE

19

SVS INSTITUTE OF TECHNOLOGY

0013H

External interrupt 1

001BH

Timer interrupt 1

0023H

Serial COM interrupt

Lower the vector, higher the priority. The External Interrupts INT0 and INT1 can
each be either level-activated or transition-activated, depending on bits IT0 and IT1 in
Register TCON. The flags that actually generate these interrupts are the IE0 and IE1 bits
in TCON. When the service routine is vectored, hardware clears the flag that generated
an external interrupt only if the interrupt was transition-activated. If the interrupt was
level-activated, then the external requesting source (rather than the on-chip hardware)
controls the request flag.
The Timer 0 and Timer 1 Interrupts are generated by TF0and TF1, which are set
by a rollover in their respective Timer/Counter registers (except for Timer 0 in Mode
3).When a timer interrupt is generated, the on-chip hardware clears the flag that is
generated.
The Serial Port Interrupt is generated by the logical OR of RI and TI. The service
routine normally must determine whether RI or TI generated the interrupt, and the bit
must be cleared in software.
All of the bits that generate interrupts can be set or cleared by software, with the
same result as though they had been set or cleared by hardware. That is, interrupts can be
generated and pending interrupts can be canceled in software.
Each of these interrupt sources can be individually enabled or disabled by setting
or clearing a bit in Special Function Register IE (interrupt enable) at address 0A8H.
There is a global enable/disable bit that is cleared to disable all interrupts or to set the
interrupts.

DEPARTMENT OF ECE

20

SVS INSTITUTE OF TECHNOLOGY

IE (Interrupt enable register):


Steps in enabling an interrupt:
Bit D7 of the IE register must be set to high to allow the rest of register to take
effect. If EA=1, interrupts are enabled and will be responded to if their corresponding bits
in IE are high. If EA=0, no interrupt will be responded to even if the associated bit in the
IE register is high.
Description of each bit in IE register:
D7 bit:
Disables all interrupts. If EA =0, no interrupt is acknowledged, if EA=1 each interrupt
source is individually enabled or disabled by setting or clearing its enable bit.
D6 bit: Reserved.
D5 bit: Enables or disables timer 2 over flow interrupt (in 8052).
D4 bit: Enables or disables serial port interrupt.
D3 bit: Enables or disables timer 1 over flow interrupt.
D2 bit: Enables or disables external interrupt 1.
D1 bit: Enables or disables timer 0 over flow interrupt.
D0 bit: Enables or disables external interrupt 0.
Interrupt priority in 89C51:
There is one more SRF to assign priority to the interrupts which is named as
interrupt priority (IP). User has given the provision to assign priority to one interrupt.
Writing one to that particular bit in the IP register fulfils the task of assigning the priority.
DEPARTMENT OF ECE

21

SVS INSTITUTE OF TECHNOLOGY

Description of each bit in IP register:


D7 bit: Reserved.
D6 bit: Reserved.
D5 bit: Timer 2 interrupt priority bit (in 8052).
D4 bit: Serial port interrupt priority bit.
D3 bit: Timer 1 interrupt priority bit.
D2 bit: External interrupt 1 priority bit.
D1 bit: Timer 0 interrupt priority bit.
D0 bit: External interrupt 0 priority bit.

3.3 POWER SUPPLY


This term covers the power distribution system together with any other primary or
secondary sources of energy.

Introduction
Power supply is a reference to a source of electrical power. A device or system
that supplies electrical or other types of energy to an output load or group of loads is
called a power supply unit or PSU. The first section is the transformer. The transformer
steps up or steps down the input line voltage and isolates the power supply from the
power line. The rectifier section converts the alternating current input signal to a
DEPARTMENT OF ECE

22

SVS INSTITUTE OF TECHNOLOGY

pulsating direct current. A filter section is used to convert pulsating dc to a purer, more
desirable form of dc voltage. The final section is the regulator, it maintains the output of
the power supply at a constant level.

Each of the blocks are described below


1. Transformer - steps down high voltage AC mains to low voltage AC.
2. Rectifier - converts AC to DC, but the DC output is varying.
3. Smoothing - smoothes the DC from varying greatly to a small ripple.
4. Regulator - eliminates ripple by setting DC output to a fixed voltage.
Power supplies made from these blocks with a circuit;

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 an 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 relay on the principle of magnetic induction between coils to
convert voltage and/or current levels.

DEPARTMENT OF ECE

23

SVS INSTITUTE OF TECHNOLOGY

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 turns ratio of the two sets of windings
determines the amount of voltage transformation.
Rectifier:
The purpose of a rectifier is to convert an AC waveform into a DC waveform (OR)
Rectifier converts AC current or voltages into DC current or voltage. There are two
different rectification circuits, known as 'half-wave' and 'full-wave' rectifiers. Both use
components called diodes to convert AC into DC.
The Full-wave Rectifier
The circuit in figure addresses the second of these problems since at no time is the output
voltage 0V. This time four diodes are arranged so that both the positive and negative
parts of the AC waveform are converted to DC.

Figure: Full-Wave Rectifier


When the AC input is positive, diodes A and B are forward-biased, while diodes C and D
are reverse-biased. When the AC input is negative, the opposite is true - diodes C and D
are forward-biased, while diodes A and B are reverse-biased.

DEPARTMENT OF ECE

24

SVS INSTITUTE OF TECHNOLOGY

While the full-wave rectifier is an improvement on the half-wave rectifier, its output still
isn't suitable as a power supply for most circuits since the output voltage still varies
between 0V and (Vs )-1.4V. So, if you put 12V AC in, you will get 10.6V DC out.

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

DEPARTMENT OF ECE

25

SVS INSTITUTE OF TECHNOLOGY

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

Operation:
During the positive half cycle of secondary voltage, the end A of the secondary
winding becomes positive and end negative. This makes the diode D1 forward biased and
D2 reverse biased. Therefore D1 conducts while D2 does not. The conventional current
flow is through diode D1, load resistor RL and upper half of secondary winding. During
the negative half cycle, end A of the secondary winding becomes negative and end B
positive. Therefore D2 conducts while D1 does not. The conventional current flow is
through D2, load RL and lower half winding as shown by solid arrows in the figure.It is
seen that current in the load RL is in the same direction for both half cycles of input ac
voltage. Therefore dc is obtained across the load RL. Also the polarities of the output
across the load should be noted

3.4 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)
Negative Voltage Series (79xx)
78xx:78 indicate the positive series and xxindicates the voltage rating. Suppose 7805
produces the maximum 5V.05indicates the regulator output is 5V.
79xx:78 indicate the negative series and xxindicates the voltage rating. Suppose 7905
produces the maximum -5V.05indicates the regulator output is -5V.
DEPARTMENT OF ECE

26

SVS INSTITUTE OF TECHNOLOGY

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: Voltage Regulator

3.5 MAX 232


Connection Diagram:

DEPARTMENT OF ECE

27

SVS INSTITUTE OF TECHNOLOGY

The MAX232 line drivers/receivers are designed for RS-232 and V.28
communications in harsh environments. Each transmitter output and receiver input is
protected against 15kV electrostatic discharge (ESD) shocks, without latchup.It can
operate from a Single +5V Power Supply.
It is an integrated circuit that converts signals from an RS-232 serial port to
signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual
driver/receiver and typically converts the RX, TX, CTS and RTS signals.

The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single
+ 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for
implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V
to + 5 V range, as power supply design does not need to be made more complicated just
for driving the RS-232 in this case.The receivers reduce RS-232 inputs (which may be as
high as 25 V), to standard 5 V TTL levels. These receivers have a typical threshold of
1.3 V, and a typical hysteresis of 0.5 V.

DEPARTMENT OF ECE

28

SVS INSTITUTE OF TECHNOLOGY

Voltage levels:
It is helpful to understand what occurs to the voltage levels. When a MAX232 IC
receives a TTL level to convert, it changes a TTL Logic 0 to between +3 and +15V, and
changes TTL Logic 1 to between -3 to -15V, and vice versa for converting from RS232 to
TTL. This can be confusing when you realize that the RS232 Data Transmission voltages
at a certain logic state are opposite from the RS232 Control Line voltages at the same
logic state. To clarify the matter, see the table below.

FUNCTION TABLE

DEPARTMENT OF ECE

29

SVS INSTITUTE OF TECHNOLOGY

LOGIC DIAGRAM (POSITIVE LOGIC)

3.6 RS-232 Cable


RS-232 was created for one purpose, to interface between Data Terminal
Equipment (DTE) and Data Communications Equipment (DCE) employing serial binary
data interchange. So as stated the DTE is the terminal or computer and the DCE is the
modem or other communications device. RS-232 is most widely used serial input output
interfacing standards. This standards used in PCs and numerous types of equipment.
However, since the standards were set long before the advent of the TTL logic family, its
input and output levels are not TTL compatible. In RS 232, a 1 is represented by -3 to -25
volt, while 0 bit is +3 to +25 volt, making -3 to +3 undefined. For this reason, we must
use MAX 232 line driver to convert voltage level. It is compatible with PC.

DEPARTMENT OF ECE

30

SVS INSTITUTE OF TECHNOLOGY

RS 232 cable
3-wire and 5-wire RS-232:
Minimal 3-wire RS-232 connections consisting only of transmits data,
receive data, and ground, is commonly used when the full facilities of RS-232 are not
required. Even a two-wire connection (data and ground) can be used if the data flow is
one way (for example, a digital postal scale that periodically sends a weight reading, or a
GPS receiver that periodically sends position, if no configuration via RS-232 is
necessary). When only hardware flow control is required in addition to two-way data, the
RTS and CTS lines are added in a 5-wire version

DB9 CONNECTOR
The term "DB9" refers to a common connector type, one of the D-Subminiature or
D-Sub types of connectors. DB9 has the smallest "footprint" of the D-Subminiature
connectors, and houses 9 pins (for the male connector) or 9 holes (for the female
connector).
DB9 connectors were once very common on PCs and servers. DB9 connectors are
designed to work with the EIA/TIA 232 serial interface standard, which determined the
function of all nine pins as a standard, so that multiple companies could design them into
their products. DB9 connectors were commonly used for serial peripheral devices like
keyboards, mice, joysticks, etc. Today, the DB9 has mostly been replaced by more
modern interfaces such as USB, PS/2, Fire wire, and others. However, there are still
many legacy devices that use the DB9 interface for serial communication.

DEPARTMENT OF ECE

31

SVS INSTITUTE OF TECHNOLOGY

Figure: db9 connector (male and female)


TYPES OF THE DB9 CONNECTOR:
In DB9 connector w have two types of connector

Male connectors
Female connectors

Male:

Figure: male connector


Female:

DEPARTMENT OF ECE

32

SVS INSTITUTE OF TECHNOLOGY

Pin Functions:
Data:

TxD on pin 3, RxD on pin 2

Handshake:

RTS on pin 7, CTS on pin 8, DSR on pin 6,


CD on pin 1, DTR on pin 4

Common:

Common pin 5(ground)

Other:

RI on pin 9

The method used by RS-232 for communication allows for a simple connection of three
lines: Tx, Rx, and Ground. The three essential signals for 2 way RS-232 Communications
are these
TXD: carries data from DTE to the DCE.
RXD: carries data from DCE to the DTE
SG:

signal ground

Pin Configuration:
The DB9 (originally DE-9) connector is an analog 9-pin plug of the D-Subminiature
connector family (D-Sub or Sub-D). The DB9 connector is mainly used for serial
connections, allowing for the asynchronous transmission of data as provided for by
standard RS-232 (RS-232C).

DEPARTMENT OF ECE

33

SVS INSTITUTE OF TECHNOLOGY

Figure: male and female pins

Pin number
DEPARTMENT OF ECE

Name
34

SVS INSTITUTE OF TECHNOLOGY

1
2
3
4
5
6
7
8
9

CD - Carrier Detect
RXD - Receive Data
TXD - Transmit Data
DTR - Data Terminal Ready
GND - Signal Ground
DSR - Data Set Ready
RTS - Request To Send
CTS - Clear To Send
RI - Ring Indicator
Figure: pin configuration

Serial Communication Block Diagram:


Serial communication can be established with the help of 2 wires one for
transmit and the one for receiving data.

DEPARTMENT OF ECE

35

SVS INSTITUTE OF TECHNOLOGY

3.7 MQ-2 GAS SENSOR

General description:
They are used in gas leakage detecting equipments in family and industry, are suitable
for detecting of LPG, i-butane, propane, methane, alcohol, Hydrogen, smoke .And this
Insight covers a methane gas sensor that can sense gases such as ammonia which get
produced from methane. When a gas interacts with this sensor, it first ionizes into its
constituents and is then adsorbed by the sensing element. Adsorption creates potential
difference on the element which is conveyed to the processor unit.

DEPARTMENT OF ECE

36

SVS INSTITUTE OF TECHNOLOGY

Pin diagram:

DEPARTMENT OF ECE

37

SVS INSTITUTE OF TECHNOLOGY

Working principle:
When a gas interacts with this sensor, it first ionizes in to its constituents and is then
adsorbed by sensing element.Adsorbtion creates a potential difference on the element
which is conveyed to the processor unit.
The sensors conductivity is more higher along with the gas concentration rising. Please
use simple electric circuit, Convert change of conductivity to correspond output signal of
gas concentration. MQ-2 gas sensor has high sensitivity to LPG, Propane and Hydrogen
also could be used to Methane and other combustible steam, it is with low cost and
suitable for different application. TTL output signal can be connected directly to a
microcontroller IO port or connect to the relay module, potentiometer is used to adjust
the output level transition threshold .
A resistive load between the output pins and ground sets the sensitivity of the detector.
Please note that the picture in the datasheet for the top configuration is wrong. Both
configurations have the same pinout consistent with the bottom configuration.The
resistive load should be calibrated for your particular application using the equations in
the datasheet, but a good starting value for the resistor is 20 k.

DEPARTMENT OF ECE

38

SVS INSTITUTE OF TECHNOLOGY

FEATURES OF MQ-2 SENSOR:


Good sensitivity to combustable gas in wide range
Wide detecting scope
Fast response and High sensitivity
Simple drive circuit

INTERNAL DESCRIPTION OF MQ-2 SENSOR:


Structure and configuration of MQ-2 gas sensor is shown as (Configuration A or B)
sensor composed by micro AL2O3 ceramic tube, Tin Dioxide (SnO2) sensitive layer
measuring electrode and heater are fixed into a crust

made by plastic and stainless steel

net. The heater provides necessary work conditions for work of sensitive components.
The enveloped MQ-2 have 6 pin ,4 of them are used to fetch signals, and other 2 are used
for providing heating current.

Resistance value of MQ-2 is difference to various kinds and various concentration gases.
So, When using this components, sensitivity adjustment is very necessary. We
recommend that you calibrate the detector for 1000ppm liquified petroleum
gas<LPG>,or1000ppm iso-butane<i-C4H10>concentration in air and use value of Load
DEPARTMENT OF ECE

39

SVS INSTITUTE OF TECHNOLOGY

resistance that(RL) about20 K (5K to47 K ).When accurately measuring, the proper
alarm point for the gas detector should be determined after considering the temperature
and humidity influence.

MQ-2 has 6 pins, 4 of them are used to fetch signals, and other 2 are Heater coil used for
providing heating current . You can use 5v DC or AC across H H pins. And as you can
see one of H pins goes to the power and the other one is connected to the ground. The pin
A (you can connect both pins ) A is connected between the power and the ground. .The
pin B gets an analog voltage when the sensor is active. Also across the output, you need
the resistor RL. Before you connect the resistor use a potentiometer to tune and get
accurate values. Generally RL value is between 20k and 200k. Connecting five volts
(AC or DC) across the heating (H) pins keeps the sensor hot enough to function correctly.

DEPARTMENT OF ECE

40

SVS INSTITUTE OF TECHNOLOGY

LM35:
LM35 is a precision IC temperature sensor with its output proportional to the temperature
(in C). The sensor circuitry is sealed and therefore it is not subjected to oxidation and
other processes. With LM35, temperature can be measured more accurately than with a
thermistor. It also possess low self heating and does not cause more than 0.1 C
temperature rise in still air.
The LM35 does not require any external calibration or trimming and maintains an
accuracy of +/-0.4 C at room temperature and +/- 0.8C over a range of 0 to +100 C
Another important characteristic of the LM35DZ is that it draws only 60 micro amps
from its supply and possesses a low self-heating capability. The sensor self-heating
causes less than 0.1C The LM35 does not require any external calibration or trimming
and maintains an accuracy of

+/-0.4 C at room temperature. It also high input

impedence.

DEPARTMENT OF ECE

41

SVS INSTITUTE OF TECHNOLOGY

DEPARTMENT OF ECE

42

SVS INSTITUTE OF TECHNOLOGY

Air temperature is almost the same as the surface temperature; if the air temperature
were much higher or lower than the surface temperature, the actual temperature of the
LM35 die would be at an intermediate temperature between the surface temperature.

DEPARTMENT OF ECE

43

SVS INSTITUTE OF TECHNOLOGY

3.8 Buzzer Circuit with Unique Functionality

Overview
The circuit was constructed using a few components to produce a unique buzzer with
adjustable buzzer tones.
Terminology
Buzzer an electronic signaling device that produces light and buzzing sound when
activated or triggered
Single Pole Double Throw (SPDT) an electromagnetic switch that has common,
normally open and normally closed connections; the common gets connected to the
normally closed connection when the relay coil is de-energized while the common
gets connected to the normally open connection when the relay coil is energized

DEPARTMENT OF ECE

44

SVS INSTITUTE OF TECHNOLOGY

Circuit Explanation
One of the main components in this circuit is the use of a relay. There are several factors
to consider when choosing a relay for specific reasons such as packaging, assembly,
contact sequence, type and number or contacts, coil current and voltage, mounting,
switching time, rating of contacts, protection for coil and contact, radiation resistant
testing, physical size and pin arrangement, expected mechanical loads, switch contact
arrangement, coil resistance, and accessories.
The relay is connected in series with an audio transformer which will be used to block
the interference of radio frequency. Additionally, this type of transformer can match the
impedance between high and low impedance circuit, split and combine signals, and
block the DC component coming from an audio signal. With these characteristics, it is
suitable for the design of audio circuits. The transformer in the circuit is rated with 1K
ohm and center tapped on the primary while 8R on the secondary winding.
The relay will start to operate upon pressing the push button switch that will cause the
relay to conduct through the primary of the transformer. The normally closed contact of
the relay opens as soon as the relay starts to operate, causing the power of the relay to
subside. The sequence of event repeats when the contacts close, which occurs in a fast
phase. Because of the swift transition, the current pulses are causing fluctuations in the
primary and secondary windings.
The tone that is being generated by the speaker depends largely on the frequency set on
the relay while the note is being tuned by the capacitor. The buzzers tone is inversely
proportional to the value of the capacitor wherein lower tones are produced by higher
value of capacitance.

DEPARTMENT OF ECE

45

SVS INSTITUTE OF TECHNOLOGY

Application
Buzzers are widely used in different industries and they also come in different forms like
in cameras, toys, speaker, automatic vending machine, electronic calculators,
amusement machines, clocks, watches, microwave ovens, washing machines, speed
alarm, electronic cash registers, gas alarms, mobile phone, pager, electric typewriter,
personal computer, telephone sets, game shows, backup buzzer, and printer copy
machine.
Relays can be categorized as double switching relay, distance relay or protective relay,
and are widely used in time delay functions by altering the opening and closing interval
of a group of contacts; in logic functions where the relay contacts may be connected in
series or in parallel; in controlled circuit isolation having two different voltages, in
distribution and transmission lines where faults are isolated and detected; in generating
low current signal to control a high current circuit; and in generating low voltage signal
to control a high voltage circuit.
Since the Single Pole Dual Throw (SPDT) switches are controlled by a voltage input
rather than a mechanical figure, they are typically used in automobiles such as power
door lock system which works with a security system for locking/unlocking vehicle
doors; as remote trunk release in opening a vehicle trunk remotely; as relay turn off to
disable a device in a vehicle; and as relay turn on for turning on devices with high
current.

DEPARTMENT OF ECE

46

SVS INSTITUTE OF TECHNOLOGY

4. Software Description
Operating System: WINDOWS XP
Software Used: KEIL, MICRO C FLASH, EXPRESS PCB
KEIL Software
Installing the Keil software on a Windows PC:

Insert the CD-ROM in your computers CD drive

On most computers, the CD will auto run, and you will see the Keil installation
menu. If the menu does not appear, manually double click on the Setup icon, in
the root directory: you will then see the Keil menu.

On the Keil menu, please select Install Evaluation Software. (You will not
require a license number to install this software).

Follow the installation instructions as they appear.

Loading the Projects:


The example projects for this book are NOT loaded automatically when you
install the Keil compiler. These files are stored on the CD in a directory /Pont. The files
are arranged by chapter: for example, the project discussed in Chapter 3 is in the
directory /Pont/Ch03_00-Hello. Rather than using the projects on the CD (where
changes cannot be saved), please copy the files from CD onto an appropriate directory on
your hard disk.
Note: you will need to change the file properties after copying: file transferred from the
CD will be read only.

DEPARTMENT OF ECE

47

SVS INSTITUTE OF TECHNOLOGY

Configuring the Simulator:


1. Open the Keil Vision2
2. Go to Project Open Project and browse for Hello in Ch03_00 in Pont and open
it.
3. Go to Project Select Device for Target Target1
4. Select 8052(all variants) and click OK
5. Now we need to check the oscillator frequency
6. Go to project Options for Target Target1
7. Make sure that the oscillator frequency is 11.5902MHz.
8. Building the Target:
9. Build the target as illustrated in the figure below
10. Running the Simulation
11. Having successfully built the target, we are now ready to start the debug session
and run the simulator.
12. First start a debug session
13. The flashing LED we will view will be connected to Port 1. We therefore want to
observe the activity on port
14. To ensure that the port activity is visible, we need to start the periodic window
update flag
15. Go to Debug - Go
16. While the simulation is running, view the performance analyzer to check the
delay durations.
17. Go to Debug Performance Analyzer and click on it
18. Double click on DELAY_LOOP_Wait in Function Symbols: and click Define
button
DEPARTMENT OF ECE

48

SVS INSTITUTE OF TECHNOLOGY

DEPARTMENT OF ECE

49

SVS INSTITUTE OF TECHNOLOGY

``

4.1 Coding

#include<reg51.h>
#include<string.h>
#include"delays.h"
#include"converters.h"
#include"serial_driver.h"
#include"adc_driver.h"
sbit buz=P0^3;
main()
{
unsigned char val=0,val1=0;
ser_del=50;
P0=0x00;
P2=0xff;
buz=1;//buzzer off
DEPARTMENT OF ECE

50

SVS INSTITUTE OF TECHNOLOGY

serial_init();
tx_str("INTELLIGENT HELMET FOR COLE MINES\n\r");
delay_ms(1000);
while(1)
{
val=mux(0);
//delay_ms(200);
if(val>=40)
{
buz=0;//buzzer on
tx_str("TEMP: ");
tx_str(getBCD(val));
}
else{
if(val1<100)
buz=1;
tx_str("TEMP : ");
tx_str(getBCD(val));}
val1=mux(1);
//delay_ms(200);
if(val1>=100)
{
buz=0;
tx_str(" SMOKE: ");
tx_str(getBCD(val1));
tx_str(" ");
tx_char('\r');
}
else{
if(val<40)
buz=1;
tx_str(" SMOKE : ");
tx_str(getBCD(val1));
tx_str(" ");
tx_char('\r');}
DEPARTMENT OF ECE

51

SVS INSTITUTE OF TECHNOLOGY

}
}

5. Result and Analysis


As the result we are designed to provide Intelligent Helmet for Coal Miners and safety
monitoring of Coal miners. Various parameters like Methane gas, Carbon monoxide gas,
Temperature and Humidity are monitored for the safety of coal miners. These sensors are
should be fitted in the helmet of the coal miners. Whenever any parameter crosses a
particular threshold value, a buzzer is turned on so as to indicate the miner about the
danger. Thus this system performs function of miners safety monitoring and controlling
system.

5.1 Applications
It can be used in various coal mines for detecting the dangerous environment

situations.

DEPARTMENT OF ECE

52

SVS INSTITUTE OF TECHNOLOGY

Can be applied at any weather Conditions.

Can be applied to the persons who are working in the underground.

5.2Advantages
It provides an automatic safety system for coal miners and other workers or

engineers entering into coal mine.


Low power consumption
Low cost
Safety monitoring of the environment.

Quick Searching and can able to give the warning.

Prevent from the high temperature, humidity and harmful gases

5.3 Snapshots

DEPARTMENT OF ECE

53

SVS INSTITUTE OF TECHNOLOGY

Prototype Design of Intelligent Helmet for Coal Miners

CONCLUSION AND FUTURE SCOPE

DEPARTMENT OF ECE

54

SVS INSTITUTE OF TECHNOLOGY

Future scope:
1. We can send this data to a remote internet
2. We can add the module of voice alarm system to indicate parameters crossing the
threshold value.
Conclusion
Thus in this system can detect concentration of the gas, temperature, humidity, wind
speed and trace the location of miners in underground mine tunnels. Wireless sensor
networks applied in monitoring coal mine security breaks through the traditional methods
and ideas, which improves the practical ability and flexibility of monitoring system. This
system not only can monitor all kinds of parameters under the coal mine, but also can
alarm automatically when environment parameters are abnormal to exceed the limitation,
which help improve the level of monitoring safety production and reduce accident in the
coalmine. Therefore, the coal mine Safety Monitoring system put forward in this article
quite meets the need of coalmine safety monitoring. Traditional mine security system can
be effectively replaced by the surveillance and safety system proposed in the paper.

Bibliography
http://www.ticom/

DEPARTMENT OF ECE

55

SVS INSTITUTE OF TECHNOLOGY

http://en.wikipedia.org/wiki/mq-2,lm35
http://www.buslab.org/index.php/content/view/24733/6
http://www.pcworld.com/article/id,103535-page,1/article.html
http://www.ni.in/site/india

DEPARTMENT OF ECE

56

Вам также может понравиться