With a diode matrix, is it possible to distinguish multiple simultaneous key presses? And if not, how do you handle modifier keys? Looking at your photo, it would seem that they're wired into the matrix in the same fashion as the rest of the keys.
My First Keyboard Build
51–60 of 82 posts
Re: My First Keyboard Build
#52With a diode matrix, is it possible to distinguish multiple simultaneous key presses? And if not, how do you handle modifier keys? Looking at your photo, it would seem that they're wired into the matrix in the same fashion as the rest of the keys.
Re: My First Keyboard Build
#53Current keyboard designs bug me, to put it mildly. Put a mux on each group of switches, have the microcontroller rapidly scan the muxes to determine which switches are down. And now all of a sudden you have a keyboard that you can actually press down as many keys as you need and it still works. Except it won't. Because USB keyboards don't support arbitrary numbers of keys being pressed at once.
Elaborating on this, in case anyone wants to know more details (I'd edit the original, but for some reason HN decides you can't edit comments after an annoyingly short time limit.) Say you have N free pins on your controller, and you want to read K keys. Find the smallest integer number of columns such that log2(k/c) + k/c Tie each row via diodes to 1 key in each column. Then tie each row to a pin on the controller.…
Re: My First Keyboard Build
#54Earlier quoted context omitted.
Elaborating on this, in case anyone wants to know more details (I'd edit the original, but for some reason HN decides you can't edit comments after an annoyingly short time limit.) Say you have N free pins on your controller, and you want to read K keys. Find the smallest integer number of columns such that log2(k/c) + k/c Tie each row via diodes to 1 key in each column. Then tie each row to a pin on the controller.…
You may be surprised to find that you can get microprocessors with over a hundred general purpose I/O pins if you're willing to solder them all down (the STM32Fx series in the QFP208 comes to mind) that would let you wire every key of a 104 or 107 key keyboard to a pin for monitoring. And you could read them all at close to a megahertz so you could get an effective state of all the keys at a given point in time. (the…
Does it support interrupts on the pins? Or just polling?
Also, can you give me a specific example of a specific part? Searching "STM32Fx QFP208 package" gets me... a link to your comment. Great to know that HN gets crawled, but still...
Re: My First Keyboard Build
#55Re: My First Keyboard Build
#56If you're interested in soldering together a keyboard, but not having to design everything from scratch, it's worth checking out the Ergodox: http://ergodox.org/ . I built one a month ago, and I'm enjoying it a lot. It's a two-piece keyboard with straight key columns, and six buttons for each thumb. You can order the parts on massdrop, when they start another order: https://www.massdrop.com/buy/ergodox?s=ergodox It's…
I would recommend extra care with the diodes as I lost a few opening the packaging and had to get extras to finish the build.
Re: My First Keyboard Build
#57Excellent build quality, but I was surprised by these two statements on things you need: A decent soldering iron. You will thank yourself later. Also note: you will burn yourself many times throughout the build. Might as well do it with a fancy iron! LEADED SOLDER – I started the build without leaded solder and oh dear… If you have a "decent soldering iron", then lead-free solder shouldn't be a problem. Also, if you…
Thanks for the tips! I found it very difficult to do the soldering due to an extremely unsteady hand and not a whole lot of experience. I 100% agree with everything you're saying though - I just ran with what I thought worked.
The trick to soldering when you have unsteady hands is to set things up so if you press harder the two things being soldered make better contact, instead of being pushed apart. That way you can rest the tip of the iron on the workpiece.
Soldering leads together in the air can be a right pain, because you can't press on hard without them moving apart. You can usually find tricks to avoid it though - like putting an old PCB and some packing material below the joint, so you have something to push against, and twisting the leads together so they can't move apart as easily.
Re: My First Keyboard Build
#58Earlier quoted context omitted.
You may be surprised to find that you can get microprocessors with over a hundred general purpose I/O pins if you're willing to solder them all down (the STM32Fx series in the QFP208 comes to mind) that would let you wire every key of a 104 or 107 key keyboard to a pin for monitoring. And you could read them all at close to a megahertz so you could get an effective state of all the keys at a given point in time. (the…
Welp. I keep forgetting how absurd microprocessors are now. Still... That's got to be a fun soldering job. And those are 1.8v / 3v chips, whereas if you're using USB you've got 5v input. Does it support interrupts on the pins? Or just polling? Also, can you give me a specific example of a specific part? Searching "STM32Fx QFP208 package" gets me... a link to your comment. Great to know that HN gets crawled, but still…
Re: My First Keyboard Build
#59Excellent build quality, but I was surprised by these two statements on things you need: A decent soldering iron. You will thank yourself later. Also note: you will burn yourself many times throughout the build. Might as well do it with a fancy iron! LEADED SOLDER – I started the build without leaded solder and oh dear… If you have a "decent soldering iron", then lead-free solder shouldn't be a problem. Also, if you…
When soldering in the air, it is harder for the flux to go where it needs to go. When soldering wires/leads to each other, it helps to apply flux beforehand, say with a flux pen.
Re: My First Keyboard Build
#60Earlier quoted context omitted.
Welp. I keep forgetting how absurd microprocessors are now. Still... That's got to be a fun soldering job. And those are 1.8v / 3v chips, whereas if you're using USB you've got 5v input. Does it support interrupts on the pins? Or just polling? Also, can you give me a specific example of a specific part? Searching "STM32Fx QFP208 package" gets me... a link to your comment. Great to know that HN gets crawled, but still…
http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32 has the list. http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1577/LN1806... is one chip you could use, though frankly using that much processor for a keyboard firmware is hilariously overkill. (Not that there's any reason not to for a hobby project, really...)