All Midi in my studio works perfectly, but then i use 2x a not-gate normally. And have one line connected to 5v+ thru a 220R as you're supposed to. With transistors it work fine, and either 2 NPN's on the switching line or an PNP on the VCC line. If you think your method should become the standard you should write to Midi.org
Where the hell do you think I took the use of a PNP transistor from. It is the official MIDI org recommended circuit.
Yes that will work as well, never said it wouldn’t. Using two inverters is however wasteful and uses more space.
Totally, but some are recycled LS versions. Environmentally friendly. And easy to replace and easy to double signal with.
You are saying you have lead free LS devices?
I am saying that i haven't thrown them i the bin. Actually that was obvious enough.
Thanks. That's why I don't really trust random circuits on the internet.
To be fair the reference circuit with PNP is quite hard to find on midi.org
I haven't found it, yet. But I will keep looking.
What I did find is the old recommendation with two inverting buffers and the update with one non inverting buffer.
But I will spend some more time on research and thinking. Maybe I'll figure it out.
I'm a bit confused about the difference. But that's mostly because I'm new to this.
Maybe I'll need to spend some time reading on that, too.
Btw: For me this is becoming a really interesting conversation which makes me think a lot and kind of exited to dive deeper.
This just saved me from a mistake:
I've tried to follow that in my schematic and after comparison with the spec it turns out that I had the opto-coupler upside down.
Thanks!
So after double, triple and quadruple checking that my pins are in line with the midi spec I took the midi out with the buffer and hooked it up the midi in (and removed the beads, etc)
Now I do have this:
Now this looks to me (if I'm not completely off) that every time TX (the buffer) goes high, the LED in the opto-coupler goes off. (Does this make sense?)
My two cents - for a CE circuit which is inverting, pull down would mean that the transistor does not have to source or sink any current when turned ON. However it still needs to be able to sink (or source, if PNP) the full collector current which would normally (in OFF state) be supplied to the following circuit.
If it's a buffer (emitter follower, or CC) it needs to be able to sink or source the full load current for logic high. So in OFF state it need not supply anything but needs a proper pull-down resistor to ensure 0V (this is usually its Re), but in ON state (which is basically its base voltage minus the Vbe) it should be able to supply the current needed by the following stage, else things might not work (which means the base drive matters).
In either case the transistor has to deal with the max load current.
Yes, that is what you want it to do. If you think about it HIGH is the normal state of the line. So in the normal state of the line you want the LED to be off, because that is the state of the LED when the MIDI input lead is disconnected. This is so that a MIDI input with nothing attached to it needs to be the same as a MIDI input lead being plugged into a MIDI output but sending nothing.
Yes I have to agree, this is because the document has been updated in 2014. I don't know if the original circuits are in this updated document as I am not a member of MIDI Org so I am not able to down load it. Last time I tried to register as a member there was a fee involved.
However, please note that the updated diagram has different resistor values for 3V3.
Yes, thanks. I've seen that. For that I made the solder bridges to select the resistor needed for the voltage supplied. But it haven't out in every schematic, yet.
The registration is (currently?) free so I went there a week ago, registered and downloaded the new, old and full specification along with some other documents about sysex, etc.
Like this?
I think I have to ponder a bit to get behind that.
I altered the circuit for the PNP a bit but I'm not sure if that's any better or correct. I did copy it somewhere.
OR this one (which is similar to one posted on this forum):
Neither is correct. If you want to use a PNP, it should be between VCC, and the resistor connected to pin 4 (it would help me pointing if you would annotate those resistors) Pin 5 then connects thru a (single) resistor to GND.
The Extra 220R resistor is at the other end between the din plug and the Optocoupler.
nb what the pin numbers are on a 5-pin Din can be a bit confusing. Rarely do the the plugs have it written on them like with XLR. The diagrams that you have used, show the view from the rear of a female plug as far as i know (same as front view of a male plug) For sure you will be able to find evidence of the mirrored image as well as it looking this way, online.
Yes assuming the right side is the input, the 10k resistor marked Re will ensure 0V when its input is floating (i.e. the driving ckt is disconnected or has no power).
I agree. I have seen fly-back diodes on Opto-couplers wondering what they are really for. I suspect the idea is to prevent reverse current through the LED (of the opto) or at least reverse voltage to be nullified. But seriously, that thing should be able to take it.
What about ESD?
What about ESD?
This is all circuitry inside the device, nothing external. External is on the other side of the opto-isolator.
"Take" what? There is nothing whatsoever to "take"!
Notwithstanding the low voltages in the logic circuit, there is simply no way that circuit can apply a reverse voltage across the LED.
That circuit not, but hooking it up to a device that has been built by someone else, everything is possible.
I'm not sure what you mean there. Whatever else it is hooked up to, is on the other side of the opto-coupler, so makes no difference at all to the LED side of the opto-coupler.
It's use is to protect the opto isolator in the event of an incorrectly wired MIDI cable or socket.
The sockets themselves are easy to get the wrong way round, as the wiring to them is symmetrical, that is they look the same as a mirror image, so a physical layout has to specify if you are looking at the front or back of the socket. The use of pin numbers on the socket doesn't help as some DIN sockets do not have the pin numbers on the socket, or have different ones to the non obvious DIN standard numbering.
When making your own leads it is easy to accidentally make a cross cable that swaps the two signal wires.
Remember this standard was made for musicians to work with, not electronic engineers.