Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

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.


Update:
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 http://www.youtube.com/watch?v=kfCDjwHBBuM”>YouTube and Vimeo.

In the Maker Shed:

Makershedsmall

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!


Related
blog comments powered by Disqus

Featured Products from the MakerShed

Follow

Get every new post delivered to your Inbox.

Join 25,547 other followers