Author Topic: Driving an optocoupler LED at different supply voltages  (Read 5741 times)

0 Members and 1 Guest are viewing this topic.

Offline fencluTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: pl
Driving an optocoupler LED at different supply voltages
« on: January 16, 2019, 01:41:41 pm »
I have a project that involves a serial communication interface, that is isolated with a 6N136 optocoupler, at a relatively high speed, but well below the maximum of 1Mbaud for this optocoupler. The biggest problem is the varying supply voltage, between 1,8V and 4,5V. In that case it is impossible to choose a proper resistor for the LED, because the current will be either too low for low voltages or too high for high voltages. I experimentally determined the minimum LED current at around 4mA.

Several problems overlap in such a case, because the LED is driven at a relatively high frequency, and the minimum voltage is close to the forward drop of the LED (the Lite-on version of the 6N136 features a maximum Vf of 1.7V).

Does anyone have a simple idea of how to drive such an LED with a current that fits between the 4mA and 25mA with varying voltage? Some simple current source maybe?
If anything can go wrong, it will.
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 785
  • Country: ca
Re: Driving an optocoupler LED at different supply voltages
« Reply #1 on: January 16, 2019, 02:11:13 pm »

I don't know if OPA with 1.8V min. Vdd exists, digikey listed from +-1V. May be you can convert supply voltage to known +2.5V - 5V and drive led as usual,  than search boost converter
 

Offline fencluTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: pl
Re: Driving an optocoupler LED at different supply voltages
« Reply #2 on: January 16, 2019, 02:17:53 pm »
Thing is, it's a bit complicated. This design is for a tiny module with an MCU on it, that is supposed to measure the battery voltage and send the data over an isolated data line. These modules will be made in big panels, so any additional cost is not desirable. Preferably i wanted to use discrete components.

I had an idea, see the attatched photo. The MCU would switch one side of a paralleled resistor based on the voltage it reads. However, I am afraid that when the R2 is not needed, the MCU would pull the output high, essentially disabling the LED.
If anything can go wrong, it will.
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 785
  • Country: ca
Re: Driving an optocoupler LED at different supply voltages
« Reply #3 on: January 16, 2019, 02:27:22 pm »
If you have spare digital pins on the uCPU, than pre-set 4-5 pins with different resistors value to a LED. Only one pin set as output at a time, others are inputs. Depends on the power source voltage selection of the appropriate resistor is made.
 
The following users thanked this post: fenclu

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2222
  • Country: mx
Re: Driving an optocoupler LED at different supply voltages
« Reply #4 on: January 16, 2019, 02:58:40 pm »
What MasterT said. The trick here is to disable the unused ports configuring them as Hi-Z inputs, such that they don't contribute or draw any current.
 
The following users thanked this post: fenclu

Offline CJay

  • Super Contributor
  • ***
  • Posts: 4136
  • Country: gb
Re: Driving an optocoupler LED at different supply voltages
« Reply #5 on: January 16, 2019, 03:13:28 pm »
I've used a variant of the simple current sink in Fig 2 in the link, you can drive it with an I/O pin of an MCU via a resistor to the gate of the MOSFET but I'm not convinced it's simple enough (four parts) or going to work down to your lowest Vf (it simulates down to 1.8V but I don't know if that's good enough for your Opto), you'd need to experiment.

Has the advantage that your MCU doesn't need to soource current, just sink it.

https://www.edn.com/design/analog/4363797/Circuit-achieves-constant-current-over-wide-range-of-terminal-voltages
 

Offline fencluTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: pl
Re: Driving an optocoupler LED at different supply voltages
« Reply #6 on: January 16, 2019, 03:15:54 pm »
If you have spare digital pins on the uCPU, than pre-set 4-5 pins with different resistors value to a LED. Only one pin set as output at a time, others are inputs. Depends on the power source voltage selection of the appropriate resistor is made.

You mean the pins to drive the resistor low, not additionalTX pins?
If anything can go wrong, it will.
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 785
  • Country: ca
Re: Driving an optocoupler LED at different supply voltages
« Reply #7 on: January 16, 2019, 03:23:06 pm »
If you have spare digital pins on the uCPU, than pre-set 4-5 pins with different resistors value to a LED. Only one pin set as output at a time, others are inputs. Depends on the power source voltage selection of the appropriate resistor is made.

You mean the pins to drive the resistor low, not additionalTX pins?
We still don't know uCPU type, bus, if there is a possibility to use any digital pin or it's map-ed by hardware. If transmit TX pin can't be moved, than "bridge" circuitry - one TX+led  and several current supply pin+resistors to select.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: Driving an optocoupler LED at different supply voltages
« Reply #8 on: January 16, 2019, 04:18:53 pm »
Just use a JFET with gate shorted to source.
Look at your LED current and find a JFET with the desired drain current at VGS = 0.

