Vous êtes sur la page 1sur 46

DATA ACQUISITION USING RF |

ABSTRACT
Data Acquisition using RF communication has two main functional aspects: measurement & communication. This project
focuses on developing an embedded system to extract temperature data from an temperature sensor, display the instantaneous value on LCD and the same data is transmitted over a distant place using RF(Zigbee) communication. This project consists of two parts. One is transmitter section which is built around microcontroller based 16F877A architecture, ADC, Sensors to measure temperature & smoke and a Zigbee transceiver to transmit data. On the other hand receiver consists of Zigbee transceiver to receive the data and display the data on the LCD display. Instantaneous data of temperature is displayed on LCD and Buzzer indication is provided if temperature is more than 400 or smoke is detected.

DATA ACQUISITION USING RF |

ACKNOWLEDGEMENT
It gives us immense pleasure to express our deep sense of gratitude to the people who have helped and supported us throughout the course and the process of completion of this project.

We would like to take this opportunity to thank Dr B.G.Sangameshwara, Principal, SJCE for providing a healthy environment in college and for extending the facilities to carry out the project work.

We owe a special thanks to our Internal guide Asst. Prof S.Gopalakrishna. His guidance and encouragement has helped up leaps and bounds in completing this project. He has constantly reviewed our project and gave us various suggestions for implementing and enhancing our project. He has also guided us in preparing our report by providing us with various other details needed in completing our report.

We would like to thank our family members and friends for morally encouraging us in everything we do.

Project associates Prathima Baliga J.P. Savitha.R Raghavendra Shenoy

DATA ACQUISITION USING RF |

CONTENTS
CHAPTER 1: INTRODUCTION WHAT IS DATA AQUASITION ?........................................................................6
1.1

NEED OF WIRELESS DATA AQUASITION.6


1.2

MAJOR COMPONENTS WHEN BUILDING A DATA ACQUISITION SYSTEM6


1.3

CHAPTER 2: BASIC PRINCIPLES


2.1

BASIC PRINCIPLES OF DATA ACQUISITION USING RF7 BLOCK DIAGRAM ..9

2.2

CHAPTER 3: PERIPHERALS
3.1
POWER SUPPLY

.12
3.2
RS 232

12

DATA ACQUISITION USING RF |


3.3
TEMPERATURE SENSOR................14

3.4

SMOKE DETECTOR

..16
3.5
BUZZER

.17
3.6
DOT MATRIX LCD

.18
3.7
MICROCANTROLLER

.18

CHAPTER 4: RF COMMUNICATION
4.1 ZIGBEE

4.1.1 Characteristics of Zigbee20 4.1.2 Network topologies supported by Zigbee21 4.1.3 ARCITECTURE.. .22 4.1.4 Types of traffic..23 4.1.5 Block diagram of Zigbee Transceiver24 4.2 Type of modulation 25

DATA ACQUISITION USING RF |

CHAPTER 5: HARDWARE IMPLEMENTATION


5.1 Sensor & TX schematic..

..29
5.2 RF receiver

..32

CHAPTER 6: FIRMWARE LOGIC


6.1 Flow chart of Data acquisition using RF

...33

CHAPTER 7: SOFTWARE
7.1 MPLAB IDE V8.60

.35
7.2 STEPS IN DEVELOPING A PROGRAM.36

CHAPTER 8: ADVANTAGES , APPLICATIONS & LIMITATIONS 8.1 ADVANTAGES 37

DATA ACQUISITION USING RF |


8.2 APPLICATIONS ..37 8.3 RESULTS .37

CHAPTER 9: DEVELOPMENT & RESULTS


9.1 DEVELOPMENT STEPS 38 9.2 RESULTS

.. .38

APPENDIX: 10. CONCLUSION .40 11. FUTURE SCOPE.. 40 12. REFERENCE ..40

DATA ACQUISITION USING RF |

CHAPTER 1 - INTRODUCTION
1.1

WHAT IS DATA ACQUISITION?

Data acquisition involves gathering signals from measurements sources and digitalizing the signal for storage analysis and presentation on PC or LCD. Data acquisition systems come in many PC technology forms to offer flexibility. Here we used RF communication to acquire data and explained in detail in next chapters.

1.2 NEED OF WIRELESS DATA AQUASITION


In an industry during certain hazards it will be very difficult to monitor the parameter through wires and analog devices such as transducers. To overcome this we use wireless devices to monitor the parameter and so that we can take certain steps in worst case. Few years back the use of wireless devices was very less but due to rapid development in technology nowadays maximum of our data transfer is through wireless.

1.3 MAJOR COMPONETS WHEN BUILDING A BASIC DATA ACQUISITION SYSTEM


We need to consider the following five components when building a basic data acquisition system.

Transducers and sensors Signals

DATA ACQUISITION USING RF |


Signal conditioning DAQ hardware Driver and display

