Close

I Switched to KiCad

A project log for Switchable Macro Keyboard

Multiple macro keyboards in one with a rotary encoder to switch between them

kevin-arneKevin Arne 03/30/2021 at 04:300 Comments

KiCad

Since I hear Eagle is going to get consumed by Fusion 360, I decided I should give KiCad a try for PCB design. I love Fusion 360, but if I'm going to have to learn a new workflow, might as well use an open source one that's pretty widely praised.

KiCad uses a different paradigm for how parts are defined. In Eagle, you design footprints and schematic symbols, then link them in a "device." The device is then what you use in your schematic and board layout. In KiCad, schematic symbols and footprints are much less connected. You can choose basically any symbol, then you tie a footprint of your choice to it when you go to make your board. The only way the two are connected is through the numbering of the pins. I think this has the potential for some frustrating errors, but it does feel like it made it much easier to simply design a footprint and associate it with a symbol you got from the generic libraries.

I also prefer the way mouse clicks work in KiCad. It just feels much more intuitive.

I did the port from Eagle to KiCad in a Twitch livestream if you're interested in seeing how I redesigned the board. Bear in mind that I'm still an amateur, so while the ways I do things might work, they aren't necessarily the best way (or even good for that matter).

New Boards

In this version of the board, I changed the placement of the rotary encoder to position it near my thumb (I'm using the keyboard with my left hand). I also switched from one of those big LCD panels to a smaller OLED panel.

I got rid of the RC filter with the rotary encoder inputs to force myself to program their operation more effectively.

The gerber, schematic, and pcb files in the GitHub repo have been updated to reflect all of these changes.

I'm thinking about offering kits of these boards on Tindie, so if that's something you might be interested in, please reach out. You're also welcome to use the gerbers to order the boards yourself if you're comfortable with that.

Ideas I'm Playing With

Displaying Button Functions

One of the nice features of other macro-keyboards and streamdecks is a screen that allows you to see what the buttons are so you don't have to memorize several keyboard layouts. I've seen this done a bunch of ways, the cleanest of which is using a touch screen, like you'd see in many 3D printer control screens. 

Something about that doesn't feel as tactile as I'd like, so I'd like to come up with a way to use my thin OLED screen to serve a similar purpose. I was thinking that the OLED screen could scroll through the different keys while you're in a single keyboard. The left side would have an info graphic with the location of the key ad the title of the key would be on the right. Something like this:

Rotary Encoder as Input

I think I'd like to use the rotary encoder (knob) as more than just a means to rotate between keyboards. For example, it could be used as a means of fine tuning mouse position, or scrolling up and down a page.

I'd instead access the other keyboards by long-pressing the encoder switch which would enable the encoder to scroll between the keyboards. Perhaps a single press to select the keyboard or a timeout. This is going to require some re-architecting of my code. Which leads me to the next thing...

Multiple Versions of the Code for Educational Purposes

I'm hoping to improve my coding abilities, but if I make the code really complicated it will remove some of the value of this project as a tool for introducing kids who want to stream to electronics. To this end, I'm considering adding different tiers of code ranging from really easy to understand and read, but basic capabilities, to something far more complicated and powerful.

GCODE-like Strings for Complicated Sequences

This macro keyboard should be able to output complicated sequences of button presses and mouse movements, so I'll need a sort of language that encompasses all of that, as well as timing. My current thought is that I'll store these in Strings that will be parsed much like G-code is interpreted (at least based on my limited understanding of G-code).

Eventually, this will be coupled with some sort of GUI and Serial communication with the Pro Micro to update the Strings without having to re-flash the code. Hopefully this will make it friendlier to those who don't want to code at all and instead just want a nice multi-function macro keyboard.

Discussions