DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: Mark Hammer on September 14, 2003, 11:07:58 AM

Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Mark Hammer on September 14, 2003, 11:07:58 AM
There has been some discussion as of late on the topic of modulation waveforms.  In particular, the idea of a hypertriangular LFO with one peak being normal linear triangle and the other peak being sinusoidal so as to audibly "decellerate" when a filtering effect of some type starts sweeping towards the low frequency range of its filtering effect, thereby accentuating the effect in that frequency range we are most likely to notice the effect.

At the same time, there has been some discussion of the properties of LDRs and LED/LDR optoisolators.  In particular. some discussion has mentioned in passing the fact that LDRs have a fast turn-on and slow turn-off time.  That is, the drop in LDR resistance when lit is much faster than the increase in resistance after the light source goes off.  This is a real boon in any sort of sidechain-driven device, like a noise gate, or limiter, compressor, envelope-controlled filter, etc., since it has the effect of being responsive to note onset but reducing the envelope ripple that is a naturally occurring part of the minimalist envelope followers that tend to be part of stompboxes, and the problematic signal sources that drive them and have to be detected, and the note decay qualities that create the problems in the first place.

Though LDRs are often far preferable as control elements for both their noise characteristics (low), flexibility of placement (they can go anywhere a resistor can), distortion characteristics (ultra-low), and design simplicity (just work out the relevant R*C formula and there you go), this non-linear aspect of how an LDR cycles through its resistance range can be problematic with respect to LFO-driven effects.  I say "can" be rather than "is" because the problem only arises when one wishes to attain modulation speeds that are faster than the LDR decay-time will accommodate.  In other words, if your sweep cycle is 0.5hz (one full sweep cycle every 2 seconds), then the response time of the LDR is fast enough so that LDR resistance linearly corresponds to where the LFO wave-form is currently at.  Crank up the speed to 3hz or more, and most LDRs tend to choke as the decay-time lags behind - i.e., the LFO has started to climb again before the LDR has reached its maximum resistance.

Okay, here is the central part of this posting.  I've seen schematics for a number of pretty standard 2 op-amp LFOs that have an extra feature of being able to adjust either time balance (i.e., rise time slower/faster/identical to fall time) or else individually adjust the rise and fall times of the LFO waveform to produce waves that are not quite triangular, in addition to the usual sweep width and frequency.  I'm wondering if:
a) these added features would be helpful in producing more linear LDR sweeps when working with faster LFO rates
b) whether anyone has tried it and what it might sound like

I know, for instance that one of the things about, say, the Uni-Vibe that has been discussed is the way the rise-time of the Uni-Vibe's incandescent bulb provides a good match to the LDRs it uses for a more desirable sweep "feel".  I'm wondering if an extra control for skewing the LFO waveform that drives the LEDs illuminating LDRs, whether in self-contained optoisolators or in homebrew LED/LDR combos might help in achieving a more desirable modulation feel.  It certainly isn't that hard to add onto the standard 2 op-amp LFO.  I certainly wouldn't want to make it a fixed setting since, as noted, the interaction between LDR characteristics and LFO speed makes it suitably compensatory at some speeds but not others.

Opinions?
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: rx5 on September 14, 2003, 11:42:24 AM
great Mark.... at last , someone hears my LFO problems.... :o  :lol:

pls post your e-add here.... dunno your e-add.... I want to send my modified LFO diagram ...maybe you could optimize it farther.... :lol:

thanks.... :wink:
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: The Tone God on September 14, 2003, 01:52:05 PM
Good post Mark. MANY years ago I was playing with circuitry for interfacing an LFO to LEDs or any other device. One of the things the circuitry did was made the central voltage point for the sweep adjustable so instead of the sweep occuring around say 4.5v you could move it to 3v, 7v, or whatever. You can take advantage of the voltage response of the device you are driving thus simulating some of the behavour you mention.

