Q about 6N135 Optocoupler

Thread Starter

prometei

Joined Apr 13, 2008
98
greets

I'm trying to use a 6N135 opto for a midi input module.

Can you guys take a look at the data sheet and tell me if an input current of 16mA is the minimum current needed to switch transistor on?



http://www.fairchildsemi.com/ds/6N/6N136.pdf

I've used the following schematic but with a 6N135 instead of a 6N138.



I did some testing by connecting a LED between pin 6 and ground. It's on while the input LED is off.
The only way I can get it to go off is if I pulse the input LED (pins 2&3) with a battery pack (ca. 3.5V). If I however I hook it up to a midi output of a midi interface and play some midi files, nothing happens, the test LED stays on.

I've tried many different resistor value but it did not help. I don't know if the 6N135 was a bad choice for this or if I'm overlooking something.

Your help is appreciated
thanks
 

crutschow

Joined Mar 14, 2008
34,450
According to this, the MIDI interface is a 5mA current loop. This means you don't need any resistor in series with the opto input.

Since the 6N135 has a minimum current transfer ratio of 7%, that means the worst-case output current would be only 0.35mA. The minimum load resistor (R2) value is thus 5V/0.35mA = 14.3kΩ. This may be too large a resistor value to get the frequency response you need. If so you may need to find an opto coupler with a higher transfer ratio and/or frequency response.
 

Thread Starter

prometei

Joined Apr 13, 2008
98
I started from scratch today, rewired everything on the breadboard, inserted a 2.2K resistor between pins 6 an 8, changed R3 from 220 Ohms to 100 Ohms and it works, at least in the direction Arduino TX - 6n135 - MidiMan (Input). The Midiman USB interface recognizes midi notes sent from the Arduino.

I'll try it 2morro the other way around, Midiman (Output) - 6n135 - Arduino RX.



---

p.s. forgot to mention that R1 between pins 7 and 5 (10kOhm) needs to be removed, otherwise this setup wont function, at least in my case.
 

absf

Joined Dec 29, 2010
1,968
I've tried many different resistor value but it did not help. I don't know if the 6N135 was a bad choice for this or if I'm overlooking something.
6N138 used darlington pair inside the opto while 6N135 uses a single transistor so the gain may be lower.

Allen
 

Thread Starter

prometei

Joined Apr 13, 2008
98
do you guys know how I could include a signaling LED on the right side of the opto (i.e. use pins 5-8)? I want it to blink whenever there is an incoming message. I've tried different combinations with a NPN transistor and a resistor and cant get a functioning circuit, i.e. if the led blinks then there is no signal going to RX, or vice versa RX is receiving data but the LED is either fully on or fully off.





---

btw, I tried removing the 3K3 resistor between pin 6 and 8 and the circuit continued to work, data was going through to the RX pin. What's the reason for that 3K3 resistor being there?
 

Attachments

LDC3

Joined Apr 27, 2013
924
btw, I tried removing the 3K3 resistor between pin 6 and 8 and the circuit continued to work, data was going through to the RX pin. What's the reason for that 3K3 resistor being there?
The resistor is a pull-up resistor to give the high level for the next stage (especially if it doesn't have a high impedance input).
 

Thread Starter

prometei

Joined Apr 13, 2008
98
The resistor is a pull-up resistor to give the high level for the next stage (especially if it doesn't have a high impedance input).
That's also what I thought, so I was expecting RX to go LOW and stay there when I removed the resistor. I guess I still have a lot to learn :)
 
Top