News:

SMF for DIYStompboxes.com!

Main Menu

LDR Sweller

Started by Kipper4, February 10, 2016, 03:08:25 PM

Previous topic - Next topic

Kipper4

All diodes and caps orientated properly yep?
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/

anotherjim

Yep indeed.
I feel a pumping analogy coming on...

Vg is from an op-amp, it's your pumping arm. Positive/forward is the pressure/delivery stroke.
Cp is the pump cylinder/piston.
D2 is a non-return charging valve.
D3 is a non-return relief valve.
Cr is the vessel you're charging.

Once the vessel is charged equal to the supply, you won't get any more in it.
It only pumps on the positive stroke, so you only get the positive going half of the full signal swing to charge with. Say maximum 4V.
Once there's 4V on Cr, the pump can still put more on top of it -  to 8V. It's a voltage doubler. Now it's equal to the most you can push from the power supply, so that's it until the charge in Cr is allowed to bleed off - thru Rr.

The negative going half of the signal opens the pump via D3, Cp needs discharging to allow the next charge in on the following positive phase.

To change to suck instead of blow, you reverse both valves.

Kipper4

Quote from: anotherjim on February 14, 2016, 05:25:19 AM
Yep indeed.

D2 is a non-return charging valve.
D3 is a non-return relief valve.
Cr is the vessel you're charging.

The negative going half of the signal opens the pump via D3, Cp needs discharging to allow the next charge in on the following positive phase.

I see no D3
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/

anotherjim

No D3 is D1, but D2 thought it was more important and should be D1, so I settled the argument by demoting D1 to D3. ::)

Kipper4

After several attempts I can kinda make it work. As set out in reply 37 top example, page 2
However the swell aspect wasn't as effective, I'm assuming because of the slower led off time. The notes don't swell the same as my earlier trials.
So quick question again.
When I look how the capacitor C4 looks like it's orientated differently to how I've seen it in other examples
For example here

http://www.allaboutcircuits.com/textbook/semiconductors/chpt-3/voltage-multipliers/#03441.png
Top most fig b

Have I got that wrong ?
Thanks
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/

anotherjim

I think the cap pos to the amp out is right. If the amp out swings to ground, the only source of pos to the neg of the cap is from the envelope cap - but there's a diode reversed biased in the way so it can't. When the amp swings positive, the cap pos can only be more positive than the envelope if that diode is conducting. So Pos to the amp is always best polarity for the cap.

I'd have thought the LED will turn off as fast as the delay control can bleed the env' cap off. Perhaps a smaller envelope cap will do? I'd also suspect you need a variable R (a preset type) in series with the LED to match it's brightness to what you want the LDR to do.

If your LDR/LED are together as a DIY vactrol, make sure no light is getting in from outside - even from the back of the LDR, or you won't know what's really happening.


Kipper4

Thanks Jim
I wasn't having a good day today.
I still have some learning and experiments to do.
Here's the vactrol I'm using.

http://www.farnell.com/datasheets/16352.pdf

I put a 5mm red led in parallel with the vactrol led when I want to try and see what's going on with it.
It's not over until the fat lady swells.:)
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

Still breadboarding and learning to hack.

I have a simpletons question.
I'm essentially using a rectifier of some sort who's job it is to use an AC signal to generate  a DC output.
Since capacitors don't pass DC
In Jims example the  cp capacitor blocks any DC from the op amp output.
So where does the DC in the rectifier come from?
Is it simpleton created by the caps and diodes d1 d2 cr ?
Cheers
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/

Transmogrifox

Think of it as an AC rectifier.  You feed AC into it and the diodes switch currents around so that current only goes one direction into the load.

Less simplistic is this is a charge pump circuit.  On the down stroke, Cp gets charged through D1.  On the up stroke, Cp discharges through D2 into the load, transferring its stored charge into the averaging/filter capacitor Cr.  Cr is slowly bled out through Rr during the following down stroke when Cp is getting charged again.

Either way Cp is conducting AC.  If you apply DC to Cp, you won't get DC at the load.  It's constantly charging and discharging, but the diodes control where it gets it charge from, and where it dumps its charge to.

That is why D1 is so important for this to work.  If you remove it, then you can't pull any more charge into Cp on the down stroke.  It really is like a pump:  Pull up on the handle and draw water into the piston through a 1-way valve.  Then when you push down on the handle it forces the intake valve to shut and the pressure forces the output valve to open and squirts the water into a bucket.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

Kipper4

Quote from: Transmogrifox on February 15, 2016, 06:51:26 PM
Think of it as an AC rectifier.  You feed AC into it and the diodes switch currents around so that current only goes one direction into the load

That is why D1 is so important for this to work.  If you remove it, then you can't pull any more charge into Cp on the down stroke.  It really is like a pump:  Pull up on the handle and draw water into the piston through a 1-way valve.  Then when you push down on the handle it forces the intake valve to shut and the pressure forces the output valve to open and squirts the water into a bucket.

Ah I see now. My old friend current.
That's what happens when my world becomes voltage centric.
Got it.
Thanks
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

