Reusing an old anemometer with Arduino?

Hello there!

I have found an older anemometer, it only has 2 wires and works via magnets I guess...

Is there a way to make this work with an Arduino? It would be a great addition to my weather station I'm making!




Quick Edit: Added images instead of attached files

Yes. That should be easy. It looks like it uses a magnetic reed switch. Wire it up to the Arduino as a switch. Count the number of pulses in unit time (ignoring bounces), then do a calculation for the wind speed. This will also be a function of the length of the rotor arm. Be careful about very long wires to it which might cause electrical instability.

Hard to tell from the pics but it appears to be just a reed switch, probably actuated by the magnet(s) whizzing by.

You could plug it into an Uno (e.g.) -- one wire to GND and the other to pin 2 -- and try this:

const uint8_t pinLED = LED_BUILTIN;
const uint8_t pinAnemometer = 2;

void setup() 
{
    pinMode( pinLED, OUTPUT );
    pinMode( pinAnemometer, INPUT_PULLUP );

}//setup

void loop() 
{
    digitalWrite( pinLED, digitalRead( pinAnemometer ) );
    
}//loop

The built-in LED should toggle states if the output is switching "on" and "off" as you rotate the thing by hand.

If that works then the unit is likely compatible electrically. Whether or not you can translate the pulse rate from it into a calibrated wind-speed is another matter.

So the, supposed, reed switches are mounted in such away that a complete revolution of the circle roundy thingy has traveled a distance to close the reed switch then, integrating the count of reed switches closures would produce productive numbers.

Now if the roundy things distance of travel to close a reed switch is one inch then the reed switch will count 1 inch movements of the roundy part. If the switch closes once a second then the roundy thing is traveling 1inch per second.

Blackfin:
You could plug it into an Uno (e.g.) -- one wire to GND and the other to pin 2 -- and try this:
"Code"
The built-in LED should toggle states if the output is switching "on" and "off" as you rotate the thing by hand.

If that works then the unit is likely compatible electrically. Whether or not you can translate the pulse rate from it into a calibrated wind-speed is another matter.

It works! :smiley: That's so awesome! Thanks for the code snippet.

6v6gt:
Yes. That should be easy. It looks like it uses a magnetic reed switch. Wire it up to the Arduino as a switch. Count the number of pulses in unit time (ignoring bounces), then do a calculation for the wind speed. This will also be a function of the length of the rotor arm. Be careful about very long wires to it which might cause electrical instability.

Yes! It indeed was pretty easy to get it up for testing with the code snippet from @Blackfin.
When I started searching for ways to code this, to get the windspeed I found this topic, in that topic there was a link to this GitHub repository. However, programming my Arduino is very much not one of my specialties so it's quite overwhelming seeing all that code... Is that code even interesting for me?
Also people talk in this topic about taking a measurement for 3 seconds... Since I'll be running my weather station off one 18650 battery, is there a way this could be shorter, so I would save some battery?

Power saving with Arduino is a big topic. Do your development on something like a Uno or Nano, then move the project onto a barebones Arduino Uno (Google this). This sheds all the power hungry components but is not so easy to work with.

In principle, the Arduino wakes up, waits until it has seen a complete revolution (or enough for a reliable average), sends the times somewhere, then goes to sleep again for a set time. This saves power.

I hope you have the third arm somewhere! A hail storm last year broke off one arm from my anemometer. Tried industrial super glue, but didn't last.
I drilled both pieces with a tiny drill and broke a steel needle to get a short length and super glued the needle piece into each plastic part and then held the pieces together until the glue set up. Has been working for about 8 months.

Paul

6v6gt:
Power saving with Arduino is a big topic. Do your development on something like a Uno or Nano, then move the project onto a barebones Arduino Uno (Google this). This sheds all the power hungry components but is not so easy to work with.

In principle, the Arduino wakes up, waits until it has seen a complete revolution (or enough for a reliable average), sends the times somewhere, then goes to sleep again for a set time. This saves power.

Okay, good to know! :smiley: But also, sorry, I wasn't clear about that. I'll be using a nodemcu esp8266 board. So I know I'll be able to use deep sleep mode for very little power draw, it was just more the windspeed that might take a few seconds to calculate. But those few seconds might cost me a (few) week(s), of battery life, if I'm right....

I hope you have the third arm somewhere! A hail storm last year broke off one arm from my anemometer. Tried industrial super glue, but didn't last.
I drilled both pieces with a tiny drill and broke a steel needle to get a short length and super glued the needle piece into each plastic part and then held the pieces together until the glue set up. Has been working for about 8 months.

Haha, sadly I've had the same problem with this one, which is why I put it in my shed. I didn't find a solution at the time to keep it in place securely. At the start of this year though, I've bought a 3D-Printer, so I'll be printing a complete new top, with arms attached. I hope that that will last for some time :slight_smile: Thanks for the tip though, I'll try it if 3d Printing it became impossible.

ESP Low Power: #58 ESP8266 Sensor runs 17 days on a coin cell/transmits data (deep-sleep) - YouTube
Just the first screen says it all (data assuming 1 transmission per hour)

Exactly! But the for the windspeed we need to keep it on for like 2-5 seconds (because it isn't instand like, most sensors), the question is, how low can we go? But I guess we'll find out, once I get it coded. :wink:

wobelaar:
Haha, sadly I've had the same problem with this one, which is why I put it in my shed. I didn't find a solution at the time to keep it in place securely. At the start of this year though, I've bought a 3D-Printer, so I'll be printing a complete new top, with arms attached. I hope that that will last for some time :slight_smile: Thanks for the tip though, I'll try it if 3d Printing it became impossible.

Unless you can print with UV resistant plastic, you won't do any better than your existing device. It is NOT UV resistant plastic as can be seen in the pictures.
Paul