Freelance Software Developer
Adventures in development, circuits, creativity, and questionable life choices.
I've always had a soft spot for interesting synthesizers and toys that make music (or in some cases, just noise).
The Meowsic keyboard, being a fairly popular kids keyboard that meows when you play it, has been on my radar for a while.
As I started looking into this particular keyboard, I was surprised to find out that nobody added
MIDI input to one of these silly cat-shaped toys yet.
Sure, there have been projects to convert one of them into a simple MIDI keyboard (in other words, to control other MIDI audio devices or DAWs), but since there are plenty of options for MIDI keyboards on the market (admittedly, more boring ones), in my opinion that's quite the opposite of what I was looking for.
This is why I was determined to find a way to add MIDI input to the Meowsic, and potentially other musical toys and keyboards.
This post outlines part of that journey. It’s open source, slightly janky in version one, and now actually working.
The Plan
The basic idea: tap into the keyboard matrix inside the Meowsic, and use a microcontroller to "press" keys via MIDI messages. The keyboard works using a standard row-column matrix setup.
By connecting specific rows and columns, you can simulate a keypress.
Reverse Engineering
Step one was figuring out which keys did what. I spent some time with a bodge wire and a notepad, mapping out the entire matrix, figuring out which row/column combinations triggered which notes.
Basically manually connecting the row/column pins at the PCB.
Tedious, but straightforward.
With the matrix mapped, I designed a PCB using KiCad and wrote firmware on top of the Arduino framework.
The firmware takes MIDI input over serial, and since I needed more inputs that the Arduino Nano could provide, using 2 MCP23017 GPIO expander ICs it connects the corresponding row/column together.
The row/columns are triggered using CD4066BE CMOS Quad Bilateral Switch ICs. These ICs are basically 4 switches in a single DIP socket.
Mistakes were made
I ordered a first batch of PCBs and (of course) made several dumb mistakes.
As luck would have it, I did anticipate making mistakes in the PCB, so after populating the board I did take some measurements of the pins before actually applying power.
After installing some bodge wires (reversing VCC and GND on the CD4066BEs where I made the mistakes), I measured again.
"Measure twice, cut once", or in this case "measure twice before you power the device".
When I was happy with the measurements, I populated the ICs.
I hooked up the DIN5 for MIDI, connected the MIDI cable to my laptop, and tried sending some glorious MIDI notes over the wire, like a conductor raising the baton...
...but the feline-shaped orchestra refused to play.
So I started debugging. The code was working on the breadboard version with a single MCP23017 and CD4066BE.
Maybe there were some gremlins in the PCB?
Perhaps I had made some mistake in the code, or the two MCPs were on the wrong I2C address?
As a debug measure, I quickly added some code to the firmware to blink an LED whenever it received MIDI data.
Nothing. Not even a flicker. The LED stared back at me, cold and indifferent.
After another long night of schematics, datasheets, and questioning my life choices, I finally spotted the gremlin: I had swapped pins 6 and 7 on the optoisolator. Turns out MIDI doesn’t like going through a gate wired backwards.
With the hardware patched up (again), I connected it to my DAW.
This time, it sang. Notes triggered on cue, meows in all the right places.
The Meowsic had officially joined the MIDI world.
Demo video below, obviously using the only good choice of MIDI file to test it out.
What’s Next
I have fixed the schematics and PCB in KiCad.
Another issue was the fact that the rev 1.0 PCB is simply too large to comfortably fit inside the Meowsic.
A new design for the PCB (this time with all the correct connections), which is significantly smaller while still retaining DIP-only for ease of assembly has been designed.
Once I have received the new PCBs from JLC I'll assemble it and will create a new blog post.
My goal is to release both the hardware and firmware as open source, and I'm looking into options to sell these devices as build-it-yourself kits.
Feel free to follow me on social media and check back here later for updates.