Can a LDR/LED be constrained to only output resistance in specific range?

Started by moid, May 03, 2020, 10:43:50 AM

Previous topic - Next topic

moid

Hello everyone

Today's hot topic of circuit construction (at least from my point of view anyway) is can the output of an LDR / LED flashing circuit be constrained to sweep from one specific resistance value to another specific value? If so, how?

Why do I need to know this? Well I built a Comet filter recently (it's a Twin T filter) and it works happily, and I noticed that if I twiddle the 100K pot in the circuit between 2PM and 5PM back and forth it creates a lovely gentle pseudo phaser sound. So before I box the circuit I thought it would be cool to add a modification to it to have a switch to enable the pedal to become a pseudo phaser as well as a filter, because why not?

Comet filter

My plan was to use a 555 LED and LDR circuit to generate a pulsing LED, combined with an LDR that somehow takes over the 100K pot in the comet filter. I found a LED circuit with dual controls for the pulsing  which would allow some strange phasing sounds I think, but looking at my selection of LDRs I think they all are capable of outputting a much wider range of resistance / sweep  than I want. Is there a way to some how get the circuit to sweep within approximately 60K - 100K resistance? Or should I be doing this in a different way (some other circuit?)

Here's the LED Flasher circuit, I've added the values on top:


There's a video about it here if you want to look:


I was planning on putting an LDR next to the LED and then covering them with insulation tape to make a a poor man's vactrol, then connect the + of the LDR to +9v and the - of the LDR to an SPDT (the original Comet filter 100K line lug 2 output would go to the other outside lug of the SPDT) and then connect the SPDT lug 2 to the comet filter circuit where the 100K Lin pot lug 2 would connect.

however I obviously need something (between? somewhere else?) the LDR and the SPDT switch to keep the sweep range to something like 60K - 100K. That's where I'm stuck. I've looked for schematics of LDRs with constrained ranges / restricted ranges and have only found people using Arduinos to do this... so I'm hoping there is a way, a bit like you can sort of do this with potentiometers if you add a resistor in series with them? Any guesses? Or should I use a different circuit to the LED Flasher?

Any thoughts / musings / wild stabs in the dark greatly appreciated :)


Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

Mark Hammer

The traditional way is to set a minimum, using a series resistance, and a maximum using a parallel resistance.

moid

Thanks Mark - this is where I get a bit confused - should this part of the circuit look like this then?



I am not sure how the circuit can have series and parallel resistance at the same time?
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

Kipper4

Mark meant you can put your clr (current limiting resistor) in series like you normally would to control how bright the led gets. Or the ldr can also have a series R to help set the min R of the ldr.
So the ldr will have a min R already when the led is full bright without the series r but with the series r you can increase the min r.

And the ldr can have a parallel R to help limit the max R of the led in what ever state the leds brightness is or isn't.

Try this. So you discover that a 4k7 is the ideal range of led clr, now replace that 4k7 with a 10-50k series pot wired as a rheostat.

You also discover the ideal range of ldr paralllel r is 1M, now replace that 1M with a parallel 1M pot wired as a rheostat.

Make adjustments of the pots.

Is it any nearer to what you imagined you wanted, maybe some more adjustments might get you in the ball park.

It made sense to me when I wrote it, I hope it comes across.
Hope it helps miod.

Rich
Ma throats as dry as an overcooked kipper.


Smoke me a Kipper. I'll be back for breakfast.

Grey Paper.
http://www.aronnelson.com/DIYFiles/up/

Kipper4

You ever try a small cap in parallel with an led that's part the of a vactrol.
Sounds daft right. Upto 1nf is fun.
Ma throats as dry as an overcooked kipper.


Smoke me a Kipper. I'll be back for breakfast.

Grey Paper.
http://www.aronnelson.com/DIYFiles/up/

tubegeek

This will vary between approximately  (60K + the minimum resistance of the LDR) and 110K.


"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR

deadastronaut

hi martin, try it with the 555 , but it may introduce ticking....might not...

if it ticks like a clock use a standard lfo opamp setup with led instead..to drive your pulsing led,

this way you could get pulse and chop too..../triangle/square . and as a bonus depth as well... 8)
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Mark Hammer

Actually, I think what I suggested was misunderstood.  If I understood the original request correctly, the objective is to have an LDR sweep over a defined range; never less than some amount and never more than some other amount.

