electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software
ADSR
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 2 [32 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Sat Mar 12, 2016 11:09 am    Post subject: ADSR
Subject description: garden variety components
Reply with quote  Mark this post and the followings unread

This is the Basic ADSR circuit i drew up.
The circuit is heavily influenced by the Nicolas-ADSR and the YUSYNTH-ADSR .
I was always attracted by the simplicity of the Nicolas ADSR but the sustain Part I found always a bit imperfect.
Additionally I am obsessed with realizing all circuits only with Resistor values of 1k, 100k, and 1M, Transistor free when possible.
And then as I saw the Sustain MOD of the YUSYNTH ADSR --> bingo.

The Idea is a bit older so I developed some variations over the time, I will put them in the next posts.

Circuit is tested with 15V Supply Voltage.
The circuit works very well with one exeption: you will always find a more or less little offset voltage on the output, during the tests I measured between 0,2V and 0,5V! (It may can be avoided if you use a FET instead the PNP Transistor??? But I haven’t it tested yet.)
EDIT: i think not using a poa-cap is the solution

A little about the circuit:
The Gate Trigger Level is at about 0,6V (the Voltage Drop of D2), it is designed like that because no change is needed when you change the supply voltage.
The Value of C1 is not so critical. I have tested on the Breadboard values between some hundred pF and 10nf.
The Amplitude of the Envelope is determinate by R4 and R5, when both are equal the Amplitude will be about 0,5x Supply Voltage. Choose the values according to your needs, especially if you change the supply voltage.
Choose the A-D and R Pots and C2 according to your needs.
The Value of the S-Pot itself is not critical, but the value of the pot and R6 has to corespondend to the propotion of R4/R5.
The opamp is lm324 because it is quite robust and can work on single supply.


basic.png
 Description:
 Filesize:  60.02 KB
 Viewed:  808 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

basic.png



Last edited by gabbagabi on Sun Aug 13, 2017 8:55 am; edited 2 times in total
Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Sat Mar 12, 2016 11:22 am    Post subject: Reply with quote  Mark this post and the followings unread

The basic circuit @9V in the Simulation connected as "Two-knob-only" and Transistor free ADSR

My ugly prototype of this @15V

and a Scope-Shoot as evidence --> u can see the described offset


IMG_20160212_123510.jpg
 Description:
 Filesize:  905.02 KB
 Viewed:  338 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

IMG_20160212_123510.jpg



IMG_20160212_122741.jpg
 Description:
 Filesize:  733.49 KB
 Viewed:  307 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

IMG_20160212_122741.jpg



9V_two_knob.png
 Description:
 Filesize:  42.25 KB
 Viewed:  386 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

9V_two_knob.png



Last edited by gabbagabi on Sat Mar 12, 2016 11:55 am; edited 1 time in total
Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Sat Mar 12, 2016 11:54 am    Post subject: Reply with quote  Mark this post and the followings unread

the full plate

retrigger in
AD / ADSR Option
LFO option, plaese switch to AD and apply a Low-but-not-Zero Voltage at the Sustain Pot (funny Envelopes when u stay on ADSR and apply some Gate Signals)
Two Accent Option Ideas, left raises the Attack Amplitude the right option raises the whole amplitude.
All tested @15v


full.png
 Description:
 Filesize:  57.9 KB
 Viewed:  460 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

full.png


Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Sat Mar 12, 2016 12:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

A simulation fun: how low you can go


single op amp.png
 Description:
 Filesize:  70.6 KB
 Viewed:  370 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

single op amp.png


Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Mon Mar 14, 2016 9:36 am    Post subject: Reply with quote  Mark this post and the followings unread

the adsr part of the book, which you can find here:
http://electro-music.com/forum/viewtopic.php?highlight=instrumentos+musicales&t=51322
describes the method of mixing a AD and a AR signal to get a ADSR envelope.

of course i had to simulate it immediately.
The two attacks will influence each other but it dosent hurt so much, i guess.

gl
hf
gg


ADSR_SPAIN_BOOK_INSPIRATION.png
 Description:
 Filesize:  108.33 KB
 Viewed:  394 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

ADSR_SPAIN_BOOK_INSPIRATION.png


Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Sat Apr 16, 2016 4:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Great to see some interesting ideas. I find it fascinating that it is still possible to come up with new options for an ADSR after all these years, and without needing to resort to any components beyond the common or garden varieties.

Nicolas
Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Mon Apr 25, 2016 3:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Hey nicolas,
good to see you are still around after all those years Wink
And many thanks, now i have a name for my desire - the garden variety component desire.
In german we call them forest and meadow components Smile

May you wouldt have a look to garden variety component filters? http://electro-music.com/forum/topic-66911.html

cheers bb
gabbagabi
Back to top
View user's profile Send private message
Pantheon



Joined: Feb 17, 2011
Posts: 36
Location: Edinburgh

PostPosted: Fri May 13, 2016 3:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi g.gabba,

Thanks for posting this nice envelope generator, I think its a simple but elegant design.

I immediately wanted to simulate it. At first I had a little trouble getting the circuit to work right (perhaps I copied it incorrectly), but with a bit of fiddling I got it working correctly I think.

I have attached the schematic I simulated (with some of my tweaks).

There were a few things that puzzled me that I set out to try and fix.
First up I think the offset you mention is caused by the diode drop of the pnp transistor, so it cant ever quite release down to ground. I offset the collector and base a little to compensate.

Second, your input comparitor opamp seems to have its negative rail tied to ground which I assume is presumably to clamp its output to ground also. I instead fed the pnp threw a diode, allowing that opamp to have its negative rail set to -12v (in my case). Now that all the opamps have the same supply it should allow everything to run from a quad opamp. I saw however you seem to already be using a quad opamp so have I perhaps missed something here?

Lastly, I had to add a 200k resistor between the schmidtt trigger and the sustain pot so that the sustain pots leg is held effectively at 0v. Thus the sustain pot wiper ranges from 0v to Vcc/2.

Have I done something wrong when I copied the schematic?

With these tweak it certainly acts like a great little envelope Smile
Thanks for sharing this design!


EDIT:
I think I misunderstood the original design, and it seems obvious now that the opamps are all of course fed from +12/gnd. I'll leave my original questions up since I think they are still interesting.


ggabbaenv.png
 Description:
Modified g.gabba envelope
 Filesize:  27.06 KB
 Viewed:  289 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

ggabbaenv.png



_________________
the8bitpimp.wordpress.com
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Sat May 14, 2016 12:34 am    Post subject: Reply with quote  Mark this post and the followings unread

yes, there is something wrong.
the connection R1*R2 should be before C1, or else you will not get a sustain level of the same width as the gate.
but by doing that, remember to place a high value resistor between C1*+In U1 and ground or else, depending on the type of opamp, the cap C1 might charge from the bias current of +In U1 effectively locking up U1
Back to top
View user's profile Send private message Visit poster's website
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Sun May 15, 2016 3:56 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Pantheon ur welcome,

and thx for reminding me that there are a few things left to do Smile

Your simulation schematic looks good.

I think i will find time next week to work on the offset quest on the prototype.

The negative supply pin of the quad opamp LM324 was tied to ground because the circuit was designed single supply as it was mentioned above, but may i should place a note in the schematics, like others already do.
But you did exactly what was needed to make it working dual supply (the 200k resistor).
I have the schematic not posted because I thought that recently everyone wants to have only single supply circuits. I post it now.

@Grumble with equal value at R1/R2 u will have the Attack peak at half supply voltage level (6V in Pantheons case), so i cant see something wrong there.

cheers
bb
gabbagabi


Gabbagabi ADSR Envelope Dual Supply.png
 Description:
 Filesize:  92.25 KB
 Viewed:  344 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Gabbagabi ADSR Envelope Dual Supply.png


Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Sun May 15, 2016 4:07 am    Post subject: Reply with quote  Mark this post and the followings unread

please tell me the settings of the scope? my guess is 0.2 sec/div but it is already vivible that the sustain voltage is dropping.
try a gate time of several seconds long and look again.
Back to top
View user's profile Send private message Visit poster's website
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Mon May 16, 2016 7:10 am    Post subject: Reply with quote  Mark this post and the followings unread

I tested some things today,

1.i replaced on the single supply 2knob prototype the polaCap with a tantal cap --> no change regarding the offset

2. a long real world scope shoot of the single supply 2knob prototype, to show there is no remarkble sustain voltage drop (left)

2a)breadboarded the single supply version with a dual npn transistor arrangement (like in the yusynth adsr) instead of the pnp with no success, the offset remains.