Along with that was a control to adjust the response time of the interface circuitry to the LFO output. There was some LFO waveform "smoothing" circuitry as well to cut down the agressive  peeks at the end of the sweep. I could even amplify the waveform if needed.

None of this circuitry played with the actual sweep of the LFO so you couldn't change the waveform's behavour itself. Just how it drove the device.

Andrew
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Mark Hammer on September 14, 2003, 02:13:15 PM
I guess I should emphasize that what I'm thinking of is primarily restricted to slowing down the rise time of the LFO so that it outputs a slightly ascending rampish wave-form.  The slower rise time would compensate for differential on/off time in the LDR by forcing the LDR to decrease resistance every bit as slowly as it increases resistance: catch-up, if you will.

Bear in mind that since you can't make an LDR go faster than it is able, there are some serious constraints on the extent to which we can even up that resistance change.  Those of you with LDR-based tremolos will note that once you start to crank up the speed, at a certain point you lose sweep depth VERY quickly.  Between that range where the LDR becomes unable to track the LFO, and that range where it is more than able to, however, there must be a sub-range where a little bit of skewing would make it behave better.  Since the skew is relegated to just the rising part of the LFO triangle (or square), all we're really talking about here is maybe adding a circuit fragment and SPST toggle to nudge the skew a bit in a defeatable manner.

Since tremoloes came up, do tube-based tremoloes in amps: a) have a pure triangle LFO, and/or b) track the LFO in a linear manner?  I ask because anyone who has used a tube amp with tremolo will immediately note the very different feel, in comparison to solid-state tremolo, and I'm not sure whether the difference lies entirely in where the amplitude modulation is being applied or the way that modulation is occurring (i.e., rise/fall time, waveform, etc.).
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: The Tone God on September 14, 2003, 02:25:47 PM
Hmm...I suppose you could make something to compensate for the respose time of the LDR but as you said the limitation at some point will be the LDR itself no matter how much compensation you use. Take in to account that not all LDRs behave the same so you would have to put in a number adjustments to compensate not only the for LDR itself but all the different types of LDRs as well.

If the goal is even response and you don't want the "charm" of the LDR's response time then it might be easier to go to something else like say FETs.

With that said I belive it would be possible but I haven't played with something like that. Just interface circuitry.

Andrew
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Peter Snowberg on September 14, 2003, 02:59:16 PM
QuoteIf the goal is even response and you don't want the "charm" of the LDR's response time then it might be easier to go to something else like say FETs.

I think that's probably the avenue with the most opportunity. PhotoFETs are some pretty cool switches.

If you can control the transfer function, you can create the "perfect" LDR; at least in theory.  :wink:

I've wondered how vital the response of an incandescent lamp is in creating the perfect EO response. It's got to have a big outcome as it would add its slowness to the resistive memory of the CdS LDR.

Has anybody played with using LEDs to emulate the response of an incandescent lamp?

It seems like the 3Hz/LDR barrier could be broken with a H11F1, a couple opamps, and a few descete parts. Hmmmm... maybe I'll file that next to "tube emulators".  :lol:  LOL!

-Peter
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Nasse on September 14, 2003, 02:59:55 PM
In G Andertons famous book "Electronic Projects for Musicians" was that project "Super Tone Control" which is state variable filter or thereabouts. It was told that by puttin in more large caps you could use that to process analog synth control voltages, and that includes LFO s and envelopes I quess.
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: drew on September 14, 2003, 06:56:07 PM
You know, I was just thinking about this the other day, since I have been obsessed with making a better tremolo for a long time now... and I think I may have the core for an idea.

A vactrol turns on fast, but turns off slow.

My idea: Use TWO vactrols.... in a simple inverting op-amp configuration (mind you there would have to be some trimmers, support parts, etc.) link the LED ends of the two vactrols to an LFO... but have one get an inverted signal from the LFO. Put one of the LDR's in between the signal and the inverting input of the opamp, and put the other one in the feedback loop.