FIG-1.1. Basic diagram of data acquisition and display.

CHAPTER 2 - BASIC PRINCIPLES

2.1

BASIC PRINCIPLE OF DATA ACQUISITION USING RF


DATA

AQUASITION USING RF consists of following

blocks. Temperature sensor Smoke sensor Microcontroller LCD displays Power supply Buzzer indication RF (Zigbee) communication module. This system senses the temperature and smoke and continuously and send data to Microcontroller. Controller PIC16F877 consists of ADC where it converts analog signal to digital and send to LCD input and UART.

DATA ACQUISITION USING RF |


Zigbee is RF transceiver module of 2.4GHZ is connected to UART of controller where the data is sent to distance place In the receiver side the data is picked by the Zigbee transceiver and send to UART receiver of Microcontroller. Microcontroller will compares the data with reference temperature value. It displays the data on LCD and no buzzer indication in Normal condition.

Normal conditions:

When temperature < 40C & smoke is absent. Temperature data will be displayed in transmitter as well as receiver
Abnormal conditions:

Three abnormal conditions can appear When temperature 40C & smoke is absent, temperature data will be displayed in receiver side and buzzer alarm is provided to indicate the rise in temperature .

When temperature < 40C but smoke is present, temperature data will be displayed in receiver side and display will be given as SMOKE IS PRESENT along with the buzzer alarm.

When temperature 40C & smoke is present, temperature data will be displayed in receiver side and display will be given as SMOKE IS PRESENT along with the buzzer alarm.

DATA ACQUISITION USING RF |

10

2.2

BLOCKDIAGRAM

TRANSMITTER

Power Supply

Temperatu re Sensor

MICRO CONTROLLE R

RS23 2

RF TRANSRE CIVER

Smoke Sensor

LCD

FIG-2.1 BLOCK DIAGRAM OF TRANSMITTER SECTION

RECEIVER

DATA ACQUISITION USING RF |

11

Power Supply

RF TRANSRECI VER

MICRO
RS232

LCD

CONTROLLE R

BUZZER

FIG-2.1 BLOCK DIAGRAM OF TRANSMITTER SECTION

FIG 2.1 shows the transmitter section of data acquisition system and FIG2.2 shows the receiver section of data acquisition system. Following are the components of these transmitter and receiver section

2.2.1 POWER SUPPLY

Digital input of 5V is provided for microcontroller and all other sensor circuitry and 12V is provided for Zigbee module. The same is followed in both transmitter and receiver section.

2.2.2 TEMPERATURE SENSOR

Temperature sensor converts the temperature into an equivalent voltage output. IC LM35 is such a sensor. Here we describe a simple temperature measurement and display system based on LM35 sensor and PIC16F877A microcontroller. The temperature in degrees Celsius is displayed on a 162 LCD. Continuous monitoring of temperature with 1-second update interval (which can be varied in the program) Temperature measurement using LM35 precision integratedcircuit sensor.

DATA ACQUISITION USING RF |


Precise analogue-to-digital conversion using in-built 10-bit

12

analogue- to-digital converter (ADC) of PIC16F877A microcontroller


2.2.3 SMOKE SENSOR

Here Smoke Sensors that can detect the presence of combustible gas and smoke at concentrations from 300 to 10,000 ppm. Owing to its simple analog voltage interface, the sensor requires one analog input pin from the microcontroller. The product can detect the presence of the smoke and send the output in form of analog signals. Our range can function at temperature ranging from -20 to 50C and consume less than 150 mA at 5V. Two basic types of smoke detectors are used today: ionization and photoelectric. The sensing chambers of these detectors use different principles of operation to sense the visible or invisible particles of combustion given off in developing fires. Ionization smoke detector is used here.
2.2.4 MICROCONTROLLER

PIC16F877 is used for computation of sensor data. This controller consists of 10 bit ADC where it converts analog data in to digital form. This data is compared with a reference temperature and smoke details. The result will be displayed on LCD and sent to UART for RF communication. In receiver side same PIC16F877 controller is used where it takes the RS232 signal and decodes. These details will be displayed in LCD.

2.2.5 LCD Dot matrix LCD of 16 dots per character and two lines is used here. It has parallel input of 8 bit. Temperature value is displayed in first line smoke data is displayed n second line. This display is provided both in transmitter and receiver side. 2.2.6 Buzzer Rise in temperature data more than 40degree or the presence of smoke will be indicated by BUZZER. 2.2.7 ZIGBEE module

DATA ACQUISITION USING RF |


This is the basic part where the data is sent to remote place with the help of this module. This is a type of RF communication of frequency more than 2.4GHz. Offset QPSK type of modulation is implemented here.

13

CHAPTER 3 - PERIPHERIALS
3.1 Power supply:
The microcontroller and other devices get supply from AC to DC adaptor through 7805, 5 volt regulator. The adaptor output voltage level is 12V DC non-regulated. The 7805/7812 voltage regulators are used to convert 12V to 5V DC. This voltage regulator gives the regulated output to all peripherals.

