Accordion like keyboard

Hello,

I’d like to build a simple keyboard with a physical layout like this:

Here some details:

  • 5 or 6 rows (4 are not enough)
  • staggered
  • keys need to be all exactly the same size

So yes, it should be similar to a keyboard button accordion.

The purpose of this keyboard is to create a musical keyboard input device. It should make easy for an accordionist to enter music (using an ad hoc software).

I don’t want to make anything professional, especially for the first version. Just something that work :slight_smile:

Now the very first question. I have searched online but it seems that there are no staggered pcbs as shown above. Or am I wrong? Can you give me some advice where I can find one?
Thanks,
Spiff

8 Likes

That’s pretty uncommon stuff. Looks like a 5 row, uniform stagger, 1u (key size) PCB. I think that might be something you have to design for yourself. Cool concept though!

2 Likes

Hello!

Indeed, this looks like a pretty bespoke arrangement. Still, relatively simple as PCB designs go. If you aren’t comfortable taking on the design yourself, there are people online who do it by commission (or maybe even community members willing to help), and various websites who can produce small numbers from a file.

This also seems like a decent place to use those circular “vintage typewriter” keys; not too alien compared to those of an accordion.

3 Likes

Yeah that’s a very uncommon layout, can’t think of any KBs that even had a layout like that TBH. As other’s have said you could have a small run of PCBs made. Alternatively you could hand wire a project like this too & skip the PCB. IMO making a plate file from Ai03’s plate generator, swilllkb, keebio, etc. Having that cut from somewhere, then handwiring to a Elite-C, pro micro, Teensy, etc. would be the easiest route.

3 Likes

+1 for handwiring. Make your layout on Keyboard Layout Editor and paste the Raw Data into Ai03 or Swillkb plate generator (Swillkb can also generate files to make a stacked style case in addition to the plate). The only issue I see would be finding a microcontroller/dev board that has enough IO pins to handle 5 rows and 20 columns without having to multiplex or otherwise complicate the matrix further. The Teensy 2.0 might work if you don’t need any extra pins for LEDs or other accessories, alternatively there is the QMK Proton C or Teensy++ 2.0 that have plenty of IO pins to work with.

From the QMK Handwire docs:
Screen Shot 2022-01-13 at 9.52.51 PM
All of the aforementioned dev boards are compatible with QMK, which has some MIDI capabilities.

Another option for a dev board is the Raspberry Pi Pico, plenty of IO but without QMK support (for now, that could change in the future though). Arduino has support for the Pico and there are MIDI libraries for Arduino but I don’t know what the viability of that approach is as I don’t have any experience with it.

Chromatic Button Synth looks similar to what you’re trying to do? (Link to the Makers personal site)

2 Likes

Thank you all for your comments and help!!
Let’s start this adventure :slight_smile:

I played a bit with the keyboard Layout Editor and I think I have been able to generate a simple keyboard similar to what I need.
Then I pasted my keyboard generated raw data into Swillkb and got a nice plate.
Here it is what I have been able to do:

Now I imagine I should find a service where I can print print this plate. Is that right?
What’s are the next step? I would be happy to read any tutorial you suggest.

Regarding the keyboard case, how does it work for a not standard/common layout like mine?

The only issue I see would be finding a microcontroller/dev board that has enough IO pins to handle 5 rows and 20 columns without having to multiplex or otherwise complicate the matrix further.

I think, at least for a first version, 82 buttons would be enough. I don’t need LEDS (as usual, not in this phase). To be able to generate midi output would be nice of course, but I’m afraid that as a first project it would get too complicated. What do you think?

On the other hand, it is necessary that the keyboard is able to correctly handle multiple buttons keypress (ideally up to 5 buttons whatever they are).

@huhsh you’re correct. The project Chromatic Button Synth is similar to what I would like to do. His project is a “standalone accordion musical keyboard” (it doesn’t need a pc to work). I would like to make something simpler and cheaper (using my pc to handle sound etc).

P.S. I know how to solder even if I’m not an expert and I have some programming experience.

Looking to be a good start :wink:

Swillkb is known to generate plates with approximative precision, less and less people are using it nowadays.
You can generate a better plates with AI03 plate generator: https://kbplate.ai03.com/

As to how to manufacture the plate, you can use one of the laser cutting services available, there is a thread here that gives different links: List of laser cutting services

With the number of switches that you have, I’d recomment the venerable Teensy++ 2.0.
This is also an Atmega MCU, writing your first QMK firmware on it will be easier than on ARM MCUs.

QMK have support for MIDI so adding this feature should not be very complicated, but I never tested this feature.

Can’ t wait to see your progress :slight_smile:

1 Like

That plate design looks good, I would opt for the plain square switch cutouts, the notches in the corners of the switch cutouts are only necessary if you plan to open the switches while they’re in the plate, and they add to the cut path length which in turn costs more to cut.

