Versatile Opto Coupler 3 to 30V Input

Hi All

For some time now I have been thinking about a system allowing a wider range of input voltages to an Opto Isolator without exceeding max ratings or stressing anything. I was thinking along the lines of a simple transistor based constant current source but constantly came up against the forward voltage drop across transistor junctions and diodes. This effectively put this idea out of reach of the now popular 3.3V logic systems.

Then a few days ago I came across this little gem. The LM334Z, an adjustable constant current source. Max 10mA, 40V and 400mW dissipation. Adjustable with 1 external resistor. Promising.

I have come up with the following circuit.
image

The components within the dashed line are for testing purposes only. That arrangement provides for about 3mA transistor collector current

I settled on about 5 to 6mA LED current as I thought most commonly available Opto Isolators would be happy with that as it sits about half way to the Max rating so should not stress. Thus I used a 12Ω setting resistor, this is a preferred value and yields a LED current of approx 5.6mA. If you look at the data sheet and extend the curves to a 10mA curve it would follow that a resistor of 6.8Ω should provide that current but that would be the extreme limit.

Using a 4N25 Opto I measured the following.

Output transistor seems to start saturation at 3.5mA LED current, Vce 0.18mV. Vin 2.0V

@ Vin=2.3V, LED Iin 5.5mA, Vce=0.14V

@ Vin=12V, LED Iin = 5.6mA (rising to max 5.65mA), Vce=0.14V.

@ Vin 30V, LED Iin= 5.6mA (rising to max 6.0mA), Vce=0.14V

The rising LED input current at the higher voltages would be due to self heating of the LM334Z which at the 30V stage would be 180mW and took a few minutes to get there but seemed to max out at that point.

The 4N25 has a suggested collector current limitation of 5mA which would not drive much but being so low Vce would be pretty ideal for 3.3V logic inputs.

An Opto with a better suggested max transistor current of 100mA is the 4N33. But there is a trade off. This device has a Darlington output and the transistor voltage drop (Vce) I measured to be 0.72V. Probably a bit marginal for a logic LOW. The onset of saturation is a bit lower at Vin of 1.8V but the rest of the measured numbers are pretty much the same.

Note I have only done these measurement on one of each Opto device and one LM334Z.

But allowing a fudge factor for tolerances etc over a range I would be pretty confidant in specifying a minimum input Vin for the circuit as drawn of 3V and a maximum Vin of 30V. If contemplating a higher input (max 40V) or higher current I would suggest reducing the duty cycle to make sure the LM334Z stays well within limits.

2 DMMs used, Voltage measurement UNI-T model VT71B, current measurement Multicomp model MP730624.

Current meter inserted in the high side between supply and DUT with Vin measured at the LM334Z input to eliminate the meter voltage burden.

For interest I compared these 2 DMMs on the voltage function.

@3v the difference 3mV (0.1%)

@12V the difference 5mV (0.04%)

@ 30V The difference 20mV (0.07%)

So in practice I think it would be safe to say both DMMs agree.
Cheers Bob

7 Likes

Thank you for sharing the circuit and your test findings! Really thorough as always @Robert93820.

This is highly informative and will surely benefit others looking to implement similar setups. Thanks for sharing :slight_smile:

3 Likes

Hi Aaron.
Yes a delightfully simple circuit.
It has got one advantage over a resistor for current limiting. If you use a resistor and specify a range of input voltages the resistor would have to be valued to suit the lowest expected input voltage. When a higher input is used the input LED current will rise in proportion. If you get up into the 24 to 30V range there is a real possibility that the Max LED current could be exceeded. Although most Opto Couplers are pretty generous with this figure the device could be operating under some stress.
And of course the source has to supply this extra current.

With this circuit the LED input current remains at about 5.6mA irrespective of input voltage, subject to the LM334Z absolute max of 40V. The 5.6mA can be reduced to about 4.5mA by increasing the adjust resistor rom 12Ω to 15Ω and so on. I personally would not go below about 4.5mA as you could go a bit marginal if you struck an Opto a bit the wrong way re tolerance spread.

Another possibility is relay operation. If you are using one of the several relay modules available, particularly the type supposedly able to operate at 5V and 3.3V the monitor LED on these mostly only indicates that the relay has been commanded to operate. It does not indicate the relay has actually operated. Providing the relay is switching DC loads up to about 30V or so this can be connected directly to this circuit and the collector of the output transistor connected to a 5V or 3.3V digital logic input using an internal or external pull up resistor.

There was a post recently about this but I don’t seem to be able to find it.

If any one is interested in this application for this little circuit I would be happy to post a couple of suggested arrangement schematics.
Cheers Bob

4 Likes

Are any optocouplers suitable for 3.3v control of 240V mains?

2 Likes

Hi Kimmo
A solid state relay(SSR) should do the job. They normally have an operating voltage of 3 to 32VDC input and are designed for switching AC (at Zero crossing point). 240VAC should be OK. Rating should be marked on the device.
Cheers Bob

2 Likes

Great minds think alike it seems :grin:

I recently designed this circuit for 12V input.

I haven’t fully checked out the specs of the components yet but I’ve used a very similar circuit for 50V in the past.

The solder bridge allows for using an internal voltage and remote contact, or monitoring an external voltage.

D8 should help with a reversed voltage as the opto is not great with that IIRC.

4 Likes

Hi Rob.

Yes, much the same with a slightly different user target. That constant current source seems to have a non adjustable current of 20mA. I have not come across that CC or Opto before although that is not surprising as I have not worked full time for quite a few years now. Applications seem to favour LED drivers.
The diode (D8) is a good idea as you seem to be aiming at higher input voltages.
A lot of logic drivers might struggle with the 20mA.

The input voltage limitation with my components (I won’t say my circuit as they are basically the same) is the 40V max across the CC device. But the current is adjustable with an external resistor.
I tailored to operate down to the 3.3V logic which seems to be all the go these days. The trouble is that you can’t have too many PN junctions or LED voltage drops before you run out of volts at 3.3V so I purposely omitted any series diode. If included it could have pushed the minimum voltage too high or at best made it marginal at 3.3V. It is for this reason I abandoned a simple transistor constant current source. The LM334Z turned out simpler in the end anyway.
And all the bits are readily available (Jaycar).

All up I think this approach is a pretty handy scheme for a little bit better wide input Opto coupler and worth putting into “the might be useful someday” basket.
Cheers Bob

2 Likes