# Capacitors controlling attack and release of a pulse.

Discussion in 'General Electronics Discussion' started by Gandy, Jan 4, 2013.

1. ### Gandy

7
0
Dec 6, 2012
Hello all.

I'm trying to turn this sort of waveform: (essentially a fixed amplitude sine wave, but really it would be a rectified audio signal)

Into this:

Whereby the times for A and B can be independently controlled with different fixed capacitor values. I can easily slip a capacitor in to smooth the whole signal out, but I need to be able to vary A and B independently. I've tried playing with different capacitor arrangements but have't really found anything that truly independently controls A and B – my capacitors seem to interact in strange ways.

Any help is highly appreciated.

2. ### BobK

7,682
1,689
Jan 5, 2010
First off, that is not a sine wave and is also not what a rectified audio signal will look like.

Assuming you really want to shape a square pulse like that, I don't know any way you could do it with a passive circuit.

Bob

3. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,505
2,852
Jan 21, 2010
I think he may be talking about changing the envelope.

i.e. to give a non-instantaneous start and stop. I believe this is called attack and decay.

Googling that, I came up with this circuit. It's all discrete, but I think more googling might yield more options.

4. ### john monks

693
4
Mar 9, 2012
edge and one for your trailing edge.
This can be done many ways but the easiest way may be to use a PNP transistor
for the pull-up and a NPN transistor for the pull-down. You can use two different
variable resistors in the collector circuits of the transistors for your time constants..

5. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,505
2,852
Jan 21, 2010
Or you can take the original pulse (if that is what it is) and pass it through a low pass filter.

6. ### Gandy

7
0
Dec 6, 2012
That'd only smooth the whole signal out. I could do that to convert peak values to RMS though, depending on the capacitor.

Would this still use capacitors charging as the physical mechanism of the delay, or would it be entirely active?

7. ### Gandy

7
0
Dec 6, 2012
I'm not very good with transistors, it seems to be about the edge of my ability. I've ventured nonetheless into using the drop of the signal's pulse to halt the discharge of the capacitor, which seems to be fairly easy with a transistor.

I came up with something like this suggestion, except both attack and release are NPN transistors. For the attack I fed the signal to both the base and collector, with a resistor/capacitor voltage divider over the base, and then varied that to determine how much signal was fed to the low pass. It just drops once the input signal drops, so I think it doesn't affect the release because the input connection to the base and collector don't allow any signal from the capacitor through base to emitter. It works in simulation at least.

For the attack I've got the emitter going to output and a capacitor to ground, and the output is fed back into the collector. I can't explain why it works in simulation, but I don't have any resistors so I'd switch the capacitor to change the release time.

Again, I'm not very good with transistors, so I have no idea if this is a valid way of doing this. It works in simulation though, but I have no idea what it'd do in real life.

Thanks for the suggestion of using the transistors. I'd have never even thought of it. Cheers.

8. ### john monks

693
4
Mar 9, 2012
I was thinking of the capacitor being in parallel with the output. A PNP transistor emitter would be connected to a power supply, maybe 5 volts, and the collector feeding a resistor.
A NPN transistor emitter would be connected to 0 volts and the collector would be feeding a different resistor.
The other ends of the resistor would be feeding one end of the capacitor and the output.
The other end of the capacitor would be connected to 0 volts.

The transistors would be acting as switches, that is being totally on or off.
The transistors are active components but are not being used in their active regions,but as switches.
Now the bases need to be feed with a pulse through separate resistors.

74
1
May 19, 2012
10. ### Yoa01

214
0
Jun 18, 2012
Oddly enough, I was just looking into how to build an ADSR for a synth I'm building. Thanks!

11. ### CiaranM

74
1
May 19, 2012
you're building a synth, huh? that's great; so am I. what site/schematics are you using?

12. ### Yoa01

214
0
Jun 18, 2012
Honestly, Google. I get my schematics from all over: datasheets, random blogs, kind manufacturers, and even a couple of my own designs. However I do blog about a lot of it here: http://siryoa.blogspot.com/.

Oh, and a couple things: firstly, the Rene ADSR doesn't seem to work. I can only run simulations because I can't get to my electronics area at the moment, but all it seems to do is output a constant voltage. Could be wrong.

Secondly, if you just want an AR generator, this works amazingly: http://charlieslick.blogspot.com/2012/08/exponential-portamento-slew-limiter.html. It's actually a slew limiter, but it does the job.

13. ### CiaranM

74
1
May 19, 2012
OK, good blog! nice to read some of your stuff. thanks for that circuit too.
I put together the ADSR yesterday, it didn't work for me either. I might try again though. I avoid simulations, ha ha. When I managed to get an output that was teravolts from an op amp powered by +/-9V, I decided not to trust Multisim any more.
If you're on Facebook, perhaps you could join the 'Synth-DIY' group. I just have. Should be useful.

Here are some sites, for your interest...
http://www.birthofasynth.com/ I've managed to test/build a few Thomas Henry designs and upload the results to YouTube. It really is a good site, however it doesn't delve into keyboards or power supplies. Consider buying this. http://www.lulu.com/shop/thomas-hen...-21st-century/paperback/product-20192513.html
no instructions and no keyboard circuit, but its a good collection nevertheless. Check out his other books, too..

http://yusynth.net/Modular/modular.html Though I haven't tried any of these, there is a lot to offer. Here is an ADSR: http://yusynth.net/Modular/Commun/ADSR/ADSR-v2-sch.gif

14. ### Yoa01

214
0
Jun 18, 2012
Good to hear! Thank you. No prob, that guy has a lot of useful circuits.

The problem with simulations is that they use math and logic. Mathematically, that kind of output is totally possible, but physically it is not because opamps can't go out of range of their supply voltage. I use LTSpice for almost everything now, give that a try. It seems to be *mostly* bug-free, but is missing a lot of components.

I'm actually on Muff Wiggler and browse the Music Tech DIY subforum a lot. Great stuff. I'll check out the FB page too.

Is it good or bad that I already frequent those sites? haha Thanks though. Might I recommend to you The Art of Electronics by P. Horowitz? A great read and well written, and you can find it in PDF form for free online if you look around a bit. I've been meaning to try out the YuSynth ADSR, I just haven't gotten to it yet.

15. ### CiaranM

74
1
May 19, 2012
hmm... looks like I'll have to try a little harder. Here are some more.
http://rubidium.dyndns.org/cag/
http://www.muzique.com/schem/
http://m.bareille.free.fr/synth.htm
http://www.sowa.synth.net/modular/index.html
http://www.synthdiy.com/show/files.asp
http://www.till.com/arptech/modmain.htm
http://hem.bredband.net/bersyn/

OK, I may try LT one day. Is it missing important components? And that makes sense. I suppose the Multisim programmers forgot about 'real life' when designing the program.
Hmm, looks good, I should check out that site. I actually tried to join http://electro-music.com/ , but I have yet to receive an email to verify my account. Damn.

I actually have the student manual. Not sure how it compares to the main book, though...

16. ### Yoa01

214
0
Jun 18, 2012
I've been to half of those. That ARP page is one of the most useful things ever though, mainly because I have ARP parts pictures and want to know how they are wired. Thanks!

Depends on what you consider important and what you are using it for. Only thing I don't like is that it doesn't have descriptions for the hundreds of opamps it has and it doesn't have transformers or normal switches. However, Tina-TI does, so I use them kinda interchangeably.

I've never really liked EM, in all honesty.

I'd assume the main book is bigger with more info The manual is probably still rather useful, though.