digital anemometer

6

Click here to load reader

Upload: sai-malleswar

Post on 21-Jan-2015

2.509 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Digital Anemometer

IIST

DIGITAL ANEMOMETER

Kosuru Sai Malleswar

Harmeet Singh

Rajil Ramesh A.

An instrument that can measure both the speed and the direction of the wind flow

Page 2: Digital Anemometer

Introduction

An anemometer is a device for measuring wind speed. Coupled with a weather vane which

indicates the direction of the wind, it forms a complete setup for describing the wind at any given

geographical location.

There are a variety of anemometers available currently which are classified on the basis of

their operating principle. Cup anemometers, Windmill anemometers, Hot-wire anemometers, Laser

Doppler anemometers, Sonic anemometers, Ping-pong ball anemometer and Acoustic Resonance

Anemometers are a few to name. Two-dimensional (wind speed and wind direction) anemometers

are used in applications such as weather stations, ship navigation, wind turbines, aviation and

weather buoys.

Our Design

The anemometer that we have made as a part of this event is of cup type. It consists of four

hemispherical cups each mounted on one end of four horizontal arms, which in turn were mounted

at equal angles to each other on a vertical shaft. On an anemometer with four cups it is easy to see

that since the cups are arranged symmetrically on the end of the arms, the wind always has the

hollow of one cup presented to it and is blowing on the back of the cup on the opposite end of the

cross. Due to the shape of the cups, more pressure and hence more force is exerted on the concave

surface of the cups as compared to the convex surface resulting in an unbalanced torque causing

the shaft to rotate. The air flow past the cups in any horizontal direction rotated the shaft in a

manner that was proportional to the wind speed. We have used a DC motor in place of a dynamo

to convert the shaft rotation to equivalent voltage.

For measuring the angle of wind, we have used a wind wane. The design of a wind vane is

such that the center of gravity is directly over the pivotal axis, so that the pointer can move freely

on its axis, but the surface area is unequally divided. The side with the larger surface area is blown

away from the turdle, so that the smaller side, with the pointer, is pivoted to face into the wind

direction. Most wind vanes have directional markers beneath the arrow, aligned with the

geographic directions. In the present design, we have used a simple single turn resistive

potentiometer attached to the wind wane as our sensor. The voltage at wiper point is clearly

proportional to the angle of the rotating dial.

Once we have the sensors in place, we can calibrate them to obtain the true wind speed and

direction. By giving the analog voltage outputs of these sensors to a microcontroller after some

signal conditioning, we can convert them to digital format for displaying on LCD.

Page 3: Digital Anemometer

Block Diagram

Figure 1: Block diagram of anemometer and wind direction measurement setup

Signal Processing unit

The voltage produced by the motor in generator mode is proportional to the velocity of the

rotating shaft which is proportional to the wind speed. So we made a plot of wind speed versus the

voltage produced. From the graph, we found the offset and the gain. According to these results,

we programmed ATMEGA128 Microcontroller to read the voltage through 10 bit Analog to

Digital Converter (ADC) units, perform scaling operations and display the speed value on 2X16

LCD Module. The supply voltage to the Microcontroller is 5V.

The voltage corresponding to the angle is indicated by the wiper arm of potentiometer. This

is read by another ADC channel of Microcontroller and scaled to obtain the angle and display on

LCD.

Figure 2: Signal Conditioning unit

Page 4: Digital Anemometer

Conclusion

Anemometer which can measure wind speeds from 2 m/s to 22 m/s with an accuracy of

0.05 m/s along with the set up for measuring the wind direction based on the reference direction

with a resolution of 0.3516 degree has been made. This system was connected with

Microcontroller unit to display the speed and the angle on LCD.

Code for measuring speed and angle and displaying on LCD

#include <avr/io.h>

#define F_CPU 14.7456e6

#include <avr/interrupt.h>

#include <util/delay.h>

#include "lcd.h"

#define adc_delay 40

#define samples 5

uint16_t adc_reading;

float c,fr;

float speed,angle;

uint8_t count=0;

uint16_t adc_read(unsigned char Ch)

{

uint16_t res;

Ch = Ch & 0x07;

ADMUX= 0x00| Ch;

ADCSRA = ADCSRA | 0x40;

Page 5: Digital Anemometer

while((ADCSRA&0x10)==0);

res = (uint16_t)ADCL;

res|= (((uint16_t)ADCH)<<8);

ADCSRA = ADCSRA|0x10;

return res;

}

void lcd_print_float(uint8_t row, uint8_t col,float value)

{

float fract;

lcd_print(row,col,(int)value,3);

lcd_cursor(row,col+3);lcd_wr_char('.');

fract=(int)(1000*(value-(int)value));

lcd_print(row,col+4,fract,3);

}

//Main Function

int main(void)

{

DDRC = DDRC | 0xF7;

PORTC = PORTC & 0x80;

ADCSRA = 0x00;

ADMUX = 0x00;

ACSR = 0x80;

ADCSRA = 0x86;

Page 6: Digital Anemometer

lcd_set_4bit();lcd_init();

lcd_string(" SPEED | ANGLE ");

lcd_cursor(2,8);lcd_wr_char('|');

while(1)

{

adc_reading=adc_read(0); c=(float)adc_reading; c=c*5000/1024;

if(c>70)

{

speed=c*0.0093; speed+=3.0846;

}

else

{

speed=0.000;

}

lcd_print_float(2,1,speed); _delay_ms(100);

adc_reading=0;

for(count=0;count<5;count++)

{

adc_reading+=adc_read(2); _delay_ms(100);

}

angle=(float)adc_reading; angle/=5;

angle=angle*360/1024;

lcd_print_float(2,9,angle);

}

}