Showing posts with label schmitz. Show all posts
Showing posts with label schmitz. Show all posts

Wednesday, 18 December 2024

Synthesizer Build part-63: FASTEST ADSR IN THE WEST by Rene Schmitz.

The fastest ADSR in the West. A simple to build and fully featured Envelope Generator. I thought it was about time for another ADSR project for the website and this one worked out great and it has no trimmers to set. I even added a few extra's to make it even better.

This is an other 7555 based envelope generator like the YuSynth one from project 24. Some people seem to have problems with that one so that's why I choose to do this project now.
This ADSR will work on both +/-15V and +/-12V. At +/-12V the maximum envelope amplitude is just under 8 Volt. If you run it on +/-15V the peak envelope value will be 10 Volt. It's a very fast Envelope Generator. The minimum risetime of the signal is 1mSec or 1/1000th of a second.
Now this is roughly the same setup as in the previous 7555 ADSR from project 24 but it does work a lot better, especially when using Schottky diodes. The whole problem with the DC offset voltage left on the ADSR output comes down to the forward voltage drop of the diodes. That's why Schottky's are so useful because they have only a third of the voltage drop of silicone diodes. Now what would be even better is to have diodes with no voltage drop. To achieve that we have to put the diodes inside the feedback loop of an opamp. That's what happens in the Kassutronics Precision ADSR which I recently also added to the website as project number 67.
So this ADSR and the Yusynth 7555 ADSR have become a bit obsolete now, eventhough they work just fine for use with VCA's and for Filter CV signals. I would advise anyone wanting to build an ADSR to go to project 67 and build that one.

SCHEMATIC:
Here is the schematic for this circuit. I've redrawn it from the sketch posted on Rene Schmitz website.
The opamps are numbered in the order they are used on the stripboard. All diodes have been replaced with Schottky diodes which work much better in this circuit.


Click here for a FALSTAD SIMMULATION of this circuit.

I've added some extra's to this design. The original design only uses two opamps but I wanted to include a LED and also an inverted output so I decided to use a quad opamp, the TL074, and include an attenuverted output where you can have in inverted envelope signal with the potmeter turned fully counter clockwise, attenuation with zero signal when the potmeter is at the 12 o'clock position and a normal envelope when the potmeter is turned fully clockwise. I took the design from the AD/AR attenuverter mod from Ole Stavnshoej design (project 44). This is a great option to have when you use the ADSR with a filter. Turning the attenuverter will give the filter some very cool resonance response.
I decided to adapt the design to more run of the mill parts, like for instance I used 1M potmeters instead of the 2M2 ones in the original schematic. I changed the 220Ohm resistors to 100Ohm types and the capacitor from 2µ2 to 4µ7 to keep the original timebase intact. This is all explained in the text underneath the original schematic on the Schmitzbits website.
The circuit is relatively simple so I was able to build it up on a very eurorack friendly sized piece of stripboard. It's only 21 strips by 33 holes. Although I left the V,W and X strips on the board, they are not populated. You can use them to connect L brackets to mount the board to a panel. The three transistors on the Gate input represent the same setup as we've seen before in the Yusynth 7555 ADSR only there he had no resistors at the base of transistors 2 and 3. It works as follows: the first two transistors make up a schmitt trigger which turns any input signal into a sharp gate signal. That signal now goes through a capacitor that turns any long gate signal into a short pulse. That pulse is inverted in the third transistor stage to make it acceptable for the 7555 chip, going in at pin 2. 
Once the ADSR has been triggered the sustain level for that cycle is frozen. You can not add sustain while the ADSR is in its cycle, unlike the Digisound ADSR which can do this. Not that that's important. it's just something I noticed while testing the circuit.
The 1M resistor, in red on the schematic and in purple on the layouts below, can be added to provide for some input hysteresis. This will improve triggering on slowly changing waveforms. In the layout below, the purple 1M resistor on the left indicates where it should go if you want to include it. I left it out. Only include it if you really think you're going to need it. If in doubt, Leave it out.