DATA ACQUISITION USING RF |

14

FIG-3.2. Regulator Schematic


FIG-3.1. 7805 Pin Configuration

3.2

RS232

Standard Details:

In RS-232, user data is sent as a time-series of bits. Both synchronous and asynchronous transmissions are supported by the standard. In addition to the data circuits, the standard defines a number of control circuits used to manage the connection between the DTE and DCE. Each data or control circuit only operates in one direction, that is, signaling from a DTE to the attached DCE or the reverse. Since transmit data and receive data are separate circuits, the interface can operate in a full duplex manner, supporting concurrent data flow in both directions. The standard does not define character framing within the data stream, or character encoding.

MAX-

232:

DATA ACQUISITION USING RF |

15

FIG-3.3 Functional diagram and Logic Diagram of MAX232 Fig-3.3 shows the functional diagram and logical diagram of MAX232. When a MAX232 IC receives a TTL level to convert, it changes a TTL Logic 0 to between +3 and +15 V, and changes TTL Logic 1 to between -3 to -15 V, and vice versa for converting from RS232 to TTL. This can be confusing when you realize that the RS232 Data Transmission voltages at a certain logic state are opposite from the RS232 Control Line voltages at the same logic state

Table 3.1 Voltage levels

DATA ACQUISITION USING RF |

16

The later MAX232A is backwards compatible with the original MAX232 but may operate at higher baud rates and can use smaller external capacitors 0.1 F in place of the 1.0 F capacitors used with the original device. The newer MAX3232 is also backwards compatible, but operates at a broader voltage range, from 3 to 5.5 V. Pin to pin compatible: ICL232, ST232, ADM232, HIN232

3.3

TEMPERATURE SENSOR LM35

The LM35 is an integrated circuit sensor that can be used to measure temperature with an electrical output proportional to the temperature (in C) In this project, LM35s are used for temperature sensing. Vs of the LM35s are given 5V and the Vout pins are connected to AN0 of PIC16F877A (ADC channel).Since the sensor gain (average slope) of the LM35 is 10mV /C and ADC has 10 bit (210 1000), so pin 5 (Vref) from PIC16F876A must be given for 1V by using the voltage divider concept. For preventing the offset, voltage for pin 5 (Vref) should be adjustable.
3.3.1 Temperature recorder: LM35 pin-out

Temperature recorder: pin-out for the LM35DZ (from the top).

FIG-3.4 Pin out of temperature

sensor

DATA ACQUISITION USING RF |

17

3.3.2 Temperature recorder Circuit

The LM35 is connected to analogue input AN0 which is also the data input line for programming the 12F675 using ICSP so you need a way of connecting the sensor and the programming input at the same time with the programming input overriding the sensor output (and not damaging the sensor). This is done here by using 1k resistor that reduces the current flowing back into the sensor and at the same time is not too large (so that the ADC can easily convert the sensor output value - the impedance must be equal to or smaller than 10k Ohm from the sensor). The voltage reference for the circuit is taken from pin 6 using a resistor divider giving a 2.5V reference. This is simply done to increase the resolution of the ADC as for the LM35 only 0-1V is generated so you loose ADC range when using a 5V reference. You could use a lower reference value but this value gives reasonable results. Alternatively you could use an amplifier to scale the LM35 output up which would make the ADC less sensitive to noise but for this project it is simpler not to do so. Note: The large decoupling capacitor on the supply input of the 12F675. This reduces noise overall and gives a more consistent reading. However using a plug block and ADC is not a very good idea as there is no ground plane and no control over current paths which you would be able control in a PCB. In a commercial system the internal ADC is often not used at all as it is essential to separate the noise introduced to the ADC using separate grounds and shielding - some designs encase the ADC in a custom metal shield and along with a ground plane connecting to the shield gives the best possible result. To overcome noise problems on the ADC the software averages the input readings so you get a better result.

DATA ACQUISITION USING RF |

18

3.4

SMOKE DETECTOR
A smoke detector is a device that detects smoke, typically

as an indicator of fire. Commercial, industrial, and mass residential devices issue a signal to a fire alarm system, while household detectors, known as smoke alarms, generally issue a local audible and/or visual alarm from the detector itself. Most smoke detectors work either by optical detection (photoelectric) or by physical process (ionization), while others use both detection methods to increase sensitivity to smoke. Sensitive alarms can be used to detect, and thus deter, smoking in areas where it is banned such as toilets and schools.

FIG-3.5 Smoke sensor

Ionization method

An ionization type smoke detector is generally cheaper to manufacture than an optical smoke detector; however, it is sometimes rejected because it is more prone to false (nuisance) alarms than photoelectric smoke detectors. It can detect particles of smoke that are too small to be visible. It includes about 37 kBq or 1 Ci of radioactive element americium241, corresponding to about 0.3 g of the isotope. The radiation passes through an ionization chamber, an air-filled space between two electrodes, and permits a small, constant current between the electrodes. Any smoke

DATA ACQUISITION USING RF |


that enters the chamber absorbs the alpha particles, which reduces the ionization and interrupts this current, setting off the alarm.

19

Alpha radiation, as opposed to beta and gamma, is used for two additional reasons: Alpha particles have high ionization, so sufficient air particles will be ionized for the current to exist, and they have low penetrative power, meaning they will be stopped by the plastic of the smoke detector and/or the air.
Working Principle

Ionization detectors have an ionization chamber and a source of ionizing radiation. The source of ionizing radiation is a minute quantity of americium-241 (perhaps 1/5000th of a gram), which is a source of alpha particles (helium nuclei).The ionization chamber consists of two plates separated by about a centimeter. The battery applies a voltage to the plates, charging one plate positive and the other plate negative. Alpha particles constantly released by the americium knock electrons off of the atoms in the air, ionizing the oxygen and nitrogen atoms in the chamber. The positively-charged oxygen and nitrogen atoms are attracted to the negative plate and the electrons are attracted to the positive plate, generating a small, continuous electric current. When smoke enters the ionization chamber, the smoke particles attach to the ions and neutralize them, so they do not reach the plate. The drop in current between the plates triggers the alarm.

3.5 BUZZER:

FIG-3.5 Buzzer

Features Resonant Frequency: 4,500Hz


Rated Voltage: 3Vdc (DC input)

DATA ACQUISITION USING RF |


Operating Voltage: 3 - 18Vdc Rated Current: 5mA @ 5Vdc
Sound Pressure Level: 70dB @ 3Vdc

20

Weight: 1 gram Dimensions: 12mm Diameter, 8.5mm High, Pin Spacing - 7.5mm 3.6 DOT MATRIX LCD:

FIG-3.5 Dot matrix LCD 16 characters x 2 lines bit parallel lines

RS232 compatible serial interface (2400 & 9600 baud selectable)


Externally selectable serial polarities (Inverted & Non-Inverted) Serially controllable contrast and backlight levels user programmable custom characters 16 Byte serial receive buffer

3.7 MICROCONTROLLER:
PIC 16F877 is used for computation the analog signals from sensor to digital form.

of

DATA ACQUISITION USING RF |

21

FIG-3.5 Pin diagram of PIC16F877A

Low-power, high-speed Flash/EEPROM technology Fully static design Wide operating voltage range (2.0V to 5.5V) Commercial and Industrial temperature ranges Low-power consumption 10-bit, up to 8-channel Analog-to-Digital Converter (A/D) Analog Comparator module with: Two analog comparators. Programmable on-chip voltage reference (VREF) module. Programmable input multiplexing from device inputs and internal voltage reference. Comparator outputs are externally accessible.

DATA ACQUISITION USING RF |

22

CHAPTER 4 - RF COMMUNICATION
4.1 .1 CHARECTERISTICS OF ZIGBEE

The focus of network applications under the IEEE 802.15.4 / ZigBee standard include the features of low power consumption, needed for only two major modes (Tx/Rx or Sleep), high density of nodes per network, low costs and simple implementation. These features are enabled by the following characteristics 2.4GHz and 868/915 MHz dual PHY modes. This represents three license-free bands: 2.4-2.4835 GHz, 868870 MHz and 902-928 MHz. The number of channels allotted to each frequency band is fixed at 16 channels In the 2.45 GHz band, 10 channels in the 915 MHz band, and 1 channel in the 868 MHz band Maximum data rates allowed for each of these frequency bands are fixed as 250kbps @2.4 GHz, 40 kbps @ 915 MHz, and 20 kbps @868 MHz. Allocated 16 bit short or 64 bit extended addresses. Allocation of guaranteed time slots (GTSs)

DATA ACQUISITION USING RF |

23

Carrier sense multiple access with collision avoidance (CSMA-CA) channel access Yields high throughput and low latency for low duty cycle devices like sensors and controls. Fully hand-shake acknowledged protocol for transfer reliability. Low power consumption with battery life ranging from months to years. Energy detection (ED). Link quality indication (LQI). Multiple topologies : star, peer-to-peer, mesh topologies

4.1.2 NETWORK TOPOLOGIES SUPPROTED BY ZIGBEE


3 types of topologies that ZigBee supports: star topology, peer-to-peer topology and cluster tree.

Star Topology
In the star topology, the communication is established between devices and a single central controller, called the PAN coordinator. The PAN coordinator may be mains powered while the devices will most likely be battery powered.

