So you’re building a new mechanical keyboard. Or attaching a few buttons to a Raspberry Pi. Or making the biggest MIDI grid controller the world has ever know. Great! The first and most important engineering question is; how do you read all those buttons? A few buttons on a ‘Pi can probably be directly connected, one for one, to GPIO pins. A mechanical keyboard is going to require a few more pins and probably some sort of matrix scanner. But the grid controller is less clear. Maybe external I/O expanders or a even bigger matrix? Does it still need diodes at each button? To help answer these questions the folks at [openmusiclabs] generated a frankly astounding map which shows, given the number of inputs to scan and pins available, which topology makes sense and roughly how much might it cost. And to top it off they link into very readable descriptions of how each might be accomplished. The data may have been gathered in 2011 but none of the fundamentals here have changed.
How do you read this chart? The X axis is the number of free pins on your controller and the Y is the number of I/Os to scan. So looking at the yellow band across the top, if you need to scan one input it always makes the most sense to directly use a single pin (pretty intuitive, right?). Scrolling down, if you need to read 110 inputs but the micro only has eight pins free there are a couple choices, keys E and F. Checking the legend at the top E is “Parallel out shift register muxed with uC” and F is “Parallel in shift register muxed with uC“. What do those mean? Checking the table in the original post or following the link takes us to a handy descriptive page. It looks like a “parallel out shift register” refers to using a shift register to drive one side of the scan matrix, and “parallel in shift register” refers to the opposite.
Continue reading “What’s the Cheapest Way to Scan Lots of Buttons?”
The new hotness for DIY electronics is mechanical keyboards, and over the past few years we’ve seen some amazing innovations. This one is something different. It adds an analog sensor to nearly any mechanical key switch, does it with a minimal number of parts, and doesn’t require any modification of the switch itself. It’s a reddit thread and imgur post, but the idea is just so good we can overlook the documentation on this one.
The key development behind this type of sensor is realizing that nearly every mechanical keyswitch (Cherry MX, Kalth, Gateron) has a spring in the bottom. A spring is just a coil of wire, and an inductor is just a coil of wire, too. By putting a spiral trace on the PCB of a mechanical keyboard underneath the keyswitch, you can sense the inductance of this spring. This does require a little bit of additional hardware, in this case an LDC1614 inductance to digital converter, but this is an I2C-readable part that can, theoretically, be integrated rather easily with any mechanical keyboard PCB and firmware.
The downside to using the LDC1614 is that sampling is somewhat time-limited, with four channels or individual keys being polled at 500 Hz. This isn’t a problem if the use-case is adding analog to your WASD keys, but it may become a problem for an entire keyboard. Additionally, the LDC1614 is a slightly expensive part, at about $2 USD in quantity 1000. A fully analog keyboard using this technique is going to be pricey.
Right now, the proof-of-concept for this analog mechanical keyswitch is just a 0.1 mm flexible PCB that is shoehorned inbetween a Cherry MX red and a (normal) mechanical keyboard PCB. The next step in the development will be a 2×4 keypad with analog sensors, and opening up the hardware and firmware examples up under a GPL license.
The Ergonomic Handheld Mouse / Keyboard Alternative from [Shervin Emami] is an all-in-one solution for your keyboarding and cursor moving needs.
The core of this build is a ‘grip-strengthening’ device that’s sold to guitarists. While the actual benefit of these devices for guitarists is questionable — there are a few anecdotes any music teacher will tell you about classical pianists ruining their hands with similar devices — the device itself can be converted into a fantastic chording keyboard. All you really need for a full-functioned keyboard is a few buttons in a rugged shell, and this ‘grip strengthener’ has that going in spades.
Underneath the plungers for each button [Shervin] installed a magnet and a magnetic sensor, meaning these buttons are analog, and shouldn’t wear out ever. With just a little bit of code on a Tiny BLE board these analog sensors can become a keyboard, a quadcopter controller, an interface for your VR setup, or anything else that can be controlled with a bunch of buttons.
Not to outdo himself, [Shervin] also managed to add some cursor control functionality to this build. This is done via the IMU onboard the Tiny BLE board, and by all accounts it works great. You can check out a video of this build pretending it’s both a keyboard and a mouse below.
Continue reading “This Keyboard And Mouse Also Gives You A Workout”
Of all the input devices, the keyboard is the greatest. This comes at a cost, though: there were times back in the Before Days, when video and music editing applications came with custom keyboards. There were Pro Tools keyboards, Final Cut keyboards, and innumerable Adobe keyboards. What’s the solution to this problem? More keyboards, obviously, and this time we’ll make them modular.
For his Hackaday Prize entry, [Cole B] is building modular, programmable USB keyboards. It’s got everything: a standard 3×3 keypad, a keyboard that’s just four potentiometers, a keyboard that’s a rotary encoder, and a keyboard that’s a set of faders.
The design of these keyboards is inherently modular, and that means there needs to be a way to connect all these modules together, preferably without a bunch of USB cables strewn about. Right now, the best idea [Cole] is working with is pogo pins and magnets. It’s a great idea although Apple Thinks Differently™ and probably wouldn’t be too keen on seeing the whole ‘magnets and pins’ idea stolen out from under them.
Nevertheless, it’s an excellent project that shows how far you can go with manufacturing on a limited budget. These are fantastic keyboard modules already, and the connector scheme already pushes this project into the upper echelon of keyboard hacks.
No one loves hacked keyboards more than Hackaday. We spend most of our workday pressing different combinations of the same 104 buttons. Investing time in that tool is time well spent. [Max] feels the same and wants some personality in his input device.
In the first of three videos, he steps us through the design and materials, starting with a layer to hold the keys. FR4 is the layer of fiberglass substrate used for most circuit boards. Protoboards with no copper are just bare FR4 with holes. Homemade CNC machines can glide through FR4, achieving clean lines, and the material comes in different mask colors so customizing an already custom piece is simple. We see a couple of useful online tools for making a homemade keyboard throughout the videos. The first is a keypad layout tool which allows you to start with popular configurations and tweak them to suit your weirdest desires. Missing finger? Forget one key column. Extra digit? Add a new key column. Huge hands? More spaces between the keys. [Max] copied the Iris keyboard design but named his Arke, after the fraternal sister to Iris which is fitting since his wrist rests are removable. Continue reading “A Custom Keyboard At Maximum Effort”
Ever wonder why keyboard number pads and telephone dials have reversed layouts? Theories abound, but the most plausible one is that, shrug, it just happened that way. And now we’re stuck with it.
Well, that answer’s not good enough for [Jesse], so he punched up his own keyboard design that combines the golden years of function-rich Sun and IBM keyboards with Ma Bell’s DTMF number arrangement. That’s right, Sundial has 24 function keys total, and the number pad matches Ma Bell’s all the way down to the asterisk/zero/octothorpe pattern on the bottom row. How do we know what the unlabeled ones are, you ask? It’s all mapped out in this layout editor. We love that it has all the key lock indicator lights, because that practice should’ve never faded out in the first place.
Though inspired by this beautiful unicorn of an Arduino keyboard we covered a few months ago, the Sundial uses a Teensy 2.0 to translate [Jesse]’s Cherry MX clone-driven wishes into software commands. It’s also painstakingly hand-wired, so here’s the build log for you to drool over. Just cover up your keyboard first.
If you’re anything like us, more than a few of your projects were borne out of the fact that you had some crusty bit of gear that was badly in need of a second lease on life. Whether it was a hand-me-down or pulled out of the garbage, we’ve all at one time or another had some piece of hardware in our hands that might not be worth anything in its current form, but would make an awesome excuse for warming up the soldering iron.
That’s what happened when [joekutz] got his hands on this exceptionally juvenile keyboard toy. In its original state, it was so janky it couldn’t even reliably detect two keys being pressed at the same time; sort of a problem for a keyboard. So he decided to pull it apart and use it as a circuit bending playground. Thanks in part to how much free space was inside of the case, he was able to pack in a number of interesting modifications which he’s kindly detailed on Hackaday.io.
[joekutz] started by adding a headphone jack to the device, as well as a switch to disable the keyboard’s speaker. That allows not only listening to digital jams in private, but makes it possible to capture high-quality audio when connected to the computer. He then started poking around the PCB with a resistor and listening for changes. When the pitch of the keyboard changed, he soldered a potentiometer into its place and now had a way to adjust it on the fly.
Of particular note is the clever physical reverb he came up with. A microphone and speaker are connected to each other with a spring made out of an old guitar string. Audio from the keyboard’s PCB is played on the speaker and a TDA2022 low-voltage amplifier boosts the signal from the microphone. The end result is a very cool ethereal metallic effect.
If you’re looking for a slightly larger DIY reverb, we’ve covered a few builds in the past which should give you some inspiration. You might want to check the dumpster behind the abandoned local Toys R’ Us for some donor keyboards while you’re at it.
Continue reading “Circuit Bent Keyboard is Pretty in Pink”