Problem with Wind Speed sensor
-
@AWI Thanks! The sketch works. But, I am not quite sure if the readings in m/s are correct. As a test, I have used a normal table fan, then I got 3.3 m/s on full speed..
Then I used a hairdryer, that on full speed.. It spins then very very fast, but it is still only 11 m/s. This is classified as normal, somewhat powerfull wind? Looks to me it's pretty low? Or could this correct for this case? :)'Edit-> Maybe it is correct :) Saw somewhere on internet a test with somewhat smaller hairdryer, which gave 9.5 m/s :)
Unfortunately I don't have any experience with windmeters :) Don't know how hard it should spin and how to test the output :)@rnollen My theory for calculating they outcome of your sensor is the following. All you need to know is the distance it takes from the pulse going from LOW (leaving the hall sensor) to HIGH triggering the hold sensor. If that's for instance 10 cm. Than the distance traveled by one full turn is 10cm. Let's say the wind will cause your windsensor to travel exactly once every second, the speed would by 600 cm's in 60 seconds. That's 1 meter per minute. So the wind speed would be 60 meter per hour which is known is 0 Beaufort.
If however the wind causes the sensor to turn exactly 3 times per second, that would be 30cm which is 0.3 m/s. Then the wind speed would be 1 Beaufort. Since 12 Beaufort starts at 32.6 m/s it would mean that your wind sensor would turn 3260 cm per second divided by 10 is 326 turns per second. which is roughly once every 3 millisecond.
But I'm hoping that someone can verify this theory ;-)
-
@rnollen My theory for calculating they outcome of your sensor is the following. All you need to know is the distance it takes from the pulse going from LOW (leaving the hall sensor) to HIGH triggering the hold sensor. If that's for instance 10 cm. Than the distance traveled by one full turn is 10cm. Let's say the wind will cause your windsensor to travel exactly once every second, the speed would by 600 cm's in 60 seconds. That's 1 meter per minute. So the wind speed would be 60 meter per hour which is known is 0 Beaufort.
If however the wind causes the sensor to turn exactly 3 times per second, that would be 30cm which is 0.3 m/s. Then the wind speed would be 1 Beaufort. Since 12 Beaufort starts at 32.6 m/s it would mean that your wind sensor would turn 3260 cm per second divided by 10 is 326 turns per second. which is roughly once every 3 millisecond.
But I'm hoping that someone can verify this theory ;-)
@TheoL In essence you are right but you need to get some more variables in the equation. It is a rotating sensor with (probably non linear) losses. Best solution in this case is to calibrate it with a known value. @mollen bought himself a quality sensor which is supposed to be calibrated. Type 12CM, according to the supplier it is 12 pulses for 1m/s per second. But the manual says that this model is 10 pulses for 1m/s." which should make the calculation pretty easy: either divide the pulses per second by 12 (or 10).
Line 68: float windSpeed = frequency / meterPerPulse ; // calculate m/s for pulses per secondand the calibration value (to be adjusted)line 39: const int meterPerPulse = 10 ; // number pulses/s for each m/sI am still working on a whole different approach for measuring wind parameters with the help of an acceleration sensor. I looks very promising.
-
@TheoL In essence you are right but you need to get some more variables in the equation. It is a rotating sensor with (probably non linear) losses. Best solution in this case is to calibrate it with a known value. @mollen bought himself a quality sensor which is supposed to be calibrated. Type 12CM, according to the supplier it is 12 pulses for 1m/s per second. But the manual says that this model is 10 pulses for 1m/s." which should make the calculation pretty easy: either divide the pulses per second by 12 (or 10).
Line 68: float windSpeed = frequency / meterPerPulse ; // calculate m/s for pulses per secondand the calibration value (to be adjusted)line 39: const int meterPerPulse = 10 ; // number pulses/s for each m/sI am still working on a whole different approach for measuring wind parameters with the help of an acceleration sensor. I looks very promising.
@AWI Thanx for the explanation. I just have to build the sensor with as much precision as I can. All will of course depend on things like the quality of the ball-bearrings that I use e.t.c. And of course in the quality of the electronic parts. And I have to calibrate it despite of my theory. What I didn't take into account is the minimum force that is needed for the sensor to start rotating.
Your approach sounds very interesting. I've recently found a sensors that measures the angle movement of a magnet. My theory is, that by probing each angle movement within a couple of ms would end up in a very precise wind sensor. Problem is that I wasn't able to find a breakout board. I can only buy the sensor as an SMD IC. And soldering SMD is just not a skill I have found time to master yet.
Also this sensor would make a perfect wind direction sensor, which is far more precise than using 8 reed relays or hall sensor that most of these wind direction sensor do. The IC cost around 7 dollar if I remember correctly.
-
@AWI Thanx for the explanation. I just have to build the sensor with as much precision as I can. All will of course depend on things like the quality of the ball-bearrings that I use e.t.c. And of course in the quality of the electronic parts. And I have to calibrate it despite of my theory. What I didn't take into account is the minimum force that is needed for the sensor to start rotating.
Your approach sounds very interesting. I've recently found a sensors that measures the angle movement of a magnet. My theory is, that by probing each angle movement within a couple of ms would end up in a very precise wind sensor. Problem is that I wasn't able to find a breakout board. I can only buy the sensor as an SMD IC. And soldering SMD is just not a skill I have found time to master yet.
Also this sensor would make a perfect wind direction sensor, which is far more precise than using 8 reed relays or hall sensor that most of these wind direction sensor do. The IC cost around 7 dollar if I remember correctly.
@TheoL I use an acceleration sensor which makes is easy to calculate angle and direction with respect to gravity. Problem is more in the mechanics to make it reliable and damped.
I will publish in a few weeks and discuss in a separate thread -
@TheoL I use an acceleration sensor which makes is easy to calculate angle and direction with respect to gravity. Problem is more in the mechanics to make it reliable and damped.
I will publish in a few weeks and discuss in a separate thread@AWI Looking forward to that thread. Would love to team up with you on this on. This is the sensor I was talking about. Just posting it hear so I'll remember it
-
@AWI Looking forward to that thread. Would love to team up with you on this on. This is the sensor I was talking about. Just posting it hear so I'll remember it
-
@TheoL A compass sensor will probably work just as fine, is a lot cheaper and comes as a module!
Just use a weak magnet (no neodimium :skull: ) -
@Yveaux True. But I think it's much easier to epoxy a magnet under an rotating axis. Let's see what we can come up with saturday.??
-
Hello I bought a TX23 and wanted to integrate it into FHEM.
Could anyone look over the scetch if it is correct?/** # Arduino-LaCrosse-TX23-Library LaCrosse TX23 is a wind speed and direction sensor. It uses 3 wires for communication and power: Pin1 - Brown(Black) - DATA Pin2 - Red - Vcc Pin3 - Green - N/C Pin4 - Yellow - GND DATA pin is to be connected directly to one of Arduino ports. */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #include <MySensors.h> #include <SPI.h> #include <LaCrosse_TX23.h> #define CHILD_ID_WIND 1 //DATA wire connected to arduino port 4 LaCrosse_TX23 anemometer = LaCrosse_TX23(4); // standard messages MyMessage msgWSpeed(CHILD_ID_WIND, V_WIND); MyMessage msgWDirection(CHILD_ID_WIND, V_DIRECTION); void setup(){ } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Wind Sensor", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID_WIND, S_WIND); } void loop() { //String dirTable[]= {"N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"}; String dirTable[]= {"0","22.5","45","67.5","90","112.5","135","157.5","180","202.5","225","247.5","270","292.5","315","337.5"}; float speed; float a = 22.5; int direction; if(anemometer.read(speed, direction)) { send(msgWDirection.set(direction*a ,1)); send(msgWSpeed.set(speed, 1)); Serial.println("Speed = " + String(speed,1) + " m/s"); Serial.println("Dir = " + dirTable[direction] + " Grad"); } else { Serial.println("Read error"); } //delay between succesive read requests must be at least 2sec, otherwise wind speed will read 0. delay(2000); }Thank you
-
Anyone got a working sketch for a pulse anenometer?
I printed this. https://www.thingiverse.com/thing:2523343
I used it with ESPHome as testing it and I got OK values.
Now i would like to use it with mysensors.
I tried @AWI s sketch but I get stange readings.
Sometimes I get a very high value when is turns slow.