I'm gonna try a Hammer mod using two schotkkys with a cap between them for less ripple.
When I'm done working.
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/

anotherjim

Worst part of envelope followers is getting it to both match playing and the thing it's controlling. You nearly always have to adjust playing technique.
Hardest part is the initial charge up after a pause, it has to be a strong input to make it happen. After that, with some charge already in the envelope cap, it only needs topping up.
If you let it charge quickly, there will be more ripple.
If it charges slow (attack resistance) ripple is smoothed out, but the player will tend to play hard since you can't hear the effect soon enough (although practice solves that).
If you don't discharge it quick enough, there will be less effect from a following note.
If you discharge it too fast, it may decay prematurely and take more signal to pump back up.

One way of making the envelope more consistent, is to limit the voltage across the cap to somewhat below maximum with a zener or diode string. That way the effect is the same with both strong and moderate playing.

You have a lot of compromises to work out.

You can to some extent remove some of these problems by having an artificial envelope generator and the range of types used in synths are there to grab. You still need an envelope follower, but now one or more comparators watch the level. A lowest level to reset the envelope, a highest level to trigger the envelope attack phase and one or more intermediate levels to determine the shape before the end. Then it's a LOT more complicated and can still not suit playing technique - it can be fooled by a slide from a decaying note for example.


Kipper4

Quote from: anotherjim on February 16, 2016, 08:13:46 AM
Worst part of envelope followers is getting it to both match playing and the thing it's controlling. You nearly always have to adjust playing technique.
Hardest part is the initial charge up after a pause, it has to be a strong input to make it happen. After that, with some charge already in the envelope cap, it only needs topping up.
If you let it charge quickly, there will be more ripple.
If it charges slow (attack resistance) ripple is smoothed out, but the player will tend to play hard since you can't hear the effect soon enough (although practice solves that).
If you don't discharge it quick enough, there will be less effect from a following note.
If you discharge it too fast, it may decay prematurely and take more signal to pump back up.
yep over the last days I've encountered all the above.

[/quote]
One way of making the envelope more consistent, is to limit the voltage across the cap to somewhat below maximum with a zener or diode string. That way the effect is the same with both strong and moderate playing.
[/quote]
you mean like the diode string in the Phuncgnosis
here
http://www.jiggawoo.eclipse.co.uk/guitarhq/Circuitsnippets/phuncgnosis.gif

where would one place a zener to do this please? orientation?



[/quote]
You have a lot of compromises to work out.[/quote]
i'm willing to try :)


[/quote]
You can to some extent remove some of these problems by having an artificial envelope generator and the range of types used in synths are there to grab. You still need an envelope follower, but now one or more comparators watch the level. A lowest level to reset the envelope, a highest level to trigger the envelope attack phase and one or more intermediate levels to determine the shape before the end. Then it's a LOT more complicated and can still not suit playing technique - it can be fooled by a slide from a decaying note for example.
[/quote]
Now that sounds intresting.
Given the hours Ive put in I think this is worth the investigation.
I'll google up Atrificial envelope generator.
Also given how simple the circuit is at this time. there is a lot of room for extra parts.

Cheers
If you have links to any of the above feel free to post them
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/

anotherjim

I think Phuncgnosis is using a trick where the LED's are acting a voltage dependent resistors, so the DC envelope added at the input varies the filter cut-off frequency. The String to 9v are to balance the down range with the up. It also has a 2 stage envelope cap, which is an easy add.
Incidentally, I've so far found not real advantage to using Schottky or germanium diodes in the rectifier or even a full rail-to rail op-amp type. The 358 (or the quad 324) only swings up to about 1.5v below the + supply. But they do swing down all the way ground, which is helpful as everything after it will cut-off at 0V at no signal.

Now this one...

...has a limiting Zener D7 across the Envelope cap C8. If you used diode/LED's instead to arrive a desired limit level, they would be in series with all cathodes facing ground. The decay is a fixed resistor R7, arrived at by experiment. There is a simple envelope generator (EG) following an op-amp which buffers the envelope on C8 from it. It does mean the envelope is flattened for some duration, but that's what was wanted in this case.

The ability to have a slow attack, but follow the natural decay of the original envelope was needed here, and there's circuitry to do that after the envelope follower. There's a variable attack control for the charge rate of the EG cap C6, then D5 will bypass the attack control and discharge C6 as the input envelope falls and follow it down. There isn't a control comparator here, it didn't really need one, but if there were its action would be to pull C6 to ground to discharge it quickly when the input envelope fell below some fixed minimum level and disconnect when the envelope returned.

A simple synth EG like this...

Works of a Gate control. All that is a high voltage while a key is pressed & 0v when released. So to run off guitar, you have an envelope follower monitored by a comparator. The gate should be high when you play and go low when decay gets low enough. As simple as possible, the gate MUST go low fairly soon so the EG decay has a chance to act while the note is still sounding.


garcho

#54
QuoteI think Phuncgnosis is using a trick where the LED's are acting a voltage dependent resistors

that's in a few Escobedo snippets. RG Keen discussing some, here:

