Reverse envelope follower/make LED dim with signal

Started by MrStab, February 05, 2014, 07:19:18 PM

Previous topic - Next topic

MrStab

hi guys,

now that my solder problem has been taken care of, i can get back to problems & complications that are my own fault!

i'm experimenting with an overdrive/distortion circuit - just out of curiosity, really - whose distortion is very slightly increased in accordance with input strength. so basically i want an LED to dim very slightly when i play, to be picked up by an LDR (in parallel with the opamp feedback loop+diodes). i've been experimenting all day, and i had a very rough version working (by "shorting" the LED anode to ground via. a 47R resistor with a NPN), but even with high-output pickups, the strength required to dim the lights was just a bit too high. FWIW, what i did have working felt quite nice and organic to play (in the dark), but i don't think my method was ideal. and i've broken it apart now anyway. if i did nail it, i couldn't work out what parameters to change.

this should be easy, no? whilst i do have a spare opamp, i'd rather use a transistor-based method than the one outlined here: http://www.diystompboxes.com/smfforum/index.php?topic=93205.0;. i've tried PNPs and NPNs without much success. it's easy to make the LED light up when i play, but achieving the opposite seems to have me stumped.

i've actually done this before on Engi's Thumb compressor builds, but that was by taking advantage of that particular circuit. i just want it to dim slightly, not all the way. it's surprisingly hard to find search results on this. i have a feeling i'll kick myself when i'm shown how simple it is. i was taking the signal from just after the opamp input buffer, btw. maybe just not enough gain? also, i seemed to need a cap to decouple the transistor base, or the signal would screw up - that's contrary to my experience with similar BJT usage.

thanks for any suggestions! the fewer parts, the better. i'm not looking for much finesse here (it is a distortion, after all!)
Recovered guitar player.
Electronics manufacturer.

duck_arse

Mr, any progress?

I been thinking of over and under leds on an opamp, and just this evening was looking for a walking ring. guess whose name came up, with the thing I had in mind, and maybe what you want, with a diagram?

http://www.geofex.com/article_folders/lfos/psuedorandom.htm

last diagram, bottom of page.
hit the lights. roll film!

R.G.

I'd use a current mirror.

Imagine an LED set up with a resistor to V+ to the LED anode, and the LED cathode grounded. The resistor limits the current to the LED. Now parallel the LED with an NPN transistor, collector to anode, emitter to ground. Turning on the transistor steals current from the LED, including all the way to zero LED current. But the signal to put on the base is very touchy.

Now put a second NPN, emitter to ground, and base to the first NPN's base. Also, the collector of the second NPN to the base of the first NPN. The new NPN is an "active diode" that is well matched to the first NPN. If you feed current into the collector of the second NPN (and both bases), the base voltage of the first NPN is automagically set to the correct voltage for its collector current to match the current fed into the second NPN's collector - it's a current mirror!

So you set up the LED and current mirror, and feed current into the second NPN collector. Whatever current you feed in is *subtracted* from the current the LED gets. After that, it's just a matter of feeding the right current into the second NPN, perhaps as a voltage through a resistor.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Mark Hammer

Might it not be easier to simply employ a method of gain-raising that involves making a resistance smaller?  That way you could use an envelope follower that increases LED brightness with amplitude.

Kipper4

Quote from: R.G. on February 25, 2014, 10:27:37 AM
I'd use a current mirror.

Imagine an LED set up with a resistor to V+ to the LED anode, and the LED cathode grounded. The resistor limits the current to the LED. Now parallel the LED with an NPN transistor, collector to anode, emitter to ground. Turning on the transistor steals current from the LED, including all the way to zero LED current. But the signal to put on the base is very touchy.

Now put a second NPN, emitter to ground, and base to the first NPN's base. Also, the collector of the second NPN to the base of the first NPN. The new NPN is an "active diode" that is well matched to the first NPN. If you feed current into the collector of the second NPN (and both bases), the base voltage of the first NPN is automagically set to the correct voltage for its collector current to match the current fed into the second NPN's collector - it's a current mirror!

So you set up the LED and current mirror, and feed current into the second NPN collector. Whatever current you feed in is *subtracted* from the current the LED gets. After that, it's just a matter of feeding the right current into the second NPN, perhaps as a voltage through a resistor.

Since I read this post I looked up currant mirrors and saw this can be done with mosfets to is there any advantages or drawback between the two type of transistors for this application.
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/

R.G.

Quote from: Kipper4 on February 25, 2014, 01:13:22 PM
Since I read this post I looked up currant mirrors and saw this can be done with mosfets to is there any advantages or drawback between the two type of transistors for this application.
MOSFETs need a higher voltage between gate and source, so the offset voltage on the mirror input is bigger. They're also more expensive, and because of the bigger variation in Vgs threshold, probably need to be matched. Of course, if you do go to the trouble, you can use a pair of really  high voltage MOSFETs for making a high voltage current mirror. But you can get NPNs up to about 300V pretty easily.

I like bipolars for this because the voltage between the input and ground is no more than 0.7V ever, and the transistors are a few cents apiece.  But the circuit works the same. The input transistor is connected in "active diode" mode, and uses its gain to create a voltage on its base that just makes the collector (or drain) conduct the incoming current. The same voltage is impressed on the output transistor, and forces a nearly identical current to flow in its collector/channel.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Kipper4

Thanks RG I am a little wiser.
I'm following this one :)
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/