6
\$\begingroup\$

I've been creating a MIDI Thru box project and was trying to avoid having so many resistors. Points A-G may (or may not) have a load connected to them. Are these equivalent, or do I really need to include a resistor on each branch?

Here's the circuit image

http://a.yfrog.com/img611/175/4rfk.png

Is the current/resistance/voltage equivalent from the DC supply to each lettered branch in each circuit? More importantly, can anyone explain (or provide a link that explains) how you came to the conclusion? I'm a developer just starting to learn electronics.

I've gotten mixed responses on twitter, and someone mentioned asking here.

\$\endgroup\$
  • \$\begingroup\$ Not directly related to your question but a design consideration: failure of R in circuit B means failure for all ports. If too many devices cause the resistor to fail, all ports will become useless. \$\endgroup\$ – Erik Noren May 27 '11 at 17:08
  • \$\begingroup\$ Why are you trying to avoid the resistors? Ease of construction? Space? Cost? There are packages that contain lots of resistors tied to one common pin to save space. interfacebus.com/… \$\endgroup\$ – endolith May 27 '11 at 18:37
  • \$\begingroup\$ I was trying to simplify the circuit. In the end, it's not a big deal, but the additional resistors do complicate the trace routing. \$\endgroup\$ – Pete May 28 '11 at 5:40
4
\$\begingroup\$

Pete, I don't know much about MIDI circuitry, but it appears that the outputs are simple open collector circuits with pull up resistors and inputs are opto-isolators. If that's not reasonably accurate, then somebody please correct me.

Given that understanding and assuming that the power supply you're using is adequately large so we can assume it'd capable of providing as much current as you want, then you could think of the two circuit options like this:

Circuit A is treating each of the inputs A-G independently and what's happening on input A isn't affecting what's happening on input B.

Circuit B is shorting all of the inputs A-G together and just happening to supply a bit of extra current to the mix. Anything happening on Input A is totally messing with what's happening on Input B. If Input A is trying to be +5 v and Input B is trying to be 0v, then you've got the outputs of two other boxes fighting each other and neither is working correctly any more.

\$\endgroup\$
  • \$\begingroup\$ neither is working correctly any more. Not only that, but there could be a high chance that the chips there will let their magic blue smoke go. \$\endgroup\$ – AndrejaKo May 27 '11 at 18:00
  • 1
    \$\begingroup\$ A through G are outputs. Pin 4 in a MIDI jack. \$\endgroup\$ – Pete May 27 '11 at 18:25
  • 1
    \$\begingroup\$ @Pete: Then this answer doesn't apply, since it's talking about shorting a bunch of outputs together, like if A and B were inputs and connected to different sources and one tried to send high while the other sent low. \$\endgroup\$ – endolith May 27 '11 at 18:50
  • 2
    \$\begingroup\$ endolith is right, if A-G are all outputs, then my comments don't make sense. But there must be more circuitry not shown here then because otherwise it's going to be really boring output (a steady +5 volts). \$\endgroup\$ – Scott Bussinger May 27 '11 at 22:21
  • 1
    \$\begingroup\$ @endolith etc. Sorry, yes, the points on the left are all outputs. \$\endgroup\$ – Pete May 28 '11 at 5:42
5
\$\begingroup\$

Suppose points A through G in circuit A are connected to ground. Then there's a current 5 V / 220 Ohm = 23 mA through every resistor for a total of 7 * 23 mA = 159 mA. In circuit B there's only one 23 mA current. They're not equivalent.
Also, in circuit A the resistance between any two of the inputs is 440 Ohm, in circuit B this is 0 Ohm.

\$\endgroup\$
4
\$\begingroup\$

They are not equivalent.

Imagine placing a 1K resistor on point A to ground. Also place a 10K resistor on point B to ground.

In Circuit A, a 220 resistor is in series with the 1K. There is a separate 220 resistor in series with the 10K.

In Circuit B, the 1K and 10K would be in parallel.

\$\endgroup\$
  • \$\begingroup\$ While true, is that a situation he will likely encounter? Won't the MIDI endpoints be reasonably similar in their resistive load especially given the small value of R? \$\endgroup\$ – Erik Noren May 27 '11 at 17:01
  • \$\begingroup\$ I'm not sure I quite understand. Why would the 10k and 1k be parallel in Circuit B but not in A? I'm sure this is a complete noob question, but there's some bit of theory here that hasn't clicked yet. \$\endgroup\$ – Pete May 27 '11 at 17:05
  • \$\begingroup\$ Pete, in circuit A you'd end up (effectively) with a 1220 Ohm resistor in parallel with 10220 Ohm resistor for an final resistance of 1090 Ohms. In circuit B you'd end up with 1000 and 10000 Ohm resistors in parallel, both in series with a 220 Ohm resistor for a final resistance of 1130 Ohms. \$\endgroup\$ – Scott Bussinger May 27 '11 at 17:41
  • \$\begingroup\$ In MIDI, isn't the load just an LED, not resistive? Like dernulleffekt.wolfgang-spahn.de/midi.html \$\endgroup\$ – endolith May 27 '11 at 17:57
  • \$\begingroup\$ @Erik: Even if all the loads were exactly the same 10K resistors, when they're combined in parallel it will be 1.4K, which will drop the voltage more than if each 220R only saw 10K. \$\endgroup\$ – endolith May 27 '11 at 17:57
