Jump to content

Recommended Posts

Posted

Most implementations of a MIDI Thru port driver use either two NOT/inverter gates, or two NAND gates with inputs joined, so the UART signal coming from the optocoupler is buffered before connected to the 200 ohm resistor and the MIDI Thru socket.

I am planning to add a MIDI Thru port to my MB-SID but didn't want to use a whole CMOS IC just for this. The MIDI Thru port only needs to sink or not sink the current, not actually output +5v. I thought a PNP transistor could do this nicely. So I put a BC557 with the base connected via a 10K resistor to pin 6 of the optocoupler (the UART signal, which is connected to the PIC's RX pin), the emitter connected via a 200 ohm resistor to the MIDI socket (it's PNP, so the emitter will sink the current when the base is low) and the collector to ground. I didn't think I needed a resistor between collector and ground, since the current is already limited by the two 220 ohm resistors of the MIDI Thru socket.

This works for me, I quickly tested it with my PC and messages I send to the MIDI In/optocoupler get looped back through the MIDI Thru to my PC.

So... can anyone see if there's a problem with this idea? It would be nice if someone with more electronics expertise could approve it  ;D

Posted

It will definetly work some of the time...

The optocoupler is an analog device, and so is your transistor.

Putting a few logic gates between them forces the signal into a

digital state, either full OFF or full ON.

Connecting without them could "soften the edges" of the signal,

making it a bit less well-defined. (increasing the gain should help)

I'm sure it will work some of the time, maybe even most of the

time. I'd like to look at the output on a scope before promising

anything more than that.

Good Luck with it.

LyleHaze

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...