Close

Hacking the new keybed

A project log for NanoEgg Music Synthesizer

A powerful little music synthesizer with a classic look!

t-b-trzepaczT. B. Trzepacz 03/29/2017 at 23:310 Comments

I've got a terrible cold this week, so I thought I might catch up with some past updates.

I FINALLY found a source for minikey sized keybeds at the NAMM show, a company I had attempted to contact through AliBaba before, but never got a response from. It turns out AliBaba shakes them down for money for the contact info, which they didn't want to pay, so I couldn't get through. Next time, look up their company name and go direct!

So, I bought one of their keybeds as a sample while I was there, and disassembled it quickly when I got home.

Here it is, intact.

Note key pitch is again slightly wider and less long than my design.

It was quickly disassembled...

Their design uses a separate spring for each key, each key being a separate piece of plastic. The key works as a lever, and has a very thick block to keep it from flying up. Their injection molding setup must be able to handle an overhang, which was a no-no with other places I talked to.

The keybed I bought as a sample has as an internal connection a flat flex cable, as you do.

In order to access those pins, I needed a flat flex connector. I didn't want to unsolder the one from the sample. So I ordered them.

http://www.mouser.com/Search/ProductDetail.aspx?R=HLW18S-2C7LFvirtualkey64910000virtualkey649-HLW18S-2C7LF

But the connectors have a pin pitch that won't fit in my breadboard.

So I needed to make an adaptor. Since the pin pitch doesn't fit in standard protoboard, I had to find a way to mount it.
I determined that the connector pins would fit nicely on the edge of a circuit board.

I have a bunch of protoboards I got for free from PCBWAY with my last order, but they had contacts in the edges that didn't fit the connector pin pitch either. So, I took it out to the garage and dremeled off the extra copper layers.

I also cut it down in the band saw. I set it up so that it would straddle the groove in the center of the breadboard.

Soldering it was kind of a pain, because wires had to go between the connector pins. Trying not to bridge the connections was tricky.

So now I have it hooked up to the teensy and I can work to determine what the pins mean.

I used the Arduino keypad library and the incorrect information I got from the manufacturer to finally determine what all of the key buttons were. There are two buttons per key, and the timing difference between button hits determines how fast you pressed the key down. I still have to write a library to handle that timing.

BTW: I had made some necessary changes to the Arduino keypad library, and submitted them to the owner. My changes exist on the GitHub version, but never made it into the Arduino Playground version for some reason. You can find it here: https://github.com/Nullkraft/Keypad

The changes are to add the key state to the event listener for keypad events, so if you are doing real-time checking of keys, you can tell if the key was pressed or released without having to search through the internal data structures for the key. I still left the original event listener so that older code would not be messed up, but it would have been nice to just remove that stuff completely and make the internals "private".

Anyway, having finally decoded the keyboard, I have created this lovely schematic. It is missing the diodes, tho.

I broke it down by octave and noted each key name. I might have some of the "b" versions of the key reversed... I don't really have a good way to know which is which at this point (no logic analyzer...) but I am sure that will become apparent when I finally write the library.


Discussions