-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wind sensor seems to be incorrect #10
Comments
On the TODO list. I need to review, but the circuit may need to be redesigned for proper de-bounce (getting electromechanical input into the electronics world). I put in a software based ignore of 10mS to eliminate some of the chatter, but need to scope it out again. The solution was a short term band-aid and I'm aware of the issue. |
If you are bored, please send a scope plot of D14 pin and what it looks like while the wind cup is spinning. We can certainly re-evaluate the software debounce/ignore time. This would help us understand if we can reduce the 10mS reliably. |
@tkoeberl If you do not have access to a scope or are not a scope user, you can certainly play with the "ignore" number. Change the highlighted number from 10 to 5 and see if the wind measurement seems stable or not. This snippet is from wind.ino |
@jhughes1010 looks like I'mm not a scope user, as I don't know what it is. |
changing from 10 to 40 is most likely going the wrong direction. You've now increased the ignore time. It will top out at lower wind speeds and start to give incorrect answers more easily. I'll look at this with my oscilloscope when I get set back up after moving. |
If I got it correct, the rebounce is like "double switching". That means to me I want to ignore the second switch if it happened in a short time frame. |
Debounce can produce more than double switching, many more. The cap in the the weather station circuit helps. Dirty little secret: The Anemometer has 2 magnets, not one. You are about to commit the cardinal sin of interrupts by placing an output statement inside an ISR. Outputs are insanely slow relatively speaking and your output will cause you to miss counting events. Not sure if you've seen my past info on the subject. https://jameshughes.atlassian.net/wiki/spaces/WSV/pages/1874460729/Software+Explanation+and+Overview#Wind-Speed-Measurement I'll lookl at all this in a few weeks when my shop is set back up. Please be patient ;) |
patience is a bit hard for me ;) |
Thomas Krebs and I went on a grand side quest to get low power consumption well understood. There are still a couple things I want to validate, correct, or fine tune. Wind measurement in general needs an upgrade, and there is a plan for that. |
I wanted to comment on your last statement about wind measurement and deep sleep. The code is currently configured to do instantaneous measurements while awake, not count revolutions while in deep sleep at this time. |
okay, that is only measures if "sleepless" explains a lot |
I'll try to play around with different values <10ms. |
Hi,
the wind sensor seems to work like expected and gives me some values, but we had the last couple of days a storm here.
The maximum what the sensor measured was about 18 km/h. That really can't be true (Tree's have fallen ;) )
If I got it correct the wind sensor is connected to D14. D14 is configured with an interrupt to count the turns.
What could be the reason for this?
thanks,
-thomas
The text was updated successfully, but these errors were encountered: