Measuring Temperature And The Weather Station Engineering Essay Example
Measuring Temperature And The Weather Station Engineering Essay Example

Measuring Temperature And The Weather Station Engineering Essay Example

Available Only on StudyHippo
  • Pages: 11 (2835 words)
  • Published: August 10, 2017
  • Type: Case Study
View Entire Sample
Text preview

Introduction

The weather station is a facility used for the measurement and detection of different weather conditions and climate. It usually measures variables such as temperature, humidity, wind direction, wind speed, and more.

To determine wind speed and direction, an anemometer is required. There are two categories of anemometers: the speed type and the pressure type. The speed type includes various types such as cup, windmill, hot-wire, laser Doppler, sonic, and ping-pong anemometers. On the other hand, the pressure type comprises plate and tube anemometers.

The wind speed measuring device known as the cup type wind gauge was initially created in 1846 by Dr. John Thomas Romney Robinson. This straightforward and simple device consists of a shaft with four cups evenly placed.

The cup rotates when the air current blows on it, allowing for easy determination of the average velocity. Normally, wind velocity and direction ar

...

e measured using two separate detectors housed in the same enclosure. However, this project only requires one set of detectors to measure both velocity and direction. The main benefit of using a single detector is that it simplifies construction compared to using two separate detectors.

Additionally, the wind speed gauge can minimize mechanical wear and tear by employing various detectors including optical detector, reed switch, or hall detector. For this particular project, the hall detector is chosen due to its low power consumption and absence of noise compared to the reed switch. The direction meter has two options for detection - either a potentiometer or an optical grey encoder.

Using a hall detector simplifies the mechanical design of the air current velocity meter by only requiring one air current vane.

Project Background

Undertaking

Hall-effect Detector

A hall-effect detector i

View entire sample
Join StudyHippo to see entire essay

a device that detects and measures the density of a magnetic field. When the density exceeds a certain level, it generates Hall voltage (VH), which is directly proportional to the strength of the magnetic field.

Figure 1: The diagram illustrates how a hall-effect detector works. It uses a slim rectangular p-type semiconductor material like Ga arsenide (GaAs), indium antimonide (InSb), or indium arsenide (InAs) that allows for continuous electric current flow. When there is a magnetic field, it applies force to the material, causing the charge (electrons and holes) to move towards one side of the semiconductor slab. As a result, there is a potential difference created between the two sides of the material due to the presence of charge carriers. Moreover, the magnetic field affects the movement of electrons through the semiconductor.

To generate a potential difference across the semiconductor, the magnetic flux lines must be perpendicular to the current flux by 90A°. Typically, Hall-effect detectors are in the off state without a magnetic field and in the on state with one present. A typical Hall-effect detector is made up of a DC amplifier, logic shift, and voltage regulator to enhance output voltage, sensitivity, and hysteresis. This design also allows for operation within various power supply and magnetic field conditions. The Hall-effect detector provides two types of outputs: linear or digital. In the case of a linear output, the op-amp output directly produces the output signal with VH being directly proportional to the magnetic field passing through.

The end product electromotive force is determined by the strength of the magnetic field and can be increased up to the power supply value. However, any further increase in magnetic

field strength will not raise the end product electromotive force any higher; it will remain constant. In digital output, when the magnetic flux surpasses a specific value, it switches the detector's state from OFF to ON. The hysteresis of the detector resolves the oscillation of the output signal that occurs as detectors enter and exit the magnetic field. Therefore, for digital output, there are only two possible states: ON or OFF.

The Hall-effect detector has the capability to distinguish between bipolar or unipolar types. For this project, the chosen detector is of the unipolar type and it produces parallel results. An analog output is required to measure changes in average value and frequency for measuring wind direction and velocity. The sensing method in this project will involve moving the magnet sideways across the surface of the detector.

Operational amplifier

An operational amplifier, also referred to as an op-amp, is a device that possesses almost all the characteristics of an ideal DC amplifier. It has widespread applications in signal filtering, mathematical operations (such as addition, subtraction, differentiation, and integration), and signal conditioning.

