Debouncing For Fun And… Mostly, Just For Fun

In our minds and our computer screens, we live in an ideal world. Wires don’t have any resistance, capacitors don’t leak, and switches instantly make connections and break them. The truth is, though, in the real world, none of those things are true. If you have a switch connected to a lightbulb, the little glitches when you switch are going to be hard to notice. Hook that same switch up to a processor that is sampling it constantly, and you will have problems. This is the classic bane of designing microcontroller circuits and is called switch bounce. [Dr. Volt] covers seven different ways of dealing with it in a video that you can see below.

While you tend to think of the problem when you are dealing with pushbuttons or other kinds of switches for humans, the truth is the same thing occurs anywhere you have a switch contact, like in a sensor, a mechanical rotary encoder, or even relay contacts. You can deal with the problem in hardware, software, or both.

Continue reading “Debouncing For Fun And… Mostly, Just For Fun”

A Vintage Morse Key Turned Into USB Keyboard

Time was when only the cool kids had new-fangled 102-key keyboards with a number pad, arrow keys, and function keys. They were such an improvement over the lame old 86-key layout that nobody would dream of going back. But going all the way back to a one-key keyboard is pretty cool, in the case of this Morse keyer to USB keyboard adapter.

To revive her dad’s old straight key, a sturdy mid-20th century beast from either a military or commercial setup, [Nomblr] started with a proper teardown and cleaning of the brass and Bakelite pounder. A Teensy was chosen for the job of converting Morse to keyboard strokes; careful consideration to the timing of dits and dahs and allowances for contact debouncing were critical to getting the job done. A new wooden base not only provides stability for the key but hides the Teensy and makes for a new presentation. The video below shows it in action; our only complaint is the lack of sidetone to hear the Morse as you pound out that next great novel one click at a time.

Lovingly restored telegraph gear is a bit of a thing around here; we featured this vintage telegraph sounder revived with a Morse code sender not too long ago.

https://www.youtube.com/watch?v=qh_apYcr4xI

[via r/DIY]

Thanks to [Liz] for the tip