Friday, 28 June 2019

4N35 opto-isolator for MIDI input does not work?


I have the following circuit which I would like to use to connect a MIDI enabled device. I am not getting any signal on pin 5, could it be because the resistor from the base to ground in too small? I am not sure how to calculate it from the datasheet.


enter image description here


Update #1


I have replaced the opto-isolator, tested the input using an LED and could see the LED light up indicating current flows in the MIDI loop. I have placed a scope probe on the output of pin 5 of the device. pin 6 is now not connected to anything. Normally (idle) the signal is pulled high, when a signal comes in the signal goes low but only down to ~2.8V which is not enough to register as a logic low.


enter image description here


Update #2


I have replaced R17 with 360 Ohm. Now the signal goes as low as 1.6V.



Update #3 - Final one


I've swapped the 360 Ohm resistor for 1K. Now the signal looks much better and it reaches almost 0V when low. It is worth mentioning the scope claims rise time of 7us and fall time of 3us (probably on the low side). Considering the MIDI freq. with about 32us per bit this is short enough not to have false readings. The MIDI signal goes to an Atmel AVR and from testing I did right now it seems the messages are going through clearly. I agree that this is not the optimal device for this task though, and the circuit one would make for it (if he desires) looks very similar to what is contained by the PC900 optocoupler from Sharp.


enter image description here




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...