optocoupler questions

Started by zach, July 14, 2010, 10:43:59 AM

Previous topic - Next topic

zach

I recently received several opto couplers from Electronics Goldmine (http://www.goldmine-elec-products.com/p ... ber=G15396). I have previously been rolling my own from photoresistors, LEDs, and heatshrink tubing.

Unfortunately, the optocouplers don't seem to be working correctly. Electronics Goldmine told me they individually test every part shipped. Although I find that rather dubious, I also doubt they're defective and am hoping someone can help me figure out what's going on here.

I wired one up in the simplest possible configuration, going directly between two audio jacks. With the LED leads not connected, it is my understanding no current should flow through the photoresistor. That is exactly the opposite of what happens. I get a clear audio signal through, with a small amount of noise due to the exposed wires, and the exact same when the LED is at full power.

Electronics Goldmine's description says the dark resistance varies from 150k up to several megs, which I interpret as meaning they will sell you whatever value in that range they happen to have in stock.  Still, this shouldn't be a problem as I have achieved the desired effect with a 200k photoresistor.   

For starters, is everything wired correctly?  I assumed the dot was the cathode on the LED and obviously the photoresistor has no polarity. What about polarity on the audio jacks? I was under the assumption this didn't matter and soldered the optocoupler to ground as it was easier to reach.

Here is a very blurry photo for reference: http://rapidshare.com/files/406735015/OptoCoupler.jpg.

Thanks,
Zach

.Mike

Did you test these with a multimeter before hooking them up to anything?

Use your multimeter to measure the resistance on the photocell side to see if it varies. I would use alligator clips to attach the photocell to the meter, and set it on the highest setting. Their site says it takes 10 - 16 mA for the LED side. So, if using a 9V, use a 470 ohm resistor to limit the current to about 15 mA (assuming a 2V forward voltage drop). Briefly touch it to the battery, and watch the meter. If the resistance drops, great. If it doesn't, you may have the anode and cathode reversed, so reverse it and try again. If it still doesn't drop, you may have a bad part.

That's a good price on optocouplers. If it works out for you, I'll probably order some. :)

Mike

If you're not doing it for yourself, it's not DIY. ;)

My effects site: Just one more build... | My website: America's Debate.

zach

I'll runs some tests this evening.  I don't think it's an issue with the LED side because current should not be flowing when the LED is off...which is not the case.

Yes, that is an amazing price.  I still doubt they're defective, but have to believe there's something wrong with them for audio applications.

On another note, can anyone point me to a good reference on the dimming curves of various types of lighting (specifically, LED, incandescent, flurorescent, and ccfl)? In other words, I'm looking for the relationship between voltage and lumens. For instance, I know that CCFLs are linear, whereas regular fluorescents are not due to the necessity of keeping the cathode above a certain temperature. Response time (how long it takes to reach a certain brightness after voltage is adjusted) would also be helpful. I'm also wondering how the size and value of the photoresistor effects this. I ask because, after this failure, I'm considering rolling my own again but experimenting with different light/photoresistor combinations to see if I can improve on them. It seems to me that the old Univibe combination of an incandescent bulb and large photoresistor would be more responsive than using an LED, although the downside is having to change the bulb intermittently.

JKowalski

#3
Quote from: zach on July 14, 2010, 01:24:30 PM
It seems to me that the old Univibe combination of an incandescent bulb and large photoresistor would be more responsive than using an LED, although the downside is having to change the bulb intermittently.

I'm not sure what you mean by responsive here.

The incandescent bulb method is probably the most non-linear you can get. The warming/cooling and resistance change of the bulb drags out and delays changes in brightness, in addition to the way the photoresistor drags it's response. You cannot go very fast with the bulb, since at a certain speed the lag of both these properties will mush into nothing. LED's respond instantly, eliminating the response lag on one half of the coupler at least. Bulbs require high current, they heat up to high temperatures, and they are not reliable over long periods of time - in comparison to LED's, which have none of these problems at all.

