Help required with 76-Key MIDI Controller (Yamaha FS 5V Keybed + Launchkey Surface + Hall Gimbals) on Teensy 4.1

ViljooNakyny

New member
Hello everyone,

I am embarking on an ambitious first DIY MIDI project using a Teensy 4.1. I’m seeking guidance on the hardware architecture, specifically regarding voltage translation, power management, and I/O expansion.

The Hardware:

Keybed: 76-key FS-Keybed (from a Yamaha Motif 7) including Aftertouch. Note: This keybed operates on 5V logic.

Control Surface: Faceplate/components from a Novation Launchkey 49 (Potentiometers, Faders, and LED Pads etc...).

Joystick: AG01 CNC Hall Gimbals (centering mode).

I/O: MIDI In/Out/Thru (5-pin DIN), Sustain Pedal (1/4" Jack), and USB-C (Data/Power).

Planned Expansion: 76 RGBW LEDs (per-key) and a touchscreen.

Power Requirements:
I intend to power the unit via USB-C with a LiPo battery backup. I need a solution for seamless power switching and charging while plugged into a PC.

My Specific Questions:

5V to 3.3V Translation: Since the Yamaha Motif keybed uses 5V logic and the T4.1 is not 5V tolerant, what is the most efficient way to handle the matrix scanning? Should I use level shifters for the entire 76-key matrix, or is there a preferred "Teensy-friendly" way to interface with 5V Yamaha FS beds?

Matrix & Scanning: For the high volume of Launchkey analog controls (faders/pots), is it better to use 16-channel muxes or I/O expanders?

Power Path & Noise: How can I best handle LiPo charging and "Power Path" switching without introducing EMI/noise that might jitter the AG01 Hall sensors?

RGBW Current Isolation: With 76 RGBW LEDs (potentially >3A draw), how should I isolate the LED power rail to protect the Teensy logic, especially when switching to battery power?

Legacy MIDI: For the MIDI Thru, can the T4.1's Serial ports handle a "Soft Thru" with negligible latency, or should I implement a hardware logic gate for the Thru port?

Any help and suggestions are greatly appriciated. I did some research like you see but i am not entirely sure about anything :,D.
Like i said before this is my first ewer diy project and quite large scale at that :)! Thankyou in advance!!!
 
I don't know anything about Yamaha Motif keybeds. Can you give some technical info about this mysterious (at least to me) hardware?

I'm also not getting a clear idea of how you're wanting to connect this to Teensy. My main confusion is whether Teensy fully control the hardware, or if the original Yamaha "brains" will be still controlling it and Teensy is supposed to somehow "listen in" and observe things as they happen? Or maybe some other way I'm not even imagining?

Likewise for all the other hardware mentioned, on pretty much every question my answer would be something like "it depends"... depends on details I don't have and also composing an answer depnds on a clear mental picture of what you're trying to do.

I want to help. If you're still looking to start a conversation, maybe details and links to tech info and photos would really help to get this conversation started?
 
I did a similar project a while back with an organ. Converted an old thing to midi using an arduino mega.

Some considerations:
  1. My keybed was only capable of on/off thus it was easy enough to implement a series of multiplexers to scan all the inputs. Your keybed has analog aftertouch which will be a bit more complicated. Usually (not for polyphonic aftertouch) there will be a pressure sensitive resistor band across the whole keybed. As you press a key harder the resistance drops. Using a voltage divider you can measure the key pressure. This system can't tell apart multiple key pressures though.
  2. Key velocity works by having two switches, one for when the key is halfway pressed, and another for when it's fully pressed. When you press a key the first switch closes a fraction of a second before the second. So you need to time that duration. I'd say a typical key press takes 10ms, meaning you need to be polling the keys about every 1ms to get an accurate reading. Supposing you only polled it every 3ms, that would only give you 3 distinct velocity levels. Even at 1ms, you only get about 10.
  3. Interfacing with any existing chips that are inside the keyboard already(i.e. ones made by Yamaha) will be quite difficult considering you'd need to spend some time reverse engineering it.
    1. If you absolutely still want to try anyway, the 5V to 3.3V can be done with off-the-shelf components, though that will be the least of your concerns.
    2. Otherwise, if you rip out the old chips entirely you won't have to worry about the 5V to 3.3V issue
> 76 RGBW LEDs (potentially >3A draw) how should I isolate the LED power rail to protect the Teensy logic

That seems like a lot of current for 76 LEDs. For the isolation, it depends on what voltage you would run these LEDs at. You can use a voltage regulator to power different parts of your circuit if they run at different voltages.
 
Hello! Thank you greatly for your help and answers.

I used my old Akai MPK Mini (for the prototype), and it worked perfectly!
Now I just need to get the keybed with velocity and aftertouch working.

Here are the photos so you can see:
Photos

Basically, the keybed has SDA and SCL that I am trying to connect to the breadboard. I also have a Pololu logic level shifter in the middle to turn the 5V to 3.3V.

How I connect the velocity and aftertouch is still a bit of a mystery to me.
 
If the keybed has SDA and SCL signals then maybe the data is already embedded inside that signal. But to be honest those circuits you sent don't mean much to me.
 
If the keybed has SDA and SCL signals then maybe the data is already embedded inside that signal. But to be honest those circuits you sent don't mean much to me.
I will try things out and see if i can get it working 🙏 Still thankyou
 
And sorry for such a uninforming last reply from me for your question Paul!

My idea is to use only the keybed and its components for the controller. I will not use the old motif "brain". The point of the project is to build entirely new modern, lighter and more efficient midi controller around the old (amaizing) Yamaha keybed. I got the understanding that with teensy its possible to get rid of the orginal motherboard and use teensy instead. Was i right about that?

Thankyou for your time :)!
 
Looks like it's already meant to talk I2C protocol.

1773187875237.png
 
Do you have any documentation about the data it's supposed to send? That would make everything much easier!

The less easy way would involve reverse engineering. For that you would need a logic analyzer. The very well known but expensive one is Saleae Logic 8. Many companies make cheap clones of the older Saleae Logic 8 product. The most widely known is from Sigrok. Lots of very cheap products are available, like this one on Amazon for only $10. For capturing I2C, any of the cheap clones should work fine.

Basic concept is you would connect SDA and SCL to 2 of the 8 inputs on the analyzer, and of course connect GND. Then run the capture software on your PC and press some of the keys on your keyboard. Hopefully you'll see fairly simple or obvious relationship between the captured data and the keys you pressed.

Good news is lots of people here used the Saleae analyzers, so if you get stuck we can probably help, especially with photos or screenshots so we can see what you see. Then with the knowledge from watching the captured data, next step would be to disconnect the keys hardware from the rest the keyboard and try using the Wire library to talk to it as the keyboard did. Hopefully by that point you'll be up to speed with the Saleae capture software, so you can see if what you're doing from Teensy looks the same as the original keyboard.
 
Back
Top