Chip Tips #1: Debouncing

  Рет қаралды 32,232

Robert Baruch

Robert Baruch

Күн бұрын

Пікірлер: 58
@AnimilesYT
@AnimilesYT 5 жыл бұрын
That intro.. Now I'm scarred for life >,
@alerey4363
@alerey4363 4 жыл бұрын
very clear and most important you lay out all the involved criteria in selecting the value of components
@DanielReetz
@DanielReetz 7 жыл бұрын
That is a very cool way to demo switch bounce. Had never thought of simply hooking up a counter.
@nisiotisR
@nisiotisR 2 жыл бұрын
I believe this is the most analytical switch debounce video and well presented! thank you!
@leonardmilcin7798
@leonardmilcin7798 3 жыл бұрын
While it is a nice demonstration of Schmitt trigger, having additional capacitor and IC for a switch is total overkill. It also requires that the switch is always powered and this means that when the switch makes contact, the contacts will switch some current (this may or may not be a good thing for the switch, some switches rely on a spark to clean the contacts). If you are doing this to be red with microcontroller, there is a better strategy. First, you can get rid of the resistor with internal pullup. Second, I just monitor the switch every couple of milliseconds, the interval being longer than possible bounce time. Monitoring means configuring the pin as both input and output (if your MCU allows it), reading the state of the pin and then immediately unconfiguring it. If the monitoring happens while the switch changes state, it doesn't matter. For example, if you do three readings (X, X, X) while the switch gets closed, you might get 0, 0, 1 or 0, 1, 1, all with same outcome. Avoiding hardware interrupts in rapid succession means the software works in a more controlled way. One reason to have extra component is if you have extremely sensitive circuit and you don't want noise to propagate from the switch circuit.
@erwanounn2209
@erwanounn2209 5 жыл бұрын
I would be more than happy to support your work via Patreon or the paid subscription feature. Great work all around Robert!
@saidbaci4344
@saidbaci4344 Жыл бұрын
You managed to dissect the switch bouncing process, and you came out with a great debouncing solution. It's amazing. Thanks a lot.
@ser7ser7i
@ser7ser7i 5 жыл бұрын
What a great lesson, i never see such quality in eee class
@EnsignRho
@EnsignRho 7 жыл бұрын
Awesome teaching. :-) Thank you.
@MarcelHuguenin
@MarcelHuguenin 5 жыл бұрын
Excellent video, great idea to use a counter, very well explained. First on your channel and will explore more of it.
@SomeGuyInSandy
@SomeGuyInSandy 2 жыл бұрын
What Phil Wright said, excellent video!
@anthonywebber1155
@anthonywebber1155 4 ай бұрын
Useful and concise. Nice.
@mangostain
@mangostain 4 жыл бұрын
Very well damn explained... Now I'm feeling like an expert, Greetings from Chile!
@mangostain
@mangostain 4 жыл бұрын
There's something I dont understand... why you didnt use the Non-Inverting Schmitt Trigger to immitate the behavior of the Switch ?
@BrettWLyons
@BrettWLyons Жыл бұрын
Exactly what I was looking for! Thanks!
@mk-tp7wb
@mk-tp7wb Жыл бұрын
The intro song was cool!
@henricoderre
@henricoderre 3 жыл бұрын
Very interesting. This video is very informative.
@maheshpadmanabh6564
@maheshpadmanabh6564 4 жыл бұрын
Brilliant explanation!!
@phoenix2464
@phoenix2464 4 жыл бұрын
Very interesting! got me thinking about bouncing issues with Morse code radios !! how did they solve it back then ? did they have Schmitt triggers ?
@Deveyus
@Deveyus 5 жыл бұрын
This was excellent.
@hughm0n6u33
@hughm0n6u33 3 жыл бұрын
A simple way of dealing with it is to simply strap a pull down resistor and a capacitor to the switch, if you don’t mind having a bit of cool down time after pressing the switch, cool down time depends on capacitance of capacitor, it doesn’t work perfectly but it’s fine 80 percent of the time
@richardlighthouse5328
@richardlighthouse5328 4 жыл бұрын
Doesn't 555 timer or adding capacitor in parallel to the switch help with the bouncing?
@alexipeck4201
@alexipeck4201 4 жыл бұрын
This was so damn useful, loved it
@jessstuart7495
@jessstuart7495 3 жыл бұрын
In most cases you don't need to measure the settling time of a switch. Just use a very conservative RC time constant (50ms). Unless you are trying to measure human reaction times, a few hundred ms delay won't matter. If you need tighter timing, you shouldn't be relying on a human pushing a button.
@steve42lawson
@steve42lawson Жыл бұрын
Nicely explained, but one missing detail: switches age, so the quality of a switch will likely degrade over time. I have actual real world cases of switch bounce getting worse with time. So, for a real-world design, I like to push that denounce delay out to more like 50ms or more. The true limiting factor is cycle time -- ie how long before the switch will ever be pressed again. In most cases, that's a period on the order of a second or more. For, instance an elevator floor button. Once pressed, it's unlikely to be pressed again until the elevator car reaches that floor, leaves that floor, and someone wants to go back to that floor. Even if the person starts pressing that button over and over, it's already been registered, so subsequent presses can be ignored. But, a game controller is a different story. The fire button might get pressed every 100ms or so, thus in that case, the upper limit is more tight. But, I would still design for as long as a denounce delay as the application will tolerate.
@AI_Image_Master
@AI_Image_Master Жыл бұрын
I would think that for an elevator the debounce would be done in software, especially in a situation if there are a lot of buttons.
@origamimagician
@origamimagician 5 жыл бұрын
intro 10/10
@trailblazingfive
@trailblazingfive 7 жыл бұрын
Cool video 😇
@duncanmarks1590
@duncanmarks1590 2 жыл бұрын
Hi, good use of overhead camera to replace conventional classroom whiteboard, content is also appropriate . bye
@albertocastillo7686
@albertocastillo7686 3 жыл бұрын
Just learning about breadboards and stuff. Hopefully I can make a FX delay pedal someday.
@FEMADEATHCAMPCONTROL
@FEMADEATHCAMPCONTROL 4 жыл бұрын
Software debouncing all of a sudden seems more appealing.
@vikitheviki
@vikitheviki 5 жыл бұрын
I can't sing either so I'm subscribing..
@ohmedarick1
@ohmedarick1 5 жыл бұрын
Well explained Thank you
@misterhat5823
@misterhat5823 6 жыл бұрын
The problem is that switches bounce more as they age. The way around it is to wait a time period after no changes occur before considering the state valid. Easy in software, somewhat easy in hardware with timers.
@petersshabbygarage396
@petersshabbygarage396 Жыл бұрын
Source? How much is the increase? Why does it happen?
@misterhat5823
@misterhat5823 Жыл бұрын
@@petersshabbygarage396 Why are you trolling a four year old post. That's a commonly accepted fact. You can Google plenty of sources if you weren't a lazy armchair expert.
@petersshabbygarage396
@petersshabbygarage396 Жыл бұрын
@@misterhat5823 i am engineer in a very different field who recently began to learn electonics as a mean to escape my anxiety. I am curious, yet i have come across so many misleading websites. Your comment inteigued me, I want to learn so figured to push you for facts. Will you please help me learn more?
@pekkagronfors7304
@pekkagronfors7304 5 жыл бұрын
Good one. Thanks.
@Linrox
@Linrox 2 жыл бұрын
@RobertBaruch I know this is an old video, but was hoping you might be able to answer this question. If you have multiple switches, like in a button box, are they always debounced separately.
@MiTh69
@MiTh69 6 жыл бұрын
Where did you get your display module? All I can find are SPI style ones.
@RobertBaruch
@RobertBaruch 6 жыл бұрын
Mike Theobald I built it. Check my other videos.
@ser7ser7i
@ser7ser7i 5 жыл бұрын
Thank you.
@tas_pas
@tas_pas 5 жыл бұрын
Hey Robert, nice tutorial! One question though, what do we do if we have, say, eight switched multiplexed. Do we have to implement the same circuit for each switch or can we do it only in the output of the mux? Thank you!
@RobertBaruch
@RobertBaruch 5 жыл бұрын
For this type of debouncing, you'd need to add a debouncer to each switch before the mux.
@tas_pas
@tas_pas 5 жыл бұрын
@@RobertBaruch Thank you! Please consider continuing the chip tips series as your way of exhausting the topics you're explaining is invaluable for us noobs.
@peterfireflylund
@peterfireflylund 6 жыл бұрын
Why do you write μF but msec instead of μs?
@peterfireflylund
@peterfireflylund 6 жыл бұрын
Oh, you actually meant milliseconds (ms). You said microseconds (μs) a couple of times.
@RobertBaruch
@RobertBaruch 6 жыл бұрын
You mean instead of ms? I don't know, I just don't like "s" as an abbreviation for seconds, unless I'm really in a hurry.
@amitdas1672
@amitdas1672 4 жыл бұрын
Sir can you please provide me its circuit diagram?
@ncarrasco2006
@ncarrasco2006 6 жыл бұрын
Hi and for learning logic circuits, which oscilloscope you think is better ' Siglent Technologies SDS1202X-E 200 mhz Digital Oscilloscope 2 Channels, Grey' or 'Rigol DS1054Z Digital Oscilloscopes - Bandwidth: 50 Mhz, Channels: 4 ' ?
@RobertBaruch
@RobertBaruch 6 жыл бұрын
Rigol, because I already have one. If you want a better answer, though, join the eevblog forum (www.eevblog.com/forum/) and look there, they've done reviews on all of these.
@ncarrasco2006
@ncarrasco2006 6 жыл бұрын
The frecuency is ok ? 50 Mhz ?
@RobertBaruch
@RobertBaruch 6 жыл бұрын
100 MHz is usually the minimum I look for.
@ncarrasco2006
@ncarrasco2006 6 жыл бұрын
hi, do you have some probes to recommend to but to test circuits with an oscilloscope ? Thanks
@telegraph_hill
@telegraph_hill 5 жыл бұрын
I have some of the same switches, but without the cool flipper mechanism. Did they come from a pdp 11 or similar? I’d love to get a few. Do you know what they are called? Aha! A paddle switch! Such as : www.surpluscenter.com/Electrical/Switches/Toggle-Switches/DPST-Paddle-Switch-15-Amp-11-3098.axd. Thanks!
@telegraph_hill
@telegraph_hill 5 жыл бұрын
Getting closer... www.ebay.com/itm/5Pcs-T80-R-3Pin-Momentary-MOM-OFF-MOM-3Position-SPDT-Mini-Paddle-Toggle-Switch/182340027352?hash=item2a745003d8:g:Y90AAOSwldZbDqxT
@RobertBaruch
@RobertBaruch 5 жыл бұрын
Also see this: www.thingiverse.com/thing:2363586
@AnimilesYT
@AnimilesYT 5 жыл бұрын
Sure. Measure it on my oscilloscope. Because everyone has one of those laying around.. I have one other solution though. 1, get a bunch of capacitors. 2, get a bunch of resistors. 3, try different timings and see which one works :D
Chip Tips #2: Wire stripping
19:12
Robert Baruch
Рет қаралды 4,3 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 26 МЛН
哈哈大家为了进去也是想尽办法!#火影忍者 #佐助 #家庭
00:33
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 65 МЛН
Chip Tips #4: Static RAM
17:21
Robert Baruch
Рет қаралды 21 М.
Arduino and Hardware Debouncing tutorial
17:05
eTech Tom
Рет қаралды 37 М.
Chip Tips #8: Transmission lines and reflections, tested.
22:21
Robert Baruch
Рет қаралды 13 М.
How to Learn Electronics: Start Here
18:10
Leo's Bag of Tricks
Рет қаралды 114 М.
How SMPS works | What Components We Need? Switched Mode Power Supply
16:38
World's easiest oscillator! Introducing the CD40106
17:54
Quincas Moreira Music
Рет қаралды 66 М.
Chip Tips #3: Generic Array Logic
11:41
Robert Baruch
Рет қаралды 13 М.
Every Component of a Switch Mode Power Supply Explained
23:10
ElectrArc240
Рет қаралды 413 М.
Телефон - самая грязная ваша вещь
0:24
Up Your Brains
Рет қаралды 1,8 МЛН
Google Pixel 8 Pro на 128 gb! Илии.... #shorts #shortvideo
0:20
UNIT | ЮНИТ | IPHONE 15
Рет қаралды 1,7 МЛН
Скучнее iPhone еще не было!
10:48
itpedia
Рет қаралды 616 М.