DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: moid on May 03, 2020, 10:43:50 AM

Title: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 03, 2020, 10:43:50 AM
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 (http://mas1911.tripod.com/Comet_Filter1_0.gif)

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:
(https://i.imgur.com/3BL2vHj.png)

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 :)


Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: Mark Hammer on May 03, 2020, 10:53:17 AM
The traditional way is to set a minimum, using a series resistance, and a maximum using a parallel resistance.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 03, 2020, 11:29:06 AM
Thanks Mark - this is where I get a bit confused - should this part of the circuit look like this then?

(https://i.imgur.com/WwypvcM.png)

I am not sure how the circuit can have series and parallel resistance at the same time?
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 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
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 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.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: tubegeek on May 03, 2020, 01:23:27 PM
This will vary between approximately  (60K + the minimum resistance of the LDR) and 110K.

(https://i.postimg.cc/sv6y5H9y/WwypvcM.png) (https://postimg.cc/sv6y5H9y)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 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)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 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 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.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 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.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 08, 2020, 09:53:25 AM
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!)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 08, 2020, 11:15:32 AM
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?
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 08, 2020, 11:18:05 AM
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.

(https://i.postimg.cc/sv6y5H9y/WwypvcM.png) (https://postimg.cc/sv6y5H9y)

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.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 08, 2020, 11:50:34 AM
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/ (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.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 08, 2020, 11:52:22 AM
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...
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 08, 2020, 11:56:36 AM
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!
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 09, 2020, 10:29:16 AM
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.
(https://i.imgur.com/SogIZIE.png)

made from:
(https://i.imgur.com/qEeQMmj.png)
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:
(https://i.postimg.cc/sv6y5H9y/WwypvcM.png)

Thanks everyone!
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: Mark Hammer on May 09, 2020, 02:22:24 PM
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.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 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.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 10, 2020, 11:18:57 AM
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:

(https://i.imgur.com/NcESVWw.png)
so I'll try to make this one and see what happens!

Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on May 10, 2020, 11:25:18 AM
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.

Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 07, 2020, 11:46:03 AM
Quote from: moid on May 10, 2020, 11:18:57 AM


(https://i.imgur.com/NcESVWw.png)
so I'll try to make this one and see what happens!

OK well this one doesn't work very well - just finished the circuit, added a battery to test the LED in the above layout and it turns on turns on and then dies (fried LED). As far as I can see I have followed the schematic into my layout (layout just above, the schematic is a couple of pasts higher). Can anyone see what I'm doing wrong here?


OK here's a thought - the original schematic uses 5V, but I just put a 9V into it... could it be as simple as that? In which case I presume I need something like a 78L05 circuit between my 9V socket and the power input of the veroboard?

I've got a couple of 7805's and 78L05's - the difference between them is one is rated for more heat and milliamps than the other. I have no idea how many milliamps this circuit requires, so I guess it is better to pick the larger 7805 to ensure that things are stable?
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: ElectricDruid on June 07, 2020, 03:39:22 PM
Do make sure to get hold of some 7555's instead of the original 555.

Honestly, you can mess around for days and you still won't stop it making everything tick. The 555 is absolutely infamous for crowbarring the supply voltage when it switches, and the low-power variant is much better in this respect. That means the problem is much much reduced at source and you don't have to spend so much time messing about trying to get rid of it.

Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 07, 2020, 05:29:43 PM
Thanks for reminding me! I got a few 7555s in the post on Friday! Right I'll switch that over now - would the use of the 555 have caused my LED to die? Or is it just a power issue?
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 07, 2020, 06:15:45 PM
(https://i.imgur.com/zgQxaUB.png)

I've made this layout from this schematic - would anyone mind just checking I did it right? Thanks!
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: bluebunny on June 08, 2020, 05:35:06 AM
The layout looks OK if the part is actually a 78L05 - which is as you've drawn it, but not as you've labelled it.  The higher-current TO-220 part would be the other way round.

Both 555s (bipolar and CMOS) will be fine with a 9V supply, btw.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 13, 2020, 05:56:40 PM
Thanks for noticing this! Sorry about the slow reply, this week has been challenging at work. I hope to get some time away from work tomorrow to have a play with it. If the 7555 can cope with 9V then presumably the LED dying is just too much power getting to it, perhaps I should just add a CLR of some type? 4.7K or 2k2? and therefore not need the power board circuit?
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: ElectricDruid on June 14, 2020, 01:52:52 PM
Dunno. What's the series resistor you've got at the moment? If you haven't got one, then *yes* that's your problem.

9V (even 5V) will fry any LED. You need a series resistor. If you find the forward voltage for the one you've got (so you need either the datasheet or some basic manufacturer's data) there are a ton of calculators online that will help you find a suitable resistor. I generally use a fraction of the "maximum" suggested forward current (If). Most modern LEDs are really bright, and I find a quarter or less of the max current is plenty for me to see if it's on or off. And like that, I don't have spots in front of my eyes for hours after looking at it....;)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 14, 2020, 06:04:05 PM
Hello everyone

Well I got enthusiastic today and decided to add a CLR to my circuit (instead of making a 9v to 5v power board) and so added a 2k2 resistor as shown below (resistor in red):
(https://i.imgur.com/J414Shs.png)
The good news - my LED lights up and doesn't explode (yay!)
The bad news - it doesn't fluctuate at all, regardless of what the pots are set to (boo!!!!). There is one position I found where the LED flickers very rapidly but barely perceptibly... which gave me some hope until I noticed the LED for the main board of the circuit (not the above) flickered as well in time with it... so something is rotten in the state of (electronic) Denmark, so to speak.

So my guesswork analysis is by adding the 2k2 resistor I've managed to divert the current directly to the LED and have bypassed the 7555 and the 2N2222... now before I get keen and start making holes in the stripboard and soldering a variety of resistors in places where they probably shouldn't go, I thought, aha! I should check the output of the IC! Surely one of the pins on the IC should be fluctuating to generate the varying amount of current need to dim/brighten the LED... so out comes the DMM and with a cursory glance at the pinout of the 7555 chip I assumed that pin5 (control voltage) would be my friend... but not according to the schematic I used... so that threw me. I'm really not sure which pin is the important one, so I measured all of them, but none are fluctuating at all!

1. 0.002mV
2. 5.95V
3. 0.003mV
4. 6.9V
5. 4.395V
6. 6.16V
7. 13.3mV
8. 6.76V

I'm running this off a 9V battery, but it's not brand new so the voltage may be a little lower than expected - I think it puts out 7.8V at the moment which should still be fine.

I guess I need to remove the 2k2 resistor... I have thought of running the 2K2 from hole J11 to J14 (with a cut in the stripboard so the current goes through the resistor and not along the strip) but if I can't find any fluctuating current anywhere, so that means something more serious is wrong that should be fixed first? Maybe?

Any ideas folks? I have tried swearing at it, by the way. That hasn't worked, but I'm willing to try more exotic and impressive barrages of rude words if anyone has any suggestions.



Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on June 15, 2020, 11:50:51 AM
pin 3, the one marked output, on your board - it has nothing connected to it, is this correct? can we again see the circuit diagram you think you've built, pleeze?

your 2k2 to the led, as shown on the stripboard, is connecting the led to the supply, makes all the rest of the circuit ignorable. probably not the best outcome.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: ElectricDruid on June 16, 2020, 12:19:13 PM
+1 request for a proper circuit diagram. I also agree with DA that you've got the 2K2 and the LED across the supply rails, so the rest of it effectively does nothing.

Working out what the circuit diagram looks like will help you get clear in your head what you actually want to do. It's not just a useful thing to do, but an important discipline to have to keep your thinking straight.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 16, 2020, 05:27:53 PM
Thanks chaps, your help is greatly appreciated! I will remove the 2K2, but I'll need to put it back somewhere to stop the LED from frying. I've socketed the LED so I can try different colours out.

The schematic (not mine) is here:
(https://i.imgur.com/3BL2vHj.png)

It too doesn't attach pin 3 of the IC to anything... so maybe I screwed up elsewhere? The only difference I can see is that I'm using 9V and the original schematic calls for 5V, but surely 5V would still be enough to make an LED go bang?

I might not be able to look at the soldering iron until the weekend sadly, too much work on at the moment :(
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: ElectricDruid on June 16, 2020, 08:34:57 PM
Your strip board has got both the 47R and the 2K2. I thought the 2K2 was supposed to be a better value for R6 to limit the current?

There's lots of things I don't understand about that circuit. What's T2 actually *for*? Why not just put the LED in series with either the emitter or collector of T1? Why do we need two transistors to drive one LED?
Also what's that diode D2 in series with the 100K do? It drops 0.6V, but I don't see the point. The transistor base is controlled by a current, and the triangle output will run from 3V to 6V roughly, so it's still plenty high enough to switch the transistor on.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 21, 2020, 10:11:00 AM
Hi Tom

I'm sorry I don't know how the circuit works, I followed the schematic and made a layout from it and expected it work. It is supposed to enable the LED to have two separate rates - for fade up and fade down to create interesting patterns. There is a video from the chap who designed the schematic here:



I'll remove the 2k2, but I'm still stuck. I've just bought some breadboard, so I'll have a go at making it on breadboard and see if I get some results.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 21, 2020, 10:40:13 AM
OK stupid disaster time. It looks like I linked the wrong video and have been making something that is possibly halfway between one circuit and another. Bugger. Here is the video that is of the actual circuit.


And the page about it is here - this is where I got the schematic from
http://www.pcbheaven.com/circuitpages/555_Breathing_Pulsing_LED/ (http://www.pcbheaven.com/circuitpages/555_Breathing_Pulsing_LED/)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on June 21, 2020, 10:57:24 AM
hmm, he has a strange way. it would make more sense to me to use a straight emitter follower where R4 starts, and then an amplifying transistor following to led drive.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on June 21, 2020, 06:23:54 PM
Thanks for replying Duck. OK so this afternoon I built the circuit on breadboard (brand spanking new clean breadboard, not clogged with dust and tears of despair breadboard!) and... well... I've just made the most complex circuit for making an LED light up :( No fading in or out at all, just bright strong light. I even built a 5V circuit from a 78L05 just to fit the original circuit design, but twiddling the pots has almost no effect (one of the pots can turn the LED off if twisted to one extreme). It really has been one of those bloody annoying days. I lost on bidding on a pedal and an instrument on ebay (some people just have damn deep pockets) and then while I wasn't paying attention to what I was doing, managed to knock a plastic tray full of all my resistors, diodes, LEDs and knobs to the floor (from the table they were on) and they exploded everywhere... 30 minutes of swearing and clearing them up and putting them back into some sort of order followed. I think I will make some bad sounds on guitar to let the universe know how I feel tonight! As Bob Dylan once put it "There's no success like failure, and failure's no success at all".

So what next? I am using a 7555 chip, would swapping out for an old 555 be worth a try? It would seem illogical to me, as far as I understand they have the same pinout and do the same thing?

Should I try to build a simpler fade in out circuit and see if that works with the original pedal I want to mash this into? If so, I'm open to any suggestions as to which to try. Something with a slow pulse and a pot to adjust the rate of the pulse would be ideal - I might try the circuit in the other video I posted and substitute the 100K resistor for a 100K pot and make the capacitor larger?

By the way Duck, good slogan underneath your post :)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 11-90-an on June 22, 2020, 06:28:06 AM
Maybe try an astable multivibrator with 2 transistors?  :icon_biggrin:
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on June 22, 2020, 11:02:04 AM
" ..... not clogged with dust and tears of despair breadboard!" well, there's yer problem.

no, don't change back to 555. in your circuit (not yours) up there, you get a sawtooth wave at the TRIgger, pin 2, which is the cap charge/discharge curve. if you ditch all that D2 and all to its right, you can voltage follower [opamp] that pin - but - you only get a 1/3Vcc to 2/3Vcc out, I think. you could then amplify this to swing more, but you'll run into supply rail one direction and led Vf the other direction.

or - if you just want a triangle-y led drive, look the oscillator circuit in a phase45 fer inst. a dual oppie can do the osc and the led drive no probs. well, we say no probs ......
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: kraal on June 23, 2020, 09:45:22 AM
Quote from: moid on June 07, 2020, 06:15:45 PM
(https://i.imgur.com/zgQxaUB.png)

I've made this layout from this schematic - would anyone mind just checking I did it right? Thanks!

This may look like a stupid question, but why using a voltage regulator IC, with capacitors for this specific usage and not a simple voltage divider (two resistors, 12k and 15k, or any other as long as 9*R1/(R1+R2)=5 ) ?
I know that this doesn't help you much for your root question, but I was wondering.

Regards,
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on June 23, 2020, 10:59:13 AM
if you look the led flash circuit, see R6 at 47R [which I think has to be wrong], when that transistor turns hard on, there will be ~2V across the led, so at 5V Vcc, there will be 63mA at 3V across 47R. now run your resistive divider equation for 63mA, see whether a regulator or the resistors is easier to figure.

someone competent needs to check my theory here - 63mA is too much for that led.


[edit :] HEY MOID! check your leds for function. if your circuit was actually working, and my calc of 63mA was correct, it would take maybe one flash and yer leds ded, maybe. is it possible you think the circuit isn't working when it is actually just destroying leds while you aren't looking? I rekn, at the VERY minimum, that 47R should be 470R, and personally I'd be using bigger still.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 06, 2020, 11:14:34 AM
Thread resurrection! I'm finally on holiday... well staying at home this Summer, but at least no work for a few weeks! OK Duck I have just removed the 47R resistor and swapped it for a 2K2 (socketed so I can try other values if required). The LED comes on but doesn't dim or fluctuate at all, regardless of what I set the pots to. Something isn't working in that circuit, so I think I'll now make vero version of a simpler circuit I've built on breadboard (which does work; on breadboard at least). I'll post the vero as soon as I've finished drawing it.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 06, 2020, 12:16:07 PM
(https://i.imgur.com/ODQc6LR.png)

OK here's a vero and schematic of a circuit that does pulse - the schematic is fine, does the vero look OK to anyone? I will try to get building this later tonight once the rest of the family are asleep.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 06, 2020, 01:19:59 PM
... and I'm stupid; I forgot to add the LDR to the circuit! I will redraw later, sorry for wasting anyone's time.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on August 07, 2020, 10:29:32 AM
erm. ldr? that is part of the other circuit, isn't?
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 07, 2020, 06:57:49 PM
Arrr now there you go Duck, mistaking me for someone who looks like he knows what he's doing! That would be sensible! Moi?

Well actually it's more that the original circuit was just the twin T filters (which works), and only afterwards did my brain conceive this wonderful plan of adding an autowah effect to it... so there's no room on the original vero for an LDR, so it has to go on the vero board for the pulsing LED thingamujig. At the moment, due to a (possible) miscalculation in the design of said LED blinky blink, some jumpers had to be added in a way that I suspect might bring tears to your eyes and a strong Australian oath to your lips... so I'll post it later (when it inevitably breaks) and you can say, see, that bit will never work, and why did you do it like that? In that polite but firm voice you reserve for dealing with children and wild animals*

And if by some minor miracle it works I will post it and show how I laugh in the face of well thought-out planning while somehow achieving my twisted goals (and sotto voce) "phew, blimey, that one actually worked! Hah, fooled them into thinking I know something!"

*I may have go with a plea of insanity. Or the devil made me do it. Whichever seems more believable. One of my threads is nothing but a rollercoaster ride of emotions. Never a dull day here folks. Bloody hell it's hot here, my brain was never designed to function at such extreme temperatures :(

Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 10, 2020, 10:00:10 AM
Ye gods it's even hotter than it was before! However some late night tinkering has resulted in (mostly) success :) I now have a functioning autowah sound that is quite musical (yay). But of course I have some questions... firstly how to make the LED blink circuit speed up a little? I thought slow would be best for the effect, but it turns out that fastest sounds better (slow does sound nice if whatever signal going in has a ton of sustain), but for less shoegaze / ambient passages, it would be great for the blink to happen quicker. Is that just a case of switching a different pot out? I suspect not because measuring the pot on lug 2 shows the fastest blinking happens when resistance is 0 ohms. SO... change a resistor in the circuit itself? Also (for those who are interested) a very bright blue LED gave a much better result than a normal green or red LED (which were very subtle).

Here's another odd question - the effect only works if I connect a cable from power jack ground to the LDR leg at D11 on the vero board (see also red writing / arrow in below) image. I've not drawn that onto the vero layout yes, just on the schematic part above. Does this mean I screwed something up in my vero layout? (I'm happy to just solder a cable from ground to the LDR as a fix, I just wondered if it was obvious what daft thing I've done).

(https://i.imgur.com/a7qotrG.png)

Thanks for the suggestions; I hope it's cooler wherever you are!

Duck - please ignore the horrible use of a curved green jumper cable on the veroboard layout... I'd already cut the board out when I realised that I hadn't allowed for any space to connect the cables for power, ground etc... minor stuff I know, but the circuit seemed a little subtle or transparent without them :) (I blame the heat, or the current state of world fascism, or the lack of decent snacks in the kitchen at the moment... one of them is the cause of all the evils in the world I'm sure)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on August 10, 2020, 10:46:24 AM
NO! not cooler, bloody hell. it's freezing enough cold here, and you want it more so? bah!

also, no, I can't unsee curved green lines, that's a black mark against your name. I hope you know this will go down on your permanent record.

faster = 1uF or 4u7 or 10uF instead of that 100uF. easy.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 11-90-an on August 10, 2020, 11:11:40 AM
The cap along with that 50k pot determines speed so when pot value's lowest isn't low enough, change the cap! 8)

Anyway, i do like looking at that shade of green jumper, so i believe duck should be slightly less harsh... ;)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 10, 2020, 07:37:23 PM
Quote from: duck_arse on August 10, 2020, 10:46:24 AM
NO! not cooler, bloody hell. it's freezing enough cold here, and you want it more so? bah!

also, no, I can't unsee curved green lines, that's a black mark against your name. I hope you know this will go down on your permanent record.

faster = 1uF or 4u7 or 10uF instead of that 100uF. easy.
I thought the land down under only had two temperatures? - damn hot and on fire? I'll take as much cold as you can send us, it's 33 degrees C here at the moment and we have another 4 days of this terror to get through... my body was not designed for such extremes... it's too hot to solder things :(

I'll make sure I scourge myself with tangled 6.35mm cables to atone for my sins! I'll never do it again! I promise! I'll make a final clean layout soon showing how it should be done in case anyone else feels the urge to recreate this circuit. And then ask the boy wonder if he'll play some fancy notes through it for your delight and delectation. Good lord, I might have to find an enclosure for this one!

Thanks for the cap info, it's strange how I thought that slower would be best... I'll try that 10uF first; the circuit doesn't need to go a lot faster, just a bit quicker, and I want to hang on to some of the longer swells it does (about 3.5 seconds at the moment which is a bit too long). I think I'll socket this one and try again. You'll have to wait a day or two for results; we're getting a dishwasher delivered and installed tomorrow (yay, no more washing up in the sink, hello the future!) so the kitchen (where I do all my soldering, naturally) is completely emptied so the delivery chaps can get in and install this magic box.


Quote from: 11-90-an on August 10, 2020, 11:11:40 AM
The cap along with that 50k pot determines speed so when pot value's lowest isn't low enough, change the cap! 8)

Anyway, i do like looking at that shade of green jumper, so i believe duck should be slightly less harsh... ;)

Thank you, I thought it was a lovely green too :) And it complements the flashing blue LED beautifully darling! And thanks for the advice about the capacitor, I was wondering how that effect could be achieved - so the relationship between the two parts controls the speed of the flash? So for slower I would use a larger pot size because that is easy to change, but for quicker I would reduce the capacitor - so is this similar to a passive low pass circuit RC circuit? To find the frequency the low pass starts at you use a combination of resistor and capacitor... to set a frequency, and that frequency is also a frequency that could be used to determine oscillation of the LED, but one that is much lower than audio frequencies! Blimey I *might* have just understood something!

I think Duck is trying (bless him!) to make something competent out of me...
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 14, 2020, 06:31:57 PM
Yay! Success :) Thanks very much chaps! I made some changes to the circuit for better sounds (swapped that 100uF capacitor in the blinking LED section for a 22uf and a 4.7uF for faster rates after playing the pedal for a day) and we have a boxed and working Autowah :) For those of you who like technical pictures, see the schematic below. And for those who like a nice vero layout (with colours!) then the even more below image doesn't reflect exactly what I did (on the mess inside my pedal), but does reflect what I should've done! I'll try to get my son to record something good through it tomorrow so you can hear it.

There are two parts of the schematic drawing that I'm not sure about. The first is on the far right, where the LDR is, I added a line off that to ground (in the pedals this is soldered to one leg of the LDR). Without it the LED blinker refuses to work, yet it wasn't needed on the breadboard version... so no idea if it should be there in the drawing?

Second query is about how I've drawn the 100K lin pot on the left side of the schematic and how it connects to the SPDT. I'm pretty sure I've done it right (the vero layout shows an exact copy of what I did), I'm just not sure if that's what I've drawn on the schematic?

(https://i.imgur.com/N7b5YXW.png)

(https://i.imgur.com/Lal17hK.png)

Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on August 15, 2020, 11:32:59 AM
hurrah! I think you have made that 56k redundant - supply at one end and ground at the other, it's just using current now. snip-snip. but the added ground lead seems to be correct.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 16, 2020, 05:13:20 AM
Hi Duck - thanks! On the grounds that the circuit is working and it's boxed I'm not touching anything for fear of the magic smoke and tone fairies escaping :) Thank you for telling me though.

We made a demo (for those of you who want to hear this pedal because there aren't any demos of it on guitar that I could find) so feel free to laugh at my explanation of it :)

Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: 11-90-an on August 16, 2020, 06:35:09 AM
Quote from: moid on August 16, 2020, 05:13:20 AM
Hi Duck - thanks! On the grounds that the circuit is working and it's boxed I'm not touching anything for fear of the magic smoke and tone fairies escaping :) Thank you for telling me though.

We made a demo (for those of you who want to hear this pedal because there aren't any demos of it on guitar that I could find) so feel free to laugh at my explanation of it :)



Cool!
Your son is a good guitarist... you raised him (or taught him ;)) well.... :icon_biggrin:
I think that pedal should be called a "auto-nyah" rather than an autowah due to the sounds it creates... ;D
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 16, 2020, 11:14:04 AM
Thanks very much! My son taught himself; he is far better at playing than I am - he shows me how to play!

Auto nyah sounds like a fun name!
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on August 17, 2020, 11:15:28 AM
moidy - geeze, it gets busy at the end there. very wah-trem. never mind that, I think I've finally -scroll-scroll-scroll-SCROLL- worked out "the error". the wire on the ldr you added to ground should instead go to the emitter//10k of the filter transistor. and snip-snip the 56k, bosh. I think. if your built actually matches your drawn, obvs.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 19, 2020, 06:15:51 PM
Hi Duck, thanks for the thoughts -  I will try to draw out what I think you're telling me tomorrow - past couple of days have been tons of DIY to cope with due to the incredible rain we've had - over a month of rain in two days! (a gutter and drainpipe got wrecked, plus loads of other smaller problems). Hopefully I get some sleep tonight and can focus on what you've written tomorrow.
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: moid on August 20, 2020, 10:21:01 AM
OK Duck, the weather changed and now we have no more predicted rain for a few days (yay)... just after I finished fixing the last drainpipe, it stopped bloody raining. Someone's playing games with me...

I've revised my vero layout; is this what you mean? I assume the ground you mention was actually for the transistor on the blinking LED board and not the filter board though (because that transistor previously had nothing attached to the Emitter - oops), but yell if you really did mean to move it across to the other board. I removed the 56K resistor but have replaced it with a jumper (column 13) so that the power can get from the +9V to the LDR and 33K resistor. Does the below look any better? If so I'll re draw the schematic as well.

(https://i.imgur.com/DTCpir7.png)
Title: Re: Can a LDR/LED be constrained to only output resistance in specific range?
Post by: duck_arse on August 20, 2020, 10:46:32 AM
mmmmmm ...... no. that's not it.

as I see it - see the 100k pot connects the emitter to the cap//cap to select the thing range? I'm assuming you are aiming to have the swept element replace the pot, so it's like PRR's little devil turning the knob up and down. so all you need do is have one end the ldr on the emitter, and one end that pot on the emitter. the two free ends go to the switch, the switch common goes to cap//cap point.

then you could have constraining resistor across the ldr to limit it's max if you wanted, or you might be able [I keep trying to work this bit in my head] to wire the ldr across the pot ..... erm - but for the next build. if you're happy wit der zound now, leave it I'd say.

it's better to think of the ldr as part of the filter/tee section, and drag its symbol across there to the switch, and then "link" it to the led with some light arrows/lightning bolts - this will have you right thinking when circuit looking, and yule be less confusable about the whole thing.