Drive optocoupler from GPIO pin

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Drive optocoupler from GPIO pin

1,575 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by extest on Sun May 08 12:11:17 MST 2016
Hello,

I'm trying to drive optocouplers from GPIO pins.  The 6N137 recommended forward current is about 10mA (min 5mA, max 15mA).  The datasheet for the LPC11U37 states that the standard GPIO pins can source/sink 4mA.  It seems like I would need a transistor in between the GPIO pin and the optocoupler since the LPC11U37 cannot provide enough current.

However, I'm confused, because in some NXP Application Note example circuits, I see them driving an optocoupler directly from a GPIO pin with a series 390 ohm resistor.  This works out to drawing about 8.5mA from the LPC micro.  (3.3V/390 = 8.5mA).  Check out page 4 of AN11153: http://www.mouser.com/pdfdocs/AN11153.pdf.

Am I missing something, or is the circuit in AN11153 drawing 8.5mA from the micro GPIO pins?
Labels (1)
0 Kudos
Reply
4 Replies

1,377 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos
Reply

1,377 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon May 09 01:10:56 MST 2016

Quote: extest
1) How are the LPC micro GPIO pins sinking more than 4mA.



As described in DS and UM: High-current output driver (20 mA)  :O



Quote: extest
2) How is the 6N137 operating when the min current is 5mA.



As described in DS https://www.vishay.com/docs/84732/6n137.pdf

Fig.16:  Output Voltage vs. Forward Input Current  :O

And with VOL = 0.4V the correct current calculation is:

I = (3.3 - 1.4 - 0.4)V / 390 Ohm = 3.85 mA   :D
0 Kudos
Reply

1,377 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by extest on Sun May 08 18:11:30 MST 2016
Ah, right.  So 3.3-1.4=1.9V, 1.9/390=4.87mA.

That still leaves me with two questions:
1) How are the LPC micro GPIO pins sinking more than 4mA.
2) How is the 6N137 operating when the min current is 5mA.

Thanks!
0 Kudos
Reply

1,377 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun May 08 12:56:36 MST 2016

Quote: extest
Am I missing something, or is the circuit in AN11153 drawing 8.5mA from the micro GPIO pins?



1.4V Forward Voltage  :O
0 Kudos
Reply