Connecting an Oscilloscope to Opto-coupler?

greets

I want to connect the oscilloscope to an opto-coupler (6N135) to monitor serial messages from an Attiny2313a. I have a sketch that sends different variables (bytes, integers) to the TX port using Serial.write command at different baud rates.

I've used this schematic from here http://www.instructables.com/id/Send-and-Receive-MIDI-with-Arduino/?ALLSTEPS:

Instead of the Arduino I have the oscilloscope, and the input (midi socket) is coming from the Attiny. I've used this midi circuit because later I want to use oscilloscope to display midi messages.

So I have a few questions:

  1. I connected the

Attiny 5V pin to 6N135 pin 2

and the

Attiny TX pin to 6N135 pin 3.
Is this the correct?

(I've replaced the diode between pins 2,3 with a LED).

  1. I don't know how to connect the scope, since it only has the probe and the ground connector. The opto-coupler has 3 connections, 5V, Data, and ground. How do I connect them? I've tried different combinations, but I either get a steady 4.5 volt line (I use three 1.5V batts to power the 6N135) or no reading at all.

So for now the only way I can monitor the data from Attiny is if I connect the scope directly, i.e. the probe to the TX pin and the ground connector to the ground pin on the chip.

I would appreciate any help on this, thanks

attiny-opto-scope.jpg

Why do you want an optocoupler between the Attiny and the oscilloscope?
You need to power the optocoupler, if you use the Attiny +5V, you defeat the optocoupler's purpose.
You could use another +5V power supply, connect it's +5V/gnd in place of the arduino, connect the oscilloscope ground to the same ground (pin 5) and the probe to pin 6

That instructible is designed for the midi interface which has a current sink and current source on 4 and 5 or vice versa.
The opto needs 20 ma which midi can supply I think, just connecting it to a microprocessor will not necessaarily work, what current can the actiny supply and sink in its data pin ?

Why do you want an optocoupler between the Attiny and the oscilloscope?

Well, I want to use opto-coupler later for inputting midi to the Arduino just like on the schematic.

You could use another +5V power supply, connect it's +5V/gnd in place of the arduino, connect the oscilloscope ground to the same ground (pin 5) and the probe to pin 6

I've tried this with two 6n135's and the scope still does not read anything.

hmm....

Boardburner2:
The opto needs 20 ma which midi can supply I think, just connecting it to a microprocessor will not necessaarily work, what current can the actiny supply and sink in its data pin ?

I wish I knew how to find this info in the datasheet

I connected a led instead of the 220ohm resistor R3, the one attached to pin 2. When the Attiny sends data the led blinks.

I also tried connecting a led between pin 8 and pin 6, it blinks at the same time as the other led does, so I guess in a way it works, except the scope does not show anything.

The led blinks !
You have the polarity wrong.
Midi spec is 5 ma for a logic 0
0 ma for a logic 1
Current only flows for a logic 0
If the circuit was working correctly the led as connected in yor diagram should not work at all.

Ye I know, but that's not the led I was talking about, it does not blink. I only replaced the 220ohm resistor with another led, just to see if there is continuity, that is the led that blinks, not the one drawn between pin 2 and 3.

Anywho... I removed the 10k resistor R1 and the circuit works! Maybe there is a big difference between the 6n135 and the 6n138, and the 10k resistor between pins 5 and 7 was messing the whole thing up.

Boardburner2:
The led blinks !
You have the polarity wrong.
Midi spec is 5 ma for a logic 0
0 ma for a logic 1
Current only flows for a logic 0
If the circuit was working correctly the led as connected in yor diagram should not work at all.

Edit
Apologies for the earlier post, I was thinking of something a bit different, late 80s / early 90 s i think I had a lot of grief with midi interfaces in the real world.