When the LFO is high, the feedback LDR will be low (low gain) and the input LDR will be high (low gain.) When the LFO is low, the feedback LDR will be high (high gain) and the input LDR will be low (high gain.) As one's decaying slowly, the other will turn on immediately to compensate. If fed a square wave, it would look like a low-pass-filtered square wave, but the depth should not be reduced horribly as in most vactrol-based tremolos because at any point, one of the LEDs is going to be able to turn on immediately.


Does that make sense? I wil post a schematic of my astable multivibrator/dual vactrol idea if anyone wants.
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: drew on September 14, 2003, 07:02:40 PM
BTW: An astable multivibrator has 0 inputs and 2 outputs; the 2 outputs are square waves, one 180 degrees out of phase. It is an extremely simple circuit but I don't know if it'll make the audio signal click... guess I'd better try, huh?

Something I always wondered too: In tremolos which have a clicking problem, why not just use two 9v batteries? Unconnected? Just an idea... when I get some 3pdt switches in maybe I'll try it. (non-true-bypass, but still...)

(Hey, wait, maybe that's where the 4pdt comes in!)


drew
toothpastefordinner.com
Title: Try the Voodoo Vibe LFO Driver!
Post by: Frankgb on September 15, 2003, 05:58:43 AM
Mark,

Some time ago I made the LED driver from the Roger MAyer Voodoo Vibe to drive the LDR'd in an Easyvibe.

It worked fine and had heaps of controls including "symmetry" which does what I think you're looking for.

I made a PCB design for it if you're interested, it uses an 8038 Function Generator IC.

cheers

Frank
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: drew on September 15, 2003, 10:20:39 AM
For tremolos that don't "cut" enough (i.e. don't have the depth required to completely cut off the signal)....

Wonder if it would be possible to apply a little bit of the buffered incoming signal to the + input of an opamp with a trimmer (with the "chopped" signal on the - input, and feedback for slightly above unity gain) to use the common-mode characteristics of the opamp to "zero out" the signal at its lowest point in the modulation?

Especially for square-wave modulation....




drew
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Jay Doyle on September 15, 2003, 10:30:22 AM
Mark, et al.,

There is an easy way to solve this problem, without changing your circuit, your LFO or even not having to use something other than an LDR.

Just use a different type of LDR.

There are two types of LDRs, those made out of cadmium sulfide (CdS) or those made out of cadmium selenide (CdSe). CdS types, which seem to be all that Small Bear carries at the moment, exhibit the problem that you are worrying about, slow decay time. CdSe types have a turn off time nearly as fast as their turn on time and are perfectly suitable for applications where a CdS types turn off time is too slow, such as phasers and tremolos, among others.

The only real difference is in the wavelength that they respond to with CdS responding to red light (about 500 nm) the best and CdSe  responding to green light (about 600 nm) the best.

