Teensy2 Not Working w/ Some MIDI Interfaces

Status
Not open for further replies.

ForestCat

Member
Hi,
I have a plain-vanilla Teensy2.0-based MIDI controller (using the example schematic from this website) whose MIDI output is only recognized by about half of my USB-based computer MIDI interfaces. The most recent one I've discovered a problem with is the MIDI Mobilizer II for iOS on an iPhone4. The USB-Based DIN interfaces are otherwise working properly, they are able to recognize DIN MIDI output from other devices, h/w synths, etc. I can unplug the Teensy2.0 from an interface which does not see the MIDI data, plug it into a h/w synth, for example, and the synth responds to the data from the Teensy, so it IS generating the desired MIDI commands.

Very frustrating, in that I had always thought MIDI is MIDI, either works or it doesn't. The output from the Teensy2.0 looks the same to me on my scope as the output from the MIDI sources that work with everything, voltages look good, pulses seem sharp.

I'm totally stumped. Project is dead if I can't get it to work w/ the MIDI Mobilizer on the phone.

Has anyone seen anything like this?
 
It will probably help whoever is going to end up helping you the most with this if you post the batch of code you are compiling for this and if you have wired any connections on Teensy (not just USB MIDI after all, for example) then pictures of your wiring will help alleviate some questions like "what have you connected?" and "are you sure you connected it right and in a reliable way?"
 
When you check MIDI signals on the scope, is the MIDI output connected to the receiving interface ?

This can be important since MIDI is not about voltage but its a current signal, so measuring the voltage on an open (unconnected) output doesnt show that it will deliver a nice current pulse when connected to the receiving MIDI optocoupler.
 
Maybe check those 220 ohm resistors? Perhaps they're not really 220 ohms?

Also check the 5V power on the 220 ohm resistor connected to DIN pin 4. If it's not 5 volts, you'll end up transmitting a weak signal, even if the resistors are correct. A small decrease, like 4.9 or 4.8 volts is ok, but something like 3.3V would cause all sorts of strange problems.

td_libs_MIDI_sch.gif
 
Thanks for your help

RE: "It will probably help whoever is going to end up helping you the most with this if you post the batch of code", I'll be happy to post all that if you need it. The reason I didn't is that if I begin to suspect a h/w issue, my standard procedure is to eliminate as much of "me" as I can from the variables(since the problem is usually me). Hence, although I initially spotted this behavior w/ a soldered project w/ buttons/pots, etc., I can repeat the problem on a breadboard, different Teensy, different power supply, and using, as stated in the OP, this circuit from the Teensy website w/ no MIDI IN, and NO I/O pins in use, other than the UART Tx:https://www.pjrc.com/teensy/td_libs_MIDI_sch.gif
Using also this Teensy website code example:
#include <MIDI.h>

const int channel = 1;

void setup() {
MIDI.begin();
}

void loop() {
int note;
for (note=10; note <= 127; note++) {
MIDI.sendNoteOn(note, 100, channel);
delay(200);
MIDI.sendNoteOff(note, 100, channel);
}
delay(2000);
}

mlu, I thought the same thing re: current, although the scope was not telling me much, even under load. I experimented w/ the resistor values, as well as putting a 7404 on the Tx output. No change.
 
Paul, I posted before I saw your reply. Yes, checked those voltages first, they're 5v on the nose. Using a very good supply, as well as USB power when programming. No change.
 
Did you also check the resistors?

MIDI uses a current loop signal. Usually when MIDI works with some inputs but not others, it's because you're transmitting too little current. Some optocouplers are able to receive with lower current, but others can't. Just remember, the current you transmit matters. Voltage is only part of the equation of Ohm's law.
 
Yeah, I put an ohmmeter on them, they're ~220 ohms, but, like I said, I have a separate setup on a breadboard w/ different 220 resistors that's doing the same thing. Wouldn't a 7404 be able to sink enough current if the UART was "weak"? Or would I need to do that w/ a transistor? What's odd, is that some of the interfaces work intermittently, or for a moment & then quit. I thought it was maybe running status-related, so I turned that off. Two of the interfaces that don't work are the eMu x-tab, and the MIDI Mobilizer II, pretty popular interfaces, so I was hoping that maybe someone here had used them w/ a Teensy 2.0. I received the Teensy 3.1 and the LC, might give it a try with them on the breadboard just for kicks...
 
Status
Not open for further replies.
Back
Top