Controlling the atmospheric turbulence, microPIC programming


Thèse de Bachelor, 2013

52 Pages


Extrait


Contents

Abstract

Acknowledgement

Introduction
Previous Work
Motivation

Literature review
Free Space Optical Communication
Advantages and Disadvantages of FSO
FSO System
Effects of Atmospheric Attenuation of FSO Communication
Performances of FSO Links

Aim and Objectives
1. Programming microPIC for temperature measurement
2. Programming microPIC for humidity measurement
3. Programming microPIC for pressure measurement
4. Programming microPIC for controlling PWM fan
5. Programming microPIC for controlling Thermistors

Temperature Sensors
Working of DS18B20 temperature sensor
Power supply for DS18B20
Memory of DS18B20
DS18B20 Sequence
Coding for PIC16F627A and DS18B20 in C language
Arduino Program for more than 1 DS18B20 temperature sensors
PCB and schematic diagram

Humidity Sensor
Working of SHT11
Communicating with SHT11 humidity sensor
Calculating relative humidity
Coding for PIC16F627A and SHT11 humidity sensor
Arduino Program for SHT11 sensor
PCB and schematic diagram for SHT11

Pressure Sensor
Working of MPX4115a pressure sensor
Calculating pressure
Coding for PIC16F627A and MPX4115a pressure sensor
Arduino Code for MPX4115a
PCB and Schematic Diagram for MPX4115a pressure sensor

Results and Discussion

Conclusion

Appendices
Facilities Resource and Cost [31]
Software Resource and Cost
Hardware Resource and cost [31]

References

Abstract

Chamber is used to study atmospheric turbulence effects on FSO signals and this experiment is done inside the laboratory to avoid the interference of sunlight light and also it is hard to create turbulence outside laboratory as outside temperature and pressure will affect the turbulence created inside this chamber. This project is all about controlling all parameters (temperature, pressure, humidity) using sensors, fans, thermistors through embedded circuit.

As observed from previous work, high end microPIC (PIC18 series) although it has many functionality and large program memory size, it is hard to control all sensors, fans, thermistor using 1 PIC1866K80, So in this project mid-range PIC (PIC16 series) are used to control sensors, fans and thermistors.

In this project, temperature, humidity, pressure sensors are controlled by different microcontrollers and taking their reading to manage the performance of PWM fans and thermistors inside the chamber. These components are very important to configure and monitor the atmospheric condition inside the chamber.

This project focuses on the use of PIC16 family microcontrollers to be programmed in C language or in assembly to control all sensors, fans and thermistor and build PCB layout.

In this project, Rs-232 or Com port will be used as an interface to control the PIC16 microcontroller instruction and procedure through computer.

Acknowledgement

I want to express my sincere gratitude for their academic assistance and scientific attitude during the procedure of my dissertation.

I would like to thanks my supervisor Dr Michael Elsdon for his positive attitude toward me and encouragement and throughout my project his knowledge and guidance help me in all stages to accomplishment the project.

I also like to thank my second supervisor Dr Joaquin Perez Soler for his warm-hearted help to overcome the difficulty I met throughout the project and helping me in designing critical parts of my project. Special thanks should be voiced to my friends for their patient and help.

List of Diagrams

Fig 1: FSO Transmitter and Receiver

Fig 2: Block diagram of FSO system

Fig 3: Atmosphere layers of earth

Fig 4: Pin diagram of DS18B20

Fig 5: Temperature register of DS18B20

Fig 6: Temperature and Digital Output of DS18B20 relationship

Fig 7: External power supply and parasite mode connection of DS18B20

Fig 8: Organisation of Memory of DS18B20

Fig 9: Schematic diagram of DS18B20

Fig 10: PCB of DS18B20 sensor

Fig 11: Connection SHT11 with microPIC

Fig 12: Start the transmission sequence for SHT11

Fig 13: SHT11 sensor command list

Fig 14: Status Register of SHT11 sensor

Fig 15: Schematic of SHT11 sensor

Fig 16: PCB of SHT11 sensor

Fig 17: Schematic of MPX4115a Sensor

Fig 18: PCB of MPX4115a sensor.

Fig 19: ROM Code of 3 DS18B20 sensors

