MIDI 3.3V circuit

Hello everyone

I found this schematic and after checking with official documentation it seems to be fine

However, since my board is 3.3V I have to make few alterations. My questions are:
On TX side:

  1. I replace the R from 3V to 5din to 33 Ohm?
  2. I replace the R from TX to 5din to 10 Ohm?
    On RX side:
  3. Do I change R between 5 din and a diode? I'm pretty sure I don't but want confirmation
  4. 1N914 isn't terribly required, right? Can be 4001, 4008, 4148?
  5. 4n35 doesn't seem what most people use, can get away with 6n138, can't I? Or is H11L1 absolutely necessary?
  6. I'm pretty sure I have to change the resistor that pulls RX to 5V (3.3 volt in my case), MIDI specs say "Value of RD depends on optoisolator and V RX" and then provides no further explanation - how do I calculate that for both 6n138 and H11L1? There are schematics I found that opt for 470 Ohm, but I don't follow the reasoning behind that
  7. Why should I pull up RX pin in the first place? Isn't it pulled up after I declare begin(BAUD)?

Thank you for your time, I really appreciate that

Your changes (1, 2,3 yes, 4 yes, 5 No, 6 yes) look good to me. The diode is reverse protection so most any general purpose diode will work. The 4N35 will probably be your problem point, its switching side is marginal for MIDI. As far as RD you need to look at the data sheet and pick a strong driving current. Check the CTR speck and use that in your calculation. 7 No clue as to what you are asking.

Thanks!

3 - yes, I assume as in "yes, you are right" not in "yes, change those"

CTR? Datasheet of the optoisolator, right? Doesn't have any CTR mentioned. MIDI specs don't have any explanation on that part either.

So that resistor is basically a limiting resistor and derived from current being supplied (so "strong current" will be determined by some spec of optoisolator)? Alternatively, I guess, I can find schematics for 5v powered optoisolator and use ~0.66 amount of resistance?

  1. I replace the R from 3V to 5din to 33 Ohm?
  2. I replace the R from TX to 5din to 10 Ohm?

What is your logic behind that?
These resistors are way too low. In order to compensate for the drop in voltage you only need change them from 220R to 200R each. Remember you are only trying to light an LED at the other end. With the values you propose you are in danger of burning it out.

  1. Do I change R between 5 din and a diode? I'm pretty sure I don't but want confirmation

No you don’t chang anything, like you suspected.

  1. 4n35 doesn't seem what most people use, can get away with 6n138, can't I? Or is H11L1 absolutely necessary?

Stick with the 4N35 it is about the only one that is fast enough for the MIDI signal.

  1. I'm pretty sure I have to change the resistor that pulls RX to 5V (3.3 volt in my case)

I would make that even bigger to say 2K2, the value issued looks like they were expecting TTL circuits to feed into.

  1. Why should I pull up RX pin in the first place? Isn't it pulled up after I declare begin(BAUD)?

No, you need a pull up resistor because on boot up that pin is a floating input so it needs to be pulled high.

Any diode will do, it is only there for reverse voltage protection in the event of a wrongly wired MIDI lead.

As you suspect CTR has nothing to do with MIDI.

At 5V MIDI is designed for about 6mA with 3 220 resistors all helping to current limit
from 5V to the ~1.1V of the opto coupler emitter.

With 3.3V you have 2.2V to drop, and 10+30+220 = 260 ohms total limiting, so
about 8.5mA through the opto, not a problem.

Shorting out the output accidentally however yields 3.3 / 40 = 82mA, which is possibly
going to damage something.

Suggest using 68 + 68 on TX side when 3.3V, short circuit current 30mA, opto current
about 6mA.

The reason for the two resistors at the TX side is to avoid damage on a short circuit,
they should not be "rationalized" into a single resistor really, although with these
low values its rather close for comfort.

The receive circuit before the optocoupler is independent of supply and shouldn't be changed for 3.3V.

Grumpy_Mike:
What is your logic behind that?

my logic behind 1 and 2 is the official MIDI specs document, so I kinda not sure what to think of your statement

Grumpy_Mike:
I would make that even bigger to say 2K2, the value issued looks like they were expecting TTL circuits to feed into.

Official MIDI specs say 31,250 bits/sec UART Receiver, I don't see any mention of TTL.
The document I keep referring to is MIDI 1.0 Electrical Specification Update [2014]
Everything else seems to be consistent with what I understand, thanx!

MarkT:
The receive circuit before the optocoupler is independent of supply and shouldn't be changed for 3.3V.

I'm not changing it, I'm mainly concerned with that resistor on MCU side of things - have any idea how to calculate that? BC I don't(

my logic behind 1 and 2 is the official MIDI specs document, so I kinda not sure what to think of your statement

Not good enough. If you are going to disagree with me I need a better explanation than that. How do you know you are not misunderstanding the documents?

Official MIDI specs say 31,250 bits/sec UART Receiver, I don't see any mention of TTL.

Yes that is because when they were written there was nothing else except TTL so why would it be mentioned? The fact they were revised in 2014 is not relevant.

I have been making MIDI interfaces for over 30 years. The TX side should actually pass through a PNP transistor in order to fully meet the specifications for the current drive because you don’t say what processor and what pins you are using. Some processors have a limit current capacity and your circuit as it is might exceed this. At best this circuit is a fudge.

Grumpy_Mike:
Not good enough. If you are going to disagree with me I need a better explanation than that. How do you know you are not misunderstanding the documents?

It's plain and simple - says to change those resistors to those values, pretty hard to misread

Grumpy_Mike:
Yes that is because when they were written there was nothing else except TTL so why would it be mentioned? The fact they were revised in 2014 is not relevant.

I would take your words for granted, I lack knowledge to argue here. But can you clarify how you ended up with 2k2 value here? That's the only bit I don't understand at this point and that value keeps changing from article to article all over the internet with no explanation (which is normal for most articles, I guess).

Grumpy_Mike:
I have been making MIDI interfaces for over 30 years. The TX side should actually pass through a PNP transistor in order to fully meet the specifications for the current drive because you don’t say what processor and what pins you are using. Some processors have a limit current capacity and your circuit as it is might exceed this. At best this circuit is a fudge.

I have no doubt in your experience and value the time you spent answering my questions. I'm just trying to understand why I'm doing something, not just what to do

it’s plain and simple - says to change those resistors to those values, pretty hard to misread

No but it is easy to see why it is wrong. It offers little protection.

Still if you don’t want advice, then why ask?

I will not be wasting my time with you any more.

Grumpy_Mike:
No but it is easy to see why it is wrong. It offers little protection.

Still if you don’t want advice, then why ask?

I will not be wasting my time with you any more.

I'm sorry you feel this way, I have no idea what offended you, I read back my massages and can't even narrow down what I did wrong(
I didn't say I don't want advice, I just said I want to know more about why that advice was given.
Thank you for your time anyway, it was helpful

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.