Electronic – 555 as a Digital Coupler

555digital-communicationsopto-isolator

I want to read MIDI data with an arduino (specifically an ATtiny85) for use in a synthesizer. The only method I'm aware of involves using an optocoupler such as the 6N138 found on this Instructable. It seems quite practical but unfortunately I don't have one on hand right now and shipping might take too long for my project. I was wondering if it would be possible to configure a 555 timer to do the same task instead. I quickly threw together this circuit of what I'm working with.555 Digital Optoisolator

The circuit should compare the voltage difference between the relevant MIDI pins and reproduce this difference as a logic level at the output. My setup as a whole is not working but without an oscilloscope nearby I can't confirm that this is the buggy part (the other option being the code I'm using). Is my circuit a valid alternative to an optocoupler?

EDIT: Removed "Isolator" from title.

Best Answer

Probably you don't know/understand what isolation means when dealing with optocouplers/optoisolators.

It doesn't mean that there is some sort of circuit buffering separating the two circuits. It really means electrical isolation, i.e. there is no current flowing from one part to the other (an optocoupler does that).

An optocoupler is essentially an LED and a photodiode (or a phototransistor) optically coupled in the same package. The LED and the photodiode don't share any electrical connection. They only "communicate" through the light generated by the LED. Therefore the "input section" (the LED) can be driven by a circuit which is completely isolated from the circuit connected to the "output section" (the photodiode/phototransistor).

enter image description here

This allows two circuits that must remain electrically isolated to communicate.

So the answer is no, an NE555 cannot substitute a circuit which performs electrical isolation.

If you're desperate or don't need specific performance/reliability you could try building a poor man's optocoupler. And here is another attempt.

Important Note: if your circuit needs an optocoupler for stringent safety reasons, using one of those home made one could pose some serious safety risks, so be warned!

That is, I wouldn't trust a mains-powered heart-beat detector using a home-made optocoupler to be used on my chest!!!