Simple and effective, I've done this many times.

 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Driving an optocoupler LED at different supply voltages
« Reply #9 on: January 16, 2019, 05:32:23 pm »
But note the WIDE spread in Idss, it is the jfet equivalent of Hfe in terms of device to device spread.

Regards, Dan.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Driving an optocoupler LED at different supply voltages
« Reply #10 on: January 16, 2019, 05:58:43 pm »
Minimum LED current is not determined experimentally, but defined by the manufacturer. If I remember correct, it is 8mA for 6N137 (please verify in the datasheet)

You need a current source for the LED.

Just ask google for "LED current  source" and check the simple transistorized solutions.

I'd bet on this two transistor one to work quite nicely across a decent voltage range up to some decent speeds.



//EDIT: I think this may be a bit better than trying to source unobtanium depletion mode (J)FETs with just the right amount of current at zero Vgs.

//Those 8mA I may have probably confused with this device? Not sure, been quite a while last time I've used such opto (there are better alternatives these days): https://media.digikey.com/pdf/Data%20Sheets/Sharp%20PDFs/PC410L0NIP%20Series.pdf
« Last Edit: January 16, 2019, 06:10:01 pm by Yansi »
 

Offline fencluTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: pl
Re: Driving an optocoupler LED at different supply voltages
« Reply #11 on: January 16, 2019, 06:28:15 pm »
Minimum LED current is not determined experimentally, but defined by the manufacturer. If I remember correct, it is 8mA for 6N137 (please verify in the datasheet)

You need a current source for the LED.

Just ask google for "LED current  source" and check the simple transistorized solutions.

I'd bet on this two transistor one to work quite nicely across a decent voltage range up to some decent speeds.



//EDIT: I think this may be a bit better than trying to source unobtanium depletion mode (J)FETs with just the right amount of current at zero Vgs.

//Those 8mA I may have probably confused with this device? Not sure, been quite a while last time I've used such opto (there are better alternatives these days): https://media.digikey.com/pdf/Data%20Sheets/Sharp%20PDFs/PC410L0NIP%20Series.pdf

The 6N137 is actually a different beast, which uses some logic at the output and also requires a supply of between 4,5 and 5,5V. The 6N136 (or 6N135) uses a photodiode with a transistor output. The datasheet of the 6N136 does not state a minimum supply current, or at least I can't find one. Nevertheless, with the decreasing current, the speed decreases. The 4 mA I determined resulted in a fall time of around 2us, which is acceptable in my case.
If anything can go wrong, it will.
 

Offline CJay

  • Super Contributor
  • ***
  • Posts: 4136
  • Country: gb
Re: Driving an optocoupler LED at different supply voltages
« Reply #12 on: January 16, 2019, 06:32:55 pm »
Minimum LED current is not determined experimentally, but defined by the manufacturer. If I remember correct, it is 8mA for 6N137 (please verify in the datasheet)
Indeed, I did some experimenting with optocouplers a while back and found forward current through the LED is very imprtant if you need to meet specs for transfer ratio but you can drive them with quite low currents if you don't need them to be high speed.

Just ask google for "LED current  source" and check the simple transistorized solutions.

I'd bet on this two transistor one to work quite nicely across a decent voltage range up to some decent speeds.



That's the bipolar version of the one I linked, it works well with a MOSFET in the T2 position, 2N7000 works.

I built a few dozen for some PWM fading LED strings a few years back, they're good to really quite high frequencies, far higher than I needed. to stop the flicker
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4422
  • Country: dk
Re: Driving an optocoupler LED at different supply voltages
« Reply #13 on: January 16, 2019, 06:47:54 pm »
with only 100mV to work with, 1.8V LDO
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Driving an optocoupler LED at different supply voltages
« Reply #14 on: January 16, 2019, 07:10:16 pm »
Do you have (any) power supply available at the isolated (LED) side?
 

Offline fencluTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: pl
Re: Driving an optocoupler LED at different supply voltages
« Reply #15 on: January 16, 2019, 07:39:22 pm »
Do you have (any) power supply available at the isolated (LED) side?

Unfortunately, no, I don't. I also had an idea to implement some sort of microcontroller voltage doubler, that way I would have a bit higher voltage to play with.
If anything can go wrong, it will.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: Driving an optocoupler LED at different supply voltages
« Reply #16 on: January 16, 2019, 07:42:09 pm »
The drain current spread of JFETs is usually rated at 1:3, but better selections are available.
Using a JFET with a rated drain current of 3...9 mA would in this case be appropriate, the real spread will be smaller.
The bipolar circuit proposed by Yansi is useless, it has at least 2 V drop. The JFET will work down to 0 V, but only act as a pure current source above ~0.4 V drain-source. Below that it will be resistive, which is not bad in this application.


 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Driving an optocoupler LED at different supply voltages