Peer-to-peer Topology
In peer-to-peer topology, there is also one PAN coordinator. In contrast to star topology, any device can communicate with any other device as long as they are in range of one another. A peer-to-peer network can be ad hoc, self-organizing and self-healing. It also allows multiple hops to route messages from any device to any other device in the network. It can provide reliability by multipath routing.

DATA ACQUISITION USING RF |

24

Cluster-tree Topology
Cluster-tree network is a special case of a peer-to-peer network in which most devices are FFDs and an RFD may connect to a cluster-tree network as a leave node at the end of a branch. Any of the FFD can act as a coordinator and provide synchronization services to other devices and coordinators. Only one of these coordinators however is the PAN coordinator. The PAN coordinator forms the first cluster by establishing itself as the cluster head (CLH) with a cluster identifier (CID) of zero, choosing an unused PAN identifier, and broadcasting beacon frames to neighboring devices. A candidate device receiving a beacon frame may request to join the network at the CLH. If the PAN coordinator permits the device to join, it will add this new device as a child device in its neighbor list. The newly joined device will add the CLH as its parent in its neighbor list and begin transmitting periodic beacons such that other candidate devices may then join the network at that device. Once application or network requirements are met, the PAN coordinator may instruct a device to become the CLH of a new cluster adjacent to the first one. The advantage of this clustered structure is the increased coverage area at the cost of increased message latency.

4.1.3 ARCHITECTURE
The LR-WPAN architecture is defined in terms of a number of blocks in order to simplify the standard. These blocks are called layers. Each layer is responsible for one part of the standard and offers services to the higher layers. The layout of the blocks is based on the open systems interconnection (OSI) seven-layer model. The interfaces between the layers serve to define the logical links between layers. The LR-WPAN architecture can be implemented either as embedded devices or as devices requiring the support of an external device such as a PC. An LR-WPAN device comprises a PHY, which contains the radio frequency (RF) transceiver along with its low-level control mechanism, and a MAC sub layer that provides access to the physical channel for all types of transfer.

DATA ACQUISITION USING RF |

25

ARCITECTURE OF ZIGBEE
FIG-4.1 Zigbee architecture

Network and Application Support layer


The network layer permits growth of network sans high power transmitters. This layer can handle huge numbers of nodes. This level in the ZigBee architecture includes The ZigBee Device Object (ZDO) User-Defined Application Profile(s) The Application Support (APS) Sub-layer. The APS sub-layer's responsibilities include maintenance of tables that enable matching between two devices and communication among them, and also discovery, the aspect that identifies other devices that operate in the operating space of any device. The responsibility of determining the nature of the device (Coordinator / FFD or RFD) in

DATA ACQUISITION USING RF |


the network, commencing and replying to binding requests and ensuring a secure relationship between devices rests with the ZDO (Zigbee Define Object). The user-defined application refers to the end device that conforms to the ZigBee Standard. 4.1.4 Traffic Types ZigBee/IEEE 802.15.4 addresses three typical traffic types. IEEE 802.15.4 MAC can accommodate all the types. Data is periodic. The application dictates the rate, and the sensor activates checks for data and deactivates. Data is intermittent. The application, or other stimulus, determines the rate, as in the case of say smoke detectors. The device needs to connect to the network only when communication is necessitated. This type enables optimum saving on energy. Data is repetitive, and the rate is fixed a priori. Depending on allotted time slots, called GTS (guaranteed time slot), devices operate for fixed durations ZigBee employs either of two modes, beacon or nonbeacon to enable the to-and-fro data traffic. Beacon mode is used when the coordinator runs on batteries and thus offers maximum power savings, whereas the non-beacon mode finds favour when the coordinator is mains-powered.

26

4.1.5 Block diagram of RF (ZIGBEE) TRANSCEIVER


IEEE 802.15.4 Modulation Format: This section is meant as an introduction to the 2.4 GHz direct sequence spread spe6ctrum (DSSS) RF modulation format defined in IEEE 802.15.4. The modulation and spreading functions are illustrated at block level in Figure below. Each byte is divided into two symbols, 4 bits each. The least significant symbol is transmitted first. For multi-

DATA ACQUISITION USING RF |


byte fields, the least significant byte is transmitted first, except for security related fields where the most significant byte it transmitted first. Each symbol is mapped to one out of 16 pseudo-random sequences, 32 chips each. The symbol to chip mapping is shown in Table 3. The chip sequence is then transmitted at 2 MChips/s, with the least significant chip (C0) transmitted first for each symbol.

27

FIG-4.2 Zigbee Transmitter

Channel filtering and frequency offset compensation is performed digitally. The signal level in the channel is estimated to generate the RSSI level. Data filtering is also included for enhanced performance. With the 40 ppm frequency accuracy requirement from [1], a compliant receiver must be able to compensate for up to 80 ppm or 200 kHz. The CC2420demodulator tolerates up to 300 kHz offset without significant degradation of the receiver performance. Soft decision is used at the chip level, i.e. the demodulator does not make a decision for each chip, only for each received symbol. De-spreading is performed using over sampled symbol co-relaters. Symbol synchronization is achieved by a continuous start of frame delimiter (SFD) search. When a SFD is detected, data is written to the RXFIFO and may be read out by the microcontroller at a lower bit rate than the 250 kbps generated by the receiver. The demodulator also handles symbol rate errors in excess of 120 ppm without performance degradation.

