{"id":1235,"date":"2017-10-18T15:31:09","date_gmt":"2017-10-18T21:31:09","guid":{"rendered":"https:\/\/scadametrics.com\/blog\/?p=1235"},"modified":"2022-10-15T15:59:30","modified_gmt":"2022-10-15T21:59:30","slug":"new-improved-digital-de-bounce-algorithm-added-to-ethermeter","status":"publish","type":"post","link":"https:\/\/scadametrics.com\/blog\/?p=1235","title":{"rendered":"New Improved Digital Pulse De-Bounce Algorithm for EtherMeter!"},"content":{"rendered":"<div id=\"attachment_3732\" style=\"width: 160px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3732\" src=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2025\/07\/IMG_0987-1-150x150.jpeg\" width=\"150\" height=\"150\" data-srcset=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2025\/07\/IMG_0987-1.jpeg 2x\" alt=\"James Mimlitz &#039;Slim&#039;\" class=\"avatar avatar-150 wp-user-avatar wp-user-avatar-150 photo\" \/><p id=\"caption-attachment-3732\" class=\"wp-caption-text\">Jim &#8216;Slim&#8217; Mimlitz, SCADAmetrics<\/p><\/div>\n<p>Although the <strong>EtherMeter\u00ae<\/strong> is designed primarily as a SCADA gateway for water meters equipped with absolute encoder signals, it also provides support for <strong>dry-contact pulse output flow meters<\/strong>.\u00a0 These can include <strong>gas meters, electric meters, water meters, wastewater meters, steam meters, hot water meters, and many others<\/strong>.<\/p>\n<p>When interfacing with mechanical pulse meters, a common challenge is handling <strong>&#8220;Contact Bounce&#8221;<\/strong>.\u00a0 For example, after a certain volume of gas flows through a meter, the meter provides a single, brief contact closure. A contact closure event might have a duration of 50 milliseconds (typical), but it may also be shorter or longer in duration, as well.\u00a0 The contact closure could be in the form of a &#8220;solid-state&#8221; contact (a Transistor\u00a0 Switch), or it could be in the form of a &#8220;mechanical&#8221; contact (a Reed Relay Switch).<\/p>\n<p>When a mechanical Reed Relay switch closes, it may physically &#8220;bounce&#8221; during the make and break movements, which can be interpreted by sensitive instrumentation as multiple contact closures, instead of one, as intended.\u00a0 This can introduce significant over-counting errors into the monitoring system, unless properly handled through <strong>&#8220;De-Bouncing&#8221;<\/strong>.<\/p>\n<div id=\"attachment_1255\" style=\"width: 715px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_01b.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1255\" class=\"wp-image-1255 size-full\" src=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_01b.jpg\" alt=\"\" width=\"705\" height=\"285\" srcset=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_01b.jpg 705w, https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_01b-300x121.jpg 300w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/a><p id=\"caption-attachment-1255\" class=\"wp-caption-text\">In this illustration, the raw, jittery pulse signal will likely be interpreted as 8 pulses. The digitally-debounced signal, however, will be correctly interpreted as 2 pulses.<\/p><\/div>\n<p><strong>&#8220;De-Bouncing&#8221;<\/strong>\u00a0describes the process of sensing the intended contact closure signal, while filtering out the extra, unintentional contact closures.<\/p>\n<p>De-Bouncing can be implemented in <strong>hardware<\/strong>, by using resistors and a capacitor to form a low-pass filter.\u00a0 De-Bouncing can also be implemented in the EtherMeter&#8217;s\u00a0<strong>software<\/strong>, by using high-speed sampling and signal processing algorithms.<\/p>\n<p>Several years ago, SCADAmetrics introduced its first-generation, software-based De-Bounce Algorithm into the EtherMeter to provide an alternative to the resistor\/capacitor hardware-based solution.<\/p>\n<p>Today, SCADAmetrics is pleased to introduce its second-generation, software-based De-Bounce Algorithm.\u00a0 The new algorithm analyzes incoming meter pulses against the user setting &#8220;DEBOUNCE_MS&#8221;, and accumulates the pulse count according to the logic described below.<\/p>\n<div id=\"attachment_1242\" style=\"width: 936px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_02.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1242\" class=\"wp-image-1242\" src=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_02-1024x553.jpg\" alt=\"\" width=\"926\" height=\"500\" srcset=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_02-1024x553.jpg 1024w, https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_02-300x162.jpg 300w, https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/DeBounce_Illustration_02-768x415.jpg 768w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/a><p id=\"caption-attachment-1242\" class=\"wp-caption-text\">Illustration of How the EtherMeter Can De-Bounce a Jittery Pulse Input with a Software Algorithm.<\/p><\/div>\n<p><span style=\"text-decoration: underline;\"><strong>When the DEBOUNCE Algorithm is ACTIVATED, then the following logic applies:<\/strong><\/span><\/p>\n<pre>If the CONTACT has been OPEN continuously for DEBOUNCE_MS (or more)...\nAND...\nThe CONTACT is detected to transition to CLOSED...\nTHEN...\nThe Pulse Count will INCREMENT BY ONE.\n\nAvailable De-Bounce Setting: 1ms &lt;= DEBOUNCE_MS &lt;= 500ms<\/pre>\n<p><span style=\"text-decoration: underline;\"><strong>When the DEBOUNCE Algorithm is DEACTIVATED, then the following logic applies:<\/strong><\/span><\/p>\n<pre>If the CONTACT has been OPEN continuously for 208 usec (or more)...\nAND...\nThe CONTACT is detected to transition to CLOSED...\nTHEN...\nThe Pulse Count will INCREMENT BY ONE.\n\nThe EtherMeter will count pulses as fast as it can detect them:\n2400 pulses-per-second, maximum.<\/pre>\n<p><iframe loading=\"lazy\" title=\"SCADAmetrics Pulse Jitter Simulation Rig for EtherMeter Pulse-Counter Testing\" width=\"580\" height=\"326\" src=\"https:\/\/www.youtube.com\/embed\/DXV2wOklCQc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h5><strong>Pulse &#8220;Jitter&#8221; Simulation Rig. This Custom Device is Driven by an External Signal Generator Emitting a 1 Hz Square Wave. Output #1 is a Mechanical Contact Pulse Output. Output #2 is a Solid-State Contact Pulse Output. Used To Help Validate the SCADAmetrics EtherMeter&#8217;s Pulse Debounce Algorithm.<\/strong><\/h5>\n<div id=\"attachment_1286\" style=\"width: 609px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Non_Debounced_01s.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1286\" class=\"wp-image-1286\" src=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Non_Debounced_01s.jpg\" alt=\"\" width=\"599\" height=\"370\" srcset=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Non_Debounced_01s.jpg 933w, https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Non_Debounced_01s-300x185.jpg 300w, https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Non_Debounced_01s-768x474.jpg 768w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/a><p id=\"caption-attachment-1286\" class=\"wp-caption-text\">Channel 1: Mechanical Pulse with Jitter, De-Bounce Algorithm Not Activated. Channel 2: Solid-State Pulse (Clean, No Jitter). Note that the Mechanical Pulse Count (977) Is Erroneously Higher Than the Reference Solid-State Pulse Count (419) by a factor of 133%.<\/p><\/div>\n<div id=\"attachment_1324\" style=\"width: 609px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Debounced_02s.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1324\" class=\"wp-image-1324\" src=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Debounced_02s.jpg\" alt=\"\" width=\"599\" height=\"367\" srcset=\"https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Debounced_02s.jpg 936w, https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Debounced_02s-300x184.jpg 300w, https:\/\/scadametrics.com\/blog\/wp-content\/uploads\/2017\/10\/Debounced_02s-768x470.jpg 768w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/a><p id=\"caption-attachment-1324\" class=\"wp-caption-text\">Channel 1: Mechanical Pulse Input with Jitter. De-Bounce Algorithm Activated with 250ms setting. Channel 2: Solid-State Pulse (Clean, No Jitter). Note that the Debounced Mechanical Pulse Count (49,029) Is Identical to the Reference Solid-State Pulse Count (49,029) \u2014 Thereby Validating the Effectiveness of the 2nd-Generation Digital De-Bounce Algorithm.<\/p><\/div>\n<p>The Second-Generation Digital De-Bounce Feature can be enabled by setting <strong>DB1<\/strong> (for meter channel 1) or <strong>DB2<\/strong> (for meter channel 2) to a non-zero value. (A setting of zero de-activates the De-Bounce feature.)\u00a0 Valid activated settings are between 1 and 500 milliseconds.\u00a0 <strong>DBn<\/strong>\u00a0should be set to approximately 1\/4 of the shortest time between pulse leading edges (in milliseconds).<\/p>\n<p>For simplicity, one of the following <strong>rule-of-thumb formulas<\/strong>\u00a0could be used:<\/p>\n<pre>DBn (ms) = 15,000 \/ ( Max_Flow_GPM x Pulses_Per_Gallon )\n\nor...\n\nDBn (ms) = 15,000 \/ ( Max_Flow_CFM x Pulses_Per_Cubic_Foot )\n\nor...\n\nDBn (ms) = 900,000 \/ ( Max_Flow_CFH x Pulses_Per_Cubic_Foot )\n\n\nor more generally...\n\nDBn (ms)\u00a0 =\u00a0 250 \/ Maximum_Expected_Pulses_Per_Second\n\n\nPlease note that the maximum allowable DBn setting is 500 ms.<\/pre>\n<p>A <strong>thank you<\/strong> shout-out\u00a0to\u00a0<a href=\"https:\/\/www.linkedin.com\/in\/dennis-marsalek-jr-43686a9\/\"><strong>Dennis Marsalek<\/strong><\/a>, <a href=\"http:\/\/www.mdmglobalservices.com\"><strong>MDM Global Services (Tucson, Arizona)<\/strong><\/a>\u00a0for the many conversations and insightful advice that went into formulating this feature upgrade!<\/p>\n<p>All EtherMeter firmware dated <strong>18 Oct 2017<\/strong> and later will ship with the <strong>2nd-Generation Digital De-Bounce<\/strong> feature. However, the feature will be de-activated, by default.\u00a0 Note: If you would like to upgrade an already-purchased EtherMeter, a firmware upgrade can be factory-flashed for a nominal fee plus shipping.<\/p>\n<p>Would the EtherMeter, with its <strong>Digital De-Bounced Pulse-Processing<\/strong> capabilities, better help integrate pulse-output flow meters into your SCADA, Telemetry, or Building Automation System?\u00a0 Give us a call! We&#8217;ll be glad to discuss the details!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Although the EtherMeter\u00ae is designed primarily as a SCADA gateway for water meters equipped with absolute encoder signals, it also provides support for dry-contact pulse output flow meters.\u00a0 These can include gas meters, electric meters, water meters, wastewater meters, steam meters, hot water meters, and many others. When interfacing with mechanical pulse meters, a common <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"https:\/\/scadametrics.com\/blog\/?p=1235\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":1255,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,8,4],"tags":[83,176,177,132,175,174,179,178],"class_list":["post-1235","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-applications","category-general","category-meteringtechnology","tag-contact-bounce","tag-de-bounce","tag-debounce","tag-pulse-counting","tag-pulse-flow-meter","tag-pulse-meter","tag-switch-de-bounce","tag-switch-debounce"],"_links":{"self":[{"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1235"}],"version-history":[{"count":60,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1235\/revisions"}],"predecessor-version":[{"id":2411,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1235\/revisions\/2411"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/1255"}],"wp:attachment":[{"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scadametrics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}