Hello Chief Delphi teams, I would like to raise a discussion that may help my teams and programmers (including me). This season we have seen a large number of custom keyboards for our drivers. I have seen several ways to do this, such as using Arduinos, digital keyboards, etc. However, creating a custom Arcane can be more difficult than I think. It would be great if any of you could explain how you created your custom keyboards and if you could give some to me and teams that are also looking to improve their driving level.
I would like to thank everyone who has seen this post.
im gonna reply to this so i get notified when somebody answers, i also want to know
If you search for “custom button board” or similar in CD, you’ll find lots of team build blog posts talking about this, with varying levels of detail. This was a good thread from a couple years ago on this topic: Button Box/Button Board Recommendations?
Electrically, you don’t want a keyboard device, but instead something that appears like a joystick/gamepad to the DS.
I designed my own custom keyboard a few years ago (for personal use, not FRC). I would recommend reading the docs for QMK (Quantum Mechanical Keyboard Firmware) to find a suitable microcontroller, learn how to wire it, and learn how to configure the firmware.
If you only need a handful of buttons, you can wire one button per IO pin on the microcontroller. If you need anything more than that, you can either buy a microcontroller board with more IO pins, an IO expander, or (preferably) use diodes to create a button matrix. It’s really not that difficult, and there’s countless examples of handwired keyboards online which can be used for reference, many of which have guides/build logs as well. If you really love it, you can even get a custom PCB manufactured for much less than you might expect - if you pursue that route, I would recommend consulting members of the Keyboard Atelier, a discord server managed by distinguished keyboard designer Ai03. The community is incredibly kind and welcoming, and they’re happy to provide advice, design reviews, and more.
quick tip:
you can just set this dropdown to watching if you want to be notified
The Xbox Adaptive Controller breaks out every button on an Xbox controller into an aux jack that you can plug buttons into. Xbox Adaptive Controller | Xbox
It’s more sustainable than writing custom software or firmware that you have to pass down year after year.
I posted elsewhere on CD what we did (including the python code to make it work)
Basically, we took an off-the-shelf macro keyboard, programmed it to send uncommon keystrokes, wrote a python program that ran on the same laptop as the driver station listening for those keystrokes and pumping them out over network tables so the RoboRio could react to them (as could our Elastic Dashboard).
We’re using a Raspberry Pi Pico running CircuitPython plugged into the DS over USB. It uses the JoystickXL library to emulate a joystick device, which can be easily read in WPIlib using the GenericHID class.
This year, we’re using snap-apart NeoKeys from Adafruit as buttons so we can do indicator lights easily, but historically we’ve also just used regular buttons/switches wired to the GPIO pins.
While the other solutions are superior, we made custom joysticks in our electronics classes in high school back in the 90s. It’s not that hard. Here is how I would do it if I didn’t have access to CD, which gives better solutions:
https://www.pjrc.com/teensy/td_joystick.html
It’s just a little translation between the voltages coming in from the controller to button numbers. I think a lot of people expect translating to be really hard, but it’s really like 20 lines of code. I would expect most programming students who can handle writing robot code to have no trouble writing some basic Arduino code (especially with the examples provided).
We bought an Ultimarc IPAC-2 USB arcade interface board as the basis for our control board. It allows you to wire up 32 separate buttons or switches and map them to gamepad buttons/axes using their configuration software.
From there we created a layout we liked using mechanical keyboard keyswitches purchased on Amazon, 3D printed an enclosure with sockets to hold the keys, and then performed the tedious task of soldering wires to each key that are installed in the IPAC terminals (a common ground is run between all switches). This has worked out great for us and been very reliable. I actually highly recommend keyboard switches instead of cheapo arcade buttons since the quality, durability, and feel when used are far superior even for inexpensive switches.
A question mainly related to IPAC, how does it appear in the driver station, do you just need to connect it with USB or do you need to make some changes to your software?
The Ipac2 appears as two separate USB gamepads in order to get all 32 buttons, but is otherwise normal in the driver station. You map to it as you would any other gamepad.
the soldering!
we used buttons with real solder terminals, but the buttons aren’t great. did you do anything special to make the soldering to those tiny pins work well?
A dab of flux and a good iron makes it easy. The pins aren’t tinned so flux helps a lot.
External flux is an all too well kept secret.
I like the pen style for things like this, reserving the tube style for circuit boards or other surfaces where it won’t immediately run off.
NB: There’s a short-ish expiration date printed on the pen, which industry might adhere to, but I’ve got one that’s 5+ years expired and still works great. I make sure to store it capped and nib/cap down.