E2em003 Report
E2em003 Report
E2em003 Report
INTRODUCTION
INTRODUCTION
1
The security management system is described in this paper. System structure of wireless security adopts
two level structures. The first level is consist of some remote controllers and a launcher ,which is include
wireless burglar alarm, fault alarm, power-off alarm, self-checking alarm and some wireless night patrol
point. The second level is consisting of a wireless receiver and a wireless alarm controller in the system.
The core of a wireless receiver and some launchers adopt advanced embedded technology. It
can improve the level of oilfield’ security, enhance it’s the security checking, strengthen the
management of it’s the digitalization and informatization; It has the important significance and social
and economic benefits for the dependability and the controllability of remote communication.
The security management system for oilfield using wireless communication. It consists of two
levels. The first level is consist of a launcher and some remote controllers ,which include wireless burglar
alarm, fault alarm, power-off alarm, self-checking alarm and some wireless night patrol point. The
launcher, which is more than 1W, is a wireless receiver, another is a wireless transmitter, it receives the
information of the front-end alarm equipments and can send message by the wireless transmitter.
The second level is consisting of a wireless receiver and a wireless alarm controller in the
system. Theft sensor is used to detect if there is any theft occurred by human and the level sensor used
for the filling of the oilfield and also two GAS sensors are used for detecting the hazards gas present in
the oilfield. The function of a wireless receiver can receive the information of some front end launchers
and send it to PC through MAX232 communication.
This system can improve the level of oilfield’ security, enhance the security checking, strengthen
the management of digitalization and informatization, The method could solve problems with highly
efficient and rapid, also could reduce the loss of country with effective, So It has the important
significance and social and economic benefits for the dependability and the controllability of remote
communication.
2
CHAPTER-2
LITERATURE SURVEY
3
LITERATURE SURVEY
2.1 Introduction
Most oil pumping units (OPUs) have been using manual control in the oilfield.
This existing oil-pumping system,
a high power-consuming process, has the incapability of OPU’s structural health
monitoring. In this paper, a sensor network based intelligent control is proposed for
power economy and efficient oilwell health monitoring. The proposed sensor
network consists of three-level sensors: 1) several types of basic sensors, such as
load sensor, angular sensor, voltage sensor, current sensor and oil pressure sensor,
which are the first level sensors (FLS), are used for oilwell data sensing; 2) our
developed intelligent sensors (IS), which belong to the second level sensor, are
designed mainly
for an oilwell’s data elementary processing, main fault alarm/indication,typical
data storage/indication, data/status transmission up to the third level sensor (TLS),
data/status transmission between IS, and comman d transmission down to the OPU
motor; and3) our developed software-defined (SD) control centers with an
embedded database, i.e., the TLS, are designed for hundreds of oilwells data
storage/management, data processing, malfunction detection, malfunction
alarm/indication, stroke-adjustment command transmission down to a specific IS
for power economy and the malfunction report to the maintenance staff via global
system for mobile communications (GSM) short message service (SMS).
Experiment results at the Chinese Petroleum’s Changqing Oilfield demonstrate
our proposed sensor network based system.
4
2.2.Salient Features of the System
2. compact.
BLOCK DIAGRAM
Transmitter Section
5
LEVEL SENSOR
TEMPERATURE
MIWI
SENSOR
UART
GAS SENSOR
(C02)
VOICE BOARD
ADC
ATMEL
AT89S52 RELAY
PH SENSOR
VOLTAGE SENSOR
EXHAUST FAN COOLING FAN
CURRENT SENSOR
Receiver Section
6
MIWI UART PC
Figure.2.1.Block diagram
CHAPTER-3
HARDWARE DESIGN DETAILS
7
HARDWARE DESIGN DETAILS
3.1.Hardware description
8
POWER SUPPLY:
9
BRIDGE RECTIFIER
VOLTAGE REGULATOR:
10
LM7805: 3-Terminal 1A Positive Voltage Regulator
Features:
• Output Current up to 1A
11
Figure 3.6 Block diagram of voltage regulator
Description:
12
these devices can be used with external components to obtain adjustable voltages
and currents.
VOLTAGE SENASOR
Introduction
The interface of various sensors to a controller like the BrainStem GP 1.0 module typically
involves either conditioning or converting voltage levels into the range the controller requires.
Many systems use A/D converters to make the sensor value relevant in a program or data logging
configuration. These converters have a fixed range of voltages they can convert from with 0-5V
being by far the most common.
Sensors often create voltages in different ranges than those required by the controllers they are
being interfaced to which requires the conversion of one voltage to another. This conversion
often breaks down into a combination one or more of three types, amplification, dividing, and
shifting.
Contents
Dividing Voltages
Voltage dividing is probably the easiest transformation you can perform on sensor outputs to
alter the value being connected to a microcontroller or other circuit.
The mathematical equivalent of what you are trying to achieve when dividing voltages is a
simple division. For instance, say you have a sensor that outputs 0-100V and you want to
convert this to 0-5V for interface to the A/D input on your BrainStem. The goal would be to
create a 20:1 ratio of voltage which means dividing the original sensor output voltage by a factor
of 20. So we need a small circuit that will accomplish the following pictorially:
The easiest way to accomplish this division is using a few resistors to form a voltage divider.
The resistors are wired up in series to create intermediate voltages based with the desired
division. The above example could be accomplished as follows:
13
This voltage divider uses the input as the top of the resistor ladder and ground as the bottom.
The actual division is defined by the proportion of resistance between the two resistors.
Notice the above circuit does not work out to an exact division by 20. This is because the
resistors used are commonly found resistor values. Precision resistors with exact tolerances can
be used but are often not needed since the original output of sensors typically varies. Here the
resulting output voltage is slightly below the maximum of 5V but with a reasonable A/D
converter like the 10-bit converters used in the BrainStem GP 1.0 module would still offer plenty
of dynamic range in the sensor readings.
Contents
Amplifying Voltages
Voltage amplification is required for a class of sensors that create small voltages. Often sensors
of this type are converting some sort of physical energy such as acceleration, temperature, or
other minimal physical force into a voltage. This conversion is often an inefficient conversion
and the measured energy is minimal which results in very small voltages generated by the
sensor. To make these small voltages meaningful, they must be amplified to a usable level.
The equation for amplification is the exact opposite of dividing. You want to multiply the output
voltage from a sensor to gain the full range of your A/D input or other interfaced circuit. Lets
say you have an accelerometer which measures accelerations in g (gravity) units. A sensor like
this may have a response of 312mV/g which means the sensor will generate 0.312V for each
gravity unit of force it encounters. Now, say you would like to measure up to 2 gravity units
(2g) with your detector with the full range of your 0-5V A/D converter. This means you need to
multiply the output voltage of your accelerometer by a factor of about 16 to get the desired range
and sensitivity in your measurements. So we want to accomplish the following pictorially:
Probably the most common way to multiply a voltage is using an amplifier. Here, we will use a
common Operational Amplifier (Op Amp) to multiply the voltage. These Op Amp circuits are
extremely common in electronics and there are volumes of literature devoted specifically to the
14
various characteristics and performance of each. We use one of the original versions which is
widely available and easy to interface called the 741. Here is one circuit that will amplify the
voltage by a factor of about 16:
There are some things to note about this circuit. Again, changing resistance values gives a
different voltage amplification (multiplication). The small numbers indicate the pins of the 741
package that you would connect to for this circuit (it is an 8 pin chip). Also, notice the additional
power supply which is both positive and negative. This is very common for Op Amp circuits.
Since the Op Amp is powered by a plus/minus voltage of 9V, the absolute output can at best be
9V. In practice, the output voltage will probably be slightly less.
The gain for this amplifier may not be exactly linear, depending on the input and output
voltages. This can often be hidden in the noise of the sensor and accuracy of the A/D conversion
on the other end but it should be considered. The higher the gain of an amplifier, the larger the
margin of error and noise.
Contents
Shifting Voltages
Shifting voltages can be a requirement for sensor data that are generated symmetrically about a
common (often ground) voltage. A simple example of this would be a motor acting as a
generator where spinning in one direction creates a positive voltage and spinning in the other
direction creates a negative voltage. Since most common A/D converters in microcontrollers
deal with a 0-VCC range for conversions, sensors that are symmetric about the ground voltage
reference need to be shifted into the 0-VCC range.
The equation for shifting is then then the addition or subtraction of an offset from the original
sensor's voltage. For example, if your sensor produces -2 to 2V, you would want to add 2V to
the output for reading with a common 0-5V A/D converter. This addition would result in a final
output of 0-4V which the A/D converter could then use. This conversion looks like this
pictorially:
15
This circuit is a two-stage summing amplifier using an Op-Amp chip (the 1458) that houses two
op-amps on a single chip. Notice there are some fixed values of resistors that essentially create a
voltage summing circuit. The input on one side is a resistor network that creates a fixed voltage
to sum with the input voltage. The variable resistor values change this resistor network's set
voltage. You could substitute a potentiometer for R1 and R2 to make the addition variable, by
twisting the potentiometer.
The addition circuit also requires a plus/minus 9V power supply for the op-amps. In addition, a
tap from the 5V supply used for the logic is used although this could be done with the positive
9V side as well, provided the voltages are computed correctly.
Contents
Combining Conversions
So the above conversions define addition, subtraction, multiplication, and division of a voltage.
Each of these conversions can be thought of in isolation as shown above or they can be
combined to create composite conversions. We essentially have an algebra of blocks we can use
to achieve a wide variety of overall conversions.
Say you have a sensor that creates -100 to 100V and you want to read the value with a 0-5V A/D
converter. You would need to scale down the original voltage to -2.5 to 2.5V first and then
offset the result by adding 2.5V to get the result into the desired range of 0-5V for your A/D
converter. You can chain together the conversions for such an effect which would look like this
pictorially:
16
Contents
Conversion Impurities
The above conversions all introduce impurities in the resulting signal in the form of noise, non-
linearity, and other corruptions of the original input voltage. Care must be taken to minimize the
number of stages and also to order them for reduced error. Testing and careful thought can
typically reduce these impurities to a minimum but they cannot be disregarded.
There is a general rule of thumb with regard to these introduced impurities. The more you are
changing the original voltage, the more impurities you will introduce. For instance, an
amplification of 100x would be generally more noisy than one of 2x.
Contents
Several of these circuits require a plus/minus 9V supply for the Op Amps. This can readily be
accomplished using two standard 9V batteries. More sophisticated options include standard
power supplies, charge pumps and inverters and several other options. The 9V battery is cheap,
simple and it works well. Op Amp circuits tend to be pretty efficient so the batteries should last
quite some time.
Contents
Further Reading
The subject of sensor interfaces is vast. This article attempts to give some basics that are easy,
practical, and quick to implement. Here are two great references to consider:
17
Contents
Additional Information
A short workshop converting this material was held at the Colorado School of Mines (CSM).
The handout used for the class is available for download.
SensorWorkshop.pdf
125.09K Bytes
Revision History:
Related Links:
voice: 720-564-0373, email: sales@acroname.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350,
privacy
© Copyright 1994-2010 Acroname
ZIGBEE:
18
ZigBee is a low-cost, low-power, wireless mesh networking
standard. First, the low cost allows the technology to be widely deployed in
wireless control and monitoring applications. Second, the low power-usage allows
longer life with smaller batteries. Third, the mesh networking provides high
reliability and more extensive range.
ZigBee operates in the industrial, scientific and medical (ISM) radio bands;
868 MHz in Europe, 915 MHz in the USA and Australia, and 2.4 GHz in most
jurisdictions worldwide. The technology is intended to be simpler and less
19
expensive than other WPANs such as Bluetooth. ZigBee chip vendors typically
sell integrated radios and microcontrollers with between 60 KB and 256 KB flash
memory.
Because ZigBee can activate (go from sleep to active mode) in 30 msec or
less, the latency can be very low and devices can be very responsive — particularly
compared to Bluetooth wake-up delays, which are typically around three seconds.
[3]
Because ZigBees can sleep most of the time, average power consumption can be
very low, resulting in long battery life.
The first stack release is now called ZigBee 2004. The second stack release
is called ZigBee 2006, and mainly replaces the MSG/KVP structure used in 2004
with a "cluster library". The 2004 stack is now more or less obsolete.
ZigBee 2007, now the current stack release, contains two stack profiles,
stack profile 1 (simply called ZigBee), for home and light commercial use, and
stack profile 2 (called ZigBee Pro). ZigBee Pro offers more features, such as multi-
casting, many-to-one routing and high security with Symmetric-Key Key
Exchange (SKKE), while ZigBee (stack profile 1) offers a smaller footprint in
RAM and flash. Both offer full mesh networking and work with all ZigBee
application profiles.
Licensing
20
Adopter, provides access to the as-yet unpublished specifications and permission to
create products for market using the specifications.
This causes problems for open-source developers because the annual fee
conflicts with the GNU General Public License. From the GPL v2, "b) You must
cause any work that you distribute or publish, that in whole or in part contains or is
derived from the Program or any part there of, to be licensed as a whole at no
charge to all third parties under the terms of this License." Since the GPL makes no
distinction between commercial and non-commercial use it is impossible to
implement a GPL licensed ZigBee stack or combine a ZigBee implementation with
GPL licensed code. The requirement for the developer to join the ZigBee Alliance
similarly conflicts with most other Free software licenses.
Device types
21
The most capable device, the coordinator forms the root of the network
tree and might bridge to other networks. There is exactly one ZigBee coordinator
in each network since it is the device that started the network originally. It is able
to store information about the network, including acting as the Trust Center &
repository for security keys.
Contains just enough functionality to talk to the parent node (either the
coordinator or a router); it cannot relay data from other devices. This relationship
allows the node to be asleep a significant amount of the time thereby giving long
battery life. A ZED requires the least amount of memory, and therefore can be less
expensive to manufacture than a ZR or ZC.
Protocols
22
lamp node will be at least a ZigBee Router, if not the ZigBee Coordinator; the
switch node is typically a ZigBee End Device.
Except for the Smart Energy Profile 2.0, which will be MAC/PHY
agnostic, ZigBee devices are required to conform to the IEEE 802.15.4-2003 Low-
Rate Wireless Personal Area Network (WPAN) standard. The standard specifies
the lower protocol layers—the physical layer (PHY), and the media access control
(MAC) portion of the data link layer (DLL). This standard specifies operation in
the unlicensed 2.4 GHz (worldwide), 915 MHz (Americas) and 868 MHz (Europe)
ISM bands. In the 2.4 GHz band there are 16 ZigBee channels, with each channel
requiring 5 MHz of bandwidth. The center frequency for each channel can be
calculated as, FC = (2405 + 5 * (ch - 11)) MHz, where ch = 11, 12, ..., 26.
23
meters for zigbee pro, although it is heavily dependent on the particular
environment. The output power of the radios is generally 0 dBm (1 mW).
ZigBee RF4CE:
Even though the radios themselves are inexpensive, the ZigBee Qualification
Process involves a full validation of the requirements of the physical layer. This
amount of concern about the Physical Layer has multiple benefits, since all radios
derived from that semiconductor mask set would enjoy the same RF
characteristics. On the other hand, an uncertified physical layer that malfunctions
could cripple the battery lifespan of other devices on a ZigBee network. Where
24
other protocols can mask poor sensitivity or other esoteric problems in a fade
compensation response, ZigBee radios have very tight engineering constraints:
they are both power and bandwidth constrained. Thus, radios are tested to the ISO
17025 standard with guidance given by Clause 6 of the 802.15.4-2006 Standard.
Most vendors plan to integrate the radio and microcontroller onto a single chip
getting smaller devices.
History
The IEEE 802.15.4-2003 standard was completed in May 2003 and has been
superseded by the publication of IEEE 802.15.4-2006.
The ZigBee Alliance announced in October 2004 that the membership had
more than doubled in the preceding year and had grown to more than 100 member
companies, in 22 countries. By April 2005 membership had grown to more than
150 companies, and by December 2005 membership had passed 200 companies.
25
ELECTRICAL CHARACTERSTICS:
26
DEVICE OVERVIEW:
MOUNTING DETAILS:
28
CIRCUIT DIAGRAM:
FEATURES:
29
2.4 GHz IEEE Std. 802.15.4™ RF Transceiver Module :
RF/Analog Features:
30
Digital VCO and Filter Calibration .
Integrated RSSI ADC and I/Q DACs
Integrated LDO .
High Receiver and RSSI Dynamic Range .
MAC/Baseband Features:
Applications
ADC 0808/0809
31
The ADC0809 data acquisition component is a monolithic CMOS
device with an 8-bit analog-to-digital converter, 8-channel multiplexer and
microprocessor compatible control logic. The 8-bit A/D converter uses successive
approximation as the conversion technique.
The device eliminates the need for external zero and full-scale
adjustments. Easy interfacing to microprocessors is provided by the latched and
decoded multiplexer address inputs and latched TTL TRI-STATE® outputs.
Features
32
8-channel multiplexer with address logic
0V to 5V input range with single 5V power supply
Key Specifications
Resolution 8 Bits
Total Unadjusted Error ±1⁄2 LSB and ±1 LSB
Single Supply 5 VDC
Low Power 15 mW
Conversion Time 100 μs
Block Diagram
Pin Diagram
33
Figure.3.2.Pin Diagram of ADC 0809
34
Functional Description
Multiplexer
35
The successive approximation register (SAR) performs eight iterations
to determine the digital code for input value. The SAR is reset on the positive edge
of START pulse and start the conversion process on the falling edge of START
pulse.
The ADC can be used in continuous conversion mode by tying the EOC
output to START input. In this mode an external START pulse should be applied
whenever power is switched ON.
36
Application
37
VOLTAGE SENSOR
Introduction
The interface of various sensors to a controller like the BrainStem GP 1.0 module typically
involves either conditioning or converting voltage levels into the range the controller requires.
Many systems use A/D converters to make the sensor value relevant in a program or data logging
configuration. These converters have a fixed range of voltages they can convert from with 0-5V
being by far the most common.
Sensors often create voltages in different ranges than those required by the controllers they are
being interfaced to which requires the conversion of one voltage to another. This conversion
often breaks down into a combination one or more of three types, amplification, dividing, and
shifting.
Contents
Dividing Voltages
Voltage dividing is probably the easiest transformation you can perform on sensor outputs to
alter the value being connected to a microcontroller or other circuit.
The mathematical equivalent of what you are trying to achieve when dividing voltages is a
simple division. For instance, say you have a sensor that outputs 0-100V and you want to
convert this to 0-5V for interface to the A/D input on your BrainStem. The goal would be to
create a 20:1 ratio of voltage which means dividing the original sensor output voltage by a factor
of 20. So we need a small circuit that will accomplish the following pictorially:
The easiest way to accomplish this division is using a few resistors to form a voltage divider.
The resistors are wired up in series to create intermediate voltages based with the desired
division. The above example could be accomplished as follows:
38
This voltage divider uses the input as the top of the resistor ladder and ground as the bottom.
The actual division is defined by the proportion of resistance between the two resistors.
Notice the above circuit does not work out to an exact division by 20. This is because the
resistors used are commonly found resistor values. Precision resistors with exact tolerances can
be used but are often not needed since the original output of sensors typically varies. Here the
resulting output voltage is slightly below the maximum of 5V but with a reasonable A/D
converter like the 10-bit converters used in the BrainStem GP 1.0 module would still offer plenty
of dynamic range in the sensor readings.
Contents
Amplifying Voltages
Voltage amplification is required for a class of sensors that create small voltages. Often sensors
of this type are converting some sort of physical energy such as acceleration, temperature, or
other minimal physical force into a voltage. This conversion is often an inefficient conversion
and the measured energy is minimal which results in very small voltages generated by the
sensor. To make these small voltages meaningful, they must be amplified to a usable level.
The equation for amplification is the exact opposite of dividing. You want to multiply the output
voltage from a sensor to gain the full range of your A/D input or other interfaced circuit. Lets
say you have an accelerometer which measures accelerations in g (gravity) units. A sensor like
this may have a response of 312mV/g which means the sensor will generate 0.312V for each
gravity unit of force it encounters. Now, say you would like to measure up to 2 gravity units
(2g) with your detector with the full range of your 0-5V A/D converter. This means you need to
multiply the output voltage of your accelerometer by a factor of about 16 to get the desired range
and sensitivity in your measurements. So we want to accomplish the following pictorially:
Probably the most common way to multiply a voltage is using an amplifier. Here, we will use a
common Operational Amplifier (Op Amp) to multiply the voltage. These Op Amp circuits are
extremely common in electronics and there are volumes of literature devoted specifically to the
various characteristics and performance of each. We use one of the original versions which is
widely available and easy to interface called the 741. Here is one circuit that will amplify the
voltage by a factor of about 16:
39
There are some things to note about this circuit. Again, changing resistance values gives a
different voltage amplification (multiplication). The small numbers indicate the pins of the 741
package that you would connect to for this circuit (it is an 8 pin chip). Also, notice the additional
power supply which is both positive and negative. This is very common for Op Amp circuits.
Since the Op Amp is powered by a plus/minus voltage of 9V, the absolute output can at best be
9V. In practice, the output voltage will probably be slightly less.
The gain for this amplifier may not be exactly linear, depending on the input and output
voltages. This can often be hidden in the noise of the sensor and accuracy of the A/D conversion
on the other end but it should be considered. The higher the gain of an amplifier, the larger the
margin of error and noise.
Contents
Shifting Voltages
Shifting voltages can be a requirement for sensor data that are generated symmetrically about a
common (often ground) voltage. A simple example of this would be a motor acting as a
generator where spinning in one direction creates a positive voltage and spinning in the other
direction creates a negative voltage. Since most common A/D converters in microcontrollers
deal with a 0-VCC range for conversions, sensors that are symmetric about the ground voltage
reference need to be shifted into the 0-VCC range.
The equation for shifting is then then the addition or subtraction of an offset from the original
sensor's voltage. For example, if your sensor produces -2 to 2V, you would want to add 2V to
the output for reading with a common 0-5V A/D converter. This addition would result in a final
output of 0-4V which the A/D converter could then use. This conversion looks like this
pictorially:
40
This circuit is a two-stage summing amplifier using an Op-Amp chip (the 1458) that houses two
op-amps on a single chip. Notice there are some fixed values of resistors that essentially create a
voltage summing circuit. The input on one side is a resistor network that creates a fixed voltage
to sum with the input voltage. The variable resistor values change this resistor network's set
voltage. You could substitute a potentiometer for R1 and R2 to make the addition variable, by
twisting the potentiometer.
The addition circuit also requires a plus/minus 9V power supply for the op-amps. In addition, a
tap from the 5V supply used for the logic is used although this could be done with the positive
9V side as well, provided the voltages are computed correctly.
Contents
Combining Conversions
So the above conversions define addition, subtraction, multiplication, and division of a voltage.
Each of these conversions can be thought of in isolation as shown above or they can be
combined to create composite conversions. We essentially have an algebra of blocks we can use
to achieve a wide variety of overall conversions.
Say you have a sensor that creates -100 to 100V and you want to read the value with a 0-5V A/D
converter. You would need to scale down the original voltage to -2.5 to 2.5V first and then
offset the result by adding 2.5V to get the result into the desired range of 0-5V for your A/D
converter. You can chain together the conversions for such an effect which would look like this
pictorially:
Contents
41
Conversion Impurities
The above conversions all introduce impurities in the resulting signal in the form of noise, non-
linearity, and other corruptions of the original input voltage. Care must be taken to minimize the
number of stages and also to order them for reduced error. Testing and careful thought can
typically reduce these impurities to a minimum but they cannot be disregarded.
There is a general rule of thumb with regard to these introduced impurities. The more you are
changing the original voltage, the more impurities you will introduce. For instance, an
amplification of 100x would be generally more noisy than one of 2x.
Contents
Several of these circuits require a plus/minus 9V supply for the Op Amps. This can readily be
accomplished using two standard 9V batteries. More sophisticated options include standard
power supplies, charge pumps and inverters and several other options. The 9V battery is cheap,
simple and it works well. Op Amp circuits tend to be pretty efficient so the batteries should last
quite some time.
Contents
Further Reading
The subject of sensor interfaces is vast. This article attempts to give some basics that are easy,
practical, and quick to implement. Here are two great references to consider:
Contents
Additional Information
A short workshop converting this material was held at the Colorado School of Mines (CSM).
The handout used for the class is available for download.
42
SensorWorkshop.pdf
125.09K Bytes
Revision History:
Related Links:
voice: 720-564-0373, email: sales@acroname.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350,
privacy
© Copyright 1994-2010 Acroname
CURRENT SENSOR
AC current input,
o analog output, which duplicates the wave shape of the sensed
current
o unipolar output, which is proportional to the average or RMS
value of the sensed current
DC current input,
o unipolar, with a unipolar output, which duplicates the wave
shape of the sensed current
43
o bipolar output, which duplicates the wave shape of the sensed
current
o digital output, which switches when the sensed current
exceeds a certain threshold
UART
44
Serial transmission of digital information (bits) through a single wire or
other medium is much more cost effective than parallel transmission through
multiple wires. A UART is used to convert the transmitted information between its
sequential and parallel form at each end of the link.
MAX232
45
Block Diagram
Transmitter
Parallel-to-serial conversion
TX Character Framing
Start Bit
Data Bits of 5, 6, 7 or 8
Parity Bit
Stop Bit of 1, 1.5 or 2
Example:
Receiver
Serial-to-Parallel Conversion
Serial to CPU
Receive (RX) FIFO and Receive Shift Register (RSR)with error tags
16X timing clock for mid bit sampling and verification
Start-bit detection and verification
Data-bit sampling
Parity sampling & verification (parity error)
Stop bit sampling & verification
Framing check and error(s) report
47
FIFO status report (RXRDY and INT)
RX Character Validation
Pin Diagram
Figure.3.4.PinDiagram of MAX232
Applicability
48
This module is primary of interest for people building their own
electronics with an RS-232 interface. Off-the-shelf computers with RS-232
interfaces already contain the necessary electronics, and there is no need to add the
circuitry as described here.
The MAX232 from Maxim was the first IC which in one package
contains the necessary drivers (two) and receivers (also two), to adapt the RS-232
signal voltage levels to TTL logic. It became popular, because it just needs one
voltage (+5V) and generates the necessary RS-232 voltage levels (approx. -10V
and +10V) internally.
The MAX232 has a successor, the MAX232A. The ICs are almost
identical, however, the MAX232A is much more often used (and easier to get) than
the original MAX232, and the MAX232A only needs external capacitors 1/10th
the capacity of what the original MAX232 needs.
49
The MAX232 and MAX232A were once rather expensive ICs, but
today they are cheap. It has also helped that many companies now produce clones
(ie. Sipex).
The MAX233 is also between three and ten times more expensive in
electronic shops than the MAX232A because of its internal capacitors. It is also
more difficult to get the MAX233 than the garden variety MAX232A.
A Typical Application
This means only two of the RS-232 signals can be converted in each
direction. The old MC1488/1498 combo provided four drivers and receivers.
TX and RX
50
If the DTE really requires these signals either a second MAX232 is
needed, or some other IC from the MAX232 family can be used (if it can be found
in consumer electronic shops at all). An alternative for DTR/DSR is also given
below.
Maxim's data sheet explains the MAX232 family in great detail, including
the pin configuration and how to connect such an IC to external circuitry. This
information can be used as-is in own design to get a working RS-232 interface.
Table.3.2.Datasheet of MAX232
AT89s52 Microcontroller:
51
The AT89S52 is a low-power, high-performance CMOS 8-bit
microcontroller with 8K bytes of in-system programmable Flash memory. The
device is manufactured using Atmel’s high-density nonvolatile memory
technology and is compatible with the Indus-try-standard 80C51 instruction set and
pin out.
Features:
52
Three 16-bit Timer/Counters.
Watchdog Timer.
Power-off Flag.
Description:
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 con-tents but freezes the oscillator,
disabling all other chip functions until the next interrupt or hardware reset.
Pin configuration:
54
Block diagram:
55
Pin Description:
56
VCC:
Supply voltage.
GND:
Ground.
Port 0:
Port 0 is an 8-bit open drain bidirectional 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 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:
57
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1
output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins,
they are pulled high by the inter-nal pull-ups and can be used as inputs.
As inputs, Port 1 pins that are externally being pulled low will source current
(IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured
to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2
trigger input (P1.1/T2EX), respectively, as shown in the following table.
Port 1 also receives the low-order address bytes during Flash programming
and verification.
Port 2:
Port 2 is an 8-bit bidirectional 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 and can be used as inputs.
58
As inputs, Port 2 pins that are externally being pulled low will source current
(IIL) because of the internal pull-ups. Port 2 emits the high-order address byte
during fetches from external program memory and during accesses to external data
memory that uses 16-bit addresses (MOVX @ DPTR).
In this application, Port 2 uses strong internal pull-ups when emitting 1s.
During accesses to external data memory that uses 8-bit addresses (MOVX @ RI),
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 bidirectional I/O port with internal pull-ups. The Port 3
output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins,
they are pulled high by the internal pull-ups and can be used as inputs.
As inputs, Port 3 pins that are externally being pulled low will source current
(IIL) because of the pull-ups. Port 3 receives some control signals for Flash
programming and verification. Port 3 also serves the functions of various special
features of the AT89S52, as shown in the following table.
59
RST:
Reset input. A high on this pin for two machine cycles while the oscillator is
running resets the device.
This pin drives high for 98 oscillator periods after the Watchdog times out.
The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature.
In the default state of bit DISRTO, the RESET HIGH out feature is enabled.
ALE/PROG:
Address Latch Enable (ALE) is an output pulse for latching the low byte of
the address during accesses to external memory. This pin is also the program pulse
input (PROG) during Flash programming.
60
In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator
frequency and may be used for external timing or clocking purposes. Note,
however, that one ALE pulse is skipped during each access to external data
memory.
Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no
effect if the microcontroller is in external execution mode.
PSEN:
EA/VPP :
61
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.
XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
XTAL2:
Memory Organization:
MCS-51 devices have a separate address space for Program and Data
Memory. Up to 64K bytes each of external Program and Data Memory can be
addressed.
Program Memory:
62
If the EA pin is connected to GND, all program fetches are directed to
external memory. On the AT89S52, if EA is connected to VCC, program fetches to
addresses 0000H through 1FFFH are directed to internal memory and fetches to
addresses 2000H through FFFFH are to external memory.
Data Memory:
The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes
occupy a parallel address space to the Special Function Registers.
This means that the upper 128 bytes have the same addresses as the SFR
space but are physically separate from SFR space.
For example, the following direct addressing instruction accesses the SFR at
location 0A0H (which is P2). MOV 0A0H, #data Instructions that use indirect
addressing access the upper 128 bytes of RAM.
MOV @R0, #data Note that stack operations are examples of indirect
addressing, so the upper 128 bytes of data RAM are available as stack space.
63
Watchdog Timer:
To enable the WDT, a user must write 01EH and 0E1H in sequence to the
WDTRST register (SFR location 0A6H).
When the WDT is enabled, it will increment every machine cycle while the
oscillator is running. The WDT timeout period is dependent on the external clock
frequency.
There is no way to disable the WDT except through reset (either hardware
reset or WDT overflow reset). When WDT over-flows, it will drive an output
RESET HIGH pulse at the RST pin.
To enable the WDT, a user must write 01EH and 0E1H in sequence to the
WDTRST register (SFR location 0A6H).
When the WDT is enabled, the user needs to service it by writing 01EH and
0E1H to WDTRST to avoid a WDT overflow. The 14-bit counter overflows when
it reaches 16383 (3FFFH), and this will reset the device.
64
]
When the WDT is enabled, it will increment every machine cycle while the
oscillator is running. This means the user must reset the WDT at least every 16383
machine cycles.
To reset the WDT the user must write 01EH and 0E1H to WDTRST.
WDTRST is a write-only register. The WDT counter cannot be read or written.
When WDT overflows, it will generate an output RESET pulse at the RST
pin. The RESET pulse duration is 98xTOSC, where TOSC = 1/FOSC.
To make the best use of the WDT, it should be serviced in those sections of
code that will periodically be executed within the time required to prevent a WDT
reset.
In Power-down mode the oscillator stops, which means the WDT also stops.
While in Power-down mode, the user does not need to service the WDT.
When Power-down is exited with hardware reset, servicing the WDT should
occur as it normally does whenever the AT89S52 is reset. Exiting Power-down
65
with an interrupt is significantly different. The interrupt is held low long enough
for the oscillator to stabilize.
When the interrupt is brought high, the interrupt is serviced. To prevent the
WDT from resetting the device while the interrupt pin is held low, the WDT is not
started until the interrupt is pulled high. It is suggested that the WDT be reset
during the interrupt service for the interrupt used to exit Power-down mode.
To ensure that the WDT does not overflow within a few states of exiting
Power-down, it is best to reset the WDT just before entering Power-down mode.
Before going into the IDLE mode, the WDIDLE bit in SFR AUXR is used to
determine whether the WDT continues to count if enabled.
The WDT keeps counting during IDLE (WDIDLE bit = 0) as the default
state. To prevent the WDT from resetting the AT89S52 while in IDLE mode, the
user should always set up a timer that will periodically exit IDLE, service the
WDT, and reenter IDLE mode.
With WDIDLE bit enabled, the WDT will stop to count in IDLE mode and
resumes the count upon exit from IDLE.
Uses of microcontroller:
Like all good things, this powerful component is basically very simple. It is
made by mixing tested and high- quality "ingredients" (components) as per
following receipt:
The simplest computer processor is used as the "brain" of the future system.
66
Depending on the taste of the manufacturer, a bit of memory, a few A/D
converters, timers, input/output lines etc. are added.
Simple software able to control it all and which everyone can easily learn
about has been developed.
Their incredible simplicity and flexibility conquered us a long time ago and
if you try to invent something about them, you should know that you are
probably late, someone before you has either done it or at least has tried to
do it.
67
learn) and a simple device (called the programmer) used for “loading”
ready-to-use programs into the microcontroller.
So, if you are infected with a virus called electronics, there is nothing
left for you to do but to learn how to use and control its power.
Working of microcontroller:
Thus, if you learn to handle one of them you will be able to handle them all.
A typical scenario on the basis of which it all functions is as follows:
Power supply is turned on and everything starts to happen at high speed! The
control logic unit keeps everything under control.
It disables all other circuits except quartz crystal to operate. While the
preparations are in progress, the first milliseconds go by.
All pins are configured as inputs. The overall electronis starts operation in
rhythm with pulse sequence. From now on the time is measured in micro and
nanoseconds.
68
Program Counter is set to zero. Instruction from that address is sent to
instruction decoder which recognizes it, after which it is executed with immediate
effect.
Inside a microcontroller:
69
As you can see, all the operations within the microcontroller are performed
at high speed and quite simply, but the microcontroller itself would not be so
useful if there are not special circuits which make it complete. In continuation, we
are going to call your attention to them.
The internal ROM is usually smaller and more expensive, but leaves more
pins available for connecting to peripheral environment. The size of ROM ranges
from 512B to 64KB.
For that purpose, one of the registers in RAM is called the "sum" and used
for storing results of addition. The size of RAM goes up to a few KBs.
It is often used to store values, created and used during operation (such as
calibration values, codes, values to count up to etc.), which must be saved after
turning the power supply off.
71
Special Function Registers (SFR):
For example, writing zero or one to the SFR controlling an input/output port
causes the appropriate port pin to be configured as input or output. In other words,
each bit of this register controls the function of one single pin.
72
Program Counter:
As its name suggests, this is a unit which monitors and controls all processes
within the microcontroller and the user cannot affect its work.
73
Arithmetical Logical Unit (ALU) performs all mathematical and logical
operations upon data.
It also stores the results ready for use in further processing. One of the SFRs,
called the Status Register, is closely related to the accumulator, showing at any
given time the "status" of a number stored in the accumulator (the number is
greater or less than zero etc.). A bit is just a word invented to confuse novices at
electronics. Joking aside, this word in practice indicates whether the voltage is
present on a conductor or not. If it is present, the approprite pin is set to logic one
(1), i.e. the bit’s value is 1.
Otherwise, if the voltage is 0 V, the appropriate pin is cleared (0), i.e. the
bit’s value is 0. It is more complicated in theory where a bit is referred to as a
binary digit, but even in this case, its value can be either 0 or 1.
74
Each microcontroller has one or more registers (called a port) connected to
the microcontroller pins.
Oscillator:
75
It can also operate without elements for frequency stabilization (like RC
oscillator). It is important to say that program instructions are not executed at the
rate imposed by the oscillator itself, but several times slower.
Timers/Counters:
If the registers use pulses coming from external source, then such a timer is
turned into a counter.
76
This is only a simple explanation of the operation itself. It’s somehow more
complicated in practice.
All SFRs are assigned names which are different for different types of the
microcontrollers and each of them has a special function as their name suggests.
77
Power Supply Circuit:
There are two things worth attention concerning the microcontroller power
supply circuit:
Brown out is a potentially dangerous state which occurs at the moment the
microcontroller is being turned off or when power supply voltage drops to the
lowest level due to electric noise.
This circuit immediately resets the whole electronics when the voltage level
drops below the lower limit.
78
Reset pin is usually referred to as Master Clear Reset (MCLR) and serves for
external reset of the microcontroller by applying logic zero (0) or one (1)
depending on the type of the microcontroller. In case the brown out is not built in
the microcontroller, a simple external circuit for brown out reset can be connected
to this pin.
Serial communication:
79
How fast the data exchange has to be?
It is important to remember that byte digits are not of equal significance. The
largest value has the leftmost bit called the most significant bit (MSB). The
rightmost bit has the least value and is therefore called the least significant bit
(LSB).
Since 8 digits (zeros and ones) of one byte can be combined in 256 different
ways, the largest decimal number which can be represented by one byte is 255 (one
combination represents zero).
80
Program:
This book describes the use of Assembly because it is the simplest language
with the fastest execution allowing entire control on what is going on in the circuit.
Interrupt - electronics is usually more faster than physical processes it should keep
under control. This is why the microcontroller spends most of its time waiting for
something to happen or execute. In other words, when some event takes place, the
microcontroller does something.
81
As its name suggests, it interrupts regular program execution. It can be
generated by different sources so when it occurs, the microcontroller immediately
stops operation and checks for the cause.
Stack is a part of RAM used for storing the current state of the program
counter (address) when an interrupt occurs. In this way, after a subroutine or an
interrupt execution, the microcontroller knows from where to continue regular
program execution.
Applications:
Automotive:
They must support small designs and offer a high level of integration, to fit
the limited space available in automotive environments. To meet the diverse needs
of a variety of automotive applications, developers need solutions that offer:
82
Flexible interface options for a variety of HMI capabilities.
Standards-based connectivity for intelligent networked solutions.
Protection and compatibility for high-voltage products, including robust
electromagnetic compatibility (EMC); electrostatic discharge (ESD)
protection; and OEM approvals.
Resistance to high temperatures for trouble-free operation in automotive
environments.
Maximum safety for automobile access.
Low power consumption for maximum efficiency.
Building Automation:
Today's intelligent home and building automation solutions offer new levels
of comfort, security, and efficiency. To develop the sophisticated solutions that
meet the needs that consumers demand, designers need standards-based, flexible
technology that can provide:
More than ever, consumers have high expectations for home appliances.
They demand sophisticated, feature-rich products that are reliable and easy to use.
To meet these needs, developers of white goods need technology that provides:
83
Advanced human machine interface (HMI) support through touchscreen
technology for a rich, easy user experience.
Flexible, compatible connectivity to integrate devices with the outside
world.
Standards-based certification to enable reliable, high-quality solutions.
Home Entertainment:
Industrial Automation:
84
High performance together with power efficiency.
Rugged environmental design to resist water, dust, moisture, and extreme
temperatures.
Advanced, yet cost effective Human Machine Interface (HMI) features.
Support for high-speed wired and wireless communication.
Dedicated features for functional safety implementation.
Lighting:
Fluorescent and LED lights use 50 to 80 percent less energy than their
incandescent counterparts. No wonder U.S. and European governments are
pushing vendors for lighting solutions that rely on high frequency electronic
ballasts. Successful ballast design depends on a few key tradeoffs:
Metering:
The market for energy, water, and gas metering systems is rapidly changing,
driven by new environmental and conservation concerns and regulations.
Traditional standalone meters are now being replaced by complex networked
systems that utilize a variety of communication methods. To meet the needs of this
evolving Smart Grid, metering developers need solutions that can provide:
85
Today's mobile products are changing the way people consume information,
socialize, conduct business, and purchase products. Major technology revolutions
have completely changed the landscape for mobile devices.
PC Peripherals:
Today's personal computers do so much more than compute. With the right
peripheral, computers can entertain, educate, connect, monitor, and secure.
Successful PC peripheral design depends on some key tradeoffs:
DC MOTOR:
86
The shunt motor is different from the series motor in that the field winding
is connected in parallel with the armature instead of in series. You should
remember from basic electrical theory that a parallel circuit is often referred to as a
shunt. Since the field winding is placed in parallel with the armature, it is called a
shunt winding and the motor is called a shunt motor. Figure shows a diagram of a
shunt motor. Notice that the field terminals are marked Fl and F2, and the armature
terminals are marked Al andA2. You should notice in this diagram that the shunt
field is represented with multiple turns using a thin line.
Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,
commutator, field magnet(s), and brushes. In most common DC motors (and all
that BEAMers will see), the external magnetic field is produced by high-strength
permanent magnets1. The stator is the stationary part of the motor ,this includes the
motor casing, as well as two or more permanent magnet pole pieces. The rotor
(together with the axle and attached commutator) rotate with respect to the stator.
The rotor consists of windings (generally on a core), the windings being
electrically connected to the commutator. The above diagram shows a common
motor layout -- with the rotor inside the stator (field) magnets.
87
winding, leading to a "flip" of the rotor's magnetic field, driving it to continue
rotating.
In real life, though, DC motors will always have more than two poles
(three is a very common number). In particular, this avoids "dead spots" in the
commutator. You can imagine how with our example two-pole motor, if the rotor
is exactly at the middle of its rotation (perfectly aligned with the field magnets), it
will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where
the commutator shorts out the power supply (i.e., both brushes touch both
commutator contacts simultaneously). This would be bad for the power supply,
waste energy, and damage motor components as well. Yet another disadvantage of
such a simple motor is that it would exhibit a high amount of torque "ripple" (the
amount of torque it could produce is cyclic with the position of the rotor).
88
Diagram of DC shunt motor.
The slight loss in speed reduces the counter emf and results in an increase of
the armature current. This action continues until the increased current produces
enough torque to meet the demands of the increased load. As a result, the shunt
motor is in a state of stable equilibrium because a change of load always produces
a reaction that adapts the power input to the change in load.
The basic circuit for a shunt motor is shown in figure. Note that only a shunt
field winding is shown. Figure shows the addition of a series winding to counteract
the effects of armature reaction. From the standpoint of a schematic diagram,
figure represents a compound motor. However, this type of motor is not considered
89
to be a com pound motor because the commutating winding is not wound on the
same pole as the field winding and the series field has only a few turns of wire in
series with the armature circuit. As a result, the operating characteristics are those
of a shunt motor. This is so noted on the nameplate of the motor by the terms
compensated shunt motor or stabilized shunt motor.
DC MOTOR CHARACTERISTICS:
90
The bar magnet represents the armature and the coil of wire represents the
field. The arrow shows the direction of the armature's rotation. Notice that the
arrow shows the armature starting to rotate in the clockwise direction. The north
pole of the field coil is repelling the north pole of the armature, and the south pole
of the field coil is repelling the south pole of the armature.
(a) Magnetic diagram that explains the operation of a DC motor. The rotating
magnet moves clockwise because like poles repel.
(b) The rotating magnet is being attracted because the poles are unlike.
(c) The rotating magnet is now shown as the armature coil, and its polarity is
determined by the brushes and commutator segments.
As the armature begins to move, the north pole of the armature comes
closer to the south pole of the field, and the south pole of the armature is coming
closer to the north pole of the field. As the two unlike poles near each other, they
begin to attract. This attraction becomes stronger until the armature's north pole
moves directly in line with the field's south pole, and its south pole moves directly
in line with the field's north pole (b).
When the opposite poles are at their strongest attraction, the armature will
be "locked up" and will resist further attempts to continue spinning. For the
armature to continue its rotation, the armature's polarity must be switched. Since
the armature in this diagram is a permanent magnet, you can see that it would lock
up during the first rotation and not work. If the armature is an electromagnet, its
polarity can be changed by changing the direction of current flow through it. For
91
this reason the armature must be changed to a coil (electromagnet) and a set of
commutator segments must be added to provide a means of making contact
between the rotating member and the stationary member.
Since the armature is now a coil of wire, it will need DC current flowing
through it to become magnetized. This presents another problem; since the
armature will be rotating, the DC voltage wires cannot be connected directly to the
armature coil.
Two factors are important in the selection of a motor for a particular application:
This action continues until the increased current produces enough torque to
meet the demands of the increased load. As a result, the shunt motor is in a state of
stable equilibrium because a change of load always produces a reaction that adapts
the power input to the change in load.
The basic circuit for a shunt motor is shown in figure . Note that only a
shunt field winding is shown. Figure 1-10B shows the addition of a series winding
to counteract the effects of armature reaction. From the standpoint of a schematic
diagram, figure 1-10B represents a compound motor. However, this type of motor
is not considered to be a com pound motor because the commutating winding is
not wound on the same pole as the field winding and the series field has only a few
turns of wire in series with the armature circuit.
Speed Control
A dc shunt motor has excellent speed control. To operate the motor above its
rated speed, a field rheostat is used to reduce the field current and field flux. To
operate below rated speed, reduce the voltage applied to the armature circuit.
A more modem method of speed control is the electronic speed control system.
The principles of control are the same as the manual controls. Speeds above
normal are achieved by reducing the field voltage electronically and speeds below
normal reduce the voltage applied to the armature.
Rotation
Torque
A dc shunt motor has high torque at any speed. At startup, a dc shunt motor
develops 150 percent of its rated torque if the resistors used in the starting
mechanism are capable of withstanding the heating effects of the current. For very
short periods of time, the motor can develop 350 percent of full load torque, if
necessary.
Speed Regulation
The speed regulation of a shunt motor drops from 5 percent to 10 percent from the
no-load state to full load. As a result, a shunt motor is superior to the series dc
motor, but is inferior to a compound-wound dc motor. Figure shows a dc motor
with horse power ratings ranging from 1 hp to 5 hp.
the field coil. In this application the armature coil is usually changed, as was the
case with the series motor. the electrical diagram of a DC shunt motor connected to
a forward and reversing motor starter. You should notice that the Fl and F2
terminals of the shunt field are connected directly to the power supply, and the Al
and A2 terminals of the armature winding are connected to the reversing starter.
When the FMS is energized, its contacts connect the Al lead to the positive power
supply terminal and the A2 lead to the negative power supply terminal.
94
connected to the positive power supply terminal. The field leads are connected
directly to the power supply, so their polarity is not changed.
Since the field's polarity has remained the same and the armature's polarity
has reversed, the motor will begin to rotate in the reverse direction. The control
part of the diagram shows that when the FMS coil is energized, the RMS coil is
locked out. Installing a Shunt Motor A shunt motor can be installed easily.
The motor is generally used in belt-drive applications. This means that the
installation procedure should be broken into two sections, which include the
mechanical installation of the motor and its load, and the installation of electrical
wiring and controls.
The motor must have its electrical installation completed to use this method.
The motor should be started, and if it is drawing too much current, the belt should
be loosened slightly but not enough to allow the load to slip. If the belt is slipping,
it can be tightened to the point where the motor is able to start successfully and not
draw current over its rating The electrical installation can be completed before,
GAS SENSOR
Gas detectors and gas sensors interact with a gas to initiate the
measurement of its concentration. The gas detector of gas sensor then
provides output to a gas instrument to display the measurements.
95
Common gases measured by gas detectors and gas sensors include
ammonia, aerosols, arsine, bromine, carbon dioxide, carbon monoxide,
chlorine, chlorine dioxide, Diborane, dust, fluorine, germane,
halocarbons or refrigerants, hydrocarbons, hydrogen, hydrogen chloride,
hydrogen cyanide, hydrogen fluoride, hydrogen selenide, hydrogen
sulfide, mercury vapor, nitrogen dioxide, nitrogen oxides, nitric oxide,
organic solvents, oxygen, ozone, phosphate, silane, sulfur dioxide, and
water vapor.
Features:
96
Level sensor:
Introduction:
Level sensors detect the level of substances that flow, including liquids,
slurries, granular materials, and powders. All such substances flow to become
essentially level in their containers (or other physical boundaries) because of
gravity. The substance to be measured can be inside a container or can be in its
natural form (e.g. a river or a lake).
There are many physical and application variables that affect the selection of
the optimal level monitoring method for industrial and commercial processes. The
selection criteria include the physical: phase (liquid, solid or slurry), temperature,
pressure or vacuum, chemistry, dielectric constant of medium, density (specific
gravity) of medium, agitation (action), acoustical or electrical noise, vibration,
mechanical shock, tank or bin size and shape.
Description:
97
It is ideal for use on mobile equipment where a surface must be finished to a
required level with respect to gravity.
In typical use, the sensor is connected to a controller, which controls a
hydraulic control valve such as a KVF servovalve.
Features:
Easy to wire. Connections between controller and sensor are made through
MS connectors.
Excellent sensitivity. The shaft supporting the pendulous mass and the rotor
of the microsyn is mounted on ball bearings for smooth, low-friction
rotation.
A variety of sensors are available for point level detection of solids. These
include vibrating, rotating paddle, mechanical (diaphragm), microwave
(radar), capacitance, optical, pulsed-ultrasonic and ultrasonic level sensors.
Vibrating point:
These detect levels of very fine powders (bulk density: 0.02 g/cm 3 – 0.2
g/cm3), fine powders (bulk density: 0.2 – 0.5 g/cm 3), and granular solids (bulk
density: 0.5 g/cm3 or greater). With proper selection of vibration frequency and
98
suitable sensitivity adjustments, they can also sense the level of highly fluidized
powders and electrostatic materials.
Single-probe vibrating level sensors are ideal for bulk powder level. Since
only one sensing element contacts the powder, bridging between two probe
elements is eliminated and media build-up is minimized. The vibration of the probe
tends to eliminate build-up of material on the probe element. Vibrating level
sensors are not affected by dust, static-charge build-up from dielectric powders, or
changes in conductivity, temperature, pressure, humidity or moisture content.
Tuning-fork style vibration sensors are another alternative. They tend to be less
costly, but are prone to material buildup between the times.
Rotating paddle:
Rotating paddle level sensors are a very old and established technique for
bulk solid point level indication. The technique uses a low speed gear motor that
rotates a paddle wheel. When the paddle is stalled by solid materials, the motor is
rotated on its shaft by its own torque until a flange mounted on the motor contacts
a mechanical switch.
The paddle can be constructed from a variety of materials, but tacky material
must not be allowed to build up on the paddle. Build up may occur if the process
material becomes tacky because of high moisture levels or high ambient humidity
in the hopper.
For materials with very low weight per unit volume such as Pearlite,
Bentonite or fly ash, special paddle designs and low-torque motors are used. Fine
particles or dust must be prevented from penetrating the shaft bearings and motor
by proper placement of the paddle in the hopper or bin and using appropriate seals.
Admittance-type:
99
When the level changes around the probe, a corresponding change in the di-
electric is observed. This changes the admittance of this imperfect capacitor and
this change is measured to detect change of level.
Only signal received during this window period will qualify for additional
signal processing. The dry signal will not be received within this window, and
therefore will be ignored.
The principle behind magnetic, mechanical, cable, and other float level
sensors involves the opening or closing of a mechanical switch, either through
direct contact with the switch, or magnetic operation of a reed. With magnetically
actuated float sensors, switching occurs when a permanent magnet sealed inside a
float rises or falls to the actuation level.
For example, larger floats may be used with liquids with specific gravities as
low as 0.5 while still maintaining buoyancy. The choice of float material is also
influenced by temperature-induced changes in specific gravity and viscosity –
changes that directly affect buoyancy.[2]
100
Float-type sensors can be designed so that a shield protects the float itself
from turbulence and wave motion. Float sensors operate well in a wide variety of
liquids, including corrosives.
When used for organic solvents, however, one will need to verify that these
liquids are chemically compatible with the materials used to construct the sensor.
Float-style sensors should not be used with high viscosity (thick) liquids, sludge or
liquids that adhere to the stem or floats, or materials that contain contaminants
such as metal chips; other sensing technologies are better suited for these
applications.
Pneumatic:
Pneumatic level sensors are used where hazardous conditions exist, where
there is no electric power or its use is restricted, and in applications involving
heavy sludge or slurry.
Conductive:
Conductive level sensors are ideal for the point level detection of a wide
range of conductive liquids such as water, and is especially well suited for highly
corrosive liquids such as caustic soda, hydrochloric acid, nitric acid, ferric
chloride, and similar liquids.
101
For those conductive liquids that are corrosive, the sensor’s electrodes need
to be constructed from titanium, Hastelloy B or C, or 316 stainless steel and
insulated with spacers, separators or holders of ceramic, polyethylene and Teflon-
based materials.
Depending on their design, multiple electrodes of differing lengths can be
used with one holder. Since corrosive liquids become more aggressive as
temperature and pressure increase, these extreme conditions need to be considered
when specifying these sensors.
Since the current and voltage used is inherently small, for personal safety
reasons, the technique is also capable of being made “Intrinsically Safe” to meet
international standards for hazardous locations. Conductive probes have the
additional benefit of being solid-state devices and are very simple to install and
use.
Typically, in most water and wastewater wells, the well itself with its
ladders, pumps and other metal installations, provides a ground return. However, in
chemical tanks, and other non-grounded wells, the installer must supply a ground
return, typically an earth rod.
102
Ultrasonic:
Ultrasonic level sensors are used for non-contact level sensing of highly
viscous liquids, as well as bulk solids. They are also widely used in water
treatment applications for pump control and open channel flow measurement. The
sensors emit high frequency (20 kHz to 200 kHz) acoustic waves that are reflected
back to and detected by the emitting transducer.
Ultrasonic level sensors are also affected by the changing speed of sound
due to moisture, temperature, and pressures. Correction factors can be applied to
the level measurement to improve the accuracy of measurement.
Since the ultrasonic transducer is used both for transmitting and receiving
the acoustic energy, it is subject to a period of mechanical vibration known as
“ringing”. This vibration must attenuate (stop) before the echoed signal can be
processed.
The net result is a distance from the face of the transducer that is blind and
cannot detect an object. It is known as the “blanking zone”, typically 150mm – 1m,
depending on the range of the transducer.
The requirement for electronic signal processing circuitry can be used to make the
ultrasonic sensor an intelligent device. Ultrasonic sensors can be designed to
provide point level control, continuous monitoring or both.
103
Due to the presence of a microprocessor and relatively low power
consumption, there is also capability for serial communication from to other
computing devices making this a good technique for adjusting calibration and
filtering of the sensor signal, remote wireless monitoring or plant network
communications. The ultrasonic sensor enjoys wide popularity due to the powerful
mix of low price and high functionality.
Capacitance:
Dual-probe capacitance level sensors can also be used to sense the interface
between two immiscible liquids with substantially different dielectric constants,
providing a solid state alternative to the aforementioned magnetic float switch for
the “oil-water interface” application.
Since capacitance level sensors are electronic devices, phase modulation and
the use of higher frequencies makes the sensor suitable for applications in which
dielectric constants are similar.
The sensor contains no moving parts, is rugged, simple to use, easy to clean,
and can be designed for high temperature and pressure applications. A danger
exists from build up and discharge of a high-voltage static charge that results from
the rubbing and movement of low dielectric materials, but this danger can be
eliminated with proper design and grounding.
104
For liquids prone to foaming and applications prone to splashing or
turbulence, capacitance level sensors can be designed with splashguards or stilling
wells, among other devices.
A significant limitation for capacitance probes is in tall bins used for storing
bulk solids. The requirement for a conductive probe that extends to the bottom of
the measured range is problematic.
Long conductive cable probes (20 to 50 meters long) suspended into the bin
or silo, are subject to tremendous mechanical tension due to the weight of the bulk
powder in the silo and the friction applied to the cable. Such installations will
frequently result in a cable breakage.
Optical interface:
Optical sensors are used for point level sensing of sediments, liquids with
suspended solids, and liquid-liquid interfaces. These sensors sense the decrease or
change in transmission of infrared light emitted from an infrared diode (LED).
With the proper choice of construction materials and mounting location, these
sensors can be used with aqueous, organic, and corrosive liquids.
105
interference from ambient light, operate the LED at a higher gain, and lessen the
effects of build-up on the probe.
An alternate approach for continuous optical level sensing involves the use
of a laser. Laser light is more concentrated and therefore is more capable of
penetrating dusty or steamy environments. Laser light will reflect off most solid,
liquid surfaces.
Microwave:
Microwave sensors are ideal for use in moist, vaporous, and dusty
environments as well as in applications in which temperatures vary. Microwaves
(also frequently described as RADAR), will penetrate temperature and vapor layers
that may cause problems for other techniques, such as ultrasonic.
106
Microwave is also executed as a non-contact technique, monitoring a
microwave signal that is transmitted through the medium (including vacuum), or
can be executed as a “radar on a wire” technique.
These sensors do not require physical contact with the process material, so
the transmitter and receiver can be mounted a safe distance from the process, yet
still respond to the presence or absence of an object. Microwave transmitters offer
the key advantages of ultrasonics: the presence of a microprocessor to process the
signal provides numerous monitoring, control, communications, setup and
diagnostic capabilities.
Magnetostrictive:
107
When choosing float and stem materials for magnetostrictive level sensors,
the same guidelines described for magnetic and mechanical float level sensors
apply.
Resistive chain:
Resistive chain level sensors are similar to magnetic float level sensors in
that a permanent magnet sealed inside a float moves up and down a stem in which
closely spaced switches and resistors are sealed.
When the switches are closed, the resistance is summed and converted to
current or voltage signals that are proportional to the level of the liquid.
The choice of float and stem materials depends on the liquid in terms of
chemical compatibility as well as specific gravity and other factors that affect
buoyancy.
These sensors work well for liquid level measurements in marine, chemical
processing, pharmaceuticals, food processing, waste treatment, and other
applications. With the proper choice of two floats, resistive chain level sensors can
also be used to monitor for the presence of an interface between two immiscible
liquids whose specific gravities are more than 0.6, but differ by as little as 0.1 unit.
Hydrostatic pressure:
108
or water in reservoirs. For these sensors, using chemically compatible materials is
important to assure proper performance. Sensors are commercially available from
10mbar to 1000bar.
Since these sensors sense increasing pressure with depth and because the
specific gravities of liquids are different, the sensor must be properly calibrated for
each application.
For use in open air applications, where the sensor cannot be mounted to the
bottom of the tank or pipe thereof, a special version of the hydrostatic pressure
level sensor can be suspended from a cable into the tank to the bottom point that is
to be measured.
The sensor must be specially designed to seal the electronics from the liquid
environment. In tanks with a small head pressure (less than 100 INWC), it is very
important to vent the back of the sensor gauge to atmospheric pressure.
Air bubbler:
An air bubbler system uses a tube with an opening below the surface of the
liquid level. A fixed flow of air is passed through the tube. Pressure in the tube is
proportional to the depth (and density) of the liquid over the outlet of the tube.
Air bubbler systems contain no moving parts, making them suitable for
measuring the level of sewage, drainage water, sewage sludge, night soil, or water
with large quantities of suspended solids. The only part of the sensor that contacts
the liquid is a bubble tube which is chemically compatible with the material whose
level is to be measured.
109
Since the point of measurement has no electrical components, the technique
is a good choice for classified “Hazardous Areas”. The control portion of the
system can be located safely away, with the pneumatic plumbing isolating the
hazardous from the safe area.
Air bubbler systems are a good choice for open tanks at atmospheric
pressure and can be built so that high-pressure air is routed through a bypass valve
to dislodge solids that may clog the bubble tube.
Gamma ray:
A nuclear level gauge or gamma ray gauge measures level by the attenuation
of gamma rays passing through a process vessel. The technique is used to regulate
the level of molten steel in a continuous casting process of steelmaking.
The technique allows non-contact measurement where the heat of the molten
metal makes any contact technique impractical.
Technical data:
110
Features:
111
Dynamic temperature compensation system.
Submersible pressure transducer not affected by foam, wind, or rain.
Monitors levels in groundwater wells, rivers, streams, tanks, lift stations and
open channels.
CE Certified.
Sensing Element:
Pressure Range: 0-3, 0-15, 0-30, 0-60, 0-120, 0-250, 0-500 ft.
Applications:
The SLW... series water level switches work to maintain a constant water
level avoiding material wastage in your process plant.
112
Common applications also include switching pumps on and off to avoid
overflow, dry running and indicating water level in an empty tank to avoid
wear and tear and production stoppage.
The measurement of temperature is one of the
fundamental requirements for environmental control, as well as
certain chemical, electrical and mechanical controls. Many different
types of temperature sensors are commercially available, and the type
of temperature sensor that will be used in any particular application
will depend on several factors. For example, cost, space constraints,
durability, and accuracy of the temperature sensor are all
considerations that typically need to be taken into account.
Various types of temperature sensors are known
including liquid-in-glass (LIG) thermometers, bimetallic
thermometers, resistance thermometers, thermocouples, and
radiometers. Depending upon the temperature to be measured, the
required accuracy of the measurement, and other factors such as
durability or cost, one type of temperature sensor may be preferable
over another.
Some temperature sensors provide a wide range of
temperature measurement, whereas other temperature sensors may
only provide temperature information for a small temperature range.
In addition to the temperature range sensed, the sensitivity and the
113
accuracy of temperature sensors may also vary widely. Additionally,
some temperature sensors work at high voltages while others only
work at low voltages.
There're many types of devices that can be employed as
temperature sensors. They include integrated circuits (ICs),
pyrometers, resistance temperature detectors (RTDs), thermistors,
thermocouples, electromechanical & volume (EMV).
LM35 is a precision IC temperature sensor with its output
proportional to the temperature (in oC). 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 oC temperature rise in still air.
The operating temperature range is from -55°C to 150°C. The
output voltage varies by 10mV in response to every oC rise/fall in
ambient temperature, i.e., its scale factor is 0.01V/ oC.
114
exceeded. Typical integrated circuit (IC) solutions for sensing
temperature change use a semiconductor temperature sensor
manufactured, entirely on the IC. Such ICs include transistors,
bolometers and pyroelectrics.
The integrated circuit sensor typically employs an integrated
diode whose output characteristics are dependent upon temperature.
The semiconductor temperature sensor can be a forward-biased pn
junction diode or variations thereof as is known in the art, such as a
diode connected npn or pnp bipolar transistor. Bolometers
incorporating temperature sensors are well known devices for
measuring radiation, and in these devices the temperature sensors are
arranged to have temperatures dependent on the flux of incident
radiation.
Different types of bolometer are used for measuring
different types of radiation in various environments; in fusion
experiments, for example, bolometers are used to measure
quantitatively the radiation and neutral particle emission from the
plasma. The resistance temperature detector (RTD) takes advantage of
the principal that the resistivity of metals is, to a small degree,
dependent upon temperature.
RTDs include all metals in the form of wire, thin/thick-films
and foil, in which the change in metal resistance vs temperature
produces a change in voltage drop, under constant current bias.
Thermistors include hot-pressed and/or fired ceramics, with embedded
electrical contact wires; the principle of operation is identical to that
of RTDs.
The thermistor is a temperature sensitive resistor and is
generally composed of semiconductor materials. Thermocouples
include metals, in the form of wires or thin-films, in which the
junction formed between 2 dissimilar metals generates a temperature
dependent voltage. The thermocouple method takes advantage of the
fact that, when two wires composed of dissimilar metals are joined at
the ends and one of the ends is heated, there is a continuous current
generated which flows in the thermo-electric circuit.
Thermocouples do not require electrical input to the TC
junction but they do require an electrical input to maintain a reference
junction.
EMVs include devices such as metal coils and strips, and
volumetric tube and bulb thermometers, in which
expansion/contraction of the metal/fluid is used to measure
115
temperature. Pyrometers which are sensitive to infrared, optical and
acoustic wavelengths, convert the input wavelength to an optical or
electronic output by means of an IC, RTD, thermistor or
thermocouple.
Temperature sensors normally generate an output signal that
increases with increasing temperature. A temperature sensor
comprises a sensing element housed in an elongated sheath.
The sensing element itself may be an electrical resistive
element. The sensor is commonly installed in a thermowell to position
the sensor element at a location at which the temperature reading is
desired. Temperature sensors such as digital thermometers often
measure temperature by exploiting the thermal-voltage characteristics
of a diode.
The temperature coefficient of a diode is the voltage drop
across the diode as a finction of temperature while the diode is
forward-biased by a constant current. The thin-film temperature
sensor is a thin-film type sensor which comprises an alumina or
silicon substrate and multiple layers laminated on the substrate by
using the semiconductor micromachining technique. Known examples
of a thermal type infrared sensor with such a structure include a
micro-thermistor bolometer and a thin-film thermistor.
Thermistor devices for temperature sensors are used in the
measurement of temperatures in the range 400-1300.degree. C. and
are used in the measurement of automotive exhaust gas temperatures,
gas flame temperatures in gas water heaters and the like, and the
temperatures of heating ovens.
Digital temperature sensors are well known. Digital
temperature sensors are typically used to generate a temperature
reference for the circuits on the chip or other integrated chips. Digital
temperature sensors, such as voltage reference circuits, generate a
temperature output signal by normalizing a thermometer voltage to a
reference voltage.
The analog to digital converter of the digital temperature
sensor measures the temperature dependent voltage ratiometrically
relative to the reference voltage. It is also known to use capacitors as
temperature sensors, where temperature changes lead to dimensional
changes of the dielectric material separating the capacitor's electrodes,
resulting in changes in capacitance which can be measured using a
capacitance bridge.
116
The thermal type infrared sensor is a non-contact type sensor
that measures the surface temperature of hot objects and moving
objects. An infrared detecting portion of the sensor is heated by the
energy of infrared radiated from the object being measured and a
change in electric resistance of a thermal sensitive resistor making up
the infrared detecting portion of the sensor is detected as a
temperature change, from which the surface temperature is
determined.
To measure temperature by means of infrared emission,
thermal (infrared) radiation can be detected either by quantum
detectors or by thermal detectors.
Quantum detectors, such as photoresistors or
photodiodes, require cryogenic cooling to measure relatively low
temperatures with high accuracy. On the other hand, thermal
detectors, while not as sensitive as quantum, may operate at normal
room temperatures.
117
In addition, the operating temperature range for a particular
electronic system may have to be limited. For integrated circuits such
as processors heat sinks are provided to dissipate heat generated by
the processor. Fans are typically utilized in conjunction with heat
sinks to blow air on the fins of the heat sink to achieve greater cooling
through convection.
Temperature detectors have been used for monitoring the
operating temperature of non-volatile EEPROM memories used in
smartcards. Smartcards are plastics cards having an integrated circuit,
such as a memory circuit or a microcontroller, embedded therein.
These cards are increasing in popularity for a variety of applications,
including credit cards, POS cards, telephone cards, access control
cards, etc.
Temperature sensors with a relatively high degree of
accuracy are used in smart antenna systems for ground based
applications (e.g., cellular antennas) and airborne applications (e.g.,
airplane or satellite antennas). Smart antenna systems, such as
adaptive or phased array antennas, combine the outputs of multiple
antenna elements with signal processing capabilities to transmit and/or
receive communications signals.
With temperature sensors, such antenna systems can vary
the transmission or reception pattern of the communications signals in
response to the signal environment to improve performance
characteristics.
Temperature sensors are utilized to monitor a variety of automotive
systems, including for example coolant temperature and exhaust gas
temperature. These sensors typically utilize a wire-type thermistor
which is generally soldered to hard-wired leads.
As engine technology becomes increasingly more
sophisticated, the number and variety of sensors used in controlling
the engine has continued to climb. Modern automotive engines
typically rely on numerous engine parameters for correct engine
operation. Optimum engine parameters are generally stored in the
memory of an engine controller. Typical engines may include many
sensors used to provide information to the vehicle owner, operator,
and service personnel and/or used to control the engine.
Temperature sensors may be used to provide engine
protection by quickly detecting adverse operating conditions which
may indicate a fault or malfunction to reduce or eliminate any
permanent engine damage.
118
The engine control module (ECM) monitors the sensor
inputs to detect conditions which may trigger a diagnostic code or
fault which may be used by owners/operators and/or service and
maintenance personnel to troubleshoot and repair the engine. High
temperature resistance temperature detector (RTD) sensors are used in
emission-control systems used with internal combustion engines
because they can detect changes in temperature with time constants on
the order of about 10 seconds or less as is required in that type of
application.
To measure temperatures up to about 1,000.degree. C.,
thermocouples that use platinum/platinum-rhodium or
nickel/chromium-nickel have been used. Temperature sensors for use
need to be accurate and reliable while operating in the harsh vehicle
environment over a long period of time. Further, since there may be
many sensor assemblies per vehicle, the cost of the sensors must be
minimized.
Temperature sensors are also used in a variety of other
applications. For instance, a temperature sensor has been used in
petrochemical industry, process control industry, electrical, oil and
gas exploration & mining industries whereas exact measurement of
particular temperature has to be controlled for getting the desired
products or composition.
Temperature sensors are commonly utilized in cold rooms
to monitor the temperature within the area to ensure that the
temperature does not increase to a point where the goods may be at a
risk of spoilage.
In such applications, a separate temperature sensor is connected
to an alarm system to provide for a warning if the temperature
increases beyond a particular limit. Storage areas where products are
stored which must be kept from freezing are required to have the
temperature monitored to ensure that it does not fall below a level at
which the products may freeze.
Temperature sensors are also used in greenhouses to maintain
the temperature within an acceptable growing range, while also
ensuring that the temperature has not reached a level which would
cause permanent damage to the crops. LIG thermometers are standard
equipment at laboratories and surface weather stations. LIG
thermometers have a fine glass bore and a fluid reservoir. Operation
depends on the thermal expansion of the liquid contained in the glass
envelope. The sensitivity of the LIG thermometer depends inversely
119
on the diameter of the bore of the tube and on the relative expansion
coefficients of the liquid and glass.
Applications:
The LM35 can be applied easily in the same way as other
integrated-circuit temperature sensors. It can be glued or cemented to
a surface and its temperature will be within about 0.01°C of the
surface temperature.
This presumes that the ambient 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 and the air temperature.
This is expecially true for the TO-92 plastic package, where the
copper leads are the principal thermal path to carry heat into the
device, so its temperature might be closer to the air temperature than
to the surface temperature.
To minimize this problem, be sure that the wiring to the
LM35, as it leaves the device, is held at the same temperature as the
surface of interest. The easiest way to do this is to cover up these
wires with a bead of epoxy which will insure that the leads and wires
are all at the same temperature as the surface, and that the LM35 die’s
temperature will not be affected by the air temperature.
The TO-46 metal package can also be soldered to a metal
surface or pipe without damage. Of course, in that case the V−
terminal of the circuit will be grounded to that metal.Alternatively, the
LM35 can be mounted inside a sealed-end metal tube, and can then be
dipped into a bath or screwed into a threaded hole in a tank. As with
any IC, the LM35 and accompanying wiring and circuits must be kept
insulated and dry, to avoid leakage and corrosion.
This is especially true if the circuit may operate at cold
temperatures where condensation can occur. Printed-circuit coatings
and varnishes such as Humiseal and epoxy paints or dips are often
used to insure that moisture cannot corrode the LM35 or its
connections.
These devices are sometimes soldered to a small light-
weight heat fin, to decrease the thermal time constant and speed up
the response in slowly-moving air. On the other hand, a small thermal
mass may be added to the sensor, to give the steadiest reading despite
small deviations in the air temperature.
120
Typical Applications:
121
Temperature Sensor, Single Supply ( −55° to+150°C)
Two-Wire Remote Temperature Sensor(Output Referred to
Ground)
122
To-20 mA Current Source (0°C to +100°C)
Physical Dimensions inches (millimeters) unless otherwise noted
(Continued)
123
Power Package TO-220 (T) Order Number LM35DT NS Package
Number TA03F
TO-92 Plastic Package (Z)Order Number LM35CZ,
LM35CAZ or LM35DZ NS Package Number Z03A
Features
• Single-chip, high-quality voice recording & playback solution
- No external ICs required
- Minimum external components
• Non-volatile Flash memory technology
- No battery backup required
• User-Selectable messaging options
- Random access of multiple fixed-duration messages
- Sequential access of multiple variable-duration messages
• User-friendly, easy-to-use operation
- Programming & development systems not required
- Level-activated recording & edge-activated play back switches
• Low power consumption
- Operating current: 25 mA typical
- Standby current: 1 uA typical
125
- Automatic power-down
• Chip Enable pin for simple message expansion
Pin functions of the IC :
During sound recording, sound is picked up by the
microphone. A microphone pre-amplifier amplifies the voltage signal
from the microphone.
An AGC circuit is included in the pre-amplifier, the extent of
which is controlled by an external capacitor and resistor. If the voltage
level of a sound signal is around 100 mV peak to-peak, the signal can
be fed directly into the IC through ANA IN pin (pin 20).
The sound signal passes through a filter and a sampling and hold
circuit. The analogue voltage is then written into non-volatile flash
analogue RAMs. It has a 28 pin DIP package. Supply voltage is
between 4.5V to 6.5V. During recording and replaying, current
consumption is 25 mA. In idle mode, the current drops to 1 A.
The APR9600 device offers true single-chip voice recording,
non- volatile storage, and playback capability for 40 to 60 seconds.
126
The device supports both random and sequential access of multiple
messages. Sample rates are user-selectable, allowing designers to
customize their design for unique quality and storage time needs.
Integrated output amplifier, microphone amplifier, and AGC
circuits greatly simplify system design. The device is ideal for use in
portable voice recorders, toys, and many other consumer and
industrial applications.
APLUS integrated achieves these high levels of storage capability
by using its proprietary analog/multilevel storage technology
implemented in an advanced Flash non-volatile memory process,
where each memory cell can store 256 voltage levels. This technology
enables the APR9600 device to reproduce voice signals in their
natural form. It eliminates the need for encoding and compression,
which often introduce distortion.
FUNCTIONAL DESCRIPTION:
The APR9600 block diagram is included in order to give
understanding of the APR9600 internal architecture. At the left hand
side of the diagram are the analog inputs. A differential Microphone
127
amplifier, including integrated AGC, is included on-chip for
applications requiring its use.
The amplified microphone signal is fed into the device by connecting
the Ana_Out pin to the Ana_In pin through an external DC blocking
capacitor. Recording can be fed directly into the Ana_In pin through a
DC blocking capacitor, however, the connection between Ana_In and
Ana_Out is still required for playback. The next block encountered by
the input signal is
the internal anti-aliasing filter.
The filter automatically adjusts its response according to the sampling
frequency selected so Shannon’s Sampling Theorem is satisfied. After
anti-aliasing filtering is accomplished the signal is ready to be clocked
into the memory array. This storage is accomplished through a
combination of the Sample and Hold circuit and the Analog
Write/Read circuit.
These circuits are clocked by either the Internal Oscillator or an
external clock source. When playback is desired the previously stored
recording is retrieved from memory, low pass filtered, and amplified
as shown on the right hand side of the diagram. The signal can be
heard by connecting a speaker to the SP+ and SP- pins.
Chip-wide management is accomplished through the device control
block shown in the upper right hand corner. Message management is
controlled through the message control block represented in the lower
center of the block diagram.
128
Message Management General Description:
Playback and record operations are managed by on chip
circuitry. There are several available messaging modes depending
upon desired operation. These message modes determine message
management style, message length, and external parts count.
Therefore, the designer must select the appropriate operating mode
before beginning the design.
Operating modes do not affect voice quality, for information
on factors affecting quality refer to the Sampling Rate & Voice
Quality section.
The device supports three message management modes
(defined by the MSEL1, MSEL2 and /M8_Option pins shown in
Figures 1 and 2):
• Random access mode with 2, 4, or 8 fixed-duration messages
• Tape mode, with multiple variable-duration messages, provides
129
two options:
- Auto rewind
- Normal
Modes cannot be mixed. Switching of modes after the device has
recorded an initial message is not recommended. If modes are
switched after an initial recording has been made some unpredictable
message fragments from the previous mode may remain present, and
be audible on playback, in the new mode.
These fragments will disappear after a record operation in the
newly selected mode.
Table 1 defines the decoding necessary to choose the desired mode.
An important feature of the APR9600 message management
capabilities is the ability to audibly prompt the user to changes in the
device’s status through the use of “beeps” superimposed on the
device’s output. This feature is enabled by asserting a logic high level
on the BE pin.
131
message immediately following recording or playback of the message.
In tape mode, using either option, messages must be recorded or
played back sequentially, much like a traditional cassette tape
recorder.
Function Description Recording in Tape Mode :
On power up, the device is ready to record or play back, starting at
the first address in the memory array. To record, /CE must be set low
to enable the device and /RE must be set low to enable recording. A
falling edge of the /M1_Message pin initiates voice recording
(indicated by one beep). A subsequent rising edge of the
/M1_Message pin during recording stops the recording (also indicated
by one beep).
If the /M1_Message pin is held low beyond the end of the available
memory, recording will stop automatically (indicated by two beeps).
The device will then assert a logic low on the /M7_END pin for a
duration equal to 1600 cycles of the sample sample clock, regardless
of the state of the /M1_Message pin.
The device returns to standby mode when the /M1_Message pin goes
high again. After recording is finished the device will automatically
rewind to the beginning of the most recently recorded message and
wait for the next user input. The auto rewind function is convenient
because it allows the user to immediately playback and review the
message without the need to rewind.
However, caution must be practiced because a subsequent record
operation will overwrite the last recorded message unless the user
remembers to pulse the /M2_Next pin in order to increment the device
past the current message.
A subsequent falling edge on the /M1_Message pin starts a new
record operation, overwriting the previously existing message. You
can preserve the previously recorded message by using the /M2_Next
input to initiate recording in the next available message segment. To
perform this function,the /M2_Next pin must be pulled low for at least
400 cycles of the sample clock.
132
The auto rewind mode allows the user to record over the
previous message simply by initiating a record sequence without first
toggling the /M2_Next pin. To record over any other message
however requires a different sequence. You must pulsethe /CE pin
low once to rewind the device to the beginning of the voice memory.
The /M2_Next pin must then be pulsed low for the specified
number of times to move to the start of the message you wish to
overwrite. Upon arriving at the desired message a record sequence can
be initiated to overwrite the previously recorded material.
After you overwrite the message it becomes the last available
message and all previously recorded messages following this message
become inaccessible. If during a record operation all the available
memory is used the device will stop recording automatically, (double
beep) and set the /M7_END pin low for a duration equal to 1600
cycles of the sample clock.
Playback can be initiated on this last message, but pulsing
the /M2_Next pin will put the device into an “overflow state”. Once
the device enters an overflow state any subsequent pulsing of
/M1_Message or /M2_Next will only result in a double beep and
setting of the /M7_END pin low for a duration equal to 400 cycles of
the sample clock.
To proceed from this state the user must rewind the device to
the beginning of the memory array. This can be accomplished by
toggling the /CE pin low or cycling power. All inputs, except the /CE
pin, are ignored during recording.
Function Description of Playback in Tape Mode using Auto
Rewind Option:
On power-up, the device is ready to record or play
back,starting at the first address in the memory array. Before you can
begin playback, the /CE input must be set to low to enable the device
and /RE must be set to high to disable recording and enable playback.
133
The first high to low going pulse of the /M1_Message pin
initiates playback from the beginning of the current message, on
power up the first message is the current message.
When the /M1_Message pin pulses low the second time,
playback of the current message stops immediately. When the
/M1_Message pin pulses low a third time, playback of the current
message starts again from its beginning. If you hold the /M1_Message
pin low continuously the same message will play continuously in a
looping fashion.
A 1,530 ms period of silence is inserted during looping as an
indicator to the user of the transition between the beginning and end
of the message.Note that in auto rewind mode the device always
rewinds to the beginning of the current message.
To listen to a subsequent message the device must be fast
forwarded past the current message to the next message. This function
is accomplished by toggling the /M2_Next pin from high to low.The
pulse must be low for least 400 cycles of the sampling clock.
After the device is incremented to the desired message the
user can initiate playback of the message with the playback sequence
described above. A special case exists when the /M2_Next pin goes
low during playback.
Playback of the current message will stop, the device will
beep, advance to the next message and initiate playback of the next
message.
(Note that if /M2_Next goes low when not in playback mode, the
device will prepare to play the next message, but will not actually
initiate playback).
If the /CE pin goes low during playback, playback of the
current message will stop, the device will beep, reset to the beginning
of the first message, and wait for a subsequent playback command.
When you reach the end of the memory array, any
subsequent pulsing of /M1_Message or /M2_Next will only result in a
double beep. To proceed from this state the user must rewind the
device to the beginning of the memory array. This
134
can be accomplished by toggling the /CE pin low or cycling power.
MIWI:
135
The relationship between IEEE 802.15.4 and MIWI is similar to that
between IEEE 802.11 and the Wi-Fi Alliance. The MIWI 1.0 specification was
ratified on 14 December 2004 and is available to members of the MIWI Alliance.
Most recently, the MIWI 2007 specification was posted on 30 October 2007. The
first MIWI Application Profile, Home Automation, was announced 2 November
2007. As amended by NIST, the Smart Energy Profile 2.0 specification will
remove the dependency on IEEE 802.15.4. Device manufacturers will be able to
implement any MAC/PHY, such as IEEE 802.15.4(x) and IEEE P1901, under an
IP layer based on 6LoWPAN.
MIWI operates in the industrial, scientific and medical (ISM) radio bands;
868 MHz in Europe, 915 MHz in the USA and Australia, and 2.4 GHz in most
jurisdictions worldwide. The technology is intended to be simpler and less
expensive than other WPANs such as Bluetooth. MIWI chip vendors typically sell
integrated radios and microcontrollers with between 60 KB and 256 KB flash
memory.
Because MIWI can activate (go from sleep to active mode) in 30 msec or
less, the latency can be very low and devices can be very responsive — particularly
compared to Bluetooth wake-up delays, which are typically around three seconds.
[3]
Because MIWIs can sleep most of the time, average power consumption can be
very low, resulting in long battery life.
136
The first stack release is now called MIWI 2004. The second stack release is
called MIWI 2006, and mainly replaces the MSG/KVP structure used in 2004 with
a "cluster library". The 2004 stack is now more or less obsolete.
MIWI 2007, now the current stack release, contains two stack profiles, stack
profile 1 (simply called MIWI), for home and light commercial use, and stack
profile 2 (called MIWI Pro). MIWI Pro offers more features, such as multi-casting,
many-to-one routing and high security with Symmetric-Key Key Exchange
(SKKE), while MIWI (stack profile 1) offers a smaller footprint in
RAM and flash. Both offer full mesh networking and work with all MIWI
application profiles.
MIWI 2007 is fully backward compatible with MIWI 2006 devices: A MIWI
2007 device may join and operate on a MIWI 2006 network and vice versa. Due to
differences in routing options, MIWI Pro devices must become non-routing MIWI
End-Devices (ZEDs) on a MIWI 2006 network, the same as for MIWI 2006
devices on a MIWI 2007 network must become ZEDs on a MIWI Pro network.
The applications running on those devices work the same, regardless of the stack
profile beneath them.
Licensing
This causes problems for open-source developers because the annual fee
conflicts with the GNU General Public License. From the GPL v2, "b) You must
cause any work that you distribute or publish, that in whole or in part contains or is
derived from the Program or any part there of, to be licensed as a whole at no
charge to all third parties under the terms of this License." Since the GPL makes no
137
distinction between commercial and non-commercial use it is impossible to
implement a GPL licensed MIWI stack or combine a MIWI implementation with
GPL licensed code. The requirement for the developer to join the MIWI Alliance
similarly conflicts with most other Free software licenses.
MIWI protocols are intended for use in embedded applications requiring low
data rates and low power consumption. MIWI's current focus is to define a general-
purpose, inexpensive, self-organizing mesh network that can be used for industrial
control, embedded sensing, medical data collection, smoke and intruder warning,
building automation, home automation, etc. The resulting network will use very
small amounts of power — individual devices must have a battery life of at least
two years to pass MIWI certification.
Device types
The most capable device, the coordinator forms the root of the network
tree and might bridge to other networks. There is exactly one MIWI coordinator in
each network since it is the device that started the network originally. It is able to
store information about the network, including acting as the Trust Center &
repository for security keys.
138
Contains just enough functionality to talk to the parent node (either the
coordinator or a router); it cannot relay data from other devices. This relationship
allows the node to be asleep a significant amount of the time thereby giving long
battery life. A ZED requires the least amount of memory, and therefore can be less
expensive to manufacture than a ZR or ZC.
Protocols
139
In general, the MIWI protocols minimize the time the radio is on so as to
reduce power use. In beaconing networks, nodes only need to be active while a
beacon is being transmitted. In non-beacon-enabled networks, power consumption
is decidedly asymmetrical: some devices are always active, while others spend
most of their time sleeping.
Except for the Smart Energy Profile 2.0, which will be MAC/PHY
agnostic, MIWI devices are required to conform to the IEEE 802.15.4-2003 Low-
Rate Wireless Personal Area Network (WPAN) standard. The standard specifies
the lower protocol layers—the physical layer (PHY), and the media access control
(MAC) portion of the data link layer (DLL). This standard specifies operation in
the unlicensed 2.4 GHz (worldwide), 915 MHz (Americas) and 868 MHz (Europe)
ISM bands. In the 2.4 GHz band there are 16 MIWI channels, with each channel
requiring 5 MHz of bandwidth. The center frequency for each channel can be
calculated as, FC = (2405 + 5 * (ch - 11)) MHz, where ch = 11, 12, ..., 26.
MIWI RF4CE:
140
On March 3, 2009 the RF4CE (Radio Frequency for Consumer Electronics)
Consortium agreed to work with the MIWI Alliance to jointly deliver a
standardized specification for radio frequency-based remote controls. MIWI
RF4CE is designed to be deployed in a wide range of remotely-controlled
audio/visual consumer electronics products, such as TVs and set-top boxes. It
promises many advantages over existing remote control solutions, including richer
communication and increased reliability, enhanced features and flexibility,
interoperability, and no line-of-sight barrier.
Even though the radios themselves are inexpensive, the MIWI Qualification
Process involves a full validation of the requirements of the physical layer. This
amount of concern about the Physical Layer has multiple benefits, since all radios
derived from that semiconductor mask set would enjoy the same RF
characteristics. On the other hand, an uncertified physical layer that malfunctions
could cripple the battery lifespan of other devices on a MIWI network. Where
other protocols can mask poor sensitivity or other esoteric problems in a fade
compensation response, MIWI radios have very tight engineering constraints: they
are both power and bandwidth constrained. Thus, radios are tested to the ISO
17025 standard with guidance given by Clause 6 of the 802.15.4-2006 Standard.
Most vendors plan to integrate the radio and microcontroller onto a single chip
getting smaller devices.
History
141
The IEEE 802.15.4-2003 standard was completed in May 2003 and has been
superseded by the publication of IEEE 802.15.4-2006.
The MIWI Alliance announced in October 2004 that the membership had
more than doubled in the preceding year and had grown to more than 100 member
companies, in 22 countries. By April 2005 membership had grown to more than
150 companies, and by December 2005 membership had passed 200 companies.
142
ELECTRICAL CHARACTERSTICS:
DEVICE OVERVIEW:
143
integrator from extensive RF and antenna design, and regulatory compliance
testing, allowing quicker time to market.
MODULE DETAILS:
144
MOUNTING DETAILS:
CIRCUIT DIAGRAM:
145
FEATURES:
RF/Analog Features:
MAC/Baseband Features:
147
Applications
Electrochemical sensor
- the glass electrode, sometimes called the measuring electrode or active electrode.
The electric potential created between the glass electrode, and the reference electrode is a
function of the pH value of the measured solution. So once the potential difference has been
measured you can calculate the pH value. How? Nernst equation, see below, will explain more.
When the glass and the reference electrode, are immersed in a solution, a small galvanic cell is
established. If you use a voltmeter and measure the potential between these two electrodes,
you will see a potential difference.
148
The pH sensor is essentially a simple single cell battery. It can be thought of as a battery, with a
voltage that varies with the pH of the measured solution.
149
Combination electrodes
The majority of pH electrodes available
commercially are combination electrodes that
have both the glass electrode and the
reference electrode conveniently placed in
one housing. While the reference electrode
and the pH measuring electrode are physically
combined into one electrode, the electrodes
still function independently, and characteristic
problems remain.
150
RELAY
Relays are usually SPDT or DPDT but they can have many more
sets of switch contacts, for example relays with 4 sets of changeover
contacts are readily available. For further information about switch
contacts and the terms used to describe them please see the page on
switches.
Most relays are designed for PCB mounting but you can solder
wires directly to the pins providing you take care to avoid melting the
plastic case of the relay.
151
Advantages of relays:
Relays can switch AC and DC, transistors can only switch DC.
Relays can switch high voltages, transistors cannot.
Relays are a better choice for switching large currents (> 5A).
Relays can switch many contacts at once.
Disadvantages of relays:
152
Circuit Diagram
Transmitter Section
153
Figure.3.10.Circuit Diagram of Transmitter section
154
Receiver Section
155
Figure.3.11.Circuit Diagram of Receiver Section
3.2.Summary
156
CHAPTER-4
SOFTWARE ANALYSIS
157
SOFTWARE ANALYSIS
4.1 Introduction
The following programs are used at various stages for the mentioned functions
158
rich set of operators. C is not a big language and is not designed for any one
particular area of application. Its generality combined with its absence of
restrictions, makes C a convenient and effective programming solution for a wide
variety of software tasks. Many applications can be solved more easily and
efficiently with C than with other more specialized languages.
159
CX51 compiler is a variant of the C51 compiler that is design for the new Philips
80C51MX architecture.
where:
160
source file is the name of the source program you want to compile.
directives are the directives you want to use to control the function of the
compiler.
Command file is the name of a command input file that may contain sourcefile and
directives. A command file is used, when the Cx51 invocation line gets complex
and exceeds the limits of the Windows command prompt.
The following command line example invokes C51, specifies the source file
SAMPLE.C, and uses the controls DEBUG, CODE, and PREPRINT.
C51 SAMPLE.C DEBUG CODE PREPRINT
The C51 compiler provides you with support for these CPUs through
the use of special libraries, library routines, and the MODxxx command-line
directives. These directives enable C51 to generate object code that takes
advantage of the enhancements mentioned above.
The Atmel 89x8252 and variants provide 2 data pointers which can be
used for memory access. Using multiple data pointers can improve the speed of
library functions like memcpy, memmove, memcmp, strcpy, and strcmp.
162
data pointers are saved on the stack. This happens even if the interrupt function
uses only one data pointer.
To conserve stack space, you may compile interrupt functions with the
NOMODA2 directive. The C51 compiler does not use the second data pointer
when this directive is used.
4.6 Summary
163
CHAPTER-5
RESULT
TRANSMITTER SECTION
Figure.5.1.Transmitter section
164
RECEIVER SECTION
Figure.5.2.Receiver Section
165
CONCLUSION
The hardware and software design of an embedded monitoring system
for real time applications is presented in this paper. Vibration signals have been
analyzed to detect the mechanical faults. The implementations of analysis
technique in time and frequency domain are given. The proposed system
imbalance detection technique is verified with different level of severity.
166
REFERENCES
Cao Liting, ”Distributed Security System for Intelligent Building
Yougjun Xu, Lingyi Liu, and Peifu Shen, ”Low Power Processor
Appendix
Program Coding
ADC+Serial
#include<reg51.h>
sfr adcout=0xa0;
sbit A1=P1^0;
sbit B1=P1^1;
sbit C1=P1^2;
sbit relay1=P1^3;
167
sbit relay2=P1^4;
void serialint()
SCON=0x50;
TMOD=0X20;
TH1=0XFD;
TR1=1;
TI=0;
SBUF=kk;
while(TI==0);
TI=0;
huns=(value1/100);
txs(huns+0x30);
168
tens=((value1/10)%10);
txs(tens+0x30);
ones=(value1%10);
txs(ones+0x30);
val=val|(adcout&0x80)>>7;
val=val|(adcout&0x40)>>5;
val=val|(adcout&0x20)>>3;
val=val|(adcout&0x10)>>1;
val=val|(adcout&0x8)<<1;
val=val|(adcout&0x4)<<3;
val=val|(adcout&0x2)<<5;
val=val|(adcout&0x1)<<7;
conv(val);
int i,j;
for(i=0;i<=value2;i++)
{
169
for(j=0;j<=1000;j++)
void main()
relay1=relay2=0;
serialint();
while(1)
while(RI==0)
A1=0;B1=0;C1=0;
delay(50);
txs('P');
adata(adcout);
delay(100);
A1=1;B1=0;C1=0;
delay(50);
txs('Q');
170
adata(adcout);
delay(100);
switch(SBUF)
LCD
#include <REGX51.H>
void lcdinit();
sbit rs=P3^5;
171
sbit rw=P3^6;
sbit en=P3^7;
void main()
while(1)
lcdinit();
lcdcmd(0x80);
lcddat(k);
void lcdinit()
lcdcmd(0x38);
delay(20);
lcdcmd(0x0e);
delay(20);
lcdcmd(0x01);
delay(20);
lcdcmd(0x06);
delay(20);
172
}
rs=0;
rw=0;
P0=value;
en=1;
delay(1);
en=0;
for(;*value;)
P0=*value++;
rs=1;
rw=0;
en=1;
delay(1);
en=0;
}
173
void delay(unsigned int itime)
for(i=0;i<itime;i++)
for(j=0;j<1275;j++);
174