3. breadboarded the dual supply version --> offset has disappeared (rigth shoot, CH1 and CH2 measuring the same point)


scope.png
 Description:
 Filesize:  100.58 KB
 Viewed:  226 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

scope.png


Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Mon May 16, 2016 3:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm sorry, just noticed that U2 is a Schmittrigger Embarassed
Back to top
View user's profile Send private message Visit poster's website
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Tue May 17, 2016 1:04 am    Post subject: Reply with quote  Mark this post and the followings unread

The reason you need a dual supply for this type of ADSR is that the PNP needs a negative voltage on its base (at least -0.7V negative) in order to fully drain the cap during the Release phase when the gate goes low.

Another thing to watch out for with this is that some PNP transistors will behave badly if the base goes all the way to -15V, hence some variations on this ADSR arrangement have an extra resistor to prevent it going too negative during the gate-off phase.

And another thing to watch for is the current capabilities of your opamp when operating near the limits. The LM324 when on a single sided supply can put its output down to ground only if the current it is required to sink is really tiny, like microamps. A lot of opamps are like this, they can swing their outputs near the rails, or they can handle milliamps of current, but not both those things at the same time.

Nicolas
Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Tue May 17, 2016 9:39 am    Post subject: Reply with quote  Mark this post and the followings unread

thx nicolas,

