DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: KarenColumbo on March 28, 2021, 04:37:13 AM

Title: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 04:37:13 AM
Yeah, yeah, I know. The basics :( But where should I look if not here? Google just gives me tons of Arduino stuff, I'd rather go the analog way. Hence my question:
- How can I regulate an LED's brightness from none at all to spec max with both 9V supply and a 100k pot (Wah).
- Background: State Variable Filter wah experiment -> defunct Cry Baby, hence single 100k pot -> great SVF schematics -> Vactrol (home-rolled).

The usual 1k - 4k7 I'm used to put into stompboxes for status LEDs vs. this 100k Wah pot I have.

In my unknowledge I suspect there is a way to somehow "transfer" those 100k to sensible LED-friendly values via a transistor amplifier. Isn't it?

Since I obviously (at least to me) need to control two resistances at once to sweep the center frequency in the SVF but only have ONE variable resistor available -> LDR/LED combi is asked for. (or maybe two "matched" FETs wired as variable resistors?)

Sorry - it's those silly simple things that trap me.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: antonis on March 28, 2021, 05:41:35 AM
I think Wah pot wouldn't like DC across it.. :icon_wink:
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: DIY Bass on March 28, 2021, 05:53:54 AM
I would try first with a resistor that will give you max brightness in series with your 100k pot.  I think that 100k will reduce the current to the point where the LED will not light.  The other way you essentially have just the series resistance.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 06:19:47 AM
Quote from: antonis on March 28, 2021, 05:41:35 AM
I think Wah pot wouldn't like DC across it.. :icon_wink:
Yeah, that is utterly possible :( That's why I blindly threw "transistor" into the arena.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 06:20:28 AM
Quote from: DIY Bass on March 28, 2021, 05:53:54 AM
I would try first with a resistor that will give you max brightness in series with your 100k pot.  I think that 100k will reduce the current to the point where the LED will not light.  The other way you essentially have just the series resistance.
Thanks, I will try just that to get a "feel" for what the LED(s) need.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: antonis on March 28, 2021, 07:13:28 AM
Quote from: KarenColumbo on March 28, 2021, 06:19:47 AM
Quote from: antonis on March 28, 2021, 05:41:35 AM
I think Wah pot wouldn't like DC across it.. :icon_wink:
Yeah, that is utterly possible :( That's why I blindly threw "transistor" into the arena.

You could use 100k pot as high gain transistor bias resistor, lowering enough DC current through it..
(in relation to "direct" LED driving..)
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 07:35:14 AM
Ah, sod it, I'll buy an expression pedal and put a dual gang pot in.
Thanks guys! This is obviously a dead end, else it would be done regularly :)
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: Mark Hammer on March 28, 2021, 09:23:54 AM
I believe Craig Anderton had an installment in Guitar Player years ago about using an LED/LDR arrangement to effectively "de-scratch" a wah or volume pedal.  I'll see if I can locate it (although I expect someone else here will probably beat me to the punch)
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: Rob Strand on March 28, 2021, 09:54:53 AM
All you need is a current source -google it.  Here's a text book type circuit.  Use an LM358 so the input can be adjusted down to zero volts.

https://electronics.stackexchange.com/questions/459323/constant-current-led-driver-using-opamp

(https://i.stack.imgur.com/AiZH3.png)

The current through the LED is "the pot output voltage" /  R2.   You will want to increase R2.

You want to limit the maximum voltage to the opamp to something in the range of 2V to 4V.   The regulator ensures the behaviour is consistent with battery voltage.  You could toss it and just connect a resistor form the pot cw terminal to +9V to limit the voltage range.  A cap from the opamp + input to ground will help prevent glitches.

Now you can simplify this circuit by feeding the pot into the base of the transistor and ditch the opamp but then then behaviour depends on the transistor gain - it still works though.   You could even use a JFET instead.

Plenty of options.


Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: iainpunk on March 28, 2021, 10:40:22 AM
PWM!!!!!!!!!!!!!!!!!!!!!!!!!

use a simple PWM circuit and switch the LED with a transistor,
https://www.electroboom.com/?tag=toothbrush
replace the motor here with the LED.

cheers
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 10:44:20 AM
Whoa! That's the ticket. Thanks again!! I will try those immediately!!! And I'll search my "archives" for Doug's snippet, too!
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 11:32:15 AM
Quote from: Mark Hammer on March 28, 2021, 09:23:54 AM
I believe Craig Anderton had an installment in Guitar Player years ago about using an LED/LDR arrangement to effectively "de-scratch" a wah or volume pedal.  I'll see if I can locate it (although I expect someone else here will probably beat me to the punch)
[/quoteI think it's on R.G.'s ,,Technology of Wah Pedals"webpages
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: tonyharker on March 28, 2021, 11:46:53 AM
The trouble with LEDs is that they cannot be dimmed in the same way as a lamp. When you get below a certain voltage the LED will cut off abruptly.  The best way is with a PWM dimmer like this one https://www.ebay.co.uk/itm/DC-3V-35V-PWM-DC-Motor-Speed-Controller-Adjustable-LED-Dimmer-10khz-Fan-O2Z9/353421746582?hash=item524993e196:g:5tIAAOSwe-dfgiBy The LEW will still need a series resistor but should dim gradually to off.  The only problem with these is the switching frequency which may be audible and may inject noise into adjacent elecrtonics.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: Fancy Lime on March 28, 2021, 11:49:44 AM
While you're at it with the PWM, use switches instead of vactrols as control elements, and you got yourself a Bass Crybaby 105Q. I have never seen a schematic but I read somewhere that is is based off an MXR envelope filter, and a quick look into my unit makes that at least sound plausible. There is a 4049 inverter that seems to be the oscillator and PWM control, a 4016 quad bilateral switch as the resistive control element, and two MC33174D quad opamps, which seem to handle the audio path, judging by their positions in what looks like a reasonably well organized layout. No guarantees, though, I haven't traced it and it's SMD with lots of unmarked caps, so...

Cheers,
Andy
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: iainpunk on March 28, 2021, 11:59:49 AM
Quote from: tonyharker on March 28, 2021, 11:46:53 AM
The trouble with LEDs is that they cannot be dimmed in the same way as a lamp. When you get below a certain voltage the LED will cut off abruptly.  The best way is with a PWM dimmer like this one https://www.ebay.co.uk/itm/DC-3V-35V-PWM-DC-Motor-Speed-Controller-Adjustable-LED-Dimmer-10khz-Fan-O2Z9/353421746582?hash=item524993e196:g:5tIAAOSwe-dfgiBy The LEW will still need a series resistor but should dim gradually to off.  The only problem with these is the switching frequency which may be audible and may inject noise into adjacent elecrtonics.
well, a photo-resistor is really slow, in my experience less than 20Hz at its -3dB point when using to transfer signals, if you switch at above audio rates, there is no way that it would be audible, or affect audio at all.

cheers
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: antonis on March 28, 2021, 12:24:50 PM
20 or more items to drive an LED...  :o

(remarkably outrageous..) 
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: PRR on March 28, 2021, 01:30:00 PM

(https://i.postimg.cc/LqkBmF7Y/drivean-LED-42.gif) (https://postimg.cc/LqkBmF7Y)
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 02:33:49 PM
Quote from: PRR on March 28, 2021, 01:30:00 PM

(https://i.postimg.cc/LqkBmF7Y/drivean-LED-42.gif) (https://postimg.cc/LqkBmF7Y)

This one does it. Thanks so much!
Just gotta finetune it - when I move the pedal (pot) too fast upwards (toe position), there's some jumping around. Could be the pot, though. I really don't know how old the Cry Baby is. Gotta test it with a normal alpha pot. Maybe the LED gets too bright, too, which is easily avoided, I guess.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 02:36:01 PM
Quote from: iainpunk on March 28, 2021, 10:40:22 AM
PWM!!!!!!!!!!!!!!!!!!!!!!!!!

use a simple PWM circuit and switch the LED with a transistor,
https://www.electroboom.com/?tag=toothbrush
replace the motor here with the LED.

cheers
Will do! I found this one (
https://gadgetronicx.com/wp-content/uploads/2014/10/pwm-led-light-dimmer.png
(https://gadgetronicx.com/wp-content/uploads/2014/10/pwm-led-light-dimmer.png)) at a quick google, and it doesn't work - connecting the pot seems to short something. But no matter. Gotta try meself a toothbrush
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 02:37:00 PM
Quote from: Rob Strand on March 28, 2021, 09:54:53 AM
All you need is a current source -google it.  Here's a text book type circuit.  Use an LM358 so the input can be adjusted down to zero volts.

https://electronics.stackexchange.com/questions/459323/constant-current-led-driver-using-opamp

(https://i.stack.imgur.com/AiZH3.png)

The current through the LED is "the pot output voltage" /  R2.   You will want to increase R2.

You want to limit the maximum voltage to the opamp to something in the range of 2V to 4V.   The regulator ensures the behaviour is consistent with battery voltage.  You could toss it and just connect a resistor form the pot cw terminal to +9V to limit the voltage range.  A cap from the opamp + input to ground will help prevent glitches.

Now you can simplify this circuit by feeding the pot into the base of the transistor and ditch the opamp but then then behaviour depends on the transistor gain - it still works though.   You could even use a JFET instead.

Plenty of options.
Thanks so much! Will try this tomorrow.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 02:38:47 PM
Quote from: antonis on March 28, 2021, 12:24:50 PM
20 or more items to drive an LED...  :o

(remarkably outrageous..)
;D  :-[ Nothing's ever easy with me, I know. But one of these days I'll know 3 or 4 ways to drive an LED with a 100k pot.
Μῆνιν ἄειδε θεὰ Πηληιάδεω Ἀχιλῆος
οὐλομένην, ἥ μυρί' Ἀχαιοῖς ἄλγε' ἔθηκε
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: antonis on March 28, 2021, 02:51:54 PM
Quote from: KarenColumbo on March 28, 2021, 02:38:47 PM
Μῆνιν ἄειδε θεὰ Πηληιάδεω Ἀχιλῆος
οὐλομένην, ἥ μυρί' Ἀχαιοῖς ἄλγε' ἔθηκε

πολλάς δ' ἰφθίμους ψυχάς Ἄϊδι προΐαψεν
ἡρώων, αὐτούς δέ ἑλώρια τεῦχε κύνεσσιν
οἰωνοῖσί τε πᾶσι..

You can't always drive an LED the way you want.. :icon_wink:
(loose transliteration...)
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 28, 2021, 04:40:49 PM
Hehehe :) I actually learned ancient greek in school. I copied those two lines from Wikipedia, but I still can recite the first 8 verses (and probably write them almost correctly). Achilles' battle against SMD LEDs or so ...
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: Rob Strand on March 28, 2021, 06:48:14 PM
Here's the budget version for antonis's benefit,

(https://i.postimg.cc/qtMD3F1f/Adjustable-LED-Driver-Imprecise-Version.png) (https://postimg.cc/qtMD3F1f)

It's possible to do a BJT version but with a high pot value like 100k the base current is going to mess things up,  perhaps even change the linearity of the control.

Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 29, 2021, 01:11:31 AM
https://www.thetonegod.com/diy/rock (https://www.thetonegod.com/diy/rock)
Found this in an old (2014) thread here on the forum
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 29, 2021, 01:18:46 AM
Quote from: Rob Strand on March 28, 2021, 06:48:14 PM
Here's the budget version for antonis's benefit,

(https://i.postimg.cc/qtMD3F1f/Adjustable-LED-Driver-Imprecise-Version.png) (https://postimg.cc/qtMD3F1f)

It's possible to do a BJT version but with a high pot value like 100k the base current is going to mess things up,  perhaps even change the linearity of the control.
Will it endure 2 LEDs? Thay may have 100-120 mA together. If I read the Data Sheet correctly, a 2N7000 has a continous ID of 200 mA. And the source resistor will "generate" a current, too. According to https://ohmslawcalculator.com/ohms-law-calculator (https://ohmslawcalculator.com/ohms-law-calculator) there's 16 mA at R1, so it looks like we're getting close to that spec.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: Rob Strand on March 29, 2021, 01:44:27 AM
Quoteill it endure 2 LEDs? Thay may have 100-120 mA together. If I read the Data Sheet correctly, a 2N7000 has a continous ID of 200 mA. And the source resistor will "generate" a current, too. According to https://ohmslawcalculator.com/ohms-law-calculator there's 16 mA at R1, so it looks like we're getting close to that spec.
I was thinking 5mA not 120mA!   So is that 2xLEDs in parallel with 50mA to 60mA each?  That's pushing the LEDs no?

For the 2N7000 the datasheets are coming up with about 200mA max.  In that circuit I doubt it will do even that.  There's going to be about 9 - 1.7 -1 = 6.3V across the device.  That's 6.3 * 0.2 = 1.26W power dissipation and 312.5 (deg/W) * 1.26 = 400C rise in junction temp.   If you are thinking that looks hot, it is  :icon_mrgreen:    Even at 100mA you still get 200C.   Whatever part and whatever circuit you use with a current source is going to need to dissipate the 1.26W (or whatever).   So you will need a small heatsink, 80C/W or preferably less.

If you can use a switching circuit that will reduce the power dissipation because the part doesn't have to sustain 6.3V across it but then you have to consider noise  and signal modulation issues.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 29, 2021, 02:46:52 AM
So I'll swap in a beast of a MOSFET? Like this hulk here? https://asset.conrad.com/media10/add/160267/c1/-/en/000162798DS01/datenblatt-162798-infineon-technologies-irl540npbf-mosfet-1-n-kanal-140-w-to-220.pdf (https://asset.conrad.com/media10/add/160267/c1/-/en/000162798DS01/datenblatt-162798-infineon-technologies-irl540npbf-mosfet-1-n-kanal-140-w-to-220.pdf)
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: Fancy Lime on March 29, 2021, 03:18:20 AM
Quote from: KarenColumbo on March 29, 2021, 02:46:52 AM
So I'll swap in a beast of a MOSFET? Like this hulk here? https://asset.conrad.com/media10/add/160267/c1/-/en/000162798DS01/datenblatt-162798-infineon-technologies-irl540npbf-mosfet-1-n-kanal-140-w-to-220.pdf (https://asset.conrad.com/media10/add/160267/c1/-/en/000162798DS01/datenblatt-162798-infineon-technologies-irl540npbf-mosfet-1-n-kanal-140-w-to-220.pdf)

No, you use less current. Most modern LEDs have the brightness range that is relevant for a good response in home-rolled vactrols somewhere in the 0.1-10mA range. That depends on the LED, the LDR and the way they are put together, of course. But I say, if you need more than 10mA through each LED to get to the minimum resistance of the LDR, use more efficient LEDs or more sensitive LDRs but don't try to turn a way pedal into a space heater. Remember, you almost never want to get near the maximum current that the LED can handle. On the one hand, it shortens it's lifespan, on the other hand, the region where LDR resistance and LED current correlate in a useful way is at the low end of the LED current range (just above where it turn on).

Andy
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: PRR on March 29, 2021, 03:22:38 PM
Quote from: KarenColumbo on March 29, 2021, 01:18:46 AM....2 LEDs? Thay may have 100-120 mA together. ....

Explain your thinking here.

The usual little LEDs are historically rated 20mA max. Back in 1985 we might need 15mA to be "bright". Today's better parts are BRIGHT with less than 5mA, even 1mA.
https://en.wikipedia.org/wiki/LED_circuit#Power_source_considerations
"The maximum current is shown on LED datasheets, for example 20 mA (0.020A) is common for many small LEDs. Many circuits operate LEDs at less than the recommended maximum current, to save power, to permit the use of a standard resistor value, or to reduce brightness."
https://commons.wikimedia.org/wiki/File:LEDs.jpg
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 29, 2021, 04:54:42 PM
Quote from: PRR on March 29, 2021, 03:22:38 PM
Quote from: KarenColumbo on March 29, 2021, 01:18:46 AM....2 LEDs? Thay may have 100-120 mA together. ....

Explain your thinking here.

The usual little LEDs are historically rated 20mA max. Back in 1985 we might need 15mA to be "bright". Today's better parts are BRIGHT with less than 5mA, even 1mA.
https://en.wikipedia.org/wiki/LED_circuit#Power_source_considerations
"The maximum current is shown on LED datasheets, for example 20 mA (0.020A) is common for many small LEDs. Many circuits operate LEDs at less than the recommended maximum current, to save power, to permit the use of a standard resistor value, or to reduce brightness."
https://commons.wikimedia.org/wiki/File:LEDs.jpg
I seem to have picked some curious datasheet, can't remember how I got 50-60 mA per LED  :-[ :icon_redface:
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: Fancy Lime on March 29, 2021, 05:05:06 PM
Quote from: PRR on March 29, 2021, 03:22:38 PM
Quote from: KarenColumbo on March 29, 2021, 01:18:46 AM....2 LEDs? Thay may have 100-120 mA together. ....

Explain your thinking here.

The usual little LEDs are historically rated 20mA max. Back in 1985 we might need 15mA to be "bright". Today's better parts are BRIGHT with less than 5mA, even 1mA.
https://en.wikipedia.org/wiki/LED_circuit#Power_source_considerations
"The maximum current is shown on LED datasheets, for example 20 mA (0.020A) is common for many small LEDs. Many circuits operate LEDs at less than the recommended maximum current, to save power, to permit the use of a standard resistor value, or to reduce brightness."
https://commons.wikimedia.org/wiki/File:LEDs.jpg
Well, you *can* buy LEDs these days, whose current limit is reported in A, not mA. Not uncommon for lighting applications. I would not necessarily use them in a vactrol, though. OTOH, they generate several W of radiated energy, so you could use a thermistor instead of an LDR. Practical? No. But certainly unusual. There's extra mojo points for that, I'm sure. Or you can place the LED and LDR at opposite ends of a long tunnel and make the biggest vactrol ever.

Andy
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: Fancy Lime on March 29, 2021, 05:15:22 PM
Quote from: KarenColumbo on March 29, 2021, 04:54:42 PM
Quote from: PRR on March 29, 2021, 03:22:38 PM
Quote from: KarenColumbo on March 29, 2021, 01:18:46 AM....2 LEDs? Thay may have 100-120 mA together. ....

Explain your thinking here.

The usual little LEDs are historically rated 20mA max. Back in 1985 we might need 15mA to be "bright". Today's better parts are BRIGHT with less than 5mA, even 1mA.
https://en.wikipedia.org/wiki/LED_circuit#Power_source_considerations
"The maximum current is shown on LED datasheets, for example 20 mA (0.020A) is common for many small LEDs. Many circuits operate LEDs at less than the recommended maximum current, to save power, to permit the use of a standard resistor value, or to reduce brightness."
https://commons.wikimedia.org/wiki/File:LEDs.jpg
I seem to have picked some curious datasheet, can't remember how I got 50-60 mA per LED  :-[ :icon_redface:
That's not a totally unusual value for the *maximum allowable* current through an LED before it blows up. But in actual practice, especially in a vactrol, you want to operate a modern, moderately bright LED *way* below it's maximum brightness (and brightness correlates more or less linearly with current).

Because LEDs and LDRs vary quite a bit, you may need to measure the correlation between resistance across the LDR and current through the LED to figure out where the right range of currents for your application is. Make sure to limit the maximum possible current during your test to no more than half of the maximum allowable value as per the datasheet. Or no more than 10 mA to be safe.

Andy
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: FingerBlisters on March 29, 2021, 05:35:48 PM
There's a pedal maker out there somewhere in france who has a trimpot inside for LED brightness to the owner can select their own level. I thought that was pretty neat.
Title: Re: Basic question: How to regulate LED brightness with ridiculously LARGE resistor
Post by: KarenColumbo on March 30, 2021, 06:35:06 AM
Quote from: Rob Strand on March 28, 2021, 06:48:14 PM
Here's the budget version for antonis's benefit,

(https://i.postimg.cc/qtMD3F1f/Adjustable-LED-Driver-Imprecise-Version.png) (https://postimg.cc/qtMD3F1f)

It's possible to do a BJT version but with a high pot value like 100k the base current is going to mess things up,  perhaps even change the linearity of the control.
This one works perfectly. Thanks again!