4.2. TYPE OF MODULATION


4.2.1 QPSK

QPSK uses four points on the constellation diagram, equispaced around a circle. With four phases, QPSK can encode two bits per symbol

DATA ACQUISITION USING RF |

28

FIG-5.1 Constellation diagram of QPSK

The mathematical analysis shows that QPSK can be used either to double the data rate compared with a BPSK system while maintaining the same bandwidth of the signal, or to maintain the datarate of BPSK but halving the bandwidth needed. In this latter case, the BER of QPSK is exactly the same as the BER of BPSK - and deciding differently is a common confusion when considering or describing QPSK. The advantage of QPSK over BPSK becomes evident: QPSK transmits twice the data rate in a given bandwidth compared to BPSK at the same BER. The engineering penalty that is paid is that QPSK transmitters and receivers are more complicated than the ones for BPSK. However, with modern electronics technology, the penalty in cost is very moderate.

QPSK signal in the time domain


The modulated signal is shown below for a short segment of a random binary data-stream. The two carrier waves are a cosine wave and a sine wave, as indicated by the signal-space analysis above. Here, the odd-numbered bits have been assigned to the in-phase component and the even-numbered bits to the quadrature component (taking the first bit as number 1). The total signal the sum of the two components is shown at the bottom. Jumps in phase can be seen as the PSK changes the phase on each component at the start of each bit-period. The topmost waveform alone matches the description given for BPSK above.

DATA ACQUISITION USING RF |

29

FIG-5.2 QPSK waveform

4.2.2 phase-shift

OQPSK - Offset quadrature keying

shift keying phase-shift different transmit. It staggered keying

Offset quadrature phase(OQPSK) is a variant of keying modulation using 4 values of the phase to is sometimes called quadrature phase-shift (SQPSK).

DATA ACQUISITION USING RF |

30

FIG-5.3 Constellation diagram of OQPSK

Taking four values of the phase (two bits) at a time to construct a QPSK symbol can allow the phase of the signal to jump by as much as 180 at a time. When the signal is low-pass filtered (as is typical in a transmitter), these phase-shifts result in large Amplitude fluctuations, an undesirable quality in communication systems. By offsetting the timing of the odd and even bits by one bit-period, or half a symbol-period, the in-phase and quadrature components will never change at the same time. In the constellation diagram shown on the right, it can be seen that this will limit the phase-shift to no more than 90 at a time. This yields much lower amplitude fluctuations than nonoffset QPSK and is sometimes preferred in practice. The picture on the right shows the difference in the behavior of the phase between ordinary QPSK and OQPSK. It can be seen that in the first plot the phase can change by 180 at once, while in OQPSK the changes are never greater than 90. The modulated signal is shown below for a short segment of a random binary data-stream. Note the half symbol-period offset between the two component waves. The sudden phase-shifts occur about twice as often as for QPSK (since the signals no longer change together), but they are less severe. In other words, the magnitude of jumps is smaller in OQPSK when compared to QPSK.

DATA ACQUISITION USING RF |

31

FIG-5.4 OQPSK waveform

4.2.3 QPSK SIGNAL VERSUS OQPSK

DATA ACQUISITION USING RF |

32

FIG-5.5 QPSK waveform vs OQPSK waveform

DATA ACQUISITION USING RF |

33

CHAPTER 5 HARDWARE IMPLEMENTATION


5.1 SENSOR AND TRANSMITTER SECTION

DATA ACQUISITION USING RF |


FIG-5.1 RF transmitter

34

Fig-6.1 shows the basic schematic of project data acquisition using RF(zigbee) Transmitter. These two inputs are taken where the temperature data and smoke details are sensing. Microcontroller PIC16F877 is used to take the following input and convert in to RS232 form and send the data in to Zigbee module. This data is sent wia wireless communication to remote places. The same data is displayed on LCD also. Individual module Schematic is as shown in below Fig.

5.1.1 SMOKE SENSOR SCHEMATIC

DATA ACQUISITION USING RF |

35

FIG-5.2 Smoke sensor and driver circuit .

5.1.2 Temperature sensor

FIG-5.3 Temperature sensor and driver circuit .

DATA ACQUISITION USING RF |

36

5.2

RF RECEIVER

DATA ACQUISITION USING RF |

37

FIG-5.4 Temperature sensor and driver circuit .