A properly working LED+photoresistor combination is the best way to go.



Looking at your picture it looks like you wired the jacks up wrong? You can't put the photoresistor across the grounds, because if you plug both ends of the circuit into two different boxes that share a ground, it won't do anything. Also, if your jacks ground to the enclosure by design, then they are always connected no matter what the photoresistor does. Switch it around and try again.

It would be more reliable to use this photoresistor in a voltage divider instead of in series with the signal. Right now you are relying on the chance that the circuit impedance of the following circuit will act as the bottom of your voltage divider. But every circuit will have different impedances, so the response will change for different circuits. If you use a voltage divider you can set the range and leave it, without having it change on you for every pedal you use next.

If you drive the LED with a high brightness LED, you can bring it down to as low as 50 ohms. If you make the casing very opaque, you can get resistances up in the 10 meg range.

zach

Thanks, Chris.  This is by far the most informative response I've recieved after posting this on two forums. 

Do you know if LEDs have a linear dimming curve?

I think what you're saying as far as the range of resistance with the LED off is that it depends more on the integrity of the casing than the photoresistor itself.  Is this correct?  I still don't understand why the manufacturer wouldn't be able to specify this in less than a several megohms range. 

I don't quite understand what you're saying about ground on the jacks, but I'm glad I at least got an answer about them.  The jacks in the photo are in-line, so ground to the enclosure wouldn't be a problem at the moment, although it's something to consider for the finished product.  As you might expect, the input is a guitar and the output is an amp, so how are they sharing ground?  Or are you saying this would be the case if I used the same power supply for multiple pedals?  I thought they isolate ground between each output so this wouldn't be a problem.  Regardless, I'll give it a shot the other way.

.Mike

Quote from: zach on July 14, 2010, 03:06:34 PMI still don't understand why the manufacturer wouldn't be able to specify this in less than a several megohms range.

As I understand it, they can. But it's expensive because they have to test each unit. Everything I have read indicates that making an entire run of photocells that match perfectly is very difficult, if not impossible. As a result, the manufacturers give minimum and/or maximum resistances. As long as the part they sell falls into that range, the manufacturer has held up their end of the deal. If you need really tight specs, you pay a price for that.

Mike
If you're not doing it for yourself, it's not DIY. ;)

My effects site: Just one more build... | My website: America's Debate.

zach

Well, I just tested all five optocouplers I purchased and they have absolutely zero resistance.  And yet Electronics Goldmine says, "We test each one before shipping and each one meets the parameters shown in the description."  Am I missing something here?

R.G.

Quote from: zach on July 14, 2010, 07:48:40 PM
Well, I just tested all five optocouplers I purchased and they have absolutely zero resistance.  And yet Electronics Goldmine says, "We test each one before shipping and each one meets the parameters shown in the description."  Am I missing something here?
Check the pinout to be sure you're testing the correct pins. If they're really all shorted, send them back.

I've ordered from EG before many times and been happy with what I got for my money; but that only counts as far as the last order, doesn't it?
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.

Lurco

Be sure to set your multimeter to OHM before measuring the resistor side of the coupler!

PRR

Your link seems broken.
http://www.goldmine-elec-products.com/prodinfo.asp?number=G15396

Your RapidShare link is expired; use http://tinypic.com/

> Do you know if LEDs have a linear dimming curve?

?? LEDs don't dim audio.

The combination of LED and LDR can dim.

The light/Voltage ratio of an LED is strongly non-linear. (Nothing below 1.4V, max-bright by 1.7V.)

The light/Current ratio of an LED is very nearly linear. (Down at a fraction of an mA, leakage diverts current and the LED goes out.)

The resistance/light function of an LDR is always non-linear. Some recipes have a long quasi-linear range.

Here is jc's plot, which looks very-near the plots I was making 30 years back:

