8 pulse anemometer

I saw the following post...

https://forum.arduino.cc/index.php?topic=598977.0

It looks straight forward enough, but while learning about wind measurement, I see that wind is normally reported at sustained (2 - 10 minute average) and gusts (15 - 20 mph either over the last 10 minute average or over the minimum over the last 10 minutes). I want to use two user two circular buffers. One to keep a 2 minute average of 5 second averages per this article ( How is wind speed measured ? is it an average of speeds taken at specific time intervals.....please explain. )for sustained and one for 10 minute readings for gusts. I plan to use a circulate array so I can keep the most current 2 and 10 minutes worth of measurements.

I am planning on using this library due to it's average functions and min/max functions...

Does anyone know if these will effect the timing of the interupts? According to my math (8 pulses in a second is 2.5 MPH wind) that even at a 75 mph wind, there will be only 240 pulses per second.

My plan is that after each 5 second average, to add that time to the end of the 2 minute array, bumping the oldest off, get the average, add the speed to the 10 minute and calculate if there is a gust speed to post. I will post that 5 second speed as current, the 2 minute sustained and the gusts each 5 seconds on a 4x20 LCD using and Ic2 interface.

Bob

An interrupt means the processor stops and runs the interrupt code to completion and then continues where it left off. That suggests the code for the interrupt should be as short and fast as possible. If you keep this in mind, then it will have NO effect on the rest of your program.
Keep in mind the location of your anemometer. As I recall, it must be 10 meters above the ground and quite some distance from obstacles like buildings.
Paul

I guess what I am wondering (without writing test code) is how long the array options will take to run keeping in mind I may get 300 interrupts per second... at the very high end.

Bob

parrst:
I guess what I am wondering (without writing test code) is how long the array options will take to run keeping in mind I may get 300 interrupts per second... at the very high end.

Bob

Kind of depends on how you write the code, don't you agree?
Paul

Yeah, I guess I am going to just have to write the code and put in a couple time grabbers to make sure nothing is taking too long.

Bob

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.