Fig 20: Temperature reading from 3 DS18B20 sensors.

Introduction

Northumbria University has research group called Northumbria Communication Research group which is focused on fibre optical communication systems and in free space optical (FSO) communications from laser transmission links to visible light communication. In 2011, in order to reproduce weather conditions from fog to turbulence, this group built an indoor atmospheric chamber and has work extraordinary on the characterization of the FSO links and the effects of weather conditions on them [8]. The suitable atmospheric condition was created by controlling temperature, humidity, pressure sensor, PWM fans and thermistor through PIC18 family series microcontroller. Even top research journals and books have recognized their work in this area. Now, this group is upgrading their facilities which imply an update on the control of the variable like temperature, humidity, pressure, wind speed in the chamber that affects the atmospheric condition replication. They used PIC18 microcontroller (PIC18F66K80) before which belongs to high end. [1] [31]

Previous Work

In previous Project which was based on effects of the sand storm on Free space optical communication, mikroC complier software was used instead of MPLAB software because MikroC has inbuilt library to set up functionality of microPIC. [1]. In this Project no linear relation between values of register (related to PWM) and wind speed delivered by the fans was found. Measurement of wind speed was done by anemometer EA-3010. MAX32323 component was used to give command to PIC and display the data received from sensors on computer. To set up UART mikroC was used as it contains lots of libraries on UART. Communication of PIC with Pc was set up using software called PuTTY (HyperTerminal can be alternative for PuTTY). For temperature measurement DS18B20 sensor is used which is digital sensor which is one-wire bus device. For pressure measurement, MPX4115A is used which is analogue and ADC converter which available in PIC18 series. For Humidity Measurement, SHT11 is used which is digital sensor which can measure both temperature and humidity but here it’s used only for humidity. In this project, 5 out of 10 fans couldn’t control with PWM (pulse width modulation) mode pin of microPIC because DS18B20 and SHT11 need some time to receive and transmit data and if program interrupt these data frame even for some milliseconds, data could misread or PIC will send wrong commands to sensors. At least one timer is needed to generated PWM, which would go often in interrupt function and will mess up other module functioning. The PCB is built around one PIC18f66K80 which limits the number port available for sensors that means numbers of sensors cannot be increased as each humidity sensor needs 2 ports, pressure sensor needs 1 analogue pin for each sensor. [31]

Motivation

Chamber will be used to study atmospheric turbulence effects on FSO signals and this experiment is done inside the laboratory to avoid the interference of sunlight and also it is hard to create turbulence outside laboratory, as outside temperature and pressure will affect the turbulence created inside this chamber. This project is all about controlling all parameters (temperature, pressure, humidity) using sensors, fans, thermistors through embedded circuit. As observed from previous work, high end microPIC (PIC18 series) although it has many functionality and large program memory size, it is hard to control all sensors, fans, thermistor using 1 PIC1866K80, So in this project mid-range PIC (PIC16 series) are used to control sensors, fans and thermistors.[1] [31]

Literature review

Free Space Optical Communication

Free space optical communication (FSO) is an optical communication technology which transmits data for telecommunications or computer networking by propagating light in form of laser using lenses and mirrors to focus and redirect the beam through free space (e.g. Air, outer space, vacuum).[31]

illustration not visible in this excerpt

Fig 1: FSO Transmitter and Receiver

Other name for FSO communication is Wireless Optical communication (WOC), fibreless or Laser Communication .Nowadays, it has witness a vast development and is categorised among as one of the different types of wireless communication. At clear atmospheric conditions, it provides a wide service and requires point-to-point connection between transmitter and receiver FSO is basically the same as fiber optic transmission. The difference is that the laser beam is collimated and sent through atmosphere from the transmitter, rather than guided through optical fiber [2]. The FSO technique uses modulated laser beam to transfer carrying data from a transmitter to a receiver. FSO is affected by attenuation of the atmosphere due to the instable weather conditions. Since the atmosphere channel, through which light propagates is not ideal.[28] [29]

FSO systems are sensitive to bad weather conditions such as fog, haze, dust, rain and turbulence. All of these conditions act to attenuate light and could block the light path in the atmosphere. As a result of these challenges, we have to study weather conditions in detail before installing FSO systems. This is to reduce effects of the atmosphere also to ensure that the transmitted power is sufficient and minimal losses during bad weather.