sometimes is the obvious so obvious that you cant see it.
For the moment i will leave it like it is, the single supply version has an offset the dual supply version not.

Do you know for what i have to look for in the datasheet to check the opamp current sink capabilities, eg TL0x4 which i use regularly?

@grumble, no problem ur welcome

cheers bb
gabbagabi
Back to top
View user's profile Send private message
vandelay



Joined: Apr 01, 2016
Posts: 1
Location: USA

PostPosted: Tue May 17, 2016 4:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm watching with great interest, as I am on the hunt for a single supply (12V) ADSR. Good luck and thanks for sharing your work!
Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Wed May 18, 2016 2:40 am    Post subject: Reply with quote  Mark this post and the followings unread

To run this ADSR on a single supply without major modification to the circuit I would use a couple of resistors and an extra opamp to create a virtual ground. If you are building a module which will have its own battery then that is job done. If the ADSR has to share its power supply with other modules then you will need to add a level shifter to remove that offset. Give me a minute and I will try to draw it.
Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Wed May 18, 2016 2:58 am    Post subject: Reply with quote  Mark this post and the followings unread

You can see in the datasheet graph that even though a feature of the chip is that the output can go all the way down to the -ve supply voltage, the current capabilities get pretty limited. If you want it to sink 10mA it can only get to within 1V of the -ve supply. Sinking 100uA - 1mA it can get within about 600mV of the -ve supply. To get to within 10mV it can only sink a couple of uA.

Nicolas


lm324-datasheet-snip.jpg
 Description:
graph from lm324 datasheet
 Filesize:  47.13 KB
 Viewed:  15295 Time(s)