An op-amp comprises three terminals: the inverting input, non-inverting input, and output. In an ideal op-amp scenario, it demonstrates high voltage gain, high input impedance, low output impedance, no current flow at the input. Additionally, the input voltage is directly proportional to the output voltage.

The diagram provided below visually represents the structure of an ideal op-amp. The output voltage can be determined by multiplying the input voltage with a constant value (A), Vout = A X Vin.

The input electromotive force, Vin, is the difference between V2 and V1. A represents the amplification factor.

Figure 2: Structure of an ideal

op-amp

An op-amp can be used in various ways such as a non-inverting amplifier, inverting amplifier, summing amplifier, differential amplifier, planimeter, etc. For this project, we used the inverting amplifier with a negative amplification factor. This means that if the input electromotive force is positive, the output electromotive force will decrease and vice versa based on the amplification factor.

The circuit of an inverting amplifier consists of an input resistance called Rin, which is connected before it reaches the op-amp. Additionally, there is a feedback resistance, Rf, that connects the output to the input. In this amplifier configuration, the non-inverting input is not utilized and is directly connected to ground.

Figure 3: Circuit of Inverting Amplifier

Theoretically, an ideal op-amp possesses a significantly high gain. Nevertheless, in practicality, this excessive gain can cause instability and challenges in controlling the amplifier.

The amplifier's stability is maintained by utilizing negative feedback, which involves directing a portion of the output signal back to the inverting input. By doing so, the voltage difference between the inverting input and the output becomes minimal, creating a closed loop circuit. Within this closed loop circuit, the amplifier's gain is adjusted for operation.

Using negative feedback control, this addition guarantees precise overall addition and reduces bandwidth. The closed loop circuit ensures that the voltage at the inverting input is almost identical to the non-inverting input, even when the latter is grounded. When negative feedback is applied to the inverting input, it combines with the input voltage and forms a summing point. This creates difficulty in distinguishing between the signal acting as feedback and the one serving as an op-amp input.

The signal is divided using a resistance called Rin in

order to complete this task.

Programmer

MPLAB v8, developed by Microchip, was used to write and test the code for this project. This program is available for free and is an integrated development environment program that includes a toolset for developing embedded applications on microcontrollers.

Figure 4: Block diagram of a microcontroller plan

This plan utilizes MPLAB, which includes a text editor, MPASM assembly program, PICSTART Plus package, and other maps. The text editor functions as a notepad for composing code. Once the code is finished, it is saved with the file extension "filename.asm". The saved code is then checked for any issues. The assembly program used in this plan is MPASM.

It can produce either absolute codification or relocatable codification. Relocatable codification can be joined with another assembled codification using the MPLINK linker. Absolute codification is the final codification that can be directly executed by a microcontroller. In this design, only absolute codification was used.

The assembly program will first check the assembly code for errors. If there are no errors, the assembly program will create a file with the extension "filename.hex". To send the hex file to the microcontroller, a programmer is required. The programmer used in this project is called USB ICSP PIC Programmer, UIC00B. It is an affordable and user-friendly programmer designed to support various PIC models, including 8-bit, 16-bit, and 32-bit microcontrollers.

The device has an ICSP (In Circuit Serial Programming) connection for loading a program, as well as a UART tool and a Logic tool. It can load the program on board or on a UIC-S socket board. No external power is needed as it uses a USB connection to link with a computer.

It can also provide a 5V electromotive force to the circuit if the program is on-board.

I used the UIC-S socket board for coding because it is easier to connect compared to on-board scheduling. The UIC-S socket board can support microcontrollers with 28 pins, as well as 18 pins and 40 pins. This type of coder comes with its own package called PICKIT 2 Programming package. To program the microcontroller, you will need the file previously created by MPLAB in a hex extension file.

Beside it can plan microcontroller, it besides can read or wipe out the codification in the microcontroller.

Design

