I have an idea for a new kind of keyboard, i think the best way to test it would be to make one and get it to work with my computer. If i can get each button on it to send a keypress signal like any other keyboard, i can work out the details with software like Kanata.
I have access to a 3D printer and i can make models in Blender, but i have no idea where to start with the electronics. Should i look into Arduino? Contact electronics manufacturers? How do i get from an idea on paper to a physical prototype?
I should mention, this thing is actually supposed to be a TV remote, because i think it’s bogus how little typing on a game console or smart TV has evolved since the '80s. I said keyboard because that’s basically what i’m trying to prototype, but normal mechanical keyboard hardware is rather bigger than what i’m trying to make. Little buttons my computer can treat as a keyboard would be a good step toward making a good design for a remote controller. Also, i am not a programmer. I know a little HTML and have dabbled with Inform6/7, but C and Python are magic wizard stuff to me.
If you just want to control a computer, there are extant products for that. I have a device for controlling my RasPi that is maybe 10x15cm. It has a mini-keyboard, a thumb stick, a d-pad, and a touch pad. I have another without the stick and d-pad that is ~5x20cm. Some gaming mice have multiple completely reprogramable buttons.
If you want to have fun building, though… One of those mice could be an interesting place to start. It’s layperson programmable. Has the ICs (kind of the hardest part) already made. You could rewire a few switches and design a shell.
edit: saw this
I have access to a 3D printer and i can make models in Blender,
You will probably want to learn some basics of a parametric CAD program as well. I recommend FreeCAD because I’m a big fan of open-source and guaranteed long-term free access. However, Fusion360 and OnShape are also solid choices. Knowing how to make printable 3D models already puts you in a good place.
but i have no idea where to start with the electronics.
You already know the hard part.
Should i look into Arduino?
Short answer: Yes.
Long answer: It depends. If you don’t know anything about programming (or are very comfortable with Python), I’d start with CircuitPython. This will allow you to concentrate more on how microcontrollers and firmwares for keyboards work, as opposed to learning the C/C++ Arduino syntax, which can seem a bit arcane at times.
If you’re already comfortable with C-like languages, it might be worth trying out Arduino first to see if it is intuitive for you.
Whichever you do with, I would also recommend getting a bit of comfort with the other to increase your personal embedded toolkit. Personally, I prefer CircuitPython for proofs-of-concept and ad-hoc use cases (like when I woke in the middle of the night and hallucinated the smell of fire - I was able to setup a particle detector board in about 5 mins to prove to myself that there was actually no smoke).
Contact electronics manufacturers?
Unless you are already running a business that deals with electronics manufacturers, I wouldn’t. At best, you’ll likely get recommended reading lists, at worst, they might try to pull one over on you and/or steal your idea.
How do i get from an idea on paper to a physical prototype?
That will depend on the complexity of the electronics required and whether you need custom parts or off-the-shelf will work (and your comfort with soldering).
If you do end up needing a custom PCB, KiCAD is pretty simple to learn and will likely handle your needs for board design.
So, where to start?
I’d first learn how keyboards work. QMK, an open-source keyboard firmware, is probably a good place to start learning that side of things: https://docs.qmk.fm/how_keyboards_work
If you’re familiar with Python, you might have an easier time learning and prototyping with KMK. Adding custom matrices is simpler than with QMK or ZMK.
For electronics hardware for prototyping I heavily suggest Adafruit. They have a ton of microcontrollers and learning resources. They have a while category dedicated to mechanical keyboards, including kits and some that allow learning without even soldering: https://www.adafruit.com/category/1020
Here’s some suggestions for getting started:
Zero soldering
- https://www.adafruit.com/product/4980
- https://www.adafruit.com/product/4900
- your choice of key switches and key caps.
Super simple soldering (two pins) with no wires
- https://www.adafruit.com/product/5020
- your choice of key switches and key caps.
I would definitely not go with an Arduino. You want to send keyboard data to a PC, so you have to emulate a USB keyboard device. The run-off-the-mill Arduino only has a USB chip capable of being a USB serial (UART) interface - it is a seperate, single-purpose chip connecting the USB to the controller.
What you need is a microcontroller board where the controller is also doing the USB stuff directly, so it is capable of being any device, at least those where a USB stack for the controller already exists.
Maybe have a look at a Raspberry Pi Pico (which is not a “normal” Raspberry Pi, but a separate and rather cheap board with a small controller). If you google for “rpi pico as keyboard”, you’ll see a number of projects where people have already done this, so you might even get a ready-made software or at least something close to it.
I would definitely not go with an Arduino.
Arduino MCU? Probably not. There’s better choices that are easier to use. Like the RP2040 (and RP2350) based boards.
Arduino firmware tools and language? Definitely recommended. There are lots of libraries and a great community that one can turn to for help. Most common 32-bit MCUs (RP2xxx, ESP32, STM32, nRF, etc) have Arduino support.
But the key issue is to have a USB Keyboard device, there the RPi Pico is definitely the way to go, and I have seen that one of the project seems to have been written in micropython, which should be easily adaptable.
I have to admit, though, that my experience with RP2XXX under Arduino IDE is limited insofar I have tried it and found it lacking. Since then I use the default IDE.
A good USB chip can go a long way on an MCU. The old Arduino boards did indeed have a lot of problems. Despite that, the Pro Micro is pretty popular for mech kbs. Personally, I’m not a fan. Not because of its USB (the ATmega32U4 chip has an integrated USB 2.0 peripheral) but because it uses an 8-bit AVR chip. To me, 8-bit is a bit dated for a beginner, when 32-bit MCUs are so cheap.
To your point, the Adafruit KB2040, an MCU using the same footprint as a Pro Micro but with an RP2040, only has a USB 1.1 PHY (much lower bandwidth). It is generally a better choice though because it both has a USB PHY and is 32-bit with a much higher clock frequency. The keyboard HID information doesn’t take much bandwidth and isn’t much different from when it was first released in 1995 as a standard. So, as long as the MCU supports acting as a USB HID device, you’re good to go.
An RPi Pico is a great and cheap board but, I’m less of a fan due to its lack of USB type C. That’s why I’d recommend just about any other third-party board based on the RP2040 (or RP2350). For anyone who is not unreasonably annoyed by the connector type, the Pico/Pico 2 is great. For wireless, probably something based on an ESP32S3 or Nordic nRF series (Nordic is more proprietary but much better on power efficiency - a Nice!NanoV2 is a great wireless keyboard MCU).
I’ve got a RPi Pico with the RP2040 right here, and it does not have a type C connector but a B Micro.
And USB1.1 is more than sufficient for a keyboard - even at the usual low speed setting for a keyboard (1.5mbit/s) you’ll be hard pressed to fill that up with your typing.
Joe Scotto: How to Build a Handwired Keyboard (Note: YouTube Link)
The board he uses is a Pro Micro. The one he linked in his description is a micro USB version. You can find Pro Micro that has a USB-C connector instead.
It’s definitely possible, there’s a tool called QMK that will flash a microcontroller to send keyboard inputs to USB. I’ve made a few of these myself, they are just sometimes a little fiddly to get working.
This has a build guide for a specific keyboard, but you could pretty easily learn that and customize it to your liking.
You could look into the mechanical keyboard world for what board to use or take apart a cheap keyboard.