« Reply #17 on: January 16, 2019, 07:58:39 pm »
Minimum LED current is not determined experimentally, but defined by the manufacturer. If I remember correct, it is 8mA for 6N137 (please verify in the datasheet)
Indeed, I did some experimenting with optocouplers a while back and found forward current through the LED is very imprtant if you need to meet specs for transfer ratio but you can drive them with quite low currents if you don't need them to be high speed.

Just ask google for "LED current  source" and check the simple transistorized solutions.

I'd bet on this two transistor one to work quite nicely across a decent voltage range up to some decent speeds.



That's the bipolar version of the one I linked, it works well with a MOSFET in the T2 position, 2N7000 works.

I built a few dozen for some PWM fading LED strings a few years back, they're good to really quite high frequencies, far higher than I needed. to stop the flicker

But using a FET as T2 does not fulfill requirement of low voltage drop across it, minimum operating voltage would become Vgsth+Vbe minimum, which would probably be significantly more, than just 2* Vbe for the bipolar version. (plus the LED Vfwd of course)

Unfortunately both are probably too much for the OP's application.  :-//
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: Driving an optocoupler LED at different supply voltages
« Reply #18 on: January 16, 2019, 08:18:15 pm »
Minimum LED current is not determined experimentally, but defined by the manufacturer. If I remember correct, it is 8mA for 6N137 (please verify in the datasheet)
Indeed, I did some experimenting with optocouplers a while back and found forward current through the LED is very imprtant if you need to meet specs for transfer ratio but you can drive them with quite low currents if you don't need them to be high speed.

Just ask google for "LED current  source" and check the simple transistorized solutions.

I'd bet on this two transistor one to work quite nicely across a decent voltage range up to some decent speeds.



That's the bipolar version of the one I linked, it works well with a MOSFET in the T2 position, 2N7000 works.

I built a few dozen for some PWM fading LED strings a few years back, they're good to really quite high frequencies, far higher than I needed. to stop the flicker

But using a FET as T2 does not fulfill requirement of low voltage drop across it, minimum operating voltage would become Vgsth+Vbe minimum, which would probably be significantly more, than just 2* Vbe for the bipolar version. (plus the LED Vfwd of course)

Unfortunately both are probably too much for the OP's application.  :-//

Who's talking about using a FET as T2? Not me!

I'm talking about using one single JFET as a constant current source. No resistors, no diodes, no nothing. Get it?

 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Driving an optocoupler LED at different supply voltages
« Reply #19 on: January 16, 2019, 08:34:52 pm »
Do you see on what part of text I have reacted? Do you get it?
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: Driving an optocoupler LED at different supply voltages
« Reply #20 on: January 16, 2019, 08:43:46 pm »
Do you see on what part of text I have reacted? Do you get it?

Not really. You've presented a bipolar solution that doesn't really help the OP (far too large voltage drop). Then you've referred to "unobtainium" JFETs, as if it is important to present a current within +/-1% to an optocoupler. After that you lost me.

The JFET solution is not precise, but will work down to almost 0 V voltage drop.

 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7732
  • Country: ca
Re: Driving an optocoupler LED at different supply voltages
« Reply #21 on: January 16, 2019, 09:02:37 pm »
+1 On the JFet constant current solution.  It has a close to 0.0v drop.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Driving an optocoupler LED at different supply voltages
« Reply #22 on: January 16, 2019, 09:16:57 pm »
Do you see on what part of text I have reacted? Do you get it?

Not really. You've presented a bipolar solution that doesn't really help the OP (far too large voltage drop). Then you've referred to "unobtainium" JFETs, as if it is important to present a current within +/-1% to an optocoupler. After that you lost me.

The JFET solution is not precise, but will work down to almost 0 V voltage drop.

And that is a reason to start attacking me? Wtf is wrong with you?

Interfacing (any) LED from a 1.8V logic direct is a bad idea anyway.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: Driving an optocoupler LED at different supply voltages
« Reply #23 on: January 16, 2019, 09:32:50 pm »
And that is a reason to start attacking me? Wtf is wrong with you?

I'm not attacking you. I've pointed out that your solution does not fulfill the requirements of the OP. That's all.

 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14464
  • Country: fr
Re: Driving an optocoupler LED at different supply voltages
« Reply #24 on: January 16, 2019, 11:28:38 pm »
Not sure you'll find a simple current source design with only 100mV dropout (in the least favorable case)...

What's your budget exactly (you want something cheap?), and how many digital signals do you actually have to isolate? Only one or several?
For an alternative solution, you could have a look at this: https://www.maximintegrated.com/en/products/interface/isolation/MAX14930.html
 
The following users thanked this post: spec


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf