{"id":923,"date":"2023-04-07T19:45:06","date_gmt":"2023-04-08T02:45:06","guid":{"rendered":"https:\/\/unixwizardry.com\/?p=923"},"modified":"2024-08-17T20:32:04","modified_gmt":"2024-08-18T03:32:04","slug":"metone-anemometer","status":"publish","type":"post","link":"https:\/\/unixwizardry.com\/index.php\/2023\/04\/07\/metone-anemometer\/","title":{"rendered":"MetOne Anemometer"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"923\" class=\"elementor elementor-923\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0b66dbf elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0b66dbf\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8c0e635\" data-id=\"8c0e635\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d55c0a7 elementor-widget elementor-widget-text-editor\" data-id=\"d55c0a7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"color: var(--sydney-text-color);\">\u00a0Now, on to the anemometer testing.\u00a0 I am currently trying to use a hardware debounce circuit (shown) and it WAS working and counting the pulses from the reed switch pretty consistently.\u00a0<\/span><\/p><figure id=\"attachment_1047\" aria-describedby=\"caption-attachment-1047\" style=\"width: 300px\" class=\"wp-caption alignleft\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-1047 size-medium\" src=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/05\/Debounce1-300x230.png\" alt=\"\" width=\"300\" height=\"230\" srcset=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/05\/Debounce1-300x230.png 300w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/05\/Debounce1-230x176.png 230w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/05\/Debounce1-350x268.png 350w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/05\/Debounce1.png 454w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-1047\" class=\"wp-caption-text\">Works well, but 100uS time constant.<\/figcaption><\/figure><p>But it\u2019s weird that a shorter RC time constant debounce circuit works better than a longer one.\u00a0 The RC time constant that seems to work better is 100 uS; if I change the capacitor to, say, a 100nF (1ms time contstant), then I get more contact bounce interrupts&#8230;weird Not what I would expect. I was using a NO (Normally Open) pushbutton switch, not a reed switch so maybe that\u2019s the issue. So, I found a small reed switch and tested with that. The switch is about the same size as the one in the 034B anemometer, I think, so the bounce time should be about the same. Below is a pic from my scope the switch bounce. After numerous activations of the switch using a small magnet I found the maximum bounce time to be no more than 300 uSec (microseconds). I am sorta puzzled why a time constant of 100 uSec works better than, say, 300 uSec. Most of the time the bounce time was like 100 uSec, but occasionally it would be much more but I never saw anything over 300 uSec.\u00a0 So now I&#8217;m experimenting with software debounce, an example of which I found\u00a0<a href=\"https:\/\/community.particle.io\/t\/timers-and-interrupts-misfiring\/46670\">on Particle.IO forum<\/a> that appears to work really well.\u00a0 Better than a hardware debounce scheme, but I might try using both methods.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f45f305 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f45f305\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-740b1bc\" data-id=\"740b1bc\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c0544d8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c0544d8\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5802a3a\" data-id=\"5802a3a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3a7a6f0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3a7a6f0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c7e7d0b\" data-id=\"c7e7d0b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b61db45 elementor-widget elementor-widget-image\" data-id=\"b61db45\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"768\" height=\"461\" src=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/04\/SDS00002-768x461.png\" class=\"attachment-medium_large size-medium_large wp-image-1034\" alt=\"\" srcset=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/04\/SDS00002-768x461.png 768w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/04\/SDS00002-300x180.png 300w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/04\/SDS00002-230x138.png 230w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/04\/SDS00002-350x210.png 350w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/04\/SDS00002-480x288.png 480w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/04\/SDS00002.png 800w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u00a0Now, on to the anemometer testing.\u00a0 I am currently trying to use a hardware debounce circuit (shown) and it WAS working and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":["post-923","post","type-post","status-publish","format-standard","hentry","category-weather-instruments"],"_links":{"self":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/comments?post=923"}],"version-history":[{"count":87,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/923\/revisions"}],"predecessor-version":[{"id":1271,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/923\/revisions\/1271"}],"wp:attachment":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/media?parent=923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/categories?post=923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/tags?post=923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}