Let's say I have an LDR whose dark resistance is 5meg and whose light resistance is 10k.  And let's also say I need that LDR to only vary between 50k and 200k.

  • I need to add a 39k resistor in series with the LDR, such that the resistor+LDR can never go below 49k, even if I point a lighthouse beam at it.
  • I don't want the whole thing to ever exceed 200k.  If I put a 150k resistor in series with 4k7, and put those two in parallel with the LDR, their combined parallel resistance will never exceed 150k.  With 49k in series with that, you end up with a total range of 49k-199k; close enough.  This all uses standard resistor values.
I guess the question that needs to be addressed is whether the "taper" of this rigged setup is palatable and musical.  The range created may be spot on, but how quickly it moves through the higher-resistance vs lower-resistance portion of that range may be a little off.

ElectricDruid

+1 what Mark said.

It's also possible to put the parallel resistor in parallel with *both* the series R and the LDR, instead of just across the LDR. That might give you a slightly different response within the limits. Obviously the parallel R will need adjusting, since it won't have the 39K in series any longer. Mark's 150K will need to become 200K, or near enough.

Whether this helps much would depend on the circuit. I'd have to plot it to know for sure.

moid

Thanks everyone for the all the great advice! Sorry for the slow reply, I haven't had anytime to look at this forum this week, work has been ridiculous :(


Quote from: Kipper4 on May 03, 2020, 11:50:30 AM
Mark meant you can put your clr (current limiting resistor) in series like you normally would to control how bright the led gets. Or the ldr can also have a series R to help set the min R of the ldr.
So the ldr will have a min R already when the led is full bright without the series r but with the series r you can increase the min r.

And the ldr can have a parallel R to help limit the max R of the led in what ever state the leds brightness is or isn't.

Try this. So you discover that a 4k7 is the ideal range of led clr, now replace that 4k7 with a 10-50k series pot wired as a rheostat.

You also discover the ideal range of ldr paralllel r is 1M, now replace that 1M with a parallel 1M pot wired as a rheostat.

Make adjustments of the pots.

Is it any nearer to what you imagined you wanted, maybe some more adjustments might get you in the ball park.

It made sense to me when I wrote it, I hope it comes across.
Hope it helps miod.

Rich

Thanks Rich (and also Tubegeek for the drawing!) - so I should treat the LDR as if it was an LED with a resistor between power and the LDR which gives me (in the case of the LDR) a minimum level of resistance (minimum LDR resistance level + CLR value). That makes a lot more sense! The parallel resistors go after the LDR, the in series one goes before. It makes perfect sense now you explained it, but I couldn't figure that out on my own, so thanks very much!

Rich the idea of the extra pots sounds fine, I might play with that, although I think the ranges I need to keep the signal between are the ones I want for this circuit - if I go below 60K there doesn't seem to be any audible effect and as the resistance hits 100K the audio signal completely fades out (or goes below my hearing), so I might need to do something like 60K - 95K... something to experiment with.

Tubegeek that drawing really helped me understand that the LDR is part of a parallel circuit, I didn't realise how that worked before.  I might use a lower value resistor in parallel with the LDR; I reckon I'll actually need around a 33K, maybe 39K - I've got some of both, so that's the way to go I think.

I'll reply to the other nice people in this thread soon, have to go speak to the neighbours for a while (not a euphemism for anything sadly!)
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

Quote from: Kipper4 on May 03, 2020, 11:52:43 AM
You ever try a small cap in parallel with an led that's part the of a vactrol.
Sounds daft right. Upto 1nf is fun.

Hi Rich - what does that do? I've heard of using caps in a circuit to smooth out power supply for LEDs (I think), is this to make the effect of the LED turning on and off more of a sine wave rather than a square wave effect?
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

Quote from: tubegeek on May 03, 2020, 01:23:27 PM
This will vary between approximately  (60K + the minimum resistance of the LDR) and 110K.



Thanks so much for this - I just realised from what you wrote that I need to factor in the minimum resistance of the LDR. One of mine is a 5K - 500K, so I'll try that first... with a 51K + 4K7 resistor in series I reckon.
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

Quote from: deadastronaut on May 03, 2020, 01:31:23 PM
hi martin, try it with the 555 , but it may introduce ticking....might not...

if it ticks like a clock use a standard lfo opamp setup with led instead..to drive your pulsing led,

this way you could get pulse and chop too..../triangle/square . and as a bonus depth as well... 8)

Thanks Rob... I looked into that (555 ticking) and it's something to do with current I think - I will put the 555 on a different bit of tagboard, so hopefully it won't be sharing power with the board with the filter on it (I realize they all get power from the same jack) so maybe that will help (Might be barking up the wrong tree though). I've read that the 555 can be swapped for a CMOS 7555 which uses less power (don't have any at present sadly) so I might try socketing the 555; ordering some 7555's and if it ticks swapping the 555 for a 7555 when they arrive (probably end of next week).

Regarding a standard lfo opamp setup (having never built such a thing) do you mean this sort of thing?
https://synthnerd.wordpress.com/2018/12/31/synth-diy-the-relaxation-lfo/

However this circuit (and all the others I've found) are for synths and run at higher voltage than I was wanting to use (looking for 9V really) is there one you could suggest please? I'm not sure how you could get depth out of the circuit either? Pulse and chop makes sense.
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

Quote from: Mark Hammer on May 03, 2020, 01:52:04 PM
Actually, I think what I suggested was misunderstood.  If I understood the original request correctly, the objective is to have an LDR sweep over a defined range; never less than some amount and never more than some other amount.

Let's say I have an LDR whose dark resistance is 5meg and whose light resistance is 10k.  And let's also say I need that LDR to only vary between 50k and 200k.

  • I need to add a 39k resistor in series with the LDR, such that the resistor+LDR can never go below 49k, even if I point a lighthouse beam at it.
  • I don't want the whole thing to ever exceed 200k.  If I put a 150k resistor in series with 4k7, and put those two in parallel with the LDR, their combined parallel resistance will never exceed 150k.  With 49k in series with that, you end up with a total range of 49k-199k; close enough.  This all uses standard resistor values.
I guess the question that needs to be addressed is whether the "taper" of this rigged setup is palatable and musical.  The range created may be spot on, but how quickly it moves through the higher-resistance vs lower-resistance portion of that range may be a little off.

Thanks Mark -  I never considered the taper... I guess this is one of those build it and see events... and then come and cry about it here when it doesn't go as planned? I just assumed the sweep would be linear...
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

Quote from: ElectricDruid on May 03, 2020, 03:28:53 PM
+1 what Mark said.

It's also possible to put the parallel resistor in parallel with *both* the series R and the LDR, instead of just across the LDR. That might give you a slightly different response within the limits. Obviously the parallel R will need adjusting, since it won't have the 39K in series any longer. Mark's 150K will need to become 200K, or near enough.

Whether this helps much would depend on the circuit. I'd have to plot it to know for sure.

Thanks Electric Druid... it's time to build something. I'll try to make a layout here and see if anyone can spot any mistakes in it before I build it... I think I may have to breadboard this possibly... in which case I'd better buy some more breadboard!
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

OK I started trying to make a tagboard layout of the previously mentioned circuits... if someone could have a look over it to check it looks like its functioning that would be lovely please, I think it works, and I've made it as small as I could (it was originally 4 columns wider!) but if there's any obvious ways to make it smaller that would be cool.


made from:

I've added Pot 1 and Pot 2 annotation so it's easier to relate it to the tagboard layout.

The LDR section of the tagboard is based on Tube geek's drawing here:


Thanks everyone!
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

Mark Hammer

Quote from: moid on May 08, 2020, 11:52:22 AM
Thanks Mark -  I never considered the taper... I guess this is one of those build it and see events... and then come and cry about it here when it doesn't go as planned? I just assumed the sweep would be linear...
The taper of the LDR itself may be linear, but bear in mind that when you put a much smaller resistance in parallel with a mush larger resistance, their combined resistance will be dictated more by the smaller value of the two.

Consider: I place a 500k resistor in parallel with an LDR whose dark value is 10meg,  At rest, their combined parallel value is 476k.  If I shine a little light on the LDR and its resistance drops by half, down to 5meg, their combined resistance is 455k.  Drop the LDR down to 2 meg, and the combined value is 400k.  So, the LDR has dropped by 80% of its maximum resistance,  but the combined value is only 20% less than the value of the fixed resistor.  My point is that, depending on the "gap" between the resistance range of the LDR, and the target resistance range that one uses "helper" resistors to achieve, you can end up with non-linear tapers, some of which may be moot, with respect to what the circuit does, and others of which may impart a somewhat different feel than you were aiming for.  The difference between actual and ideal may be small, but I'll leave it to the end-user to determine which they've arrived at.  That said, until we reach a point in electronics history where we can specify the precise resistance range we want from an LDR, when making an online order, we simply have to live with the impromptu arrangements.

When it comes to effects where LDRs are modulated by an LFO, it is possible to tinker with the final waveshape of the LFO, so as to complement the LDR's taper/rise-fall, such that the LFO/LDR combination yields a particular feel.

Chainsaw

If you want a really nice taper from an LED-LDR combo, what you do is control the minimum and maximum LED current.

The taper doesn't change at all from the uncontrolled version, just the part that you use. And the stock taper of most optoisolators is pretty nice - conductance is more or less proportional to LED current, which gives easy linear or exponential control, if you want to drive it with something fancy. It takes exactly the same number of parts - two extra resistors, at the minimum. They're just in a different place in the circuit.

If you want odd LFO waveforms, it's a lot more flexible to generate them in the LFO than to give the controlled device an unusual transfer curve, although with lo-fi stuff, anything goes.

The down side is that you either need to know the optoisolator's transfer curve, or you have to measure and/or trim by ear.

moid

Quote from: Mark Hammer on May 09, 2020, 02:22:24 PM
The taper of the LDR itself may be linear, but bear in mind that when you put a much smaller resistance in parallel with a mush larger resistance, their combined resistance will be dictated more by the smaller value of the two.

Consider: I place a 500k resistor in parallel with an LDR whose dark value is 10meg,  At rest, their combined parallel value is 476k.  If I shine a little light on the LDR and its resistance drops by half, down to 5meg, their combined resistance is 455k.  Drop the LDR down to 2 meg, and the combined value is 400k.  So, the LDR has dropped by 80% of its maximum resistance,  but the combined value is only 20% less than the value of the fixed resistor.  My point is that, depending on the "gap" between the resistance range of the LDR, and the target resistance range that one uses "helper" resistors to achieve, you can end up with non-linear tapers, some of which may be moot, with respect to what the circuit does, and others of which may impart a somewhat different feel than you were aiming for.  The difference between actual and ideal may be small, but I'll leave it to the end-user to determine which they've arrived at.  That said, until we reach a point in electronics history where we can specify the precise resistance range we want from an LDR, when making an online order, we simply have to live with the impromptu arrangements.

When it comes to effects where LDRs are modulated by an LFO, it is possible to tinker with the final waveshape of the LFO, so as to complement the LDR's taper/rise-fall, such that the LFO/LDR combination yields a particular feel.

Thanks Mark,  I didn't know any of this at all, thanks for explaining it... so hopefully because this circuit's LFO speeds are controlled by pots I should be able to 'tune' them to get a speed that feels right? Hopefully... anyway I redrew my layout and made it smaller:


so I'll try to make this one and see what happens!

Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

Quote from: Chainsaw on May 09, 2020, 10:22:56 PM
If you want a really nice taper from an LED-LDR combo, what you do is control the minimum and maximum LED current.

The taper doesn't change at all from the uncontrolled version, just the part that you use. And the stock taper of most optoisolators is pretty nice - conductance is more or less proportional to LED current, which gives easy linear or exponential control, if you want to drive it with something fancy. It takes exactly the same number of parts - two extra resistors, at the minimum. They're just in a different place in the circuit.

If you want odd LFO waveforms, it's a lot more flexible to generate them in the LFO than to give the controlled device an unusual transfer curve, although with lo-fi stuff, anything goes.

The down side is that you either need to know the optoisolator's transfer curve, or you have to measure and/or trim by ear.

Hello Chainsaw, welcome to the forum and thanks for the post! When you say control the LED current how would you do this? The 56k resistor + LRD min resistance of 5K is doing that to the minimum part of the circuit, presumably the 56K+33K+5K does that to maximum, are you suggesting to do something different? Like use trimpots to get a finer control? I'm not using a manufactured optoisolator like a NSL32, I'm using an LDR and an LED and then sticking them together and wrapping them in insulation tape.

My limited electronics knowledge doesn't go as far as transfer curves I'm afraid.

Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes