WIND SENSOR / ANEMOMETER

Hi, i've an arduino uno with a meteo shield. The meteo shield works very well. My problem is the anemometer, there's not a manual, neither some informations and i've not enough experiences to solve this problem, so please help me. I'll attach 3 photos of these devices and i'll describe it. The anemometer has a mammut , and a big cable with 4 wires: white and green inserted in the mammut and the other two wires are cut, I've found these wires in this way, I've not touched them. I've inserted white and yellow wires as in photo. I've inserted the white wire in 5v and the yellow one in the pin 9. I know only that 4 impulses = 10 km/h. Now I don't know what to do. Thanks.

1383685742984.jpg

1383685751743.jpg

1383685762947.jpg

1383907776897.jpg

raveniano:
The anemometer has a mammut

What exactly do you mean by "mammut"? Do you mean the 3-way connection block in the photos?

raveniano:
I've inserted the white wire in 5v and the yellow one in the pin 9

Is there anything in the anemometer connected to the 3rd connection of then 3-way connection block?

I can think of 3 likely scenarios:

  1. The rotor of the anemometer carries a magnet, which passes a reed switch, and you are presented with 2 connections to the reed switch.

  2. The rotor of the anemometer carries a magnet, which passes a Hall sensor, and you are presented with 3 connections to the Hall sensor.

  3. The rotor of the anemometer carries a magnet, which passes a coil and induces an alternating voltage in it.

You could start by using a multimeter to measure the resistance between the two connections. What does it read? Does it ead the same if you reverse the connections? Does the reading change if you slowly rotate the anemometer?

hi , yes 'mammut' word is a mistake , i've found it in this way https://www.google.it/search?q=mammut+elettronica&client=firefox-a&hs=BMV&rls=org.mozilla:en-US:official&tbm=isch&tbo=u&source=univ&sa=X&ei=C2d5UoKILafX0QWY4YC4Bg&ved=0CDMQsAQ&biw=1920&bih=939 , by the way I've found that It produces the same if i reverse the connections. I've not opened the anemometer so I don't know what's inside, for now i've tried the pulseIn function in HIGH with pinMode(9,INPUT) and i've got always 0 value when the anemometer wasn't in acvtivity, but when it was in activity, after around 5 seconds I got value as 15000...the strange fact is that if i move the wire on pin 9 it gives these high values, without activate anemometer with wind. Is It normal?

Another note is that in the description of the anemometer is written that 4 impulses = 10 km/h

Have you measured the resistance, as I suggested in my earlier post?

Hi, i don't have a multimeter, but I've found that if I insert both the connections (pin 8 and 5v), with pulseIn I've always 0 also if there is wind and the anemomter rotates. But if i insert only one of these 2 wires (the same for both the wires) and in pin 8, I've always values, also if the anemometer isn't in activity, but if it's in activity there are more little values, also 0. Maybe, these two wires are to insert both in pins because they are the speed based on direction of the wind, maybe if I rotate in a direction the anemometer there will be a pin with high values and the other with 0.

Try connecting the sensor between the input pin and ground, and connect a pullup resistor of between 1K and 10K between the input pin and +5V.

Thanks for the help but there's a code to see impulses/second? With these values we can know what's the problem.

Search the Arduino forum for "RPM counter" or "Frequency counter".

You will have to pull the anemometer apart to see what type of sensor pickup it uses, otherwise you dont know
whether the voltages coming from the anemometer are even compatible with the arduinos input.
A common technique thats used is a spinning magnet which induces a small voltage into a pickup coil.
This produces an AC output which has to be conditioned so that the Arduino can read it.

with the pullup resistor from 1k to 10k i got value 0. I've disassembled the sensor , there's a magnet that in every rotation produce an impulse, every 4 impulses in 1 second is 10 km/h. I've tested some codes about rpm counter or frequency but i got discontinuos values, for example sometimes it gives values also when it's not in activity or sometimes when it's in activity, when it becomes slower gives higher values and after again lower values.

1383907776897.jpg

1383907800278.jpg

1383907863338.jpg

raveniano:
with the pullup resistor from 1k to 10k i got value 0.

If you have wired it correctly, with a pullup resistor connected (or with the internal one enabled), you will read a low or a high depending on the position of the anemometer rotor. Your photos show clearly that the sensor itself is a reed switch.

With this code ->

const int switchPin = 2;     //     // Reed switch to digital pin 2

void setup() {
  pinMode(switchPin, INPUT);        // switchPin is an input
  digitalWrite(switchPin, HIGH);    // Activate internal pullup resistor
  Serial.begin(9600);
}

void loop() {  
  Serial.println(digitalRead(switchPin));  // Display current value
  delay(200);
}

http://learn.parallax.com/reed-switch-arduino-demo

i always got '0' , even if the anemometer is rotating. I've used a 2.2 k resistance.

1383937391832.jpg

I can't tell for sure because your photo has quite a low resolution and is taken from the wrong angle, but it looks to me that you have connected the pullup resistor to the Vin pin of the Arduino, instead of to +5V.

i'll tell you the connections:

a) white in column with resistance , the white wire connected with green wire to pin 2, the resistance connected to the gnd;
b) yellow wire connected to 5v

note: i've also tried to change 5v with gnd but in this way i always got 1, also if the anemometer is not rotating.

With that code, you should only need to connect the anemometer between pin 2 and ground, as shown in the tutorial you linked to.

I suggest you check for broken or poor connections to the anemometer. If you are sure thay are OK, then buy a multimeter (it's very difficult to do electronics without one), then you can measure the resistance of the sensor, to check that is working. You could also try holding a magnet close to the reed switch.

Hi i've solved , it was an internal problem in the sensor, the magnet couldn't communicate with the rotor, but now i've another problem: the lcd on the weather station uses pin 2 and 3, but i need the interrupts to count the pulses of the sensor, how can i do?

I'm not sure it is a good idea to use interrupts to count pulses from the reed switch, because the reed switch will be prone to contact bounce, and sotfware debouncing is more difficult to do when using interrupts. However, if you want to go this route, you have a couple of options. You can move the LCD to different pins and change the software accordingly. Or you can use a pin change interrupt for thr sensor.

i've read something about pin change but i don't have understood how to do it, i've an arduino uno but it seems to be possible only on atmega

It works on any Arduino. Google "arduino pin change interrupt".