Cups anemometer

Okay this is my first topic in Exhibition forum.

Some months ago, i went over the idea of develop a small anemometer "on the cheap". I know that in this forum and over internet there are thousand of different similar devices, but i made it for my own learning and to increase the sensors of my project.

I developed this cup anemometer based on IR sensor and a rotary encoded wheel. The anemometer is a cup anemometer type.

Here you have the preliminary release. I must change the cups (by hemispherical or conical ones) because those that i used are only used to testing purposes (i need to search for useful things that could works such cups for my device). In the next weeks i will change them, but the other parts of the device will remain.

Here you have a presentation picture:

coin provides an idea of the scale.

and here more detailed pictures of all the parts: (75 Mb)

and here is the example code:

/* QRD1114 IR Sensor on an cups anemometer
 * Authors: M.A. de Pablo & C. de Pablo S., 2010
 * version: 1.0   20100823
 * Wind speed information:

// Pin definitions
# define IR 2                 // Receive the data from sensor
# define Led 13               // Light a led

// Constants definitions
const float pi = 3.14159265;  // pi number
int period = 10000;           // Measurement period (miliseconds)
int delaytime = 10000;        // Time between samples (miliseconds)
int radio = 65;               // Radio from vertical anemometer axis to a cup center (mm)
char* winds[] = {"Calm", "Light air", "Light breeze", "Gentle breeze", "Moderate breeze", "Fresh breeze", "Strong breeze", "Moderate gale", "Fresh gale", "Strong gale", "Storm", "Violent storm", "Hurricane"};

// Variable definitions
unsigned int Sample = 0;       // Sample number
unsigned int counter = 0;      // B/W counter for sensor 
unsigned int RPM = 0;          // Revolutions per minute
float speedwind = 0;           // Wind speed (m/s)
unsigned short windforce = 0;  // Beaufort Wind Force Scale

void setup()
  // Set the pins
  pinMode(2, INPUT);
  digitalWrite(2, HIGH);
  pinMode(13, OUTPUT);
  // sets the serial port to 115200 
  // Splash screen
  Serial.println("Based on QRD1114 IR sensor");
  Serial.print("Sampling period: ");
  Serial.print(" seconds every ");
  Serial.println(" seconds.");
  Serial.println("** You could modify those values on code **");

void loop() 
  Serial.print(": Start measurement...");
  Serial.println("   finished.");
  Serial.print("Counter: ");
  Serial.print(";  RPM: ");
  Serial.print(";  Wind speed: ");
  Serial.print(" [m/s]  (+/- 0.07 m/s);  Wind force (Beaufort Scale): ");
  Serial.print(" - ");

// Measure wind speed
void windvelocity(){
  speedwind = 0;
  counter = 0;  
  digitalWrite(Led, HIGH);
  attachInterrupt(0, addcount, CHANGE);
  unsigned long millis();                     
  long startTime = millis();
  while(millis() < startTime + period) {
  digitalWrite(Led, LOW);

void RPMcalc(){
  RPM=((counter/2)*60)/(period/1000);  // Calculate revolutions per minute (RPM)

void WindSpeed(){
  speedwind = ((2 * pi * radio * RPM)/60) / 1000;  // Calculate wind speed on m/s
  if (speedwind <= 0.3){                           // Calculate Wind force depending of wind velocity
    windforce = 0;  // Calm
  else if (speedwind <= 1.5){
    windforce = 1;  // Light air
  else if (speedwind <= 3.4){
    windforce = 2;  // Light breeze
  else if (speedwind <= 5.4){
    windforce = 3;  // Gentle breeze
  else if (speedwind <= 7.9){
    windforce = 4;  // Moderate breeze
  else if (speedwind <= 10.7){
    windforce = 5;  // Fresh breeze
  else if (speedwind <= 13.8){
    windforce = 6;  // Strong breeze
  else  if (speedwind <= 17.1){
    windforce = 7;  // High wind, Moderate gale, Near gale
  else if (speedwind <= 20.7){
    windforce = 8;  // Gale, Fresh gale
  else if (speedwind <= 24.4){
    windforce = 9;  // Strong gale
  else if (speedwind <= 28.4){
    windforce = 10;  // Storm, Whole gale
  else if (speedwind <= 32.6){
    windforce = 11;  // Violent storm
  else {
    windforce = 12;  // Hurricane (from thi point, apply the Fujita Scale)

void addcount(){

It is 5714 bytes when compiled. Developed and tested under Arduino Alpha 0017 for windows XP.

The sensor that i used is a QRD1114, IR emitter/sensor, reading a coded wheel (half black, half white).
The circuit was based on this idea:
and this one:

The code measure the interrupts by changing the color, calculate revolutions per minute, calculate wind velocity in m/s, and returns the wind force based on standard Beaufort scale:

Here you have an Excel file where you could see how i made the calculations and the high accuracy of the calculations done by arduino:

This anemometer will be part of the next release of my ArduDrop project:
in which webpage i will post new releases on code, schemes, circuits and pictures from the anemometer in the future.

I hope you could find this anemometer useful. I really appreciate any comment about the device and the code.

Enjoy it!

Looks cool. What I'm particularly interested in is how you set up the mechanical aspects of the bearing and sensor. To achieve good sensitivity to low wind speeds the friction obviously has to be as low as possible, so what sort of bearing did you use?

Practical Arduino:

Ah, I see. I just downloaded that monstrous ZIP file full of images, and it looks like you're using a brass sleeve / rod arrangement. That's nice work. Perhaps you could post scaled-down versions of a couple of the construction pics here so people can see what's inside the case without having to download that entire archive.


and comments on the odd looking and off color pvc parts - well odd from were I shop for plumping pvc parts. they look greenish to me. Here in the usa - blue or grey (electric), white(pvc), yellowish (cpvc), black (abs), maybe purple (for grey water) but greenish??

I dig the white bottle cap anemometer cups - the other day I was thinking that fence post caps of the al type might work - but they might be to heavy. Maybe they make a similar cap in pvc? or get a big jar lid and bang it into the correct shape? Disk drive platers are about the correct size and thickness but got that big hole in the center... or heat/melt/bend pvc using fence post caps as a guide template. I've also heard of people using soap laddle spoons or measuring cups/spoons.

anyways - nice work and thanks for sharing.

what about those toy capsule despensing thingy's?

Every supermarket has them. I am not sure how long they will last in the weather but should be pretty easy to make.



Thanks for your comments!

Yes, i will try to reduce some of the better images and post them here to be more illustrative.

Yes, the color is very ugly, but it is grey. The color in the pictures are not the most realist. It is normal grey. In any case, white and grey are the most common color of PVC pipes on my nearest shop; there are other color, but they are less easy to locate. However, i used old pieces that i had at home. In any case, it remains the original color, but in the future (in few days) i will paint it in white by the use of an outdoor paint. In fact it will also have the logo of my project in the side. In any case, in the future release i will use white pieces, thanks for the comment!

On the other hand, the piece of pipe (see the last picture in the next post) is to illustrate how to connect it to a mast, or to the top of a "box", or whatever. In fact, side screws are no fully tightened for illustrative reasons. Right now, i have on mind to use the huge remaining space inside the tube to include other sensor (wind vane, T/HR, P, irradiance... i still don´t know).

In order to reduce the friction, i used two small precision steal bearing from and old HD, but they could be easy to found, for example here:
My objective was to produce a small, cheap and DIY device, so the recycled pieces that i used must be easy to buy without the necessity of recycle old devices.

The design allow to the axis not to go "inside" the device, and not to go "outside" by the force of the wind. The own pieces avoid it.

About the cups, yes, i know since the early beginning that they are not the adequate ones. but it was what i had near. I tried with small PVC pieces, but they were heaviest than the bottle caps, what are really hard, and light!!. They are from especial products, not from normal soda bottles. But i will search for other pieces, such as those proposed by Copiertalk or pantonvich, but they must be also small.
I will also explore other options such as soap laddle spoons or measuring cups/spoons, or to develop my owns. In any case, thanks for the ideas!!

Thanks guys for your nice and interesting comments!!

Here you have some pictures form the different parts of the small device:

The circuit of the sensor inside the PVC piece. You could see that half of the disk is empty, so may be you could put inside other sensors for the anemometer, or temperature sensor, or whatever (is only an idea. i will remain it empty):

The bottom part of the circuit and the steel bearing in the lower side, inside a piece of methacrylate, and the lowerpart of the axis:

Again the inner part of the device, but including the coded disk into the axis: since the sensor is so near the disk, it works perfect with this small disk of methacrylate, half covered by a piece of white paper:

Here is the cup with the second steel bearing on top adjusted by a piece of methacrylate on top:

This is the side of the device still not completely closed, but with the axis in its place:

onces it is closed, is it completely waterproof. Here you see the cups system still not screwed to the top of the axis:

Now it is ready, I included an small plastic piece on top to protect the axis, and here is an example of how to connect it to a piece of pipe or to a mast:

You have these and much more pictures at full scale in the link that i provided in the first post.
Enjoy it and feel free to ask!

Have fun!

Slick design, Pablo [smiley=thumbup.gif]

Plastic Easter eggs should give you a good balance of good capture on one side and low wind resistance on the other.

You might also be able to buy a cup assembly from a company that makes weather stations (like Davis Instruments). Not as "boast-able" as making your own, but they'll be made of a plastic that doesn't rot in the sun. Which can be a huge problem: I live at about 4500 feet, and the UV here is much worse than at lower altitudes. The dome on the cheap solar garden lights I got off ebay clouded up to the point of being useless in less than a year.

Thanks Ran for your very interesting ideas. I will take into account to improve the cups.