4

I have been thinking about how to produce an optocoupled input that works well over a wide voltage range, say 3V to 30V and I came up with the following schematic.

According to the simulator in CircuitLab it seems to work pretty well, maintaining an LED current between 5 and 10 mA and a total current of less than 20mA despite a tenfold change in input voltage.

schematic

simulate this circuit – Schematic created using CircuitLab

(The ammeters shown are just to measure current. The LED represents the input LED of the optocoupler.)

Is this circuit a good idea, or is there some major problem I'm missing?

JRE
  • 67,678
  • 8
  • 104
  • 179
Peter Green
  • 21,158
  • 1
  • 38
  • 76
  • Good enough?...How can we tell without a spec. It is far better than a simple current-limiting series resistor. At 30V, a 2N3904 will get hot - near its thermal limit. – glen_geek Dec 09 '22 at 02:39
  • Peter, there's a lot of design detail [here](https://electronics.stackexchange.com/a/481317/38098). It shows you how to read datasheets and design something that is also stable over temperature. Best wishes! – jonk Dec 09 '22 at 03:15
  • What about using an LM334? It only requires this IC and one resistor. – Bart Dec 09 '22 at 09:30

1 Answers1

6

I would prefer a circuit similar to this one - fewer parts and line regulation rather better than +/-10% (temperature will have an effect though):

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here

Given aging and temperature effects you need to give the opto more than nominally required to keep it working reliably. You also need to watch the dissipation on Q2 at high input voltage. Something more like 7 or 8ma nominal may be better, or use an SOT89 transistor for Q2.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • When I look at https://www.onsemi.com/pdf/datasheet/2n3903-d.pdf it specs a max dissipation of 625 mW, that seems to give a reasonable margin over the dissipation in the circuit. – Peter Green Dec 09 '22 at 03:02
  • 1
    @PeterGreen At Ta = 25°C and that assumes a junction temperature of 150°C which is about 50°C higher than I like to see, for reliability. If this is used, for example, in an SSR and it might have to live with high ambient you might only have a couple hundred mW to work with. But it's your call. – Spehro Pefhany Dec 09 '22 at 03:06
  • I notice you also used a much lower value of supply resistor than I did (resulting in a much higher input current draw at high input voltage), was there a reason for that? – Peter Green Dec 09 '22 at 03:19
  • 1
    @PeterGreen It's not an optimized design, I just picked a value that I thought would be more-or-less reasonable without any calculation or testing. A lower value will help keep the current more constant at low input voltage (and low ambient temperature), of course, and as you can see it's starting to drop fairly rapidly at 3V. – Spehro Pefhany Dec 09 '22 at 03:39
  • I had a play with higher R2 values in circuitlab and they didn't seem to make a huge difference, slightly worse regulation but still more than acceptable for the application and still much better than my circuit. I'll probablly increase the R1 value a bit too reducing the nominal current and hence the heat. – Peter Green Dec 09 '22 at 04:37
  • 1
    In any case i'm accepting this answer, it seems to give better performance, lower total part count and lower distinct part count than my idea, while still only using generic "jellybean" components. – Peter Green Dec 09 '22 at 04:40