I built a keytar from an old PC keyboard. It worked okay, but it was customized for the specific keyboard model I used, so I want to build a second version.
At the core, I use a Raspberry Pi Pico W (I used a Pico in the previous version) - performance-wise it is far better than what I need and it comes with built-in bluetooth and the Programmable IO (PIO) modules. which will come in handy.
The main thing I want to improve is the integration of the keyboard. Instead of partly replacing the keyboard with 3D prints like the first version, I want to create mounting brackets that integrate it in a reversible way. I also want to use a proper USB A port to attach the keyboard (and add PS/2 support down the line) instead of soldering a micro USB B plug to the keyboard wire.
Feature-wise I want to add support for BLE MIDI and battery management, enabling wireless play. Also, I want to use the Picos PIO for the USB host port, keeping the hardware USB free for USB MIDI and debugging.
It has been more than a year since I started this project and I have made quite some progress and reached most of my goals for this project.
I 3D printed a case consisting of two main parts surrounding the keyboard, so it can be integrated without being modified itself, so there is always a way back to using it as a normal keyboard. As the keyboard I used a Steelseries 6Gv2 I bought used. It supports 6 key rollover, allowing to play more notes simultaneously (being limited to 2 notes in the worst case with the previous version was quite annoying). Unfortunately I got it without its PS/2 adapter, which supports N key rollover, maybe I will reverse-engineer the proprietary USB protocol some day later to unlock its full potential, right now 6 keys is enough for me as I mostly intend to play it one-handed.
I implemented BLE MIDI in both server and client modes, so I can connect it to my Laptop or other BLE MIDI devices and it works flawlessly. A shoutout to pico-w-ble-midi-lib here, which made BLE MIDI integration much easier.
Contrary to my initial plan, I continued to use the hardware USB for communication to the keyboard instead of using USB implemented using PIO. This was unfortunately necessary as the program memory for the PIO state machines is quite limited on the RP2040 and some of it is needed to use the bluetooth module (which was unfortunately not very well documented). As now the Raspberry Pi Pico 2 W with the RP2350 is available, I can probably use PIO USB if I use that microcontroller board, as the RP2350 has has more PIO program memory. I will however continue to use the hardware USB for the keyboard, as this core functionality is more important than USB MIDI and serial (considering BLE MIDI and serial MIDI are available). In the next PCB iteration I will include that change as well (in my keytar I added a pair of botch wires to rewire the USB port).
On the PCB I added a simple LiPo battery charging and protection circuit as well as a 5V boost converter as a battery management system. I also wanted to measure the voltage, but unfortunately forgot to add the necessary traces before ordering the PCBs so that is something I will fix with botch wires as well once I address it.
I added a small display to show some status information. I shows the current keymap (piano, guitar and multiple accordion keymaps are implemented right now), bluetooth connection and battery state (currently not working). I also implemented a small menu system to change keymaps and bluetooth mode (client/server) and connect bluetooth devices in client mode.
The most recent addition is the pitch bend strip. It is a soft potentiometer that works by closing a circuit to a resistive layer on pressure. using a resistor in series and a pull-up-resistor it allows to detect if and where it is pressed, which I use for pitch bending. Pressing in the middle or not pressing at all results in a neutral pitch bend, pressing closer to the body raises the pitch, pressing further away lowers it.
To sum up, I am very pleased with the progress I made. Some things I want to do next:
Remember last used keymap
Automatically reconnect last connected BLE MIDI device or restore server state
Measure battery voltage and charging signals to display proper battery state
Senor Chang approves...