lm324-datasheet-snip.jpg


Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Wed May 18, 2016 3:33 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is a drawing of what I am talking about - a 1.2V virtual ground which will allow the PNP to get properly biased, but will create a 1.2V offset in the output, so we add a 1.2V level shifter as a final stage. Also adding in a diode to create a crude offset in the sustain level to keep the pot range about where it should be. All of this is completely untested, so I there may be errors in the details I have drawn, but the general principle is sound I think. One thing to note is that current through the diodes should be small and matched between the virtual ground and the level shifter.

Nicolas


adsr-single-supply.jpg
 Description:
adsr single supply
 Filesize:  100.69 KB
 Viewed:  267 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

adsr-single-supply.jpg


Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Fri May 20, 2016 10:41 am    Post subject: Reply with quote  Mark this post and the followings unread

thx nicolas for the input,
looks interessting, but iam not so into virtual ground technics,
so iam working on a (more basic) solution by replacing the PNP with a double NPN.
the offset by now is a little noise @20mV, not bad i have guessed. But then i hooked this up to my thruZeroVco together with a LFO --> a regular auto triggering has happend. Maybe a voltage can sneak to the negative input of the triggerOPA via the direct connection to the output.
test next week

cheers bb
gabbagabi
Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Sat May 21, 2016 3:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes, the NPN solution should work well. Let us know what configuration works best.

But the sensitivity to false triggering is also a problem that comes from not having the ability to go below zero. Without that bias or virtual ground (or a dual supply) then the switch points for the main schmitt trigger are zero volts and roughly half of V+. In order to provide some immunity to noise the lower switch point really needs to be a bit below zero, but you can't get that without a dual supply or a virtual ground or something equivalent.

I guess it sort of depends where you are coming from. For those who are coming from a background of audio and discrete transistors then bias voltages are just the normal way everything works and in the opamp world virtual ground is just a different name for the same thing.

Nicolas
Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Thu May 26, 2016 1:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

after a hard week, i burned the last opa and broke my glasses, i had the (hopefully) problem-solving-idea under the shower (no joke) for the single supply adsr. No more autotriggering observed.

I observed one nice strange behavior, there is a spike before the release if u set the attack to zero (right scope), if u set attack a little bit over zero the spike will disappear (left scope), it is a unique feature-bug i like to keep it
the offset is down to 20mV (ch2 scope left, both channels meassuring same point),


scope_single supply adsr 26052016.png
 Description:
 Filesize:  64.96 KB
 Viewed:  217 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

scope_single supply adsr 26052016.png



gabbagabi_single_supply_adsr.png
 Description:
 Filesize:  114.68 KB
 Viewed:  270 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

gabbagabi_single_supply_adsr.png


Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 651
Location: Berlin by n8
Audio files: 23

PostPosted: Sun Aug 13, 2017 9:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Schemo update,
i gave up the single supply idea,
usefull or not some features added,

the previously observed spike at sustain end was due to bouncing of the manual gate pushbutton, debouncing action is advised here

cheers
gabbagabi

Edit: next schemo update


gabbagabi ADSR sept17.png
 Description:
 Filesize:  142.5 KB
 Viewed:  237 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

gabbagabi ADSR sept17.png



Last edited by gabbagabi on Thu Aug 31, 2017 11:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
belltones



Joined: Aug 08, 2017
Posts: 12
Location: Philadelphia

PostPosted: Thu Aug 31, 2017 2:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

i'm diggin on these minimal module designs you're posting, sometimes I feel like it's diminishing returns with people's more complex designs! i like the idea of building a whole synth on a 4x4" perf. that would be true genius.
Back to top
View user's profile Send private message Visit poster's website
AlanP



Joined: Mar 11, 2014
Posts: 746
Location: New Zealand
Audio files: 41

PostPosted: Thu Aug 31, 2017 3:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm quietly looking forward to gabbi's freq shifter, those usually use a monstrous amount of components. So his version should be very cunning!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 2 [32 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use