I bought a very simple wind speed sensor here.
It says it is 12-24Volt so i think I should use a voltage divider to keep the voltage to 5 volts max and read that in from a pin on the Arduino.
I am new to this stuff so I would appreciate some guidance on this sort of readings.
Thanks in advance.
I bought a very simple wind speed sensor here.
Hi, Only two wires??
You need more information from the seller /manufacturer.
Yes, Only 2.
One is ground and one is signal voltage.
I think you would need more than 2 wires. 2 wires would be used only for delivering power (voltage and ground). There should be another wire for giving you the actual readings.
A quick search on ebay gave me these:
Both of them are arduino compatible. You just connect the 3rd voltage wire to any of the analog inputs (A0 to A5) and just read the readings.
That wind speed indicator linked in the OP uses a generator of some sort to develop a voltage proportional to the wind speed (2.5 V at 32 m/s). Many anemometers simply use a toy DC motor as a generator.
It will work fine with the Arduino -- use analogRead() to read the output voltage and convert to wind speed using the table posted on the sales page.
You’ll probably need some averaging too - I’d expect the signal to be noisy
Poor description on that page. The 12V/24V part is misleading, and they're not even sure whether it's got a 2 or 3 meter long wire attached.
DC or AC output voltage?
Have you tried putting a voltmeter on the wires and spinning the rotor?
If you are, my opinion, lucky, you will find that it ISN'T one of the "generator" windspeed sensors, but that it has a switch inside which closes for a time, probably (but not necessarily) once in each rotation of the sensor.
If you got no voltage on the wires, try again, but this time measure the resistance between them. If it is very very high for part of the cycle and near zero for the rest, the "12v/24v" was probably a (mostly meaningless) "statement" of the voltage the switch was "good" for. (You did say this was an eBay purchase!)
Give me a switch based anemometer every time.
(For reading the speed, Arduino...
I have one of these 2 wire wind sensors, that use voltage to determine wind speed. Also think I understand how I might set it up.
Because it is 2 wire only, 1 wire is input voltage, 12v or 24v, or example. The other wire is signal. If you setup a volt meter and provide 12v, the meter will read 12v on the signal wire, actually 12.23/12.24v for mine. If I spin the sensor, the voltage goes up higher as the wind speed increases. So 12.50, 12.70, 13.0, etc. This sort of makes sense, given the sensor is voltage based.
I connected a 5v source, and did the same test, and I got 5.0v at no wind speed, and greater than 5.0v as I provided input to sensor.
So i believe is I create a voltage divider or deduction regular, to take the signal value to a baseline of 0v (-12v in other words, I can sample the incremental voltage via the analog input. Can the onboard pull down take 12v to zero? Not sure, but I doubt it, since Arduino is a 0v-5v scale device. If I used a 5v input, then maybe.
Per the vendor data...
Wind Rank Wind Speed (m/s) Output Voltage（V）
1 0.3-1.6 0.02-0.1
2 1.6-3.4 0.1-0.2
3 3.4-5.5 0.2-0.4
4 5.5-8.0 0.4-0.6
5 8.0-10.8 0.6-0.8
6 10.8-13.9 0.8-1.0
7 13.9-17.2 1.0-1.3
8 17.2-20.8 1.3-1.6
9 20.8-24.5 1.6-1.9
10 24.5-28.5 1.9-2.2
11 28.5-32.6 2.2-2.5
The wiring is thus...
Power 12v to sensor blue wire
Sensor signal wire to analog input to Arduino (through voltage divider or reducer as noted above, so the voltage range to Arduino analog input is limited to 0v-2.5v.
Since the wind sensor has no ground, the sensor signal wire combined to the power GND.
If this is wrong in anyway, please chime in. But it seems to work with the initial testing... using a volt meter.
My guess is the motor in the device is rated for 12 to 24 volts and is being used as a generator. I had one similar to it until the sleeve bearings gave out. Can't indicate below about 2 Mph. If you can get to the bearings, put a little light oil on them every year.
Update… I realized after a bit more testing, that the specific wind speed sensor I have is just an induction motor. This means that regardless of what the limited documentation states as this device is rated for 12v or 24v, that is actually misleading. By connecting a voltage source to this device, serves not purpose. So I connected the signal wire to the A0 pin on my Arduino, and the unlabeled wire to ground. I then added a wind source… human blowing… Boom! I got an inducted voltage/current from the sensor. Given that the documentation states that 2.5v is the expected maximum voltage when wind speed is 32.6 m/s… A very fast wind speed to be sure. And given 2.5v is well below the 5v maximum, time to test.
As an initial test, I was able to get a reading of 138 from A0 input blowing for as long and hard as possible (one big breath and exhale). This against the documented A0 scale of 0=0v and 1024=5v. So the sensor ranges from 0v to 2.5v, my human test resulted in 138, or 0.67v (5v/1024=204.8 points per volt). Thus 138/204.8 is 0.67 volts. This works out to about wind rank of 5, or 8.0 to 10.8 m/s wind speed. To be more specific the speed range is 0 to 32.6 m/s for 0v to 2.5v, so 0.67v/2.5v32.6 m/s=8.7 m/s (converting to m/h 1 m/s=2.23694 m/h) thus 8.73682.23694=19.543697 m/h. Given that Humans can exhale around an average of 15.5 miles per hour. This seems a reasonable result, at just short of 20 miles per hour, since I have good lung capacity.
Clearly, need to validate more, but at least Arduino A0 is getting the induction load from the sensor, a step in the right direction, using a 2 wire wind sensor.
Paul, yes, it does appear that very low air flow can't achieve rotations... for my purpose not a big deal. To get to the bearings, I will have to break the sealed base... I will do that when needed, for now it works. I planned to use a old computer fan as a cheap wind sensor as well.
This is a hopelessly cheap sensor, it will wear out in one storm I’m sure. Great as a toy, not for monitoring windspeed!