LAYOUTS:
Here are the layouts I made for this project. As always they are verified. I used them to build my module. It's important to use logarithmic 1M potmeters for Attack, Decay and Release. The time based parameters. Otherwise it will be much more difficult to set these parameters accurately. It will work with linear types but get logarithmic pots for these. Sustain is a level control so that can and should be a 10K linear type potmeter.
I used Schottky diodes throughout this design because with 1N4148 diodes there's a DC offset voltage present on the output. Using Schottky diodes helps to prevent that.

Wiring diagram:


Stripboard only:
Again, leave out the purple 1M resistor unless you're going to feed this ADSR with slowly changing Gate input signals. Nor likely so leave it out.


Cuts and wirebridges seen from the component side. You know the drill by now; mark the cuts on the component side with a Sharpie or Edding pen and then stick a pin through the marked holes and mark them again on the copper side. Then cut at the marked places with a sharp, hand held, 6- or 7mm drill bit.


Here is the Bill of Materials. I altered the diode types to Schottky diodes because they will work much better in this design. I put in the BAT4* series (like: BAT41, BAT42, BAT43 etc) because they work really well and have good availability in webshops. Any Schottky diode will do though.



OSCILLOSCOPE IMAGES:
Here are some screen shots from my oscilloscope to give you an impression of what the signal looks like. All testing was done with a +/-12V powersupply:

Here's the normal envelope output. The envelope signal does have a small positive offset voltage of 400mV I noticed. But this won't cause any VCA to stay open so it's of no consequence. 
However I changed the diodes for Attack and Release into Schottky diodes and that reduced the offset to just 16mV (16 thousandth of a volt) which is the same as 0V to me. The offset voltage is the result of the fact that the 4.7µF cap has to discharge through a diode and a diode has a voltage drop over it of about 0.6V (with silicon diodes). So the lower that voltage drop the better. With Schottky diodes the voltage drop is only about 0.2V which allows the cap to discharge as good as fully.


Here's the normal output in yellow and the inverted in blue coming from the attenuverter mod I added on myself. It works like a charm.


Here you can see, in the blue trace, the attenuverter in action. I'm turning the potmeter as the trace goes from left to right.


This is the signal at a pretty high rate at almost 3Hz. No problem for this ADSR.


In yellow you can see the pulse as it comes out of the third transistor and into pin 2 of the 7555. It's a inverted pulse, triggered by the gate signal, that starts the ADSR.


This time the yellow trace is the gate signal at the input. This was measured after the 10K input resistor. The gate signal was a +/-5V pulse wave from an LFO.


PICTURES:
Here are some pictures from the build proces.
Stripboard with cuts and wirebridges done.


Finished stripboard ready for wiring up.


All wired up ready for testing


I decided to use this ADSR for my DIY Kosmo synth and not for Eurorack so I took the YuSynth ADSR and replaced the stripboard with this one. I had to widen one hole to fit the attenuverter potmeter to which I added a bi-coloured LED to fill up another hole where a switch had been. I used a 4K7 resistor to connect it to the attenuverted output socket. I also re-used the manual trigger button that was already present in the panel. I took two 47K resistors and made a voltage divider so when I press the manual trigger it sends 7.5V to the gate input. (My DIY synth runs on +/-15V mostly).
Backview of the panel:


Here's what it now looks like mounted into the synth. My ADSR module has two Gate inputs each with a Schottky diode in series with the socket (soldered straight to the socket). This is to prevent +7.5V entering the Gate socket when I push the manual trigger button.


Luckily I could re-use the potmeters, which were 1M logarithmic types with a 10K linear pot for the sustain, the same as in this project.
You can see the blue LED underneath the attenuverter potmeter. The hole I had to fill up was 6mm and this LED is only 3mm so I used hotglue and made a sort of white blob that lights up red or blue. Worked out pretty well :)
I kept the dual gate inputs from my previous ADSR because I think it's handy to have. The gate inputs have Schottky diodes on them so that when I push the manual trigger button I don't get 7,5 Volt pushed into the gate patch cable(s). It's a safety feature I advise you to copy if you are going to include a manual trigger button.
Troubleshooting tip: If your Decay and Sustain are not working then the most likely cause will be a broken Sustain potmeter. It happend to me when I built it into the panel I used for the YuSynth 7555 ADSR and it turned out it had a broken Sustain potmeter all the time.

