What's inside a cheap 5$ USB MIDI interface ?

In the case you didn't know these cheap USB MIDI interfaces and bought a 50$ one, I'm sorry for you ;) Seriously, these interfaces from eBay China are really great: they simply do what you want them to do. Period.

I dismantled one unit to know how it works internally :

There's more or less nothing else than a few resistors, diodes, probably a traditional opto-isolator (see here), plus a very tiny microcontroller that was impossible to see, because it's under a black glue/epoxy.