The hard part is finding them. I know that Clairex makes them in the same numbered series that Steve at Small Bear sells (Steve's are CdS), I just can't find a place that has them for sale. I thought that Hosfelt had some in the past but I can't find them on their site.

Jay Doyle
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: rx5 on September 15, 2003, 11:21:41 AM
@Jay

hello... since youve mentioned thier differences, then how would you differentiate a CDs from CDSe ?? diff color?? by thier form? size? :?:  :?:
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Ed Rembold on September 15, 2003, 11:31:35 AM
Jay,
I recieved an order from Clairex in march, at which time they told me that they were shutting down their opto division. Last orders were accepted in april.
Too bad, they were the best.
Ed R.
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Mark Hammer on September 15, 2003, 02:40:29 PM
Lots of good ideas here.

Jay,
Certainly the category of LDR is worth exploring.  My gut sense tells me that this is a mail-out job since just about everything I've seen locally is CdS.  I think my thinking may have been too limited in past by the looming spectre of CLM6000's.  Obviously there ARE other types of LDRs worth exploring, so thanks for jogging my thinking a bit.

Frank,
The layout would be of interest to me.  I've got an 8038 in my parts bin (purchased for a synth VCO at the dawn of recorded history I think) so this might be very handy.  You can send it to mhammer@ccs.carleton.ca

Drew,
I think I get the gist of what you mean.  Basically, your intent is to use two LDRs in different places that set gain, and use the point on the light/resistance curve of one to offset the point on the light/resistanc curve of the other.  In principle it seems plausible, although obviously there are some details to be worked out. such as how much resistance change can be accomplished in X amount of time.  Seems like there is a lot of tweaking ahead.  Not a reason to NOT do it, just that I don't have hopes for it simply falling into place right away.  There may be some series/parallel resistor tweaking too.  The other thing, of course is that this is limited to gain adjustment and can't be made to work for phasers, or other filter-type devices.   Still, seems worth pursuing.

Andrew,
The noise/distortion/ripple-immunity distinction between FETs and LDRs remains firmly in place.  Even with a decay time chopped in half, the instantaneous response of an FET pales in comparison to an LDR with respect to ripple-immunity.  So while photoFets are sure as heck handy, small, easy to buy, etc., LDRs just make some things easier.  I have somne H11F1's in the bin.  One of these days I'll have to throw two copies of something together with photoFETs and LDRs to demonstrate the difference in ripple and signal handling.  Who knows, I may well be overselling LDRs, when it comes to real-world needs (as opposed to ideal-world specs).

I like this thread.  It's brought out some useful thinking in folks.
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Jay Doyle on September 15, 2003, 02:53:40 PM
Ed, well that just shoots that all to hell doesn't it? I know other manufacturers make them I just don't have any links available. That will certainly make things harder.

rx5, sorry, there isn't a way to tell the difference just by looking at them. Chances are though if you see a LDR, it will be CdS. That is all that Mouser carries. I'll look into it some more.

Mark, great thread.

Jay
Title: re: tremolo
Post by: drew on September 16, 2003, 04:39:11 PM
I am prettying up this circuit to get it ready to draw the schematic... and also trying that "feed in the original signal" idea to get more "chopping" out of it.

Theoretically the dynamic range is about 60dB at 10hz... It is a little mushy, but I am going to try tweaking things a bit to see what I can do about that.

I am also interested in potentially using more than one in series/parallel (LEDs in parallel, resistors in series) to get a wider range out of it... No idea if this would work, though.


drew
toothpastefordinner.com
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: rx5 on September 17, 2003, 01:00:53 AM
Hi guys,
just wanna clear up things.... :)

what color of LED is best for use on an LDR (cds) ??

in mutron, it was green.. some say RED is or has the best sensitivity...some white....

so what really is the best color of LED to use for CdS ??? to get the best possible usage of it..

thanks...
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: blackbox on September 17, 2003, 01:15:10 AM
It depends on what kind of LDR you are using.  The color sensitivity range is usually listed in the specs.  CdS are generally more responsive to yellow or green and CdSe to Red.  The spec sheet should give you a peak response in nm that you can then compare to an LEDs Peak Wavelength value (also in nm).  I have some application info, etc. for optos on the blackbox DIY section at http://www.blackboxmusicfx.com/diy.html  

One thing that I don't think has been mentioned is plain ole FETs for voltage control.  They are not the greatest for audio, but for controlling other voltages, they are a cheap and good substitute for photo FETs for apps where distortion and feedthrough aren't a problem.

Lorren
Blackbox Music Electronics
http://www.blackboxmusicfx.com


Quote from: rx5Hi guys,
just wanna clear up things.... :)

what color of LED is best for use on an LDR (cds) ??

in mutron, it was green.. some say RED is or has the best sensitivity...some white....

so what really is the best color of LED to use for CdS ??? to get the best possible usage of it..

thanks...
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Peter Snowberg on September 17, 2003, 05:25:44 AM
Has anybody played with units from Silonex?