3
\$\begingroup\$

This is like a fan-out circuit to drive multiple MIDI inputs?

If I understand MIDI correctly, each of these outputs feeds directly into an LED, not a resistive load, like this:

enter image description here

If the LEDs have a drop of 2 V, then circuit A would be applying (5 V - 2 V)/220 Ω into each LED = 14 mA.

Circuit B, on the other hand, puts all the LEDs in parallel, so they each get 1/7th of that current = 2 mA. This could prevent them from lighting enough to register as signals. Also, any variation in the voltage of the LEDs (if one optocoupler uses an IR LED and the others use green LEDs, for instance) would allow the lowest voltage LED to hog all the current and prevent the others from lighting at all.

\$\endgroup\$
  • \$\begingroup\$ Yes. Obviously the real circuit is more complex, but the +5V (not signal, just power) is shown in my diagram. The points A-G are pin 4 on a MIDI Thru (out) jack. When implemented properly, an optocoupler is used, as you show. There are no guarantees of that, but for the most part, that's a reasonable assumption. Also as shown in your diagram, the receiving end also has a 220ohm resistor, when implemented correctly. \$\endgroup\$ – Pete May 27 '11 at 18:20
  • \$\begingroup\$ @Pete: The resistor at the receiving end would eliminate the current-hogging problem, but not the low-current problem. And you can't guarantee the resistors are there either? And you can't guarantee they didn't implement the inputs without optocouplers? Definitely should stick with a resistor on each output, as designed. \$\endgroup\$ – endolith May 27 '11 at 18:36
1
\$\begingroup\$

Yes. They could be equivalent. No, they aren't equivalent. It depends. <g>

(to clarify, they circuits aren't really equivalent - my response above is mostly in response to the implied question of, "can I replace this part of a more complex circuit and get equivalent results)

I think a more interesting question is, in your particular circuit, would replacing the 5 resistors hanging off the 5v line with one resistor cause any problems?

(it's been a really long time since I've done any kind of circuit analysis - and only in school - so I might have missed something below)

If you look at the standard MIDI circuit (I used this as an example) and compare it against your circuit diagram, you can see why it's designed the way it is. It appears as though the resistor is there to limit current. The MIDI output circuit has (2) 220 resistors while the input has just 1. When pin 5 of the output goes low current can flow across the opto-isolator from the +5 line on pin 4 (and passes through (3) 220 ohm resistors in series Ra, Rb, Rc in the diagram). If you short any of the lines the various resistors will keep too much current from flowing.

If you take a look at the datasheet for the inverter or the opto-isolator even if you removed the 220 ohm resistor on the +5v side of things you still be within tolerance of the parts (not flow too much current) (but don't do that - a short could cook parts in that case).

So it looks like you could use just 1 resistor in your particular circuit so far.

What about power? How much power will this resistor need to handle?

In the original circuit you've got 5 resistors so if you replace them with a single one this resistor will need to handle 5X the amount of power. Does it matter? Power is P = I * V, and V = 5. To calculate "I", first calculate the total circuit resistance, 220 (5v side) + 220 (pin 5 of the output) + 220 on the input side, so 5 / 660 (I'm going to ignore the 1.2/1.4 voltage drop of the opto; let's assume it shorted) = 7.5mA. P = 5 * 7.5mA = 37mW. 5 circuits * 37mW = 189mW. So it's less than a 1/4 of a watt even with all of them active (although that's not providing a ton of headroom, I'd probably use a 1/2 watt to be safe).

So it looks like you could replace it with a single resistor.

One other consideration - what happens if that 1 resistor fails? If it fails as an open circuit, all 5 ports would stop working. In the original circuit only a single port would be dead. If it shorted, the other resistors in the circuit would probably keep anything from cooking (so you're still safe there), although if you have multiple shorts (between equipment) you'd still cook things, as mentioned above.

\$\endgroup\$
  • 1
    \$\begingroup\$ For more fun, it hadn't even occurred to me (as some of the other posts are pointing out) to consider "what if" someone else decided to remove pieces of their circuit to help control costs/parts count/board space. \$\endgroup\$ – Paul Mrozowski May 27 '11 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.