Advantages and Disadvantages of FSO

The free space optics advantages and disadvantages are worth exploration. After all, whenever a new method of modern communication is developed it is important to consider all the positives and negatives that come along with it.

There are many advantages of free space optics. Such as, lower costs associated with the system, no fiber optic cables to lay, no expensive rooftop installations required and no security upgrades necessary, the system upgrades are generally made quite easily and no RF license is needed.[23] Another advantage of free space optical communication is that it is incredibly fast. Currently, these systems can transmit a large amount of data, 1.25 GB per second [30] [27]. In fact, in future it is expected to increase to a whopping 10 GB per second. This speed is because of the fact that the signals can be transmitted through the air faster than they can be transmitted through fiber optic cables. The signals are sent from one wireless unit to another in a direct line through the atmosphere. Another advantage of free space optics is that the radio frequencies don’t interference with the signal . This means fewer disruptions to the information flow [22].

There are also a number of drawbacks of FSO. Free space optical communication is subject to atmospheric disturbances and conditions. Thick fog is one of the most problematic forms of interference for wireless optical communication [25]. This is because the moisture in the fog can reflect, absorb, and scatter the signal. Absorption and scattering can both occur whenever there is a lot of moisture in the air. Absorption of the signal causes a decrease in signal strength. Scattering does not cause a decrease in signal strength, but rather causes the signal to be sent off in different directions. This is an issue particularly over long distances. Physical obstructions can also be a problem [26]. These are generally temporary and include birds, cranes, and even building sway that results from earthquakes. Scintillation, which is heat rising from the earth or something man-made, can also disrupt the signal. There have also been concerns about the level of safety of free space optical communication due to the use of lasers. This is of concern particularly when it comes to eye safety and to the high voltages required to power the systems. However, there have been strict regulations put into effect to minimize the risks.

Overall, FSO has got many advantages than its disadvantages. To have a reliable and less expensive method of wireless communication is of the utmost importance in today's mobile society and free space optics makes this possible. All advantages and disadvantages of free space optical communication are given below.

FSO System

illustration not visible in this excerpt

Fig 2: Block diagram of FSO system

FSO communication is a line of sight technology that uses laser beam for sending the very high bandwidth digital data from one point to another through atmosphere. This can be achieved by using a modulated narrow laser beam lunched from a transmission station to transmit it through atmosphere and subsequently received at the receiver station. The generalized FSO system is illustrated in Fig. (2), it is typically consists of transmitter, FSO channel and a receiver.

a. Transmitter

Transmitter transforms the electrical signal to an optical signal and it modulates the laser beam to transfer carrying data to the receiver through the atmosphere channel. The transmitter consists of four parts as shown in Fig. (2): laser modulator, driver, optical source and transmit telescope.

Laser modulator

Laser modulation means the data were carried by a laser beam. The modulation technique can be implemented in following two common methods: internal modulation and external modulation [2].

Internal modulation: is a process which occurs inside the laser resonator and it depends on the change caused by the additive components and change the intensity of the laser beam according to the information signal.

External modulation: is the process which occurs outside the laser resonator and it depends

on both the polarization phenomena and the refractive dualism phenomenon.

Driver

Driver circuit of a transmitter transforms an electrical signal to an optical signal by varying the current flow through the light source.

Optical source

Optical source may be a laser diode (LD) [21] or light emitting diode (LED), which used to convert the electrical signal to optical signal.

A laser diode is a device that produces optical radiation by the process of stimulated emission photons from atoms or molecules of a lasing medium, which have been excited from a ground state to a higher energy level. A laser diode emits light that is highly monochromatic and very directional. This means that the LD's output has a narrow spectral width and small output beam angle divergence. LDs produce light waves with a fixedphase relationship between points on the electromagnetic wave. There are two common types of laser diode: Nd:YAG solid state laser and fabry-perot and distributed-feedback laser (FP and DFB) [3].

Laser source selection criteria for FSO

The selection of a laser source for FSO applications depends on various factors. They factors can be used to select an appropriate source for a particular application. To understand the descriptions of the source performance for a specific application, one should understand these detector factors. Typically the factors that impact the use of a specific light source include the following [4]:

