Hi everyone,
First I'd like to thank you for reading my post. I generally do not like to post questions unless I'm absolutely stuck and this happens to be one of those cases. I do not have a lot of electronic circuit design experience nor do I have any formal education in electronics. Please forgive my ignorance in the subject.
What I am trying to do is to build a circuit to read and write MIDI signals using an AVR (more specifically an Arduino). Lucky for me the Arduino provides a serial interface. I have been successful sending valid MIDI signals but have been unable to receive midi signals. I designed my circuit based on the one posted here
I purchased several 6n138 Optoisolators from DigiKey. Here is the datasheet.
The odd thing is (following the circuit above) the 6n138 gets extremely hot when I connect pin 8 to +5V and pin 5 to GND. I was reading through the datasheet and the 6n138 should be able to handle a Vcc of +7V. I double checked to make sure my power supply was in fact providing +5V which it was. Am I misreading the datasheet?
I originally noticed the problem after I completed the circuit and turned the power on for the first time. I assumed that the 6n138 I was using was bad so I tried another one which had the same problem. Okay back to the drawing board. I then removed everything from my breadboard except the 6n138 and the wires going from pin 8 to +5V and from pin 5 to GND and it STILL overheated (Good thing I purchase a lot of these things).
The next thing I did was introduce a resistor between pin 8 and +5V. According to the datasheet the output current is about 60mA so I decided to use a 100ohm resistor I had lying around which dropped the voltage to about 3.9 and current to around 40mA which should be well within operating values. The 6n138 no longer overheats but it still seems odd to me that I needed to introduce the resistor because the above circuit doesn't use one.
Okay so now that the 6n138 is not overheating I re-connected the circuit but still without any luck. One thing that bothers me is the LED between pins 2 and 3 will be OFF when there is no MIDI data. The 6n138 is inverting (is that the correct term?) the signal meaning that PIN 6 will be HIGH when the LED is OFF. Is there a way to measure this? If I put a voltmeter between PIN 6 and GND I get about +3.9V. Does this make sense??
As you all can tell I'm royally confused right now. I know I want to use the 6n138 to isolate and protect my circuit from the other MIDI device. Is there another way (or better way) of doing this? Can anyone offer me any advice as to what I should do next?
First I'd like to thank you for reading my post. I generally do not like to post questions unless I'm absolutely stuck and this happens to be one of those cases. I do not have a lot of electronic circuit design experience nor do I have any formal education in electronics. Please forgive my ignorance in the subject.
What I am trying to do is to build a circuit to read and write MIDI signals using an AVR (more specifically an Arduino). Lucky for me the Arduino provides a serial interface. I have been successful sending valid MIDI signals but have been unable to receive midi signals. I designed my circuit based on the one posted here
I purchased several 6n138 Optoisolators from DigiKey. Here is the datasheet.
The odd thing is (following the circuit above) the 6n138 gets extremely hot when I connect pin 8 to +5V and pin 5 to GND. I was reading through the datasheet and the 6n138 should be able to handle a Vcc of +7V. I double checked to make sure my power supply was in fact providing +5V which it was. Am I misreading the datasheet?
I originally noticed the problem after I completed the circuit and turned the power on for the first time. I assumed that the 6n138 I was using was bad so I tried another one which had the same problem. Okay back to the drawing board. I then removed everything from my breadboard except the 6n138 and the wires going from pin 8 to +5V and from pin 5 to GND and it STILL overheated (Good thing I purchase a lot of these things).
The next thing I did was introduce a resistor between pin 8 and +5V. According to the datasheet the output current is about 60mA so I decided to use a 100ohm resistor I had lying around which dropped the voltage to about 3.9 and current to around 40mA which should be well within operating values. The 6n138 no longer overheats but it still seems odd to me that I needed to introduce the resistor because the above circuit doesn't use one.
Okay so now that the 6n138 is not overheating I re-connected the circuit but still without any luck. One thing that bothers me is the LED between pins 2 and 3 will be OFF when there is no MIDI data. The 6n138 is inverting (is that the correct term?) the signal meaning that PIN 6 will be HIGH when the LED is OFF. Is there a way to measure this? If I put a voltmeter between PIN 6 and GND I get about +3.9V. Does this make sense??
As you all can tell I'm royally confused right now. I know I want to use the 6n138 to isolate and protect my circuit from the other MIDI device. Is there another way (or better way) of doing this? Can anyone offer me any advice as to what I should do next?