Connecting Teensy USB Midi device to other device with Type B connector

Status
Not open for further replies.

elkayem

Active member
First post to PJRC forum, and wow this is an active community! Terrific!

I am using a Teensy 2.0 as a MIDI to CV device, so I can use my iPad or computer to drive multiple CV inputs on my analog synthesizer. It has been working great (couldn't have been easier with Teensy's usbMIDI commands), and there are some great sequencer iPad apps out there I can now use to drive my synth. Cool!

I would like to connect it to my keyboard as well, which has a USB MIDI output. However, it has a female USB Type B port. Since the Teensy USB input is also Type B, and standard cables are Type A to Type B, I have a problem.

I don't need power. I'm already driving the Teensy with a separate power source, and have cut the 5V pads apart on the bottom of the device.

My question: Can I simply buy a USB B to A adapter, and plug the Teensy into the keyboard? Will the Teensy then receive MIDI messages from the keyboard? Or are there any other pitfalls I might want to know about.
 
You need Teensy 3.6 and this cable. Sorry, none of the other Teensy models before 3.6 have this 2nd USB port.

Hopefully this picture will be worth 1,000 words to explain how it works. :)

cable_usb_host_t36_2.jpg


For the code, click File > Examples > USBHost_t36 > Test. That should give you a pretty good idea of how it'll receive the incoming MIDI messages from your keyboard.
 
Wow, a reply from the man himself, within the hour! Thanks Paul! Yes, that does look like it would do the job. And I like how the cable has mounting holes so it can be installed in a case.

So I assume the answer to my question "Can I simply buy a USB B to A adapter, and plug the Teensy into the keyboard?" is no. My knowledge of USB is next to nothing, which is why I am leery of trying it before I do my homework first. Is this because one of the two MIDI devices needs to act as the "host"? Or am I reading too much into your answer?

As it turns out, last night I just sent a set of gerber files off for PCB manufacture so I can get my midi to cv converter off of my breadboard and start putting it to use. It works really well with the iPad. I have a different one I am using with my keyboard, so I'm not stuck. It would be nice if there were an easy way to use this design with my keyboard though.

I need to pick up one of those Teensy 3.6s now, and start playing with it! I used the 2.0 because of its native 5V support, and honestly 8-bit was sufficient for this project. But the 3.6 looks like a really capable board.

Thanks Paul!
 
So I assume the answer to my question "Can I simply buy a USB B to A adapter, and plug the Teensy into the keyboard?" is no. My knowledge of USB is next to nothing, which is why I am leery of trying it before I do my homework first. Is this because one of the two MIDI devices needs to act as the "host"? Or am I reading too much into your answer?

Yes exactly, it is about USB Host which is very different to USB device (more complicated). All of the Teensies have USB device capability, only Teensy 3.6 has USB Host as well.
 
Yes exactly, it is about USB Host which is very different to USB device (more complicated). All of the Teensies have USB device capability, only Teensy 3.6 has USB Host as well.
Thanks, that clears it up for me! Time for me to start educating myself about USB protocol. Also, time to pick up a Teensy 3.6!
 
Status
Not open for further replies.
Back
Top