Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Session 2011-2015
Project Supervisor
Submitted By
Degree
Bachelor of Science
In
Telecommunication/Electronics
By
_______________ ________________
Supervisor Dean
Lastly, we thank all our teachers who have sweated their guts during these four years to train us
as efficient engineers.
The concept of our project revolves around the sensor node which is essentially is a sensor,
microcomputer, power source and transceiver which form the input stage of any system. It
detects some physical parameter (temperature, pressure, proximity, vibration, sound,
electromagnetic, etc.), converts it into quantifiable data and sends the data to a host for
processing. The information is then collected by the system along with all the other sensors for a
specific control or monitoring task.
Wireless sensors gather information about the physical environment and connect it to systems
and networks to provide monitoring, automation and control for many varied applications. The
uses of wireless sensor networks are almost unlimited with many industries and applications
having specific technology requirements such as reliability, permanence, battery life, range,
frequencies and sensor use. These systems can take the form of security systems, monitoring
equipment and machinery in factories, monitoring forces.
Current and future design goals in the aerospace sensors and transducers field call for the
development of new sensing devices that require less electrical power, occupy less space, and
weigh less. Self-calibration, self-health assessment, processing of raw data at the sensor level,
and alternate data transmission methods are desired to provide the user with information in a
more efficient way. The Instrumentation Branch of the NASA Spaceport Engineering and
Technology Directorate at Kennedy Space Center, along with Dynacs Inc., was tasked to
investigate new ways to design and develop transducers with these characteristics. As part of the
initial efforts to acquire the skills and new technologies for such pursuits, the Transducers
Development Group began investigating the use of wireless communications at the sensor level.
This section will give some brief details of the project. The goal of this project is to utilize
the after-market parts and build a Communication system. This section will also state the
basic characteristics of the project. The basic idea behind the project is to develop a smart
system that can be used for communication purpose between two nodes.
The main function of these circuits is to send information of sensors to the computer by
wireless communication. We chose this as our final project because we were inspired by the
recent technological trend in wireless communication systems.
Circuit has one node unit and one base unit. Node unit send the information of sensors to the
base unit or when the base unit ask for the information of sensors to the node.
Node unit consists of three sensors temperature sensor, current sensor and voltage sensor and
a microcontroller and R.F module. These sensors send the analogue data to microcontroller
and first this data is converted to digital form in the microcontroller and then save that data in
it and display on LCD and also send data to R.F module by which this send to base unit.
Base unit consists of R.F module, microcontroller, RS232 serial cable. R.F module receives
data from node unit, delivers it to microcontroller and that data moves to computer by serial
cable RS232. This base unit also sends the query to get the information of sensors to get the
decision against information of nodes.
1.2 Motivation
The motivation factor in attempting this project was our learning, understanding and helping
the system to be improved. Imagine that a employee of electricity department is sitting in
front of his computer in base unit, and he wants to observe the voltage or current or
temperature or humidity of a specific area transmission line, rather to get the values by going
physically he get these values through wireless sensors, which would be an easier way and
gives relief to the employee.
The proposed approach for designing this system is to implement a microcontroller based
sensor and control module that receives and transmit the data from node to computer.
1.7 Applications
Military sensor to detect and gain as much information as possible about enemy
movements, explosions, and other phenomena of interest
Sensor to detect and characterize Chemical, Biological, Radiological, Nuclear, and
Explosive (CBRNE) attacks and material
Sensor networks to detect and monitor environmental changes in plains, forests,
oceans, etc.
Wireless LANs are designed for much higher data rates. These are designed to connect PC’s,
shared peripheral devices, large computers etc., within an office building or similar local
environment. The use of infrared, RF and ultrasonic technologies have been proposed for
wireless communication
Fixed wireless -- the operation of wireless devices or systems in homes and offices,
and in particular, equipment connected to the Internet via specialized modems
Mobile wireless -- the use of wireless devices or systems aboard motorized, moving
vehicles; examples include the automotive cell phone and PCS (personal
communications services)
Portable wireless -- the operation of autonomous, battery-powered wireless devices or
systems outside the office, home, or vehicle; examples include handheld cell phones
and PCS units
IR wireless -- the use of devices that convey data via IR (infrared) radiation;
employed in certain limited-range communications and control systems
The WSN is built of "nodes" - from a few to several hundreds or even thousands, where each node is
connected to one (or sometimes several) sensors. Each such sensor network node has typically several
parts: a radio transceiver with an internal antenna or connection to an external antenna, a
microcontroller, an electronic circuit for interfacing with the sensors and an energy source, usually a
battery. A sensor node might vary in size from that of a shoebox down to the size of a grain of dust,
although functioning "motes" of genuine microscopic dimensions have yet to be created.
The Base Node was the second part of the Sensor Nodes Network. Its purpose was to PC as
the liaison between the PC and the Sensor Nodes Network (through Serial Port) and delivers
all the data to PC.
Temperature
Voltage Sensor
Current Sensor
Analogue to Digital Converter
PIC Microcontroller.(PIC 16F877)
Encoder
Decoder
Transceiver
Temperature Sensor.
Voltage Sensor.
Current Sensor.
The temperature sensor is an integrated circuit that can be used to measure temperature with
an electrical output proportional to the temperature (in oC)
1. Semiconductor devices
2. Thermocouples
3. RTD’s
4. Thermistor
The two main types of the semiconductor temperature sensor are temperature sensitive
voltage source and the temperature sensitive current source. An example of the first type of
the temperature sensor is LM35.
(c)The LM35
The LM35 is an integrated circuit sensor that can be used to measure temperature with an
electrical output proportional to the temperature (in oC). LM35 is use measure temperature
more accurately than a using a thermistor. The sensor circuitry is sealed and not subject to
oxidation, etc. LM35 generates a higher output voltage than thermocouples and may not
require that the output voltage be amplified.
i. Specification
LM35 gives the output voltage that is proportional to the Celsius temperature. The scale
factor is .01V/oC .it does not require any external calibration or trimming and maintains an
accuracy of +/-0.4 oC at room temperature and +/- 0.8 oC over a range of 0 oC to +100 oC.
Another important characteristic of the LM35 is that it draws only 60 micro amps from its
supply and possesses a low self-heating capability. The sensor self-heating causes less than
0.1 oC temperature rise in still air. The output voltage is converted to temperature by a simple
conversion factor. The sensor has a sensitivity of 10mV / oC. Use a conversion factor that is
the reciprocal that is 100 oC/V. The general equation used to convert output voltage to
temperature is:
Temperature ( oC) = Vout * (100 oC/V) So if Vout is 1V , then, Temperature = 100 oC .The
output voltage varies linearly with temperature.
iv. Implementation
A Voltage sensor is the one which detects the input voltage in the line and generates the
corresponding stepped down DC output voltage which can easily be measured.
(a)Specification
(b)Design
(c)Working
The main function of voltage sensor is to convert 220v AC to desired DC volts. We are using
the same concept but we adjust our variable resister in such a way that power supply gives
the following outputs of DC.
220 AC 2.20 DC
215 AC 2.15 DC
210 AC 2.10 DC
Voltage sensor circuit has one step down transformer and a full wave rectifier and two
capacitors of 470µf and 10µf and also has two resistance of 1k ohm, 22kohm and one
variable resistance of 10kohm.
The A.C voltage of transmission line of 220V are step down by the transformer and that
step down voltage value is depend upon the input voltage given to the transformer further
the step down voltage is converted to D.C voltage by the process of full wave rectification.
That full wave rectified voltage comes towards the 470µf capacitor which gives the straight
line voltage and a resistance of 1kohm is connected to the capacitor in parallel to discharge
the capacitor rapidly and 22kohm resistance works for filtrations of the D.C volts. Then that
D.C voltage goes towards the 10kohm variable to get the output according to the input A.C
voltage and 10µf capacitor is connected parallel to get smooth and consistent (steady) D.C
voltage output.
(d) Implementation
(a)Specification
(b)Design
First the current signal is send to CT and then is step down here in (mA). Then there is a
resistor of 1k which is protecting the amplifier and then signal is amplified in LM 324 and
passed to diode where it gets a signal as a switch and the amount of energy is then stored in
capacitor and then there is a variable resistor which is connected to MC to give a proper
signal of 5 or less than 5 volts to MC according to our need.
(d)Implementation
(e)LM324
The LM324 consist of four independent, high gain, internally frequency compensated
operational amplifiers which were designed specifically to operate from a single power
supply over a wide voltage range. Operation from split power supplies is also possible so
long as the difference between the two supplies is 3 volts to 32 volts. Application areas
include transducer amplifier, DC gain blocks and all the conventional OP Amp circuits which
now can be easily implemented in single power supply systems.
3.3.2 Working
(a) Conversion of AC to DC
In a simple PSU the easiest way to provide regulation to compensate for varying load
conditions is to use a pair of relatively high value Electrolytic Capacitors. Their values in this
case being in the region of 470uF to 2000uF depending on the application and the amount of
current required from the output of the unit. One of these capacitors is connected across the
DC output of the rectifier diode(s) or bridge, this capacitor also providing an extra degree of
smoothing the output waveform.
The second capacitor is connected via a low value, medium to high wattage resistor, which
assists in limiting the current demand.
3.3.3 Rectification
A full-wave rectifier converts the whole of the input waveform to one of constant polarity
(positive or negative) at its output. Full-wave rectification converts both polarities of the
input waveform to DC (direct current), and is more efficient. However, in a circuit with a
non-center tapped transformer, four diodes are required instead of the one needed for half-
wave rectification. Four diodes arranged this way are called a diode bridge or bridge rectifier:
While half-wave and full-wave rectification suffice to deliver a form of DC output, neither
produces constant-voltage DC. In order to produce steady DC from a rectified AC supply, a
smoothing circuit or filter is required. In its simplest form this can be just a reservoir
capacitor or smoothing capacitor, placed at the DC output of the rectifier. There will still
remain an amount of AC ripple voltage where the voltage is not completely smoothed.
PICs are popular with both industrial developers and hobbyists alike due to their low cost,
wide availability, large user base, extensive collection of application notes, availability of
low cost or free development tools, and serial programming (and re-programming with flash
memory) capability.
Unlike most other CPUs, there is no distinction between memory space and register space
because the RAM serves the job of both memory and registers, and the RAM is usually just
referred to as the register file or simply as the registers.
PIC 16F877 series normally has five input/output ports. They are used for the input/output
interfacing with other devices/circuits. Most of these port pins are multiplexed for handling
alternate function for peripheral features on the devices. All ports in a PIC chip are bi-
directional. When the peripheral action is enabled in a pin, it may not be used as its general
input/output functions. The PIC 16F877 chip basically has 5 input/output ports. The five
input/output ports and its functions are given below.
PORT A is a 6-bit wide bi-directional port, the direction of this port is controlled by TRIS A
data direction register. Setting a TRIS A (=1) makes corresponding PORT A pin as an input,
clearing the TRIS A (=0) making the corresponding PORT A pin as an output Pin RA4 is
multiplexed with the “Timer0” module clock input to become the RA4 pin and functioning
either input/output operation or Timer 0 clock functioning module. The RA4 pin is a Schmitt
Trigger input and an open-drain output. All other PORT A pins has TTL input levels and full
CMOS output drivers.
PORT B is also an 8 bit bi-directional PORT. Its direction controlled and maintained by
TRIS B data direction register. Setting the TRIS B into logic ‘1’ makes the corresponding
“PORT B” pin as an input. Clearing the TRIS B bit make PORT B as an output. Three pins
of PORT B are multiplexed with the In-Circuit Debugger and Low-Voltage Programming
function: RB3, RB6 and RB7 for performing its alternate functions.
The block diagram of PORT B register is given in the figure below.
PORT B functioning table and the registers associated with PORT B is given in the table
below.
PORT C is an 8-bit wide, bidirectional PORT which controlled and maintained by TRIS C
data direction register. Setting a TRIS C bit (= 1) will make the corresponding PORT C pin
an input (i.e., put the corresponding output driver in a High-Impedance mode). Clearing a
TRIS C bit (= 0) will make the corresponding PORT C pin an output PORT C is also
multiplexed with several peripheral functions. PORT C pins have Schmitt Trigger input
buffers.
When enabling peripheral functions, more care should be taken in defining TRIS bits for
each PORT C pin as compared to other. Some peripherals override the TRIS bit to make a
pin an output, while other peripherals override the TRIS bit to make a pin an input. Since the
TRIS bit override is in effect while the peripheral is enabled, read-modify write instructions
PORT D is an 8-bit PORT with bi-directional nature. This port also with Schmitt Trigger
input buffers, each pin in this PORT D individually configurable as either input or output.
PORT D can be configured as an 8-bit wide microprocessor PORT (functioning as Parallel
Slave PORT) by setting control bit. In this mode, the input buffers are TTL (transistor-
transistor logic).
PORT E has only three pins (RE0, RE1 and RE2) which are individually configurable as
inputs or outputs. These pins controllable by using its corresponding data direction register
“TRIS E”. These pins also have Schmitt Trigger input buffers. The PORT E pins become the
I/O control inputs for the microprocessor PORT when bit PSPMODE is set. In this mode, the
user must make certain that the TRIS E bits are set and that the pins are configured as digital
inputs. Also, ensure that ADCON1 is configured for digital I/O. In this mode, the input
buffers are TTL.
TRISE register which also controls the Parallel Slave PORT operation. PORT E pins are
multiplexed with analog inputs. When selected for analog input, these pins will read as ‘0’s.
TRIS E controls the direction of the RE pins, even when they are being used as analog
inputs. The user must make sure to keep the pins configured as inputs when using them as
analog inputs.
“Table4.3: Comparison”
In the PIC 16F877, the USART is accessed through pins RB6 and RB7. It has two modes of
operation, synchronous (using a separate clock signal) and asynchronous (no clock
connection). The asynchronous mode is probably used more often, as other methods of
synchronous transmission are available in the PIC, as we will see. In asynchronous mode,
RB6 acts as a data transmit (TX) output, and RB7 as data receive input (RX) Data is usually
transmitted in 8-bit words (9 is an option), with the least significant bit sent first. The
receiver must sample the input at the same rate as the data is sent, so standard clock (baud)
rates are used. 9600 baud is used in our example here, meaning that the bits are transmitted at
about 10k bits/s. Separate transmit and receive lines are used, so it is possible for these
operations to be carried out simultaneously.
In the block diagram, the PIC is connected to a PC. The PIC USART output itself operates at
TTL voltages, and needs an external serial line driver to convert its output into a higher
symmetrical line voltage. This is necessary because a simple baseband data signal is
attenuated down a line, due to the distributed resistance and capacitance of the cabling. The
standard RS232 interface operates with a higher line voltage so that the signal can be
4.6.3 Reliability
(b)Reliability characteristics
“Table4.6: Interfacing”
Serial communication requires that you specify the following four parameters:
Each transmitted character is packaged in a character frame that consists of a single start bit
followed by the data bits, the optional parity bit, and the stop bit or bits.
.
“Figure5.1: Serial Vs Parallel Data Transfer”
For serial data communication to work the byte of data must be converted to serial bits using
a parallel-in-serial –out register; then it can be transmitted over a single data line. This also
means that at the receiving end there must be a serial-in-parallel-out shift register to receive
the signal data and pack them into byte. Of course, if data is to be transferred on the
telephone line, it must be converted from 0s and 1s to audio tones, which are sinusoidal-
shaped signals. This conversion is performed by a peripheral device called a modem, which
stands for "modulator/demodulator".
Serial data communication uses two methods, asynchronous and synchronous. The
synchronous method transfers a block of data (characters) at a time while the asynchronous
transfers a single byte at a time. It is possible to write soft ware to use either of these
methods, but the programs can be tedious and long. For this reason, there are special IC chips
made by many manufacturers for serial data communications.
Notice in Figure below that when there is no transfer, the signal is 1 (high), which is referred
to as mark. The 0 (low) is referred to as space. Notice that the transmission begins with a
start bit followed by D0, the LSB, then the rest of the 'bits until the MSB (07), and finally,
the one stop bit indicating the end of the character "A".
In some systems in order to maintain data integrity, the parity bit of the character byte is
included in the data frame. This means that for each character (7or 8-bit, depending on the
system) we have a single parity bit in addition to start and stop bits. The parity bit is odd or
even. In the case of an odd-parity bit the number of data bits, including the parity bit, has an
odd number of Is. Similarly, in an even-parity bit system the total number of bits, including
the parity bit, is even. For' example, the ASCII character "A", binary 0100 0001, has 0 for the
even-parity bit. UART chips allow programming of the parity bit for odd-, even-, and no-
parity options.
The simplest connection between a PC and microcontroller requires a minimum of three pins,
TxD, RxD, and ground, as shown in Figure below. Notice in figure that the RxD and TxD
pins are interchanged and TxD pins are interchanged.
In modems, there are occasions when a single change of signal transfers several bits of data.
As far as the conductor wire is concerned, the baud rate and bps are the same, and for this
reason in this book we use the terms bps and baud interchangeably.
The data transfer rate of a given computer system. Depends on communication ports
incorporated into that system. For example, the early IBM PC/XT could transfer data at the
rate of 100 to 9600 bps. However in recent years, Pentium based PCs transfer data at rates as
high as 56K bps. It must be noted that in asynchronous serial data communication, the baud
rate is generally limited to 100,000 bps.
5.6 MAX232
5.6.1 Features
Operates From a Single 5-V Power Supply
With 1.0 µF Charge-Pump Capacitors
Operates Up To 120 kbit/s
5.6.2 Description
Usually all the digital ICs work on TTL or CMOS voltage levels which cannot be used to
communicate over RS-232 protocol. So a voltage or level converter is needed which can
convert TTL to RS232 and RS232 to TTL voltage levels. The most commonly used RS-232
level converter is MAX232. This IC includes charge pump which can generate RS232
voltage levels from 5V power supply. It also includes two receiver and two transmitters and
is capable of full-duplex UART/USART communication.
The voltage level of the RS232 is used to assure error-free transmission over greater
distances than would be possible with TTL levels. For error checking it is possible to include
a parity bit as well, just prior to the stop bit. The bits are transmitted at specific time intervals
determined by the baud rate of the serial signal. The baud rate is the reciprocal of the time to
send 1 bit. Error-free serial communication requires that the baud rate, number of data bits,
number of stop bits, and presence or absence of a parity bit be the same at the transmitter and
at the receiver.
The serial port is full duplex, meaning it can transmit and receive simultaneously.
PIC16F877 provides a transmit channel and a receive channel of serial communication. The
transmit data pin (TXD) and the receive data pin (RXD. The serial signals provided on these
pins are TTL signal levels and must be boosted and inverted through a suitable converter
MAX232 to comply with RS232 standards. All modes are controlled through SCON, the
Serial Control register. The SCON bits are defined as SM0, SM1, SM2, REN, TB8, RB8, TI,
and RI from MSB to LSB. The timers are controlled using TMOD, the Timer Mode register,
and TCON, the Timer Control register.
“Figure5.7: Interfacing between computer and Microcontrollers through RS232 serial port”
The circuit of Figure above is a converter RS232/TTL signals used to make the connection
between the microcontroller and the computer through the serial port. Note that the pins 11
and 12 the Max232 are connected to the pins respectively 11 (TX) and 10 (RX) of
microcontroller AT89C51. The serial cable connected to your computer is composed of 3
wires (RX, TX and GND). Pins 2 and 3 of the DB9 connector are connected via serial cable
respectively to the pins 14 and 13 the Max232. 5 pin (GND) of the connector is connected to
power supply controller circuit. The electrolytic capacitors are used to configure the correct
operation of the Max232; some of them work with their inverted polarity.
Table below (for DB-9) provides the pins and their labels for the RS232 cable, commonly
referred to as DB-25 connector. In labeling, DB-25P refers to the plug connector (male) and
DB-25S is for the socket connector (female). See Figure.
Since not all the pins are used in PC cables, IBM introduced the DB-9 version of the serial
I/O standard, which uses 9 pins only, as shown in Table. The DB-9 pins are shown in Figure
below.
Baud rate is a measure of how fast data are moving between instruments that use serial
communication. . The term roughly means the speed that data is transmitted. It is a derived
value based on the number of symbols transmitted per second.
The baud rate is associated with many mathematical formulas. Its units are either symbols
per second or pulses per second. Baud can be determined by using the following formula:
Baud = (Gross Bit Rate / Number of Bits per Symbol). This can be used to translate baud into
a bit rate using the following formula: Bit Rate = (Bits per Symbol * Symbol Rate). Baud can
be abbreviated using the shortened form “Bd” when being used for technical purposes.
RS-232 uses only two voltage states, called MARK and SPACE. In such a two-state coding
scheme, the baud rate is identical to the maximum number of bits of information, including
control bits, which are transmitted per second. MARK is a negative voltage, and SPACE is
positive. Figure 2 shows how the idealized signal looks on an oscilloscope. The following is
the truth table for RS-232:
Signal > 3V = 0
The output signal level usually swings between +12 V and -12 V. The dead area between +3
V and -3 V is designed to absorb line noise.
A start bit signals the beginning of each character frame. It is a transition from negative
(MARK) to positive (SPACE) voltage. Its duration in seconds is the reciprocal of the baud
rate. If the instrument is transmitting at 9,600 baud, the duration of the start bit and each
subsequent bit is about 0.104 ms. The entire character frame of eleven bits would be
transmitted in about 1.146 ms. Data bits are transmitted upside down and backwards. That is,
inverted logic is used, and the order of transmission is from least significant bit (LSB) to
most significant bit (MSB). To interpret the data bits in a character frame, you must read
from right to left and read 1 for negative voltage and 0 for positive voltage. This yields
There are -ve ones among the data bits, already an odd number, so the parity bit is set to 0.
The last part of a character frame consists of 1, 1.5, or 2 stop bits. These bits are always
represented by a negative voltage. If no further characters are transmitted, the line stays in
the negative (MARK) condition. The transmission of the next character frame, if any, is
heralded by a start bit of positive (SPACE) voltage.
Notice that this is the maximum character transmission rate. The hardware on one end or the
other of the serial link might not be able to reach these rates, for various reasons.
S = 300 / f
The RF spectrum is divided into several ranges, or bands. With the exception of the lowest-
frequency segment, each band represents an increase of frequency corresponding to an order
of magnitude (power of 10). The table depicts the eight bands in the RF spectrum, showing
frequency and band width ranges. The SHF and EHF bands are often referred to as the
microwave spectrum.
RF transmitters use oscillators to create sine waves, the simplest and smoothest form of
continuously varying waves, which contain information such as audio and video. Modulators
encode these sign wives and antennas broadcast them as radio signals. There are several
ways to encode or modulate this information, including amplitude modulation (AM) and
frequency modulation (FM).
The process of separating the original information or signal from the modulated carrier is
called demodulation. In the case of amplitude or frequency modulation it involves a device,
called a demodulator or detector, which produces a signal corresponding to the instantaneous
changes in amplitude or frequency, respectively. This signal corresponds to the original
modulating signal. In radio transmission this process is a major function of a receiver, in
order to retrieve the desired signal. In a wireless network, the device, named transceiver, is
connected to the wired network. The transceiver transmits and receives data between wireless
network and the wired network infrastructure. The RF-based low power transceivers
consume hundreds of mill watts of power with many of chip components.
6.6 PT2262
In our project we have use a RF EncoderPT2262 and PT2272 RF Decoder. RF Transmitter is
connected to the different components through RF Encoder. This encoder converts the 8-bit
PT 2262 is a remote control encoder paired with PT2272 utilizing CMOS technology. It
encodes data and address pins into a serial coded waveform suitable for RF or IR modulation.
PT 2262 has a maximum of 12 bits of tri-state address pins providing up to 531,441 (or 3^12)
address codes: thereby, drastically reducing any code collision and unauthorized code
scanning possibilities.
6.6.1 Features
CMOS Technology
Low Power Consumption
Very High Noise Immunity
Up to 12 Tri-state Code Address Pins
Up to 6 Data Pins
Wide range of Operating Voltage: Vcc = 4 ~ 15 Volts
Single Resistor Oscillator
Latch or Momentary Output Type
Available in DIP and SO Package
Applications
Car Security System
Garage Door Controller
Remote Control Fan
Home Security System/ Automation System
Remote Control Toys
Remote Control for Industrial Use
6.7 PT 2272
PT 2272 is a remote control decoder paired with 2262 utilizing CMOS Technology. It has 12
bits of Tri-state address pins providing a maximum of 531,441 (or 3^12) address codes;
thereby, drastically reducing and unauthorized code scanning possibilities. PT 2272 is
available in several options to suit every application need: variable number of data output
pins, latch or momentary output type.
At the receiving end, the receiver receives this analog value on a single data line and passes
this data to the decoder. The decoder does the opposite functioning of the encoder i.e., it
converts the single bit data into eight bit data and gives it to the microcontroller which does
the further processing.
6.7.1 Features
CMOS Technology
Low Power Consumption
Very High Noise Immunity
Transmitter communicates with control unit part I using RS232 protocol (baud rate is 9600).
RS232 protocol uses -12V for logic 1 and +12 for logic 0. However microcontroller and RF
module uses 5V for logic 1 and 0V for logic 0. So max232 circuit, which converts +12 & -12
to 0 & 5, is used for interfacing. Max232 sends converted data to microcontroller.
Microcontroller adds appropriate header to incoming data and sends to receiver side. At this
point hardware coding must be analyzed to understand communication protocol. PT2262 and
PT2272 encoder & decoder chips are used for hardware coding. Microcontroller controls
PT2262 encoder chip with 5 pins. At each transmission 4 bits can be sent from transmitter to
receiver.
The decoder (PT2272) pairs with the encoder PT2262 for RF wireless transmission. It
decodes data obtained from the receiver to binary series (data) identical to what is encoded in
the PT2262 encoder. In this design, 4 data pins (D0 to D3) are used for data registration. The
VT pin of the decoder is a decoding indicator. Data decoding is completed when the VT pin
is pulled up at high state level, the PIC16F877 retrieves the data by reading the states of D0
to D3 of the decoder. On the contrary, the PIC16F877 will not read the states of the pins
when the VT pin is pulled down to GND, which means that there is no data received by the
receiver.
6.9 Modulation
A device that performs modulation is known as a modulator and a device that performs the
inverse operation of modulation is known as a demodulator (sometimes detector or demod).
A device that can do both operations is a modem (short for "Modulator-Demodulator").
available bandwidth
permissible power
inherent noise level of the system
The RF spectrum must be shared, yet every day there are more users for that spectrum as
demand for communications services increases. Digital modulation schemes have greater
capacity to convey large amounts of information than analog modulation schemes.
In the case of PSK (phase-shift keying), a finite number of phases are used.
In the case of FSK (frequency-shift keying), a finite number of frequencies are used.
In the case of ASK (amplitude-shift keying), a finite number of amplitudes are used.
In the case of QAM (quadrature amplitude modulation), a finite number of at least
two phases, and at least two amplitudes are used.
“Figure6.3: ASK”
“Figure6.4: PSK”
Phase Shift Keying (BPSK) demonstrates better performance than ASK and FSK. PSK can be
expanded to a M-ary scheme, employing multiple phases and amplitudes as different states. Filtering
can be employed to avoid spectral spreading
“Figure6.5: FSK”
Bandwidth occupancy of FSK is dependent on the spacing of the two symbols. A frequency
spacing of 0.5 times the symbol period is typically used. FSK can be expanded to a M-ary scheme,
employing multiple frequencies as different states.
We can use both ASK and FSK modulation scheme because both of the transceivers can
operate on 315/433MHz. By doing so we can effectively reduce
Power efficiency, i.e., the E b/N /ratio for a specific error probability
Bandwidth efficiency, i.e., the data rate per unit bandwidth
Performance on multipath fading channels and under non-linear distortion
Implementation cost and complexity
Due to the less complexity and cost of circuit we have selected a FSK. Frequency shifting a
carrier between known fixed frequencies to convey digital data. FSK signals can be heard in
There are numerous forms of FSK in use on the HF bands where the majority of this activity
takes place. Applications include amateur radio, press agencies and meteorological
broadcasts. Normally, FSK modulation is achieved using just two frequencies to represent
binary data. For example, a frequency of 2000 Hz may represent a binary 1 (mark) and 1000
Hz a binary 0 (space). The nominal carrier frequency of the RF signal is the center frequency
equidistant between the two FSK arms. The energy of the signal alternates between the mark
and space frequencies to convey the digital message.
The spectrogram of an off-air FSK signal is shown below. This clearly illustrates how two
frequencies can be used to convey binary information. It is even possible to read off the data
bits by eye (if you assume a bit value for each tone).
More than two levels are also used by some advanced systems since more bits per tone can
be sent. FSK signals may either be generated as an audio signal (baseband) then transmitted
using a conventional SSB or FM transmitter, or a transmitter's carrier may be frequency
keyed directly.
If the tones of the FSK transmissions are regarded as symbols, a 2-level FSK signal has 1 bit
per symbol. By contrast a 4-level system has 2 bits per transmitted symbol. A multi-level
signal is capable of much higher data rates but has the disadvantage that more bandwidth is
required. If a fixed bandwidth is available, a multi-level FSK system will experience greater
difficulty in resolving the symbols.
The rate at which symbols are sent is the baud rate; this need not be the same as the bit rate
supported by the modem. Typical baud rates range from 45 baud up to 300 baud on HF with
SSB modulation being used. Data rates of 1200 baud or more are commonly used on VHF
narrowband FM as the modulation method.
Distortion and electrical distortion are the basic source of interruption in any kind of waves.
A distortion is the alteration of the original shape (or other characteristic) of an object, image,
sound, waveform or other form of information or representation. Distortion is usually
unwanted. In some fields, distortion is desirable, such as electric guitar (where distortion is
often induced purposely with the amplifier or an electronic effect to achieve an aggressive
sound where desired). The slight distortion of analog tapes and vacuum tubes is considered
pleasing in certain situations. The addition of noise or other extraneous signals (hum,
interference) is not considered to be distortion, though the effects of distortion are sometimes
considered noise.
6.18.1 Asynchronous
Sending data encoded into your signal requires that the sender and receiver are both using the
same encoding/decoding method, and know where to look in the signal to find data.
Asynchronous systems do not send separate information to indicate the encoding or clocking
information. The receiver must decide the clocking of the signal on its own. This means that
the receiver must decide where to look in the signal stream to find ones and zeroes, and
decide for itself where each individual bit stops and starts. This information is not in the data
in the signal sent from transmitting unit.
When the receiver of signal carrying information has to derive how that signal is organized
without consulting the transmitting device, it is called asynchronous communication. In
short, the two ends do not synchronize the connection parameters before communicating.
Asynchronous communication is more efficient when there is low loss and low error rates
over the transmission medium because data is not retransmitted and no time is spent setting
negotiating the connection parameters at the beginning of transmission. Asynchronous
systems just transmit and let the far end station figure it out. Asynchronous is sometimes
called "best effort" transmission because one side simply transmits, and the other does it's
best to receive.
6.18.1 Example
Asynchronous communication is used in our project on RS-232 based serial devices such as
on an IBM-compatible computer's COM 1 ports. Asynchronous Transfer Mode (ATM) also
uses this means of communication. Your PS2 ports on your computer also use serial
communication. This is the method is also used to communicate with an external modem.
Asynchronous communication is also used for things like your computer's keyboard and
mouse. Think of asynchronous as a faster means of connecting, but less reliable.
Synchronous systems negotiate the communication parameters at the data link layer before
communication begins. Basic synchronous systems will synchronize both clocks before
transmission begins, and reset their numeric counters for errors etc. More advanced systems
may negotiate things like error correction and compression.
It is possible to have both sides try to synchronize the connection at the same time. Usually,
there is a process to decide which end should be in control. Both sides can go through a
lengthy negotiation cycle where they exchange communications parameters and status
information. Once a connection is established, the transmitter sends out a signal, and the
receiver sends back data regarding that transmission, and what it received. This connection
negotiation process takes longer on low error-rate lines, but is highly efficient in systems
where the transmission medium itself (an electric wire, radio signal or laser beam) is not
particularly reliable.
#include <stdio.h>
//#device adc=10
#define vt pin_b7
/////////////////////////////////////////////////
/////////////////////////////////////////////////
{ putc(10); putc(13); }
void main()
enter();
enter();
enter();
enter();
enter();
//trans[0]= 2;
//trans[1]= 2;
//trans[2]= 0;
//trans[3]= 1;
//trans[4]= 2;
//trans[5]= 2;
//trans[6]= 5;
//trans[7]= 4;
//trans[8]= 0;
{ while(1)
rec=getch();
if(rec=='R' || rec=='r')
enter();
output_d(0b00001101);
delay_ms(500);
output_d(0b00000000);
delay_ms(500);
/////////////////////////////
enter();
delay_ms(10);
while(input(vt));
delay_ms(10);
putc('.');
/////////////////////////////
delay_ms(10);
while(input(vt));
delay_ms(10);
trans[1]=input_b();
putc('.');
/////////////////////////////
delay_ms(10);
while(input(vt));
delay_ms(10);
trans[2]=input_b();
putc('.');
/////////////////////////////
delay_ms(10);
delay_ms(10);
trans[3]=input_b();
putc('.');
/////////////////////////////
delay_ms(10);
while(input(vt));
delay_ms(10);
trans[4]=input_b();
putc('.');
/////////////////////////////
delay_ms(10);
while(input(vt));
delay_ms(10);
trans[5]=input_b();
putc('.');
/////////////////////////////
delay_ms(10);
while(input(vt));
delay_ms(10);
trans[6]=input_b();
putc('.');
/////////////////////////////
delay_ms(10);
while(input(vt));
delay_ms(10);
trans[7]=input_b();
putc('.');
/////////////////////////////
delay_ms(10);
while(input(vt));
delay_ms(10);
trans[8]=input_b();
putc('.');
//enter();
printf(" COMPLETE.");
enter ();
putc(trans[0]+0x2f);
putc(trans[1]+0x2f);
putc(trans[2]+0x2f);
putc('V');
/////////////////////////////////////////////////
putc(' ');
putc(' ');
putc(trans[3]+0x2f);
putc('.');
putc(trans[4]+0x2f);
putc('A');
/////////////////////////////////////////////////
putc(' ');
putc(' ');
putc(trans[6]+0x2f);
putc('C');
/////////////////////////////////////////////////
putc(' ');
putc(' ');
putc(trans[7]+0x2f);
putc(trans[8]+0x2f);
putc('%');
/////////////////////////////////////////////////
enter();
output_d(0b00001011);
delay_ms(500);
output_d(0b00000000);
delay_ms(500);
/////////////////////////////
enter();
output_d(0b00001100);
delay_ms(500);
output_d(0b00000000);
delay_ms(500);
delay_ms(1000);
#include <16F877.h>
#device adc=10
/////////////////////////////////////////////////
/////////////////////////////////////////////////
/////////////////////////////////////////////////
void main()
{ set_tris_a(0xFF);
set_tris_b(0x00);
//set_tris_c(0b00000100);
//set_tris_d(0x00);
output_b(0x00);
//output_c(0x00);
//output_d(0x00);
ADCON0 = 0B01000001 ;
ADCON1 = 0B10000010 ;
while(1)
process_voltage();
process_current();
process_temperature();
//delay_ms(500);
transmitt();
delay_ms(500);
/////////////////////////////////////////////////
if(dat==0b00001011) output_high(relay);
if(dat==0b00001101)
output_c(trans[count] + 1);
delay_ms(400);
output_c(0b00000000);
delay_ms(400);
/////////////////////////////////////////////////
{ set_adc_channel(2);
delay_ms(5);
adc_read();
adc_value = adc_value*50000/1023;
lcd_data('C');
lcd_data('U');
lcd_data('R');
lcd_data('R');
lcd_data('E');
lcd_data('N');
lcd_data('T');
digit1 = adc_value/10000;
trans[3] = digit1 ;
lcd_data (digit1+0x30);
lcd_data ('.');
digit1 = (adc_value/1000)%10;
trans[4] = digit1 ;
lcd_data (digit1+0x30);
lcd_data('A');
/////////////////////////////////////////////////
void process_voltage(void)
{ set_adc_channel(3);
delay_ms(5);
adc_read();
adc_value = adc_value*5000/1023;
lcd_com(0x80);
lcd_data('V');
lcd_data('O');
lcd_data('L');
lcd_data('T');
lcd_data('A');
lcd_data('G');
lcd_data('=');
digit1 = adc_value/1000;
trans[0] = digit1 ;
lcd_data (digit1+0x30);
digit1 = (adc_value/100)%10;
trans[1] = digit1 ;
lcd_data (digit1+0x30);
digit1 = (adc_value/10)%10;
trans[2] = digit1 ;
lcd_data (digit1+0x30);
lcd_data('V');
/////////////////////////////////////////////////
void process_temperature(void)
{ set_adc_channel(0);
delay_ms(5);
adc_read();
adc_value = adc_value*5000/1023;
lcd_com(0x90);
lcd_data('E');
lcd_data('M');
lcd_data('P');
lcd_data('E');
lcd_data('R');
lcd_data('A');
lcd_data('T');
lcd_data('U');
lcd_data('R');
lcd_data('E');
lcd_data('=');
digit1 = (adc_value/100)%10;
trans[5] = digit1 ;
lcd_data (digit1+0x30);
digit1 = (adc_value/10)%10;
trans[6] = digit1 ;
lcd_data (digit1+0x30);
lcd_data('C');
/////////////////////////////////////////////////
{ adc_value = 0;
adc_value = adc_value/30;
/////////////////////////////////////////////////
void lcd_ini(void)
{ delay_ms(300);
lcd_com(0x38);
lcd_com(0x0C);
lcd_com(0x01);
delay_ms(50);
/////////////////////////////////////////////////
void lcd_com(char i)
{ output_low (RS); // = 0;
PORTB = i;
output_high(EN);
delay_us(100);
output_low (EN);
/////////////////////////////////////////////////
void lcd_data(char i)
{ output_high (RS); // = 0;
PORTB = i;
output_high(EN);
delay_us(100);
output_low (EN);
8.2 Conclusion
A fully functional wireless communication system between two units can be made cost
effectively. The architecture designed is implementable in real applications with very few or
no modifications required. This project if researched on a little more will become a
successful product whose market can be all domestic. Now after completing this project, we
are quite satisfied that we have achieved our goal to extend. During the period of our final
project, we came to know about particle aspects of implementation and maintenance of
wireless sensors in transmission lines that sound our knowledge in electrical, telecom and
electronics. As these are the most disciplined fields with challenges and prospect. Indeed,
having entered this splendid world, we greedier for the new.
The transmitted power of the system varies with the variation in temperature.
RF system works well in conditions with a high humidity (i.e., at night and during
rain)
A lot of future enhancements can be worked on this project. If we were to do this project
again, we would probably consider finding a pair of transceivers that operates on different
frequencies. This would simplify the logic and state transition of the project by a lot since we
would need much less handshaking and error control
We would also change it so that one node can communicate with more node at the same time
in wireless domain and partially accessible by the base node, by doing that we can reduce
human efforts, time saving and less security issue. This should not be too difficult, since all
we have to do is to include the target device's identification number when we are about to
send data. That way, only the target device will pick up the transmission. We would also
change it so that the distance between transmitter and receiver will be more than 100 feet.
10 8 Optocoupler 60 480
Total 21060