DEMO:
Here's a video I found on YouTube of someone demonstrating this ADSR in action. He's using it on the cutoff of a lowpass filter. Sounds pretty sweet. If he had the version with my attenuverter mod it would have sounded even better LOL ;) 



So that's another one done. I thought it was about time for a new ADSR project on this website, especially since some people seem to have problems getting the YuSynth 7555 ADSR of project 24 to work right. That's weird though because I always rated that one as near perfect but I think this will make an excellent alternative especially with the extra's I added. I'm really chuffed that it worked so well. Okay, I hope you will enjoy building this one. 

If you have any questions or comments about this project then please post them in the comments below of on the special Facebook group for this website.


Friday, 10 March 2023

Synthesizer Build part-51: SAMPLE & HOLD new version.

A revised version of the earlier 'Yet Another Sample and Hold' (YASH by Rene Schmitz) project.

This is the same core S&H circuit as the earlier one I published. That was one of the first projects I built and that was just over 3 years ago so it was time to update it. The things I added on myself were put together rather clumsily, especially the x1/x0.5 CV range switch that I put in. (The previous version works fine, don't get me wrong.) I have now replaced that range switch with a range potmeter so you can set the range to any level you want. The toggle switch for external or internal input has also been removed and instead I used the internal switch inside the External Clock input socket.
If you built the previous version then it should be quite easy to just replace the stripboard with this new version. You will have to make room for the extra Range potmeter but there will be a hole left over from the range switch so maybe you can drill out that hole to 7mm and use that for the potmeter.

SCHEMATIC:
Below here is the schematic drawing I made in Photoshop of this sample and hold circuit. It has the offset opamps and attenuation I designed added on, connected to the output of the LF398 Sample & Hold chip. The offset potmeter is a 100K linear type. You could use other values but that will alter the range a bit so I'd stick with the 100K. The Attenuation potmeter however must be a 100K one because it determins the gain factor of the opamp. If you put in a 1M for instance it won't only attenuate but also amplify which you absolutely don't want because the CV voltage will get way too high and it'll sound really bad connected to a VCO, if you get sound at all. There's a 470 Ohm resistor in series with the attenuation potmeter to make sure it doesn't go all the way down to zero and you'll always get a little bit of a signal.  (I suppose you could get away with using an other value for the Range potmeter as long as the resistor between pins 2 and 7 is the same value as the potmeter. Then the balance (or ratio) between the two stays the same.)
Now, I know you are not really supposed to use an inverting amplifier with a feedback resistance that is lower than the input resistance. Normally Rf must be bigger than Rinput otherwise the opamp could draw too much current. I have however done some measurements and in this case it is absolutly fine. I used an NE5532 dual opamp in my circuit and the current always stays below 15mA.
The Offset control is included in the circuit so you can transpose the whole CV output up or down by as much as you like. This is handy if some of the notes produced are below the 0V line. In the normal case you would just hear a C0 note for those but if you give the CV an overall higher offset then all those notes will be audible. If you use the S&H to modulate a filter those negative voltages could sound really good so in that case you can dial in the effect you want to achieve with the offset control.
I put a 470pF capacitor over the output opamp because with testing I noticed a lot of little voltage spikes on the signal when I viewed it on the oscilloscope. The capacitor turned out to be a very good solution to suppress those little voltage spikes.
The Sample Rate potmeter needs to be a 1M Ohm linear type. I didn't have one so I used a 500K potmeter and that also works perfectly fine. Don't use any value lower than that though otherwise your frequency range will be very limited.
If you build this project and you find you can hear the pulse train in other modules, coming in over the power rails, then try putting a big electrolytic capacitor over the powerrails of this S&H module. Something like a 470µF or 680µF over the plus and the ground should do the trick. That should be enough but if the problem persists then also put one over the negative rail.
This circuit works equally well on +/-12V as on +/-15V. The current draw of the circuit is about +15mA for the positive rail and 10mA for the negative rail (maximum).


THE SCHEMATIC EXPLAINED:
The Schmitt-Trigger [A] at the bottom left is wired up as a Low Frequency Squarewave Oscillator and produces the clock pulse with the potmeter controlling the frequency. The clock pulse then goes to the switch connection of the external clock input socket. If there's no cable connected, the signal goes through the switch to the base of the transistor. Now when the clockpulse is high, it makes the transistor conduct and so the plus 15 Volt coming in over the LED is now connected to ground. The LED lights up and the voltage at the collector is practically zero (except for the voltage drop over the transistor) so the transistor actually inverts the clock pulse at this point. Then the pulse goes through a Schmitt Trigger inverter to invert it back to normal and then through a 470pF capacitor which changes the pulse (or actually squarewave signal) into a trigger signal. It then goes through two other inverters to cut off the negative part of the trigger pulse (a squarewave always produces a positive and negative trigger pulse, from the rising and falling slope of the squarewave, if it goes through a capacitor) to end up with the same positive phase it had at the beginning. It now goes into pin 8 of the LF398 and triggers it to take a sample of the voltage on pin 3. It presents this sample at pin 5 from where it goes into the two opamps to be buffered and more. At the first opamp we can introduce an offset voltage that will shift the whole pulse train up or down in voltage without changing the voltage difference between the pulses. In other words the offset voltage is just added (when positive) or subtracted (when negative) from the pulse train. Because this offset voltage goes into the inverting pin of the second opamp (summed with the pulse train) the working of this offset voltage is actually inverted but this just means the positive voltage needs to be connected to the counter clockwise side and the negative voltage to the clockwise part of the offset potmeter. The pulse train is inverted back to normal in the second opamp. At the second opamp we have a variable gain potmeter which has a maximum resistance which is the same as the input resistor which means the gain can not increase, only decrease. With this we can set the maximum voltage difference between the highest pulse and the lowest pulse generated. This then determins the range of the pulse train. So the pulses can for instance all be between zero and 1 Volt (one octave) or between zero and 7 Volt (7 octaves) and anything inbetween. This can give the pulses a more musical sound. There's a 470 Ohm resistor in series with the potmeter to make sure the gain can never be zero and we always hear a signal. The 470pF capacitor is there to suppress any voltage spikes on the output CV.
Now I know you're not supposed to use an opamp in this configuration as an attenuator. Rfeedback must always be bigger than Rinput; but I did test this setup and the opamp draws no extra current so it works perfectly fine.

LAYOUTS:
Here are the layouts I made for this project. I used these layouts for my own build so they are verified as always. Make sure you copy them accurately and it'll work first time.
Please keep in mind that the LED is a vital part of the circuit so don't leave it out! It's best to use a normal red, green or yellow LED for this either 3mm or 5mm. 
This is the wiring diagram:


The Offset and Output Range options are of my own design. The Output Range is particularly useful. It determins the range between the lowest and the highest possible notes you will hear. You can set it so all the random CV Voltages (or notes) fall in the same octave or higher, upto a range of over 7 octaves. The inclusion of this option saves you from having to put the S&H output through an external attenuator to achieve this effect.

Here is the stripboard only view:


Here's an overview of the wirebridges and the cuts that need to be made in the stripboard as seen from the COMPONENT SIDE!
As always, mark the cuts on the component side and then stick a pin through the marked holes and mark them again on the copper side and then cut with a sharp, hand held, 6 or 7mm dril bit.


Here's the Bill of Materials:


OSCILLOSCOPE SCREENSHOTS:
Here are some screenshots from the scope:

In the shot below you can see the little voltage spikes I was getting when I first tested this circuit. They are the thin overshoots on the rising and falling edges and they also appeared in between in some cases.


Here's the result after I put in the 470pF capacitor over the output opamp. Nice clean CV output:


With all these images I used a sawtooth wave as 'Signal to be sampled', not noise. You can still get sort of random notes even without using noise on the input if the sample rate differs enough from the frequency of the wave you're using. However the paterns will be repeating, they won't be totally random, which can be good for creating melody or bass lines. 
Here's a sawtooth wave being sampled at a very high rate:


In the picture below you can see that the original wave being sampled was a sawtooth wave. Fast rise and slow decline. The CV voltages all lie in one octave (0 to 1 Volt) because the range potmeter was set almost fully counterclockwise. This picture was also taken before I put in the 470pF capacitor so it shows the voltage spikes too.



PICTURES:
Here are some pictures I took while I was building this project:
The cuts and wirebridges ready:


Below you can see the components mounted except for the IC's. Note the vintage Polystyrene 1nF timing cap I used at the top right. It has a red stripe on it. That doesn't mean it's polarized. The stripe indicates which of the legs is connected to the outer layer of aluminium in the capacitor. That leg should always go to ground (or the lowest voltage potential). That way it acts as shielding to prevent hum. Now, if you have a cap that isn't marked but you want to find out which leg is connected to the outer layer and you have an oscilloscope then connect the probe to the capacitor; ground to one leg and probe tip to the other leg. Set the scope so it's quite sensitive and touch the capacitor body with your fingers. Now you become the signal source just by touching the capacitor body (not the legs). If you get a pronounced waveform on the scope then your probe tip is connected to the outer layer and the ground clip is connected to the inner layer. If you reverse them and touch the capacitor body again, you should get little to no deflection. Now you know the leg that outputs the biggest signal is connected to the outer layer and this leg should go to ground. However it is not necessary to do this procedure. I just wanted to tell you how you can find this out, but the capacitor will work fine which ever way you put it in because it's not polarized and this circuit is not that sensitive to hum.


The finished stripboard. I used the old Sample and Hold faceplate and soldered the new stripboard to the old wiring. This particular faceplate I made is a bit of a weird shape because of how I built my synthesizer. It actually sits in a little wooden plank above the other modules. You could say it's sort of a 1U module but for the Kosmo format :)


VIDEO DEMO:
I made a short video demo of the sample and hold in action. The S&H is connected to a Thomas Henry VCO. The input is white noise from the 5 sorts of noise module. The audio goes through the Steiner Parker filter and boy does it sound good!!



Finally I want to leave you with an excellent video by the 'Monotrail Tech Talk' YouTube channel which explains all the different things you can do with a Sample and Hold and discusses some awesome patches. Subscribe to him while you're there. It's an excellent channel for anyone into modular synthesis.   



That's it for another one. If you have any questions please put them in the comments below of post them on the special Facebook Group for this website.


Thursday, 9 January 2020

Synthesizer Build part-16: SAMPLE and HOLD.

Creates random voltages from noise or turns an LFO signal into a stepped signal which you can use to control a filter. Lots of options.

NOTE: THERE IS NOW A NEW REVISED VERSION OF THIS PROJECT WHICH IS THE BETTER OPTION TO GO FOR IF YOU'RE PLANNING ON BUILDING THIS PROJECT.
CLICK HERE TO GO TO PROJECT 51, THE SAMPLE & HOLD VERSION 2.

This doesn't mean the design in this article doesn't work well. On the contrary. It works very well but the new one is  better designed and has a better output impedance so it's more stable when connected to other modules. So for a S&H you really should build project 51. It uses the same components as this version. I'm leaving this old version online as an archived article so people who built it can refer back to it.

Original text:
Every synth needs a sample and hold circuit in my opinion to have an extra source of control voltages. The S&H samples a voltage when triggered and holds that voltage until it is triggered again. If you feed it a white noise signal it will give you random voltages on the output which can create random tones if you input that signal into a VCO. If you feed it a signal from the LFO it will turn that signal into a stepped signal. The LF398 chip samples the input signal in 4 to 20 millionth of a second (!) and is used in many more applications that just synthesizers.
For this build I used the schematics from Rene Schmitz called 'Yet Another Sample and Hold'. (<-- click to have a look at the schematic)
I had ordered the LF398 chips a while ago and had a try earlier at building this circuit but I couldn't get it to work, but this time everything went fine and the circuit works very well. I added some extra's to this circuit in the form of a DC offset feature so I can control the voltage range of the output signals a bit better and I installed two input sockets between which you can choose with a SPDT switch. I also installed a switch that gives me the normal output voltage range (0 - 10Vpp) or half the normal output voltage range (0-5Vpp) which is better as input for the VCO's. The DC Offset in particular has proven to be a very useful addition. If you turn it into the negative the random notes get very deep and if you then put that through, say, the Steiner-Parker filter, you get the most amazing sounding low notes that sound really deep and sharp and in some cases can resemble the sound of drops of water if you put reverb on it. I can experiment for hours with this module.
This module will work fine on both +/-15V or +/-12V.

Here's the layout. All green wirebridges refer to connections to ground. All potmeters viewed from the front:



(Last revised: 19-Aug.-2021: Cosmetic changes to layout)

At the bottom right on the layout you can see the circuit for the DC Offset feature. I re-designed this from the previous version. This is a better way to add DC offset and it makes use of both opamps in the TL072 chip. (You can also use a TL082).

Here's a close-up of just the stripboard:



This S&H has an internal clock pulse generator based around one Schmitt Trigger NAND gate of the CD4093. You can also choose to trigger it externally by selecting the external input with switch S1.

Here's the schematic drawing of the extra features I added myself; the DC-Offset and the output range switch. A very observant reader noted that my output range switch does alter the low impedance that the normal opamp output would provide and this might be problematic in some cases. He suggests to put the range option in between the two opamps (see comments below). My reasoning is that the signal from this S&H usually goes back into an opamp like the CV input of a VCO or of a filter and most of the times these are opamp buffered and those inputs have an infinitely high input impedance so in those cases it really doesn't matter, but if the signal goes into an opamp inverter with resistors than that resistor balance can be upset. That's nothing serious but it would mean the amplitude of the S&H signal can be influenced in a way not anticipated. 
If that's all gibberish to you just ignore it and proceed building ^___^
[EDIT: This is one of the reason I re-designed this project in early 2023 and wrote a new article about it (project 51).  I'm keeping this article online because this is an archive of the modules I built and the progress I made over the years and as reference for people who already built this project in case they need to refer back to the schematics or layout.)




At first I used a potmeter with center detent for the OffSet control but I later decided to change it back to a normal one because it was difficult to set the offset accurately with the center detent spring pulling on the potmeter around the middle setting. 
The CV output goes through a resistor voltage devider that halfs the output voltage. This puts the different random tones closer together which sounds better. It's something I added after testing and seeing the output signals on the oscilloscope. Later on I added a switch that bridges that voltage devider and gives the original output voltages. I labeled it "Output x 1 and x 0,5". I did this because I wanted the full voltage available in case I want to use the output of the S&H to control the Cut-Off frequency of a filter (among other things). The resistor voltage devider however is something I strongly advise to include in your circuit if you're building one of these. The range switch is a good feature to have.

I didn't have any more space in the synthesizer I build to put this S&H in as a separate module so I cut a hole in the wood above the panels and mounted it there. This works very well and adds yet more buttons and switches and a flashing light. That always looks cool ^___^

Here's a picture of the finished panel and one that shows the placement within the synthesizer:




Here's a little video to demonstrate the sound you get when you put white noise on the input. This sound is going through the Dual Korg MS-20 filter described in the previous article.:



Here's a cool demonstration of the S&H with the Triple Wavefolder and the Steiner-Parker filter:



Okay that's another one done. Hope you enjoyed it and if you did please consider following this blog to get notified of new uploads and while you're here, leave me a comment please!

If you want to know more about sample and hold circuits I refer you to this Wikipedia page.

Here's a link to the LF398 sample and hold chip datasheet in PDF form:  (Click here)

The DIY Modular Sessions YouTube channel made some videos about building this sample and hold module which you can watch by clicking the links below:

PART-1 Preparing the stripboard

PART-2 Soldering the components in.