(http://www.silonex.com/images/graphics/cplranim.gif)

Most photocells are made of either a Cadmium Sulphide (CdS) or Cadmium Selenide (CdSe) photoconductive material. Either material is suited for specific applications, but only a compound of the 2 material will optimize audio performance and remove significant audio performance issues.

See:

http://www.silonex.com/audiohm/constants.html

They have effects for application circuits too! 8)

http://www.silonex.com/audiohm/compressor.html

-Peter
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: rx5 on September 17, 2003, 07:17:18 AM
ok...thanks

how do you wire a normal JFET to make it function like a CdS????

preferably positively triggered, more voltage -> the lower the resistance of JFET becomes.... thanks.... pls post links...need to know more
===============================================
been experimenting lately with LEDs and CdS...

tried using high-brightness green: attack was fast and decay also fast....

tried using high-brightness red:  fast attack and SLOW decay.... how come???

setup was both parts encased in plastic tube(sealed from light) then LED was voltage driven with a 9V battery(seriesed with 100ohms) , then for the CdS, connected it to the analog multimeter(resistance x10K)....

any reason why using RED led resulted in slow "dropping" of resistance???
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Mark Hammer on September 17, 2003, 08:56:17 AM
It's not the LED, its the match between LED spectral content and the spectral sensitivity of the photocell.  

Photocells have bandwidth like anything else, although we're not talking the equivalent of a 6-pole filter at each end of that frequency/wavelength distribution.  So with a "preferential" wavelength range, just about ANY visible colour light will produce a resistance change, though not all wavelengths will produce the same amount of resistance change at the same luminance or intennsity.

As Lorren notes below, LDR peak sensitivity is indicated in nanometers - the light "wavelength" - with longer wavelengths being more towards the red end of the visible spectrum and shorter wavelenths being more towards the purple end - passing through green, then blue on the way.  Since yellow is in between red and green in the spectrum, any photocell which has peak sensitivity for yellow light will also be robustly affected by red and green LEDs shining on it, though yellow light will get your biggest "kick" at the LDR.

This is the long way of saying that the difference in decay time is likely the difference between a non-peak colour of LED poking the LDR in the shoulder and the LDR going "Uh-huh" and quickly diverting attention, and a peak colour slapping the LDR silly, sending it reeling for a few moments.  The decay difference you hear is the result of the differential recovery time for peak vs non-peak wavelength.

Make sense?
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Nasse on September 17, 2003, 10:37:50 AM
Not only LDRs but LEDs too are different from their make and material. I was fooling some month ago with some LEDs. I made simple triangle wave generator working at 9V and tried some LEDs at its output. I had some "superbright" and "ultrasuperbright" ones and some "regular" ones. Some seemed to give more "linear" variation from darkness to full intensity, some were quite quirky for their response. If I remember superbright green-blueish ones were nice ones. So I think you should test your leds too, before putting them in shrink or something
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: blackbox on September 17, 2003, 01:14:15 PM
Hey Peter-
The Audiohm series (like the NSL32SR2, etc.) have a really fast response time and are a great choice for certain applications like high end compressors, phasers, etc.  The venerable NSL-32 is much slower but a better choice for things that require a slower response time or envelope ripple filtering.  There's pretty much a part for every need.

Lorren
Blackbox Music Electronics
http://www.blackboxmusicfx.com


Quote from: Peter SnowbergHas anybody played with units from Silonex?

(http://www.silonex.com/images/graphics/cplranim.gif)

Most photocells are made of either a Cadmium Sulphide (CdS) or Cadmium Selenide (CdSe) photoconductive material. Either material is suited for specific applications, but only a compound of the 2 material will optimize audio performance and remove significant audio performance issues.

See:

http://www.silonex.com/audiohm/constants.html

They have effects for application circuits too! 8)

http://www.silonex.com/audiohm/compressor.html

-Peter
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: blackbox on September 17, 2003, 01:25:39 PM
You wire up the gate through a resistor (depends on what range you need) to the voltage control source and the drain & source act as the variable resistance.  This isn't a direct replacement for an LDR which will work in any application where variable resistance can be used.  Using a JFET will only work well in some applications but it is very fast and cheap.   It won't for instance make a good VCA.  You can however use it for a phaser stage like the MXR but it requires matching and is prone to distortion.  It's best in non-audio applications like VCOs, etc.  My advice is try it.

