Integrating a Yamaha keyboard into a homemade synth

Thread Starter

CallMeJunior

Joined Sep 29, 2019
6
Hi guys,

I have almost no prior experience with CPU's so I would like help with my project :) .
I dissected the and intend to use it for my synth by translating the logic to a range of voltages and then control the synth by voltage per octave. Can someone explain to me what exactly is going on at the keyboard section? I have an idea but I can't really trust myself on this one. And how would I translate the keys to a range of voltages? Should I still use decoders?
https://www.manualslib.com/manual/1528785/Yamaha-Psr-E413.html?page=58#manual
Any help from more experienced people would be grand, be it a plan or some tips.

Cheers!
 

Thread Starter

CallMeJunior

Joined Sep 29, 2019
6
Edit: If I'm not mistaken notes are grouped (in 6) on to the same pin that leads to the decoder. This confuses me as to how polyphony works on this keyboard.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Edit: If I'm not mistaken notes are grouped (in 6) on to the same pin that leads to the decoder. This confuses me as to how polyphony works on this keyboard.
It looks to me like they've got a multiplexing arrangement there. The microcontroller isn't reading all 61 keys at once. Instead it cycles (very rapidly) through a sequence where it reads groups of six or so at a time. In any given instant, it's reading the individual positions of 6 different keys. Then a moment later it reads the next group of 6 keys, and so on.

This is a pretty common method of reducing the number of I/O pins required on the microcontroller to read or control a given number of inputs and outputs. A common example these days is an LED driver chip that controls 64 LEDs. You might expect the chip to have 64 discrete outputs, each running to one side of its corresponding LED, with the other side of each LED tied to either power or ground. In fact, the chip only requires 16 outputs. There are 8 high side switches delivering power to groups of 8 LEDs per pin. Then there are 8 low side switches controlling the negative/return path for groups of 8 LEDs each. In any given moment only one high side switch is on, providing positive voltage to 8 LEDs at once, and the 8 low side switches determine which of those 8 actually get a complete circuit and light up. You cycle through the high side switches rapidly, each time updating which low side switches are on for that bank of 8 (or vice versa with the high and low side groups.)

Back to your keyboard, I'm having a hard time seeing all the details, but it looks like there are two switches per key (presumably to read velocity,) so it would require 61*2 = 122 inputs to monitor these keys without multiplexing. Instead it looks like they're using 12 low side switches and 11 high side switches, which would be only 23 pins. In fact, they've gone even further by using the decoder chips so that they can use only 4 pins on the microcontroller to drive the 11 high side controls, reducing the pin count to 16!

As for how you should tap into this, that depends entirely on your skill set and whether you're trying to use:
  • strictly analog
  • use digital ICs, but no microcontrollers
  • microcontrollers ok
If it were me, I would probably leave all their circuitry as it is and just write a simple Arduino program to read the MIDI data from the keyboard and convert that to voltage, but that's just my personal preference and comfort level, not necessarily better or worse in any way.
 

Thread Starter

CallMeJunior

Joined Sep 29, 2019
6
It looks to me like they've got a multiplexing arrangement there. The microcontroller isn't reading all 61 keys at once. Instead it cycles (very rapidly) through a sequence where it reads groups of six or so at a time. In any given instant, it's reading the individual positions of 6 different keys. Then a moment later it reads the next group of 6 keys, and so on......
Thank you so much for this reply! I go around a lot of forums because I have a bunch of hobby's but this is one of the best replies I've had. Now onto the subject (; :

You mention 11 high side switches yet there are 12 physical connections in total at the ribbon connector. I guess B07H and L count as the same high side switch but I don't really understand what is going on there (they both are highlighted on the ribbon cable).

I have an Arduino Uno lying around but I don't think the pin count will be enough. So I'm gonna buy a bigger one that also could do some DSP stuff.

Cheers
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thank you so much for this reply! I go around a lot of forums because I have a bunch of hobby's but this is one of the best replies I've had. Now onto the subject (; :

You mention 11 high side switches yet there are 12 physical connections in total at the ribbon connector. I guess B07H and L count as the same high side switch but I don't really understand what is going on there (they both are highlighted on the ribbon cable).

I have an Arduino Uno lying around but I don't think the pin count will be enough. So I'm gonna buy a bigger one that also could do some DSP stuff.

Cheers
Thanks for the kind words! This forum is an incredibly helpful place. I get tons of help here, and I try to give back the few times I feel qualified to pitch in.

The portion of the schematic I was viewing in the manual was a bit fuzzy (at least on my phone,) so I may have mis-counted. Alternately, maybe I reversed my description of which things were high side vs. low side.

Either way, don't take the exact numbers or details in my description too literally - I was really just trying to describe the concepts in rough terms. I'm not even totally sure I'm interpreting the concepts in that design properly, but I think I am.

I might try to take a closer look later from my computer. If I find any more useful details that I missed, I'll let you know.
 
Top