6n137 optopcoupler wired wrong?

Thread Starter

basline

Joined Aug 16, 2012
20
Hi all,

I'm having trouble with the attached circuit, and as a newbie who has forgotten much of what I learned along the way I'm at a loss as to how I can trouble shoot the problem. I've stuck the multi-meter on the circuit, and while there is 5 volts across pin 6 and pin 8 this voltage never changes even when apply voltage across pin 2 and 3.

I've been working on a project to control fans and pumps with a micro-controller. I designed the attached circuit, which uses 6n137 optocouplers (because I had them) and n-channel mosfets along with some sizable diodes to deal with the flyback from switching the motors. I've been working a few weeks here, a few weeks there for over a year now. I'm having a a hard time making heads from tails on the 6n137 datasheet as I've for gotten so much now.

To test this circuit I have connected my microcontroller's 5V to pin 2 of connector JP8. I then use the digital output of my controller to toggle pin 1 and pin 3 for each optopcoupler. I see the voltage across pin 2 and pin 3 of the 6n137 go from 0 to 1.4 volts, which I think is what it is supposed to do. However the voltage across pin 6 and pin 8 never changes from 5V, and my mosfets never turn on.



Are there problems with my schematic?

Thanks in advance
 
Last edited:

Lestraveled

Joined May 19, 2014
1,946
You need a pull up resistor on the output (pin 6). Look at the data sheet. Put a 470 ohm resistor between +5 and pin 6 and it will work.
 
Last edited:

hp1729

Joined Nov 23, 2015
2,304
I can't seem to upload an image of the schematic. For the time being here is a link to a hosted image:
http://postimg.org/image/mn5dyfhs9/

I've also attached a pdf of the schematic. I can't seem to upload an png image.
Pin 7 is an Enable input. It should be high. I can't tell if it is on your schematic.
(edited to add ....)
I had to sit down and play with one to confirm it. Yes the enable floats high. Yes letting it float should work.
You are back to the output being your only problem.
 
Last edited:

DickCappels

Joined Aug 21, 2008
6,003
When posting images here that are hosted by postimage.org, use the link labeled "direct link" instead of the one simply labeled "link".
 

Thread Starter

basline

Joined Aug 16, 2012
20
Thanks for the feedback everyone. I realized I had my pin numbering off in my original post (incorrectly referred to pin 7 when I meant pin 8, also referred to pin 5 when I meant pin 6). I apologize for any confusion this may have caused, I've edited my original post to reflect this. Apologies overall for the edits, I'm flustered and frustrated that I messed this up. I really appreciate the help.

When posting images here that are hosted by postimage.org, use the link labeled "direct link" instead of the one simply labeled "link".
I've edited the link.

Pin 7 is an Enable input. It should be high. I can't tell if it is on your schematic.
hp1729, pin 7 is not connected. I was confused about this in the datasheet, and it seemed like it would change the behavior of the optocoupler.I went with NC as it seemed like it wasn't needed.
Here's the datasheet:
http://optoelectronics.liteon.com/upload/download/DS70-2008-0035/S_110_6N137 20140411.pdf

You need a pull up resistor on the output (pin 6). Look at the data sheet. Put a 470 ohm resistor between +5 and pin 6 and it will work.
Lestraveled, I have a pull down resistors on pin 6 because they are controlling logic level n-channel mosfets, but I may also just be confused about this as well. I did a pull down resistor as I thought a pull resistor will mean the n-channel mosfet is always on. Is this incorrect? I think a resistor between pin 5 and pin 6 would be a pull down resistor rather than a pull-up resistor, or is this incorrect? Should I remove R1 and add a 470ohm pull-up resistor instead?
I've been looking at the lite-on datasheet linked to above, and it's example circuits have just confused me. I'll try looking at other manufacturers to see if they have better examples.

Thanks again
 
Last edited:

hp1729

Joined Nov 23, 2015
2,304
Thanks for the feedback everyone. I realized I had my pin numbering off in my original post (incorrectly referred to pin 7 when I meant pin 8, also referred to pin 5 when I meant pin 6). I apologize for any confusion this may have caused, I've edited my original post to reflect this. Apologies overall for the edits, I'm flustered and frustrated that I messed this up. I really appreciate the help.



I've edited the link.



hp1729, pin 7 is not connected. I was confused about this in the datasheet, and it seemed like it would change the behavior of the optocoupler.I went with NC as it seemed like it wasn't needed.
Here's the datasheet:
http://optoelectronics.liteon.com/upload/download/DS70-2008-0035/S_110_6N137 20140411.pdf


Lestraveled, I have a pull down resistors on pin 6 because they are controlling logic level n-channel mosfets, but I may also just be confused about this as well. I did a pull down resistor as I thought a pull resistor will mean the n-channel mosfet is always on. Is this incorrect? I think a resistor between pin 5 and pin 6 would be a pull down resistor rather than a pull-up resistor, or is this incorrect? Should I remove R1 and add a 470ohm pull-up resistor instead?
I've been looking at the lite-on datasheet linked to above, and it's example circuits have just confused me. I'll try looking at other manufacturers to see if they have better examples.

Thanks again
Pin 7 looks like an Enable input to me and must be high. I don't know if floating qualifies. ... and yes, the output can only pull low.
(edited to add ...)
No, pin 7 is not your problem. I had to play with one to confirm it. Leave it to float.
 
Last edited:

Thread Starter

basline

Joined Aug 16, 2012
20
Thanks for the help from everyone. I ended up simplifying the circuit somewhat since I had to start over an order new parts. In case it will help future novices out there, this circuit is working on my breadboard. There are two jumpers so I can control the mosfets either separately with 2 pins from the microcontroller, or together with a single pin from the microcontroller.
 

Attachments

Top