Price and availability of commercial components

Transmission power and lifetime

Modulation capabilities

Eye safety

Physical dimensions and compatibility with other transmission media.

Transmitter telescope

The transmitter telescope collects, collimates and directs the optical radiation towards the receiver telescope at the other end of the channel.

b. FSO channel

illustration not visible in this excerpt

Fig 3: Atmosphere layers of earth

For FSO links, the propagation medium is the atmosphere. The atmosphere may be regarded as series of concentric gas layers around the earth. Three principal atmospheric layers are defined in the homosphere [5], the troposphere, stratosphere and mesosphere. These layers are differentiated by their temperature gradient with respect to the altitude. In FSO communication, we are especially interested in the troposphere because this is where most weather phenomena occur and FSO links operate at the lower part of this layer [5].

The atmosphere is primarily composed of nitrogen (N2, 78%), oxygen (O2, 21%), and argon (Ar, 1%), but there are also a number of other elements, such as water (H2O, 0 to 7%) and carbon dioxide (CO2, 0.01 to 0.1%), present in smaller amounts. There are also small particles that contribute to the composition of the atmosphere; these include particles (aerosols) such as haze, fog, dust, and soil [6][20].

Propagation characteristics of FSO through atmosphere drastically change due to communication environment, especially, the effect of weather condition is strong. The received signal power fluctuates and attenuates by the atmospheric obstacles such as rain, fog, haze and turbulence in the propagation channel [22] . The atmospheric attenuation results from the interaction of the laser beam with air molecules and aerosols along the propagation. The main effects on optical wireless communication are absorption, scattering, and scintillation [7].

c. Receiver

The receiver optics consists of five parts as shown in Fig. 2: receiver telescope, optical filter, detector, amplifier and demodulator.[19]

Receiver telescope

The receiver telescope collects and focuses the incoming optical radiation on to the photo detector. It should be noted that a large receiver telescope aperture is desirable because it collects multiple uncorrelated radiation and focuses their average on the photo detector [8].

Optical filter

By introducing optical filters that allow mainly energy at the wavelength of interest to impinge on the detector and reject energy at unwanted wavelengths, the effect of solar illumination can be significantly minimized [6].

Detector

The detector also called photodiode (PD) is a semiconductor devices which converts the photon energy of light into an electrical signal by releasing and accelerating current conducting carriers within the semiconductors. Photodiodes operate based on photoconductivity principals, which is an enhancement of the conductivity of p-n semiconductor junctions due to the absorption of electromagnetic radiation. The diodes are generally reverse-biased and capacitive charged [9]. The two most commonly used photodiodes are the pin photodiode and the avalanche photodiode (APD) because they have good quantum efficiency and are made of semiconductors that are widely available commercially [10].

Features of detector

The performance characteristics indicate how a detector responds to an input of light energy. They can be used to select an appropriate detector for a particular application. To understand the descriptions of detector performance and to be able to pick a detector for a specific application, one should understand these detector characteristics. In general, the following properties are needed [18]:

A high response at the wavelength to be detected.

A small value for the additional noise is introduced by the detector.

Sufficient speed of response.

Effects of Atmospheric Attenuation of FSO Communication

Clear air turbulence phenomena affect the propagation of optical beam by both spatial and temporal random fluctuations of refractive index due to temperature, pressure, and wind variations along the optical propagation path [11][12]. Atmospheric turbulence primary causes phase shifts of the propagating optical signals resulting in distortions in the wave front. These distortions, referred to as optical aberrations, also cause intensity distortions, referred to as scintillation. Moisture, aerosols, temperature and pressure changes produce refractive index variations in the air by causing random variations in density [13]. These variations are referred to as eddies and have a lens effect on light passing through them. When a plane wave passes through these eddies, parts of it are refracted randomly causing a distorted wave front with the combined effects of variation of intensity across the wave front and warping of the isophase surface [14]. The refractive index can be described by the following relationship [15] [20]:

Where:

P is the atmospheric pressure in [mbar].

T is the temperature in Kelvin [K].

If the size of the turbulence eddies are larger than the beam diameter, the whole laser beam bends. If the sizes of the turbulence eddies are smaller than the beam diameter the laser beam bends partially, they become distorted. Small variations in the arrival time of various components of the beam wave front produce constructive and destructive interference and result in temporal fluctuations in the laser beam intensity at the receiver.

Refractive index structure

Refractive index structure parameter Cn2 is the most significant parameter that determines the turbulence strength. Clearly, Cn2 depends on the geographical location, altitude, and time of day. Close to ground, there is the largest gradient of temperature associated with the largest values of atmospheric pressure (and air density). Therefore, one should expect larger values Cn2 at sea level. As the altitude increases, the temperature gradient decreases and so the air density with the result of smaller values of Cn2 [3].

In applications that envision a horizontal path even over a reasonably long distance, one can assume Cn2 to be practically constant. Typical value of Cn2 for a weak turbulence at ground level can be as little as 10-17m-2/3, while for a strong turbulence it can be up to 10-13m-2/3or larger. However, a number of parametric models have been formulated to describe the Cn2 profile and among those, one of the more used models is the Hufnagel-Valley [16] given by Eq.

Cn2(h) = 0.00594(v/27)2 x (10-5h)10 exp(-h/1000) + 2.7 x 10-16 exp(-h/1500) +

A0 exp(-h/100)

Where:

h is the altitude in [m].

v is the wind speed at high altitude [m/s].

A0 is the turbulence strength at the ground level, A0 = 1.7x10-14m-2/3.

The most important variable in its change is the wind and altitude. Turbulence has three main effects [36]; scintillation, beam wander and beam spreading.

Scintillation

Scintillation may be the most noticeable one for FSO systems [9]. Light traveling through scintillation will experience intensity fluctuations, even over relatively short propagation paths. The scintillation index, σi2 describes such intensity fluctuation as the normalized variance of the intensity fluctuations given by Eq. (19) [3]:

Where:

I = |E|2: is the signal irradiance (or intensity).

The strength of scintillation can be measured in terms of the variance of the beam amplitude

or irradiance σi given by the following:

σi2 = 1.23 Cn2k7/6L11/6 ----(20)

Here, k = 2π/λ is the wave number and this expression suggests that longer wavelengths experience a smaller variance.

Where the Eq. (20) is valid for the condition of weak turbulence mathematically corresponding to σi2 < 1. Expressions of lognormal field amplitude variance depend on: the nature of the electromagnetic wave traveling in the turbulence and on the link geometry [3].

Performances of FSO Links

There are many parameters to analysis the performance of FSO links like bit error ratio (BER), received power, geometrical loss, and link margin. According to theory, the basic principal of communication states that received power must be less than transmitted power, PR ≤PT [10].

PR =PT – Total Losses

Here PR is received power and PT is transmitted power and units are dBm. Losses of transmitted signal in FSO system are atmospheric phenomena (Latm­ (dB)), geometrical loss (L­­geo (dB)) and system loss (Lsys (dB)). Geometrical and system loss (define by manufacturer) occur inside FSO transceiver and fixed which cannot be neglected. Geometrical loss is calculated by

L­­geo = - 10 log []

Here l (km) is the distance of optical path of laser beam, ∅ (mrad) is the divergence angle which is cone angle emitted light from transmitter and A (m2) is the total area of receiver apertures on FSO unit. Atmospheric loss for any laser power is given by Beers-Lambert Law [11].

Latm­­ ="<"/span>

Here ℺ is typical attenuation coefficient (0.1 for clear air) and l (km) is transmittance range. Bit error ratio (BER) is ratio of the number of errors to total number of bits.

BER =

Here ne is number of received error bits and Nb is the number of all transmitted bits for long period. [17]

Aim and Objectives

In this project, the aim is to control temperature, humidity, pressure sensors by different microcontrollers and taking their reading to manage the performance of PWM fans and thermistors inside the chamber. These components are very important to configure and monitor the atmospheric condition inside the chamber. This atmospheric condition which is created in chamber will be used to see how real atmospheric turbulence affects the free space optical signal. The Rs-232 or Com port will be used as an interface to control the PIC16 microcontroller instruction and procedure through computer. For temperature measurement, DS18B20 digital sensors will be used, for humidity measurement, SHT11 digital sensors will be used and for pressure measurement, MPX4115a analogue sensor will be used.

1. Programming microPIC for temperature measurement

The first objective is to do research on working of DS18B20 temperature sensors, after that select suitable mid-range microPIC (PIC16 micro controller). While selecting microPIC process, microPIC should be selected which has sufficient memory size, has internal oscillator to reduce PCB size, which can programmed with In-circuit serial programmer (PICKIT 2 or PICKIT 3) has USART feature in it. After selecting microPIC, this microPIc should be programmed using C language or assembly language. Then PCB for temperature sensor should made using software like Proteus or Eagle.

2. Programming microPIC for humidity measurement

The second objective is to do research on working of SHT11 humidity sensor, followed by selecting suitable mid-range microPIC (PIC16 micro controller). While selecting microPIC process, microPIC should be selected which has sufficient memory size, has internal oscillator to reduce PCB size, which supports In-circuit serial programming (ICSP) so that it can be programmed with PICKIT 3 and has USART feature in it. After selecting microPIC, this microPIC should be programmed using C language or assembly language. Then PCB for temperature sensor should made using software like Proteus or Eagle.

3. Programming microPIC for pressure measurement

Similarly, third objective is to do research on working of MPX4115a pressure sensor, followed by selecting suitable mid-range microPIC (PIC16 micro controller). While selecting microPIC process, microPIC should be selected which has sufficient memory size, has internal oscillator to reduce PCB size, has internal analogue to digital converter, supports In-circuit serial programming (ICSP) so that it can be programmed with PICKIT 3 and has USART feature in it. After selecting microPIC, this microPIC should be programmed using C language or assembly language. Then PCB for temperature sensor should made using software like Proteus or Eagle.

4. Programming microPIC for controlling PWM fan

Fourth objective is to do research on working of 12 Volts DC PWM fan, followed by selecting suitable mid-range microPIC (PIC16 micro controller). While selecting microPIC process, microPIC should be selected which has sufficient memory size, has internal oscillator to reduce PCB size, has Pulse width modulating feature, supports In-circuit serial programming (ICSP) so that it can be programmed with PICKIT 3 and has USART feature in it. After selecting microPIC, this microPIC should be programmed using C language or assembly language. Then PCB for temperature sensor should made using software like Proteus or Eagle.

5. Programming microPIC for controlling Thermistors

Fifth and last objective is to do research on working of thermistor with microcontroller, followed by selecting suitable mid-range microPIC (PIC16 micro controller). While selecting microPIC process, microPIC should be selected which has sufficient memory size, has internal oscillator to reduce PCB size, supports In-circuit serial programming (ICSP) so that it can be programmed with PICKIT 3 and has USART feature in it. After selecting microPIC, this microPIC should be programmed using C language or assembly language. Then PCB for temperature sensor should made using software like Proteus or Eagle

Temperature Sensors

Working of DS18B20 temperature sensor

illustration not visible in this excerpt

Fig 4: Pin diagram of DS18B20

In the project DS18B20 temperature sensor (TO-92) is used whose pin diagram is shown in Fig4. This temperature sensor measure temperature and convert it in digital format before sending to master device on one-wire bus. This sensor provides user-configurable resolution of 9,10, 11 and 12 bits which relates to increments by 0.5⁰ C, 0.25⁰C, 0.125⁰C and 0.0625⁰C in temperature respectively and its default resolution is 12 bits at power-up. In order to make temperature in Fahrenheit application, a lookup table or conversion sub-function should be include while making program for micro PIC. The output temperature data of DS18B20 is stored as 16bit sign-extended 2’s complement number in its temperature register. In temperature register, bit 12 - bit 15 are sign bits (S) and if the temperature is positive then S is equal to 0 and if it is negative then S is equal 1. In Temperature register, bit 0- bit3 represents decimal part of temperature reading, so if resolution is set to 9 bits then bit 0- bit 2 are undefined, if resolution is set to 10 then bit 0 and bit 1 is undefined, if resolution is set to 11 then bit 0 is undefined and if resolution to 12 then bit 0 – bit 3 contain valid data. Fig 6 and Fig 7 shown below gives good idea of temperature and data relationship when DS18B20 is set to resolution of 12.

illustration not visible in this excerpt

Fig 5: Temperature register of DS18B20

illustration not visible in this excerpt