Lorren
Blackbox Music Electronics
http://www.blackboxmusicfx.com


Quote from: rx5ok...thanks

how do you wire a normal JFET to make it function like a CdS????

preferably positively triggered, more voltage -> the lower the resistance of JFET becomes.... thanks.... pls post links...need to know more
===============================================
been experimenting lately with LEDs and CdS...

tried using high-brightness green: attack was fast and decay also fast....

tried using high-brightness red:  fast attack and SLOW decay.... how come???

setup was both parts encased in plastic tube(sealed from light) then LED was voltage driven with a 9V battery(seriesed with 100ohms) , then for the CdS, connected it to the analog multimeter(resistance x10K)....

any reason why using RED led resulted in slow "dropping" of resistance???
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Mike I. on September 17, 2003, 01:42:09 PM
More points to consider:
a) Don't lose sleep about spectral match between LDR and LED... if not an exact spectral match then simply increase or decrease the drive current of the LED to suit. Or adjust the LED-LDR spacing.

b) The emission angle (beam angle, related to LED lens shape) of LED also affects the  total amount of optical energy incident on the LDR.
As an example, you are wasting battery power with a diffused LED where the LDR only intercepts 10 percent of the emitted light. Narrow beam-angle can be used for more efficient coupling.

c) I have not seen any fx units where the LDR is brilliantly illuminated by a lamp or LED - for lamp units, a dull-red to yellow filament is sufficient. Most LDR's seem to be fairly sensitive over their useful resistance range.

d) Note that LED's are current-operated devices - the light output is directly proportional to drive current (within limits - see f below, but certainly has a wide linear range). A current source driver for LED's makes sense when you want to accurately translate an LFO waveform to variable light output.

e)LED's vary considerably in efficiency between different types.
Certainly the newer ones are more efficient than the early 70's units. But...

f) The more efficient units seem to have  a threshold effect where the unit becomes more efficient above a  minimum current value, the older less-efficient GaP or GaAsP are more linear with respect to light output vs. drive current. So perhaps the older units would be more suitable in terms of "minimum light to LFO waveshape" distortion.

g) For some applications it may be desirable to use voltage-source drive for the  LED - this will make the light output vary exponentially with drive voltage - giving a simple type of volts/oct converter. Can give an excellent sounding sweep with an LFO. A second matched LED can be used for bias stabilization as this is a more finicky circuit than a simple current-source driver.

h) Experimenting with different LED/LDR combos becomes a lot easier when you make an adjustable drive circuit with non-interacting Manual and LFO Amount controls (aka offset and  gain controls). This implies that the LFO waveform must be centered about ground (or the mid-supply pseudo-ground) so that varying the LFO Amount control does not affect the offset.
Regards, Mike
Title: Making LDRs "behave" better by tweaking LFO wavefo
Post by: Mark Hammer on September 17, 2003, 02:05:01 PM
As always, Bill (in joke, don't ask), you bring a more resonant ring of authority to these debates than I ever could.

One thing I will add to your comments is that LDRs are pleasingly maleable in the extent to which you can tinker with series and parallel resistances to compensate for whatever else you have to do in driving them to make them behave as you want.  Does the baseline brightness of the LED have to be too bright/dim in order to get the response time characteristics you want?  No problem, just add a series/parallel resistor to increase the resistance to where you want it.  If you use an LDR as one half of a voltage divider, you can get all sorts of division ratios and tapers just by playing with the other resistance leg of the divider and clever use of a resistor in parallel wih the LDR.

BTW:  Since Gilles is in Mtl for a little while, and I have some holiday time owed me, feel like swinging into Ottawa and coming with me for a drive to Mtl?  I'd obviously have to coordinate with "Mr. Curls" Caron.