Can LED/photo-transistor optocouplers be used as variable resistances?

Started by Mark Hammer, October 01, 2014, 11:11:34 AM

Previous topic - Next topic

Mark Hammer

Folks who have built any of the many envelope-controlled autowahs that use bandpass filters, like the Dr. Q/Quack, Nurse Quacky, Bass Balls, et al., will have used a bipolar transistor as the control element; functioning as a variable resistance-to-ground that is used to sweep the filter center-frequency.

While "pure" isolation of the transistor is not critical to the circuits working, I wonder if they might be coaxed into better, and more controllable, performance if they were isolated.  Things one might do to shape the time constants of the envelope signal are often constrained by the rather direct path between the rectifier and base of the transistor in question. 

The obvious response to this challenge is the fairly standard photo-transistor-based optoisolator, containing an LED and a transistor whose base is governed by the light shining on it.  And I ask because these things are readily available, cheap, compact, and there is a very broad range of products available out there.

Can these things work, or are the typical specs of either the transistors they contain, or the LEDs, or something else about them, incompatible with the task at hand?

R.G.

I think they can work. They will probably have limitations, as you've guessed.

They'll probably work in circuits where there is already a bipolar transistor used as a variable resistor. They already suffer from the normal ills of a bipolar used that way, which may be OK, but there is another added issue.

A phototransistor works by the incoming light generating electron-hole pairs directly in the base region.  This has the same result as inserting base current - "poisoning" the ability of the collector-base depletion region to hold off current flow. When you turn the light off, it takes some time for the holes and electrons to recombine so the depletion region can resume not conducting at all. That time may be long in some situations.

I'm guessing that this is a non-issue for modern optoisolators, because the phototransistors have been worked on for decades to get them to recombine and resume non-conducting quickly. But it's something to watch for.

Just guessing.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Mark Hammer

Thanks for that.

Would any of the more familiar 6-pin 4N3x types serve as potential candidates?

teemuk

Quote from: R.G. on October 01, 2014, 11:27:56 AMI'm guessing that this is a non-issue for modern optoisolators, because the phototransistors have been worked on for decades to get them to recombine and resume non-conducting quickly. But it's something to watch for.

I have a "302 Circuits"  book printed in 1985 (basically a compilation of various circuits from Elektor magazine) and even then there were optocouplers with a bandwidth from 5 Hz to excess of 100 kHz. Perfectly suitable for audio applications.

So yes, optocoupling devices adequate for generic audio applications have existed for ages.

But it is indeed a matter of picking the right device for the job. Especially generic LDRs do suffer from the aforementioned "saturation" and "recovery" effects and these can be particularly long in many of them. For example, response times of VT900 series LDR's are practically measured in milliseconds (rise time being almost 10x longer than fall time, and in addition resistance change may take several seconds to "develop fully" due to saturation characteristics). On the other hand, turn on/off and rise/fall times of something like MOC205-208 optoisolator series are only few microseconds.

So, depending on the device they can be entirely different animals and either perfectly fine or absolutely unusable for the particular application.

bool

Purely theoretically, you could f.e. trigger a 4N25 with a "led" and use the 4N-transistor as mentioned, plus using the transistor base as an auxiliary "cold" or "init" value control (via a pot, or something else).

edit: but if you just want to drive the "variable-r" transistor harder, it's fairly simple to construct a "darlington" that "doesn't have collectors tied together". So the driving bjt would just have its collector tied directly to some V+, and through some resistance to limit what current can get dumped onto the driven bjt base. Works, and very predictably. Perhaps cheaper with the use of film caps and said "darlington" vs. a single bjt with a tantalum cap (for time-constant setting in envelope). .. speaking for TH components, not SMT.

PRR

> already a bipolar transistor used as a variable resistor.

What he said.

And how often do you see that?

"Resistor" can be used many ways. Sometimes a transistor can do the job. Example is: I can use a constant voltage and a resistor to get a constant current. I can also get a constant (maybe constanter) current with a transistor.

However the transistor trick often has a resistor under it, to monitor the current. If you are doing the opto for isolation, you must now isolate the monitor voltage.

> Quack, Quacky, Balls, et al., will have used a bipolar transistor as the control element

And you have found the one place where a BJT "is" used as a variable audio resistor.

As a general-purpose audio attenuator, a BJT can only handle VERY small signals. The main use is a mute on CD deck outputs... with bias you can have a fair collector voltage no distortion, and when muted the collector voltage is zero so no distortion (or distorted bleed-thru).

National Semi published an app-note where a BJT attenuates the signal from a microphone for AGC in a $13 cassette deck. There's actually a $999 pro box which works this way. However this is about the least-used AGC technique around, because it is fussy and has limited S/N.

With a BJT you usually know the hFE within a factor of 2, so you can predict how much base current will cause how much collector action. Photo-BJTs have much broader spreads of transfer ratios with much greater variation against current.

The speed issue R.G. raises is real but generally not a problem for music audio. A reasonable choice of base resistor will bleed-off stored charge in a high audio cycle. Extreme designs get into the MHz.

There is a photo-FET which is more appropriate for audio attenuation. Like any FET the peak audio has to be much-less than the pinchoff voltage. For fast switching they go for low pinchoff. In my youth I experimented and could only hit a few milliVolts without gross distortion. Knowing more now I'd say that 40dB S/N is not so hard but 60dB S/N might be really hard. Stage amps often expect better. (Not that S/N is ever large in one passage, but because when turned to Loud and sitting idle in a quiet room you hear hiss.)

> the rather direct path between the rectifier and base

Get more clever with rectifier buffering.

Anyway driving an LED is different and not necessarily easier than driving a base. (You may need 10X the current and 3X the voltage for starters.)
  • SUPPORTER

bool

A bjt as a "variable" element has imho the "character" much different that cleaner alternatives, so even a jfet could be "too clean" in some circuits. I also did a lot of "playing around" with different such circuits ... in 80s (ouch). A "firmer" base-drive could even be cheaper and with less device variance compared to optocouplers (only an assumption).

midwayfair

Ray Ring posted a lot about distortion issues with these. Look up his optical compressor, which uses the H11F1 as a variable resistor (and sounds very good).

I know CultureJam tried to get one to work in a tremolo and it was a bust.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

Mark Hammer

The ideal control element, for me, at least, tends to be a relatively quick LDR, since the limits on its speed serve as an additional layer of lowpass filtering on the envelope ripple.

BUT, if the design is premised on a BJT instead of an LDR, I figure what the heck.

But Paul makes a valid point about current/voltage requirements.  Being a suitable category of device for insertion into the circuit is separate from something being a plug-and-play component.