Fig5.4 shows the basic schematic of project Data acquisition using RF(zigbee) Receiver. On the receiver side same Zigbee transceiver module collects the RF data. This data is converted in to RS232 form by MAX232 converter. The data from MAX232 is giver to PIC16F877 receiver. This data is collected or monitored in remote places where it is displayed in LCD and buzzer indication is provided if temperature is more than 40o. Buzzer indication is also provided if there is a presence of smoke. START

Configure all ports and Registers as per the requirement CHAPTER 6 - FIRMWARE

LOGIC

Display Weather monitoring using ZIGBEE

6.1 Read the FLOWCHART AND FIRMWARE LOGIC


Temperature value & smoke sensor status from I/O pin

If output of Smoke sensor is high OR Temperature value is more than 40 degree

NO

Display Temperature value and Smoke status as normal

YES

Display Temperature value and Smoke status as normal Turn ON the Buzzer

STOP

DATA ACQUISITION USING RF |

38

Above flow chart shows the software flow of DATA ACQUISITION USING RF COMMUNICATION All the ports should be initialized as output port because it should not pick any other noise. The required port which is used for input should be made as input. Microcontroller PIC16F877 consists of 10bit ADC where it receives analog signal and converts in to digital form as shown in block diagram Fig-6.1

FIG-6.1 ADC from PIC controller and displayed on LCD. The temperature data and smoke details are taken as input from I/O pin. Now the reference is fixed as it compares with 40degree of temperature value and 200 relative humidity of smoke value. If these value varies beyond the limit then Buzzer indication is provided at receiver section. Indication provided on LCD both at transmitter and receiver section. IC PIC16F877A is an 8-bit microcontrollerwith 8k14-bit flash program memory, 368 bytes of RAM and many other extra peripherals like ADC, universal synchronous asynchronous receiver transmitter, master synchronous serial port, timers, compare capture and pulsewidth modulation modules, and analogue comparators. It is based on the reduced instruction set computer (RISC) architecture.

DATA ACQUISITION USING RF |


The microcontroller processes the sensor output to compute the temperature in degree Celsius. The internal ADC of the microcontroller is used to convert the analogue output of the sensor into its equivalent digital value. The internal ADC of the microcontroller has eight channels of analogue input and gives 10-bit digital output. In this project, the r e f e r e n c e voltage to the ADC is the same as the supply voltage to the microcontroller,i.e, 5V. The resolution of the ADC can be calculated as follows: (as it is a 10-bit ADC) = 5/1023 = 4.887 mV It means that for 4.887mV change in the analogue input, the ADC output changes by binary 1 with a reference voltage of 5V. Analogue output of the sensor at its pin 2 is connected to Port A at RA0 for conversion into digital equivalent. The control lines EN, R/W and RS of the LCD module are connected to microcontroller pins 18.19 & 20, respectively. The commands and the data to be displayed are sent to the LCD module in the nibble mode from microcontroller.

39

CHAPTER 7 - SOFTWARE
7.1 MPLAB IDE v8.60

MPLAB IDE is a Windows Operating System (OS) software program that runs on a PC to develop applications for Microchip microcontrollers and digital signal controllers. It is called an Integrated Development Environment, or IDE, because it provides a single integrated "environment" to develop code for embedded microcontrollers.
Embedded systems

An embedded system is typically a design making use of the power of a small microcontroller, like the Microchip PIC MCU or dsPIC Digital Signal Controller (DSCs). These microcontrollers combine a microprocessor unit (like the CPU in a desktop PC) with some additional circuits called "peripherals", plus some additional circuits on the same chip to make a small control module requiring few other external devices. This single device can then be embedded into other electronic and mechanical devices for low-cost digital control.
MPLAB Editor

The MPLAB Editor is an integrated part of the MPLAB IDE Integrated Development Environment. The editor is always available when MPLAB IDE is running.

DATA ACQUISITION USING RF |


The MPLAB IDE and MPLAB Editor are designed to provide developers with an easy and quick method to develop and debug firmware for Microchip Technology's PIC microcontroller (MCU) and DSPIC digital signal controller (DSC) product families.
MPLINK Linker

40

MPLINK object linker (the linker) combines object modules generated by the MPASM assembler or the MPLAB C18 C compiler into a single executable (hex) file. The linker also accepts libraries of object files as input, as geneated by the MPLIB object librarian. The linking process is controlled by a linker script file, which is also input into MPLINK linker.

MPLAB ICD 2 debugger

The MPLAB ICD 2 is a low-cost in-circuit debugger (ICD) and in-circuit serial programmer (ICSP). MPLAB ICD 2 is intended to be used as an evaluation, debugging and programming aid in a laboratory environment. The MPLAB ICD 2 offers these features: Real-time and single-step code execution Breakpoints, Register and Variable Watch/Modify In-circuit debugging Target Vdd monitor Diagnostic LEDs MPLAB IDE user interface RS-232 serial or USB interface to a host PC

7.2 STEPS IN DEVELOPING A PROGRAM


Setting Up the Environment

DATA ACQUISITION USING RF |


Running the Project Wizard Viewing the Project Creating a HEX File Setting Debug Options Setting Up the Demo Board Loading Program Code For Debugging Running TUT452 Debugging TUT452 Programming the ApplicationTUT452 Main Routine and Source Code

41

CHAPTER 8 - ADVANTAGES & APPLICATIONS AND LIMITATIONS


8.1 ADVANTAGES
1. Better accuracy. 2. Avoiding human error. 3. Increases speed and saves time. 4. Cost effective.

8.2 APPLICATIONS:
The major applications of data acquisition using RF communication (ZIGBEE) is Manufacturing industries where the continuous data needed to be monitored data communication is required for different modules in industrial campus.

DATA ACQUISITION USING RF |


In hospitals it has advantage to gather the information. Remote temperature alarm for poultry sheds: Wireless Temperature Monitoring and alarm can be used to remotely monitor incubator temperature, egg storage room temperature, broiler sheds, water level and humidity. Optional outputs can also be used to control ventilation fans and heating devices Industrial and commercial remote wireless temperature monitoring system. Home and industrial automation systems

42

8.3 LIMITATIONS:
Range of communication reduced when there is obstacles between transmitter and receiver. Since no security data may be received by unintended receiver.

CHAPTER 9 - DEVELOPMENT AND RESULTS


9.1 DEVELOPMENT STEPS
The development of project is done in various stages. a. Stage 1: Study of all the components carried in this stage. RF communication Various modulation techniques Sensors Embedded coding Detailed study is done on the above factors

DATA ACQUISITION USING RF |


b. Stage 2: Circuit diagram is prepared and verified in Multisim software. c. Stage 3: Circuit connection is done first on breadboard. d. Stage 4: Since it is wireless communication the range of communication is checked and noted. e. Stage 5: Coding is done in MPLAB software. f. Stage 6: Report preparation is done. The prototype of Data acquisition using RF was designed as discussed in previous chapters.

43

9.2. RESULT
The input dc 12V is given to the power supply circuit. The power ON LED indication is provided to each of the modules. This power on indication is mainly implemented for debug purpose. In transmitter side as soon as circuit powers ON it senses the temperature & Smoke data and displays on LCD. Refer Tablexx for detailed transmitter and receiver LCD display output. On the receiver side, the input dc 12V is given to the power supply circuit. The power ON LED indication is provided to each of the modules. This power on indication is mainly implemented for debug purpose. If any data is collected by receiver from transmitter then it shows the corresponding value on LCD. If no data is received by receiver it waits for the data by displaying weather monitoring using ZIGBEE.

Table.9.1 Display pattern for different conditions of input Condition Temperature is within 40 degree Celsius and absent of smoke TRANSMITTER RECEIVER

DATA ACQUISITION USING RF |


Temperature value is more than 40 degree Celsius and smoke is present

44

When receiver is not receiving data from transmitter then the display will be shown as below FIG 8.1

FIG-9.1 Display pattern when no transmitter input .

10. CONCLUSION:
The fundamental aim of this project is to design a wireless weather system which enables to monitor the weather parameter in an industry by using zigbee technology and display the

DATA ACQUISITION USING RF |


parameter on the PCs screen using visual basic. The components used in the circuit are readily available. The individual sub-circuits have been designed on PCB and tested for functioning in the laboratory. The test has been performed by placing the sensor board both in an indoor and outdoor and the parameters are noted and checked with the analog transducers for errors and the errors will be very less. ZigBee targets applications not addressable by Bluetooth or any other wireless standard. The Zigbee based wireless weather station is essentially a design and implementation project of wireless technology. To approach a project like this a parallel path has to be taken in regards to the theory and the practical circuitry, for a successful conclusion in any project the paths must meet, and this only happens when they are fully understood. This is why a good grounding in the basics of Digital, Computer interfacing ports & programming in micro controller ,visual basic6.0 language must be achieved before ever approaching a project like this. To start off looking at basic of wireless device was must. This is what made the overall project challenging and rewarding. The design use for this project is essentially quite a simple one, and it is this simplicity which partly brings it down when it comes to the overall reliable performance.

45

11. FUTURE SCOPE OF ZIGBEE:


The zigbee technology can be wide used for home and industrial automation. It lead to the cheap wireless technology, so that it can be widely used for low rate data transfer. It can also be used for the remote control unit like toys, etc. We got a proposed zigbee universal remote controller. It requires only 200us of latency and high efficient use of power. Zigbee is the best for where the battery is replaced very rarely.

12. REFERENCES
www.zigbeealliance.com www.wikipedia.org Wireless Communication System by Roody Coolen Communication Electronics by Freznel

DATA ACQUISITION USING RF |

46

DATASHEE T

Vous aimerez peut-être aussi