<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Bouncing and debouncing</title><link>/members-area/personalblogs/b/blog/posts/bouncing-and-debouncing</link><description>I’ve been teaching students of all ages, from 8 years old to adults, and one of the most common things I’ve heard is about bouncing. Sooner or later, we are faced with this rather simple problem, so what causes it, and what can we do? Let’s star...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Bouncing and debouncing</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/bouncing-and-debouncing</link><pubDate>Thu, 05 Jan 2017 14:48:40 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d26d6673-6380-46cc-9571-6a0554d03cf7</guid><dc:creator>D_Hersey</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a href="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Mercury_memory.jpg/220px-Mercury_memory.jpg"&gt;&lt;img alt=" " class="thumbimage jive-image" height="108" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Mercury_memory.jpg/220px-Mercury_memory.jpg" width="220" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This is the mercury delay-line memory from the Univac 1&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2378&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Bouncing and debouncing</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/bouncing-and-debouncing</link><pubDate>Wed, 04 Jan 2017 17:16:43 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d26d6673-6380-46cc-9571-6a0554d03cf7</guid><dc:creator>D_Hersey</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Well, I think using a DPST and a F/F for debouncing is timeless.&amp;nbsp; We should scan these old databooks and put them in an archive, IMHO&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2378&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Bouncing and debouncing</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/bouncing-and-debouncing</link><pubDate>Wed, 04 Jan 2017 08:22:06 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d26d6673-6380-46cc-9571-6a0554d03cf7</guid><dc:creator>mcb1</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Nice post and a great subject.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;ve described bouncing as like dropping a tennis ball onto a hard surface, it bounces back up, and then drops.&lt;/p&gt;&lt;p&gt;This continues for a period of time so you don&amp;#39;t know what state it is until after it stops.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;ve also seen 0.1uF caps across the switch to provide a small filtering effect.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Depending on the application, I&amp;#39;ve often triggered on the first change (High in your example) and then waited 50mS and check if it is High, and action it or ignore it and carry on.&lt;/p&gt;&lt;p&gt;If the application is time critical, I use the millis() timer to &amp;#39;come back&amp;#39; after 50mS, but if it isn&amp;#39;t, then I just use a delay(50).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The &amp;quot;poll less often&amp;quot; is okay as long as the user is prepared to hold the button.&lt;/p&gt;&lt;p&gt;Modern appliances and gadgets often use the same button for two different functions (short press and long press)&lt;/p&gt;&lt;p&gt;We tend to demonstrate what happens if you have a really long delay time, and as you say will the user hold the button that long.??&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;ve usually found the cheaper switches are worse, and 50mS seems to be able to capture most bounces.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Personally I prefer to use a pulldown, simply because it interfaces to open collector circuits, but also you dont have an issue with the 5V getting shorted.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Mark&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2378&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Bouncing and debouncing</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/bouncing-and-debouncing</link><pubDate>Wed, 04 Jan 2017 07:19:17 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d26d6673-6380-46cc-9571-6a0554d03cf7</guid><dc:creator>jw0752</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi James,&lt;/p&gt;&lt;p&gt;Thanks for the nice blog on this important subject. &lt;/p&gt;&lt;p&gt;John&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2378&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Bouncing and debouncing</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/bouncing-and-debouncing</link><pubDate>Wed, 04 Jan 2017 00:40:49 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d26d6673-6380-46cc-9571-6a0554d03cf7</guid><dc:creator>dougw</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Good topic, my first system failure was due to switch bounce. I wish someone had explained it to me earlier.&lt;/p&gt;&lt;p&gt;I prefer to use a double throw switch whenever possible because it can be debounced quickly without ambiguity:&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/300x200/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-d26d6673-6380-46cc-9571-6a0554d03cf7/contentimage_5F00_183156.gif:300:200]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2378&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Bouncing and debouncing</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/bouncing-and-debouncing</link><pubDate>Tue, 03 Jan 2017 17:00:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d26d6673-6380-46cc-9571-6a0554d03cf7</guid><dc:creator>D_Hersey</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I try to keep my debounce circuit times to under sec/10 or I find the switch annoying.&amp;nbsp; You can use a comparator for these circuits, then you can adjust threshold and delay.&amp;nbsp; Besides debounce, a circuit that handles a switch or pushbutton might provision for suppressing runt pulses, which may be the result of randomish EMI&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2378&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>