http://www.lynx.net/~jc/NSL32SR3%20subcircuit%20vs%20data.jpg
http://www.lynx.net/~jc/NSL32-SR3modeling.html

The particular NSL32 part he used gives "sorta linear" resistance within 2:1 over a 100:1 range of current:
300r at 1mA
2,000r at 0.1mA
40,000r at 0.01mA

A single resistor does not attenuate; there's always other circuit values and these must be accounted. The usual thing is to wire a Voltage Divider. The attenuation of a voltage divider is NOT a simple straight function of either resistance.

The rise/decay time of an LED is "instant" for our purposes. Much faster folks than us (MHz data-links) have to fight stray parasitics. I suppose that if you really get the electrons flowing right-quick, there is some lag between excitation and light; this is far beyond our interest.

LDRs are slow. Most will go from >1Meg down to few-K faster than your ohm-meter. They go up slower. Most will rise above 100K in less than a second, a few take minutes to rise above 10Meg.

Don't have a bright light on the bench. This is essential in home-brew. I would assume this black-epoxy is very light-tight, but?

I too doubt any retailer can do 100% testing on $0.69 parts, especially a part with no standard tester (resistors/caps go in a standard DMM). However modern production parts are 99.99% good at the factory. It is remotely possible GM has been duped by a bogus-part wholesaler.... even NewEgg got bit by a truckload of fake CPUs. Such fraud is rising; but mis-wiring remains as popular as ever.

What Mike said. Use ohm-meter on the LDR side. Should be >1Meg. Wire 9V batt and 500-1K resistor to the LED side. Verify ~~1.6V across LED pins; if 5V then swap the polarity. If 9V both ways, maybe they got the dot on the wrong end, flip it.

LED versus LDR: nearly every LDR uses round-wire legs, most LEDs now use flat legs punched from strip metal. LED should also have one short leg, though this may have been trimmed when packaging the coupler.
  • SUPPORTER

Beo

Quote from: PRR on July 15, 2010, 01:21:04 PM
The particular NSL32 part he used gives "sorta linear" resistance within 2:1 over a 100:1 range of current:
300r at 1mA
2,000r at 0.1mA
40,000r at 0.01mA

I recently got a grab bag of mostly unmarked optocouplers from Electric Goldmine, and this test method worked for me, to be sure the opto's are functional. I found a lot of variance between the resistances at these LED current, but I could use this static method to match up opto's. However, it's hard to know the response time, and whether any of these are decent for audio applications. Is there a simple audio application to use to test an opto's "goodness" for audio? Or would the test circuit in this link be a good way to evaluate an opto for audio use?

http://www.eetimes.com/design/test-and-measurement/4227865/Simple-circuit-measures-optocoupler-s-response-time

PRR

> the test circuit in this link

That is stunningly clever.

It might be good (in fact they suggest) to scale "R1" similar to the resistor in your actual application, or by the minimum useful R of your photo-R. I'm more familiar with audio limiters, which usually use fixed resistor near 25K-50K (so a 1K photo-R can get deep limiting). For high resistances you can't use TTL, CMOS is suitable and easy.

In the top-end limiters the photo-Rs were selected not just for attack, and decay to a higher value, but for decay to a VERY high value. Putnam found some cells with mixed opto-stuff that gave a very long tail. It could take a minute to plot the full decay.

However for most hackery, you want to sort the too-darn-fast from the not-so-fast. This circuit will do that fine.

I assume they expect you to use an oscilloscope. Actually you can "hear" the sum of attack and decay by the tone pitch (or beat-speed for slow optos). You may even be able to guess the attack click from the decay click.
  • SUPPORTER

Beo

Quote from: PRR on April 24, 2012, 02:08:44 AM
However for most hackery, you want to sort the too-darn-fast from the not-so-fast. This circuit will do that fine.

I'll give this circuit a try. I have a scope. For most stomp uses of opto's (LFO's, Trem, etc), we want too-darn-fast, right? Or is something in the middle better?