When the air current blown the air current vane, the vane will revolve harmonizing to the way of the air current blown. So, by puting two hall-effect detectors in 90A° to each others, it was possible to mensurate the way of the air current by mention point of angle to the air current way. Each detectors will be supply with a sinewave electromotive force.

Initially, the average value of each detector for a few bends of the vane needs to be measured. If there are any changes in the airflow direction, it will also affect the average value of the detector. By comparing the changes in average value with a reference table of angles, the microcontroller can determine the direction of the airflow in terms of degrees. The airflow velocity can be determined by the frequency of the detector's sine wave voltage. As the airflow velocity increases, the frequency will also increase.

Figure 5 shows a block diagram that illustrates the connection between air current velocity and frequency. The design includes two detectors placed at a

90-degree angle. Both detectors are connected to operational amplifiers, which function as converters for analog signals to digital. The resulting digital signal is then sent to a microcontroller for additional processing.

The text describes a device that includes a clipper for limiting the input sent to a microcontroller. After the microcontroller performs the necessary calculations, it sends the information to an LCD display.

Construction and Testing

Circuit Analysis

The main component of this design is the microcontroller, PIC16F876, labeled as IC1. It includes a 10-bit Analog to Digital converter for two inputs and a capture/compare faculty for measuring the reference signal. Two hall-effect detectors, Q2, A, and Q3, are connected to a dual operational amplifier.

The quartz crystal, X1, has a clock frequency of 16 MHz and is connected on both sides to a capacitance of 15 pf, C1; A; C2. The signal of the operational amplifier is adjusted for optimal backup by the microcontroller with the help of a CRO. The final product requires a voltage range of 0.5V to 4.5V and no deformation in the signal. Ports like R/W, Enable, and RS are connected to the PIC to drive the LCD. Instead of using 8 datalines, it operates in a 4-bit manner using DB0, DB1, DB2 & A; DB3 as datalines

The main power source utilized in this design was a 9V battery. To meet the requirement of a 5V-DC power supply, a circuit was incorporated with a regulator to lower the voltage from 9V to 5V. The implementation involved the use of a 7805 regulator chip and three capacitors.

For the microcontroller design

Upon setting up the design on the board, there are additional tasks that must be completed.

Primarily, programming is necessary for the microcontroller.

The first step in planning the movie involved connecting it to a coder (figure 7) who utilized PICKIT2, a user-friendly package (figure 8). After programming the movie using the code displayed below in the appendix, adjustments were required for the amplifier. Upon programming and placement of the microcontroller on the board, there are four potentiometers (VR1-VR4) within the circuit that need to be adjusted. VR1 and VR2 are used for elaboration purposes, while VR3 and VR4 are used for starting. It is important to adjust all potentiometers to ensure that the output voltage of the amplifier falls within a range of 0.5 to 4.5V.

This can be accomplished by using an oscillator. To start, turn on the circuit and enable the wind sensor to function. Then, begin adjusting the potentiometer while monitoring the signal produced by pin 1 and pin 7. The result should be a sinewave signal without any distortion.

Calibration

Standardization of Wind Velocity
Initially, the wind velocity meter will measure the time it takes for one full rotation, and afterwards, velocity can be calculated using the equation: velocity = K / Period.

The speed factor (K) is the constant factor that remains unchanged. It is determined by comparing the step velocity and the actual velocity using the formula: Speed factor = Y + 256X, where Y is the actual velocity and X is the measured velocity.
Wind direction calibration is performed by connecting each of the sensors to a 72-value table with 5-degree increments. This is necessary due to variations in magnet force. The calibration process requires a software tool called tuning package, and the circuit must be connected to

a computer during this operation.

First, this plan sets 8 points for each curve of the detector. Each of the points will hold 45 degrees to each other. Then, it requires turning the air current vane manually until it reaches 45 degrees and saving the information in a package. This procedure needs to be repeated for all 8 points. After all the information is set, the circuit will be ready for measurement.

Decisions

The main issue in this project was with the wind vane.

The construction of the air current vane required some mechanical skill. Therefore, I attached the magnet to the rod without the air current vane. This only serves to test the circuit. The main drawback of this design is that it cannot accurately show the direction of the air current.

It only shows the result in multiples of 5. Therefore, if the measured value is not exactly a 5 degree interval, it will round the result to the nearest interval. For example, if it's 6 degrees, it will display 5 degrees.

The accuracy of the design was slightly lower, but this can be improved by setting more values for the mentioned curve. However, this will also increase the time it takes to display the results. Overall, fewer components were needed for this design, making it cost-effective to build. The use of a hall effect detector also reduced mechanical issues and eliminated the need for mechanical parts.

References

  1. Cytron Technologies Sdn. Bhd, 2010. UIC00B USB ICSP PIC PROGRAMER [ User manual ] [ 4nd March 2011 ] .
  2. Edward Ramsden, 2006. Hall Effect Detectors:

Theory and Application, 2nd Edition. United kingdom: Newnes. [ 26nd February 2011 ] .

  • EE Times, 2002. Differential Hall-effect detectors aid rotational velocity control [ online ] Available at ; lt ; hypertext transfer protocol: //www.eetimes.com/electronics-news/4164393/Differential-Hall-effect-sensors-aid-rotational-speed-control ; gt ; [ 3rd January 2011 ] .
  • Electronic-Tutorials, 2011.
  • Electronic-Tutorials provides a tutorial on Hall Effect Magnetic Sensor, which can be found at ;a href="http://www.electronics-tutorials.ws/electromagnetism/hall-effect.html";http://www.electronics-tutorials.ws/electromagnetism/hall-effect.html;/a; (accessed on 3rd January 2011).

  • Another tutorial on Operational Amplifiers is also available at Electronic-Tutorials, which can be found at ;a href="http://www.electronics-tutorials.ws/opamp/opamp_1.html";http://www.electronics-tutorials.ws/opamp/opamp_1.html;/a; (accessed on 4rd January 2011).
  • Elektor Magazine published an article in 2004 about Wind Speed and Direction Meter, which can be found at ;a href="http://www.elektor.com/magazines/2004/may/wind-speed-direction-meter.56940.lynkx? tab=2";http://www.elektor.com/magazines/2004/may/wind-speed-direction-meter.56940.lynkx? tab=2;/a; (accessed on 15th November 2010).
  • Explain That Stuff provides information about Anemometers, which can be found at ;a href="http://www.explainthatstuff.com/anemometers.html";http://www.explainthatstuff.com/anemometers.html;/a; (accessed on 10th November 2010).
  • John G.Webster's book "The Measurement Instrumentation and Sensors Handbook" was published in 1999.
  • Denmark: Springer. [26nd January 2011].

  • Microchip, 2005. MPASM™ Assembler, MPLINK™ Object Linker, MPLIB™ Object Librarian User's Guide [online] Available at: ;hypertext transfer protocol: //ww1.microchip.com/downloads/en/devicedoc/33014j.pdf; [20th January 2011].
  • Microchip, 2001. PIC16F87X Data Sheet [online] Available at: ;hypertext transfer protocol: //ww1.microchip.com/downloads/en/DeviceDoc/30292c.pdf; [25th December 2010].
  • Michael Predko, 1998.
  • Programming and customizing the PIC microcontroller. United Kingdom: McGraw-Hill [20th March 2011].

  • Square 1 Electronic, 2011. MPLab Version [online]. Available at: ; lt ; hypertext transfer protocol: //www.sq-1.com/MPLAB.html ; gt ; [2nd February 2011].
  • Wikipedia, 2011. Weather station [online]. Available at ; lt ; hypertext transfer protocol: //en.wikipedia.org/wiki/Weather_station ; gt ; [10th November 2010].
  • Wikipedia, 2011. Anemometer [online].
  • Available at ;a

    href="http://en.wikipedia.org/wiki/Anemometer";hypertext transfer protocol: //en.wikipedia.org/wiki/Anemometer;/a;. [10 November 2010].

    Get an explanation on any task
    Get unstuck with the help of our AI assistant in seconds
    New