The ‘case’ in this instance would either be a stacked case, or the minimum of a plate and a bottom piece of the same size held together with stand-offs. Stacked or stand-off, you’ll need a ‘edge padding’ around the outside of the switch area of the plate for bolts to hold the layers together.

82 switches in a 5x17 matrix would work with a Teensy 2.0.

If you set it up with QMK, you can have multiple keymaps/layers with different functions. For example a layer that sends USB-MIDI keycodes for working with DAWs/software synths that support MIDI control. Or a layer that has normal keyboard layout or macros for working with software that is meant to work with a standard computer keyboard.

Using a diode on each switch in your matrix will allow for multiple keypresses to be recognized without ghosting.

I keep forgetting, Golem has a variety of articles on designing a keyboard from scratch and much of that info would probably be useful for your project.

@Rico my first attempt was using AI03 plate generator. But apparently it generated an empty file. I will try again and with more determination :slight_smile:

[Laser cutting] I live in Geneva (Switzerland). I have not yet addressed the issue of where to have the plate cut. If possible I would prefer a service near here.

[firmware] It’s not yet clear to me why I need to write a firmware. I thought any keyboard should do pretty the same things… But evidently I’m wrong!!! I will check some tutorial and came back here for the details.
Ciao

Ok, it is clear that it adds cost. Why would anyone want to open a switch before or after in the plate?

The ‘case’ in this instance would either be a stacked case, or the minimum of a plate and a bottom piece of the same size held together with stand-offs. Stacked or stand-off, you’ll need a ‘edge padding’ around the outside of the switch area of the plate for bolts to hold the layers together.

So if I understand correctly that’s going to be something to do more or less manually. I mean: given a plate there’s no software that automatically generates the case. Right?

82 switches in a 5x17 matrix would work with a Teensy 2.0.

Ok. Some questions:
1 Suppose I enjoy my work and after the first version I want to make a new keyboard with more keys. I understand that in that case it would be “easier” to use another microcontroller (to avoid multiplexing etc). Right?
2 Is learning to use a microcontroller easy? Does changing microcontrollers require learning everything all over again?
3 If changing is difficult, wouldn’t it be better to use a microcontroller from the beginning that allows you to scale up better (even if it costs more)?

If you set it up with QMK, you can have multiple keymaps/layers with different functions. […]

I had a look online and read something about multiple layers. It looks ok.

Using a diode on each switch in your matrix will allow for multiple keypresses to be recognized without ghosting.

Ok, perfect.

I keep forgetting, [Golem] has a variety of articles […]

I’m checking them. Thanks a lot for your kind help @huhsh
Ciao, g.

The switch is probably the one thing that many people might want to customize in your device. There are numerous types of switches (linear, tactile, and clicky) along with a wide range of pressures needed to actuate different models of switch (typically anywhere from 35g to 100g of force).

Aside from the types of switches and the force needed to actuate them, many people find that it is useful to mod the switches. Many people typically tend to want to make the switches smoother, and lower the pitch they make when pressed by adding lubricant to the stems, housing and springs. Some people will want to change the springs in some cases. Some people might make other modifications to the switches.

Think of this as being similar to guitar players: they will change the strings on their guitars for different gauges and windings depending on how the strings feel on their fingers. But then they will go a step further in modifying their guitar “setup” to adjust the distance between the strings and fret board, adjust the intonation, etc.

Being able to chose the type and force of switch would go a long way to making a device that is more comfortable for each user. Being able to change and / or mod the switches would take this from a personal device into the completely custom range of devices.

Sure, it makes sense. Thank you for the explication.
Ciao, g.

For laser cutting metal only I can recommend LaserBoost: they are located in Spain, not Switzerland, but at least they are in Europe.
For other materials like wood or acrylic the French Sculpteo also offer laser cutting services.

Yes, writing firmware is a bit daunting at first as you have many things to learn.
But QMK makes this task as easy as it can be possible, even non programmers are able to make their own firmware with it (with a bit of effort of course).

Thank you for the suggestion! I think I’ll need a little more time before I need a metal plate or similar but I’ll keep your link handy.

Yes, writing firmware is a bit daunting at first as you have many things to learn.
But QMK makes this task as easy as it can be possible, even non programmers are able to make their own firmware with it (with a bit of effort of course).

I think my needs are very basic at least at beginning. So I hope I don’t have to work too hard :slight_smile:

1 Like

On Aliexpress I found some switches with this title

10Pcs 3 Pin KeyCaps Brown Mechanical Keyboard Switch for cherry MX Keyboard 667A

They cost about 0.8$ (for 10 switches). For testing purposes, would these switches be okay?

I suggest to look for ktt switches there, similarly priced whilst being very nice switches.( Aliexpress is banned here so would unfortunately not be able to help with links. )

1 Like

Thank you for the suggestion!
g.