Fig 6: Temperature and Digital Output of DS18B20 relationship

Power supply for DS18B20

This device can be provided power supply either by an external supply through Vdd pin on device or by parasite power mode, in which this device steals power from one-wire bus through data pin when one-wire bus is held high by master device. By stealing power from one-wire bus some charge is stored on parasite power capacitor in parasite-power control circuitry inside this device which provides power when bus is low. In parasite mode Vdd pin of device is connect to ground as power is taken one-wire bus. For application which need remote temperature reading or in application that are space constrained, this mode is very useful. While performing temperature conversion in parasite mode, master device should provide strong pull-up on one-wire bus and this is achieved by using MOSFET. While the pull-up is enabled, no other activity can take place. This type of power mode is not recommended for measuring temperature above 100⁰C. Fig 8 shows connection of parasite mode and external power supply mode.

For external power supply mode Vdd pin is connected external power supply, there is no need of MOSFET pullup and master can send or receive data from other devices on the bus while some of them are performing temperature conversion.

Master device on one-wire bus can also determine whether DS18B20 is connected to parasite mode or external power supply mode by issuing Skip ROM command (CCh) followed Read power supply function command (B4h) followed by read time slot which explained in detail DS18B20 Sequence section.

illustration not visible in this excerpt

Fig 7: External power supply and parasite mode connection of DS18B20

Memory of DS18B20

Fig 9 shown below shows organisation of DS18B20’s memory which consists of SRAM scratchpad with non-volatile EEPROM storage which used to store values of high and low alarm trigger register(TH and TL) and configuration register if we want this values not to be lost when power goes off. When this device is powered up, it automatically transfers data from its EEPROM to its Scratchpad byte2, 3 and 4 which is its high and low alarm trigger register and configuration register respectively. When DS18B20 alarm function is not used, then high and low alarm trigger register acts general purpose register.

Byte 0 – byte 1 in scratchpad contain the LSB and MSB of the temperature register. In this register, result of temperature conversation is stored by the device and this register is read-only register. Byte2 – byte 3 are high and low alarm trigger register. From byte 5 to byte 7 are reserved register and cannot be overwritten. read-only Byte number 8 is register which contains the CRC code for bytes 0 to 7 of the scratchpad.

Byte 4 of scratch pad is configuration register. This register is controls the resolution of resulting temperature data from temperature conversion process which is user-configurable. Bit 5 and bit 6 of configuration register are R1 and R0 respectively. If both R0 and R1 are zero then resolution is 9 bits, if R0 is 1 and R1 is 0 then resolution is 10 bits, if R0 is 0 and R1 is 1 then resolution is 11 bits, and if both R0 and R1 are 1 then resolution is 12 bits. There is trade-off between maximum conversion time needed for temperature conversion process and resolution of resulting temperature data. For 9 bits maximum conversion time is 93.75 milliseconds, for 10 bits maximum conversion time is 187.5 milliseconds, for 11 bits maximum conversion time is 375 milliseconds and for 12bits maximum conversation time is 750 milliseconds.

illustration not visible in this excerpt

Fig 8: Organisation of Memory of DS18B20

[...]

Fin de l'extrait de 52 pages

Résumé des informations

Titre
Controlling the atmospheric turbulence, microPIC programming
Université
Northumbria University
Cours
BEng. Electrical and Electronic Engineering (Hons.)
Auteur
Année
2013
Pages
52
N° de catalogue
V284209
ISBN (ebook)
9783656845034
ISBN (Livre)
9783656845041
Taille d'un fichier
1145 KB
Langue
anglais
Mots clés
controlling
Citation du texte
Ninad Gondhalekar (Auteur), 2013, Controlling the atmospheric turbulence, microPIC programming, Munich, GRIN Verlag, https://www.grin.com/document/284209

Commentaires

  • Pas encore de commentaires.
Lire l'ebook
Titre: Controlling the atmospheric turbulence, microPIC programming



Télécharger textes

Votre devoir / mémoire:

- Publication en tant qu'eBook et livre
- Honoraires élevés sur les ventes
- Pour vous complètement gratuit - avec ISBN
- Cela dure que 5 minutes
- Chaque œuvre trouve des lecteurs

Devenir un auteur