In this video we look at how to measure wind speed using an anemometer and Arduino. This approach will work on both ARM and AVR based Arduinos. You can find the code from the video at forcetronic.blogspot.com/2016/...
КОМЕНТАРІ: 51
@SailingBrickHouse-RVLife6 років тому
Finally, someone who could explain what I needed to know!
@mindracing5 років тому
Excellent, clear explanation. Thanks!
@dawgrules17 років тому
Outstanding video !Thanks bud, well explained.
@klaus-peterkastrup18823 роки тому
Excellent video, the best on this subject I (EE) have seen!
@902SteelerРік тому
I had so many sensors and lcd's going that interrupts messed up my program big time so all I did was go in to each sensor function and check. I set my windspeed function up such that if it didn't produce one period in a given time to break out of the loop and report no wind to the display. This made my code run soooo much better. Interrupt is great if you don't have many other functions running (like a print to lcd function)
@902SteelerРік тому
I used the same anemometer for a pic 18 controller. These are awsome quality
@TwisterKidMedia5 років тому
For those curious, cup anemometers over sample the wind speed by anywhere from 5 to 7% SO if you need hyper accurate data remember to apply a correction.
@thibauttheconsultant37306 років тому
very nice project my brother
@patrickmclaughlin60133 роки тому
Does a hall effect sensor need debounce? I'll have to have a go at that. This is a good video to make a tachometer with.
@RoadRunnerMeepРік тому
I imagine switch bounce is when you spring a ruler up and down whilst holding it, there's an initial vibration, then a residual one afterwards
@darkshadowsx59495 років тому
if the wind sensor circuit always bounces the same you can compensate for that in programming where you ignore signals for a micro second. that shouldn't effect the result unless you get wicked fast wind speed unheard of on earth.
@Hulkeq23 роки тому
I usually fix relay float problems in software tbh.. it depends on the timescales involved.. Arduino is fast enough to continuously read input in the 5 microsecond range .. That is more than enough to detect the non floating bit.
@XeALabs3 роки тому
Would it be okay if the Vcc is changed to 5v? Are there any changes to be made to the code if Vcc is 5v?
@moaks51255 років тому
Great Video. From where did you source the anemometer
@ForceTronics5 років тому
Hello, here is a link to the company I purchased the anemometer from www.inspeed.com/
@andresamautagonzaleszapata92372 роки тому
where do you find that 1 pulse per rotation = 2.5 mph/Hz? I dont find this in the datasheet , best regards!
@billd01rfc4 роки тому
Great video, fantastic explanation, thnx! . . . but . . . using your sketch I don't get consistent, repeatable results. I've set up my anemometer on a stable base. set up a fixed air flow (old hair dryer anchored to a bench), I get very variable results, even with a stable physical setup (I don't really acre what the output is, as long as its stable, then I can calibrate from there). Thnx again for your great video, much appreciated, and advice would be great. billd
@ForceTronics4 роки тому
Hmmm sounds like you are missing triggers. You are using some type of switch denounce method, correct?
@DavidLeeMenefee7 років тому
Nice. Thanks....PEACE
@ismailkhan8873 роки тому
is 2.5 circumference =d*pi ?
@kashafwania54064 роки тому
Where is program?
@rapunzeleh5465 років тому
so i should be able to use this to lower trackers on a solar panel array back to 'flat' in case of high winds?
@ForceTronics5 років тому
Anemometers are commonly used to measure wind out doors so yes
@rapunzeleh5465 років тому
haha... i know what they're for... just thinking i could program it with an arduino to do what i want... if i get one with the directional dohickey, if the wind is X and the direction is Y, then close, otherwise, the wind will sort of 'defect' off the panels. i'm surprised there are not more youtube videos for this purpose.
@Sudakatux5 років тому
I dont get why in the comment it sais Falling event but you set it to Rising `attachInterrupt(interruptPin, anemometerISR, RISING); //setup interrupt on anemometer input pin, interrupt will occur whenever falling edge is detected`
@ForceTronics5 років тому
I may have misspoke in the video. You can use either the rising or falling edge.
@khenmehko18042 роки тому
do you know how to make real time velocity-time grapgh using arduino?
@ForceTronics2 роки тому
No I don't
@ltmnizam41684 роки тому
Can i know what software u use
@ForceTronics4 роки тому
Are asking about the software on the Arduino. I wrote that for the video and you can access the code on my blog (see link in video description)
@phillevitt6377 років тому
What value diode do you use in the debounce circuit?
@ForceTronics7 років тому
By value do you mean forward voltage drop? You can use any standard diode but you do want to make sure that the forward voltage drop is not so high that it reduces the voltage of the pulse so much that it is lower than the "high" threshold of whatever digital pin you are using to detect the pulse. I typically just make sure the forward voltage drop is
@phillevitt6377 років тому
Thank you very much for the quick reply. I initially used a Fairchild 1N4001 diode, that is typically used as an AC rectifier, and got some unexpected results. I changed it to a small LED and your program works fine on the Uno, as written. I want to use the anemometer to close my patio awning when the wind speed hits a predetermined threshold, e.g. aSetting >20 mph, and trigger a relay. I also want to use the Adafruit Feather Huzzah and relay wing, instead of the Uno, because 1) small size of the microprocessor and relay, and 2) wifi capability to transmit the data to a Raspi Pi and display. I notice that your code compiles and loads to the feather huzzah, but I am not getting anything on the serial monitor other than a couple junk characters? I will try to modify the code to get the feather to work... wish me luck.
@ForceTronics7 років тому
Rectifier diodes are typically made for pretty high forward currents and this application is fairly low current so maybe that is the issue. I don't have any experience with the Huzzah, but the strange characters sounds like a baud rate setting mismatch. Sounds like an interesting project, good luck on it.
@phillevitt6377 років тому
Thanks. The Feather Hazzah and wings are pretty cool, and the on-board wifi is a nice feature, like the new Raspi Zero. I checked the baud rate mismatch, and the outputs, just to see if the program was working but not printing correctly. It does send the junk message to the serial monitor every 1.8 seconds. I can write my own code to send messages to the serial monitor and it works as expected. I'm not sure if the Adafruit Huzzah supports interrupts, or if I need a library to correctly access the GPIO pins? I will attempt to find out from Adafruit . I've looked at a few Arduino IDE sketches for the Huzzah on GitHub, but there is not a lot to choose from. P.S. I like your channel and your obvious expertise. I've "borrowed" your code numerous times for projects, e.g. nRF24L01 radio code for robotics projects.
@ForceTronics7 років тому
The Hazzah has an ESP8266 on it which I believe supports interrupts so the Hazzah should support interrupts. Glad you found the content on the channel useful and I put the code out there for others to use.
@sickvic39096 років тому
What is the 3rd wire on some anmomynomyters :)
@ForceTronics6 років тому
I can't answer for all Anemometer, but the 3rd wire on mine is not connected to anything. My guess is they are using some standard connector that has 3 wires but they only use 2.
@sickvic39096 років тому
Thanks
@sondaubacvlog2 роки тому
Something wrong bro, attachInterrupt(interruptPin, anemometerISR, RISING); => I think it must be: attachInterrupt(digitalPinToInterrupt(interruptPin), anemometerISR, RISING);