Keyboard MIDIfication (was Mystery connector)

So…
I’ve decided to convert this old keyboard to have MIDI in/out. I plan to do this using an Arduino Mega, 49 analogue switches (!), a large dollop of multiplexers, and a custom PCB. On this board there will connectors that interface between the main board of the keyboard and the matrix connections on the back of the keybed.

I won’t go into details now about how I plan for the majority of the project to work because a) everything is subject to change and b) I don’t know if my programming is quite up to scratch.
(I may be seeking help from the Arduino wizards on here for some of it - programming is my biggest weak point, especially trying to optimise C++.)

As with all projects, there’s always a stumbling block at the start. Hence I have a question - does anyone know what the model of these connectors is?
I took some measurements of the socket, let me know if more would help.
image



Cheers

3 Likes

Looks similar to a JST type.

2 Likes

Yeah, I thought that, but it doesn’t have that kind of latch on the front. It has 2 clips, but they don’t extend all the way down the casing of the socket. I suppose I could try and modify one to fit though.

I tried fitting a female pin header (the kind on RPi HATs and Arduinos etc), but it turns out the pins are too wide (in the Y direction in my drawing) to fit.
Thanks for the suggestion.

The JST-ZH series does not have the latch on the front, looks like it might fit

1 Like

Look at the pitch:

2 Likes

Progress is afoot. I reached out to all 99 corners of the internet and nobody could find the connector.
I reached into the depths of my ‘box of crap’ and found some old ribbon cables that had an unknown model of JST connector adorning the end. Off came the plastic casing and lo and behold - the crimp connectors fit! Turns out they seem to use the same crimp connectors on the mystery connector as they do on my JST cables.

The only problem was that it was nearly impossible to insert all 10 wires into the socket at once; I clearly needed some better solution. I didn’t want to have to wait weeks for parts to arrive from China so I put my CAD skills to work.
I decided to try a trick I learned from a Prusa video where you pause a 3D print to insert magnets or some such device to be embedded in the print. Instead of magnets, I used the JST wires. I modelled up a small jig that holds the wires at a 2.54mm spacing so they could be plugged into the socket.

At first, I used the ‘pause at layer’ function in PrusaSlicer to try and stop the print midway through to allow me to put the wires in. However, instead of stopping, my trusty Ender 3 decided to have at the gcode and plough right past the M601 command that the slicer puts in. Little did I know that M601 only works on Prusa machines, and the correct command for most Marlin printers is M0, which needs to be inserted using the ‘custom gcode at layer’ dialog.

Round 2 and… I didn’t realise that if you’re using Octoprint, you have to use the web interface to unpause the printer after sending M0. I had assumed that you use the button on the LCD screen to unpause. I had to cancel that print anyway because I had measured a different wire and designed the holes too small :man_facepalming: .

I got the third time lucky! The print went off without a hitch.
Here it is still on the print bed:


And after some cleanup:

It fits nicely on to the keyboard matrix socket:

Today I also figured out that I can use thin pin headers to couple the female connector to my custom Arduino board. I was going to bin these last week (I ordered them by mistake from Tayda
and they don’t fit into standard pin headers) but am now very glad I didn’t!
On the left is the standard size pin header and on the right is the thin one. The difference doesn’t show up so well in the photo but in person it’s clearly visible.

My next steps will be to reverse engineer the matrix (the service manual should make this stupidly easy), plug these into an Arduino and rig up a MIDI output circuit to test that everything’s working fine.

6 Likes

Curious, what’s the Tayda SKU for that? I don’t foresee wanting to order it, but I would like to avoid ordering it by mistake. But I don’t see it on the Tayda site…

1 Like

A-4662.
They’re described as ‘round pin’ but have the standard pin image.

3 Likes

That’s a clever solution!

1 Like

I’ve made less progress than I would have liked over the past 6 months but I managed to order all the parts I need to finish this from Tayda. Here’s a sneak peek of my next steps.

Every chip has 4 analogue switches and there’s 13 of them for a total of 52 switches. I think most of you can probably guess where this is going. More updates to follow shortly.

3 Likes

I accidentally “composed” some, er, jarring 20th century music.

Always pull your CMOS inputs up or down, folks.

2 Likes