QuoteFor a diode, if you put 0V across the diode and then introduce a change of maybe 0.1V, the current doesn't change much. If you do this with 0.2V, 0.3V, etc, nothing much changes until you get to about 0.45V (for silicon diodes!) where the current starts changing more and more. That's if the change is positive. If the change is negative, the diode essentially doesn't conduct at all. So the diode is a very nonlinear resistor. This is why we use it for clipping and distortion of signals which exceed about 0.45V.

However, if you use a tiny signal variation, maybe 0.010V (10mV), and slowly change the DC voltage across the diode, you will see that the computed resistance at 0.1V (which means the diode is getting a voltage of 0.995 to 0.105V when you add the tiny signal variation) may be, for instance, 500K. Then at 0.2V (that is, from 0.195 to 0.205) it may be 400K, 0.3V (from 0.295 to 0.305) 100K, and so on, you'd find that over the range of 0.45V to 0.70V (roughly, depends on the particular diode's ingredients and manufacture) that the incremental resistance would change from mostly nonconducting (about 100K) to almost a short circuit (about 10 ohms). Within that range, the diode is acting as a voltage controlled resistor.

This is only an approximation, of course. The actual diode response always has some distortion of the signal. But the smaller the signal, the less distortion. For signals of under 10-15mV, the distortion is well under 1%. For signals of 100mV, the distortion may be 5-10%, and we all know that distortion can be massive for signals over 0.5V.

There are actually tremolo circuits and filter circuits which use diodes for variable resistors which have been talked about here. The tremolo in the old Thomas Vox amplifiers is based on a set of four diodes which are fed a control current to set their operating point, and a tiny audio signal to be modified. The Steiner filter is a synthesizer filter which uses several diodes to make a voltage controlled filter.

here's the thread

Nicolas Collins has this interesting envelope follower with attack and decay controls, from an old issue of Electronotes, just found it recently, haven't tried it yet. if you're into avant garde weird stuff, check out some of his software pieces on that same site.

sometimes you can help your envelope followers with a little expansion before the input (you can leave it out of the audio signal path if you want). if you're gonna use a NE570/1, you can always use it as a rectifier, and a good one at that. Thomas Henry has a publication with a few uses for that chip.

there's also a VCR in the app notes for the 13700
  • SUPPORTER
"...and weird on top!"

Transmogrifox

#55
Looks like we were all thinking the same things at the same time.  For a string swell effect to yield consistent behavior, it works better if it's controlled by a triggered envelope generator instead of an envelope follower.

If the gain is controlled more directly by the envelope it is an expander, which increases the dynamic range of the signal (which is an effect of its own).  For a guitar string swell effect, this probably isn't exactly what you're going for or you wouldn't be trying to improve the envelope follower approach.

I have been toying with this for several days and came up with an envelope generator that has trigger sensitivity down to 10 mV.

Try this (replace op amp with flavor of choice or comparator).  Also "D1" is the LED you want to couple to the LDR.  The other LED is just to set up the "zero" point on the trigger so there isn't such a long delay before it activates.  You may want to play with R14 if you find it isn't starting the ramp fast enough on shorter swell times.

Also the "Swell" pot should be at least 100k (schematic note is a typo).  You may even want to go as high as 500k if you want to have the ability to do really gradual swells.


This is how you hook up the LDR in the circuit to make it into a sweller:


Then here's what the output looks like with a test signal stepping from 0 to 20 mV, dropping off to 5 mV, then stepping back up...  You can see what the input signal looks like in the plot below, and the output signal as a response.

Notice this simulation is run with maximum sensitivity.  If you don't want it to trigger so low then you just turn the pot.

Something that could be added is a hysteresis:  That is you adjust the threshold with the envelope generator output to make it trigger release sooner, but the first step is to try it and see if it works.  I may not get a chance to breadboard it for a while yet.


trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

Kipper4

Brilliant stuff guys this is above and beyond.
I'll read it Asap.
I'm so greatful of all the intrest and contributions.
I've had a breakthrough tonight on the breadboard.
It's still has a few issues but I think with a little tweeking it will improve.
As such it has just two control knobs now.
Rise and depth.
I'll try to post a schemo later.
And of course since you've all made so much effort I will continue with the latest ideas you have been so kind to provide
Great news
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

Q and D Schemo
Subject to improvements




If you breadboard it sitck a 3mm red led in parrallel with the vactrol led to see what its doing. for visual testing.
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/

Transmogrifox

honestly looks really good to me.  Only a few observations/comments:
A)  R10 and C2 form a high pass filter at ~340 Hz.  This isn't bad if you purposely intend for it to be more selective for notes played above the D string.
B)  Depth pot at Vb pulls against the 47uand 22k resistors.  This pulls Vb down and thus your intended audio path gets centered toward the 1.75V LED drop for bias.  I'm guessing you didn't intend for this.

For B, just make a separate, extra Vb for the LED and that will keep it out of the way of your audiio "thru" path.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

Kipper4

I'll make a separate vbias for the led. Thanks for the heads up.
C2 was adjusted so that the lower note triggered the charge pump.
Something I can play with.
It's much improved.
Thanks for the continued support.
I'll be back on the breadboard later
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/