Subscribe to Make Magazine Today!

USB devices are so common nowadays – wouldn’t it be nice to use one with your homebrew electronics projects? I wanted to use my compact USB-MIDI keyboard with my homebrew synth circuits. It seemed a simple enough prospect at first – listen to the data output, press buttons, note the changes, and then program a microcontroller to turn those changes into something I could use (like basic serial MIDI data).

After a little investigating, I learned a bit about how USB works and that I’d need some extra hardware capable of playing the role of “USB Host” (a job normally left to a full computer) in order to properly work with my keyboard. Enter the USB Host Shield from Circuits@Home. This Arduino compatible shield uses a MAX3421E peripheral/host controller + supporting code library chip to quickly solve my ‘USB-without-a-computer’ problem.

I used the examples included with the shield’s Arduino library to gather some info from my USB-MIDI keyboard (an Akai LPK25) and then plugged those values into one of the included demo sketches. After figuring out what messages I was receiving, I redirected those bytes to an outgoing serial connection, and voilà – a USB-MIDI to MIDI converter was born!

I did run into a few hiccups in the process, but once I was able to actually read the output from the keyboard’s USB port, I simply applied the basic hacking technique of pressing buttons and observing results. HexDecBin came in very handy for the many binary to decimal conversions I made along the way.

Almost forgot – the sketch I wrote for use with the LPK25 can be found here

Subscribe to the MAKE Podcast in iTunes, download the m4v video directly, or watch it on">YouTube and Vimeo.

In the Maker Shed:


MKNB1 2T Collin's Lab: USB Hacking with Arduino

MIDIVOX for Arduino

Collin Cunningham

Born, drew a lot, made video, made music on 4-track, then computer, more songwriting, met future wife, went to art school for video major, made websites, toured in a band, worked as web media tech, discovered electronics, taught myself electronics, blogged about DIY electronics, made web videos about electronics and made music for them … and I still do!

blog comments powered by Disqus

Related Supplies at Maker Shed


Get every new post delivered to your Inbox.

Join 29,177 other followers