Thursday, 9 January 2020

Synthesizer Build part-16: SAMPLE and HOLD.

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

Every synth needs a sample and hold circuit in my opinion to have an extra source of control voltages. The S&H samples whatever you put on the input at a given rate, which you can control with a potmeter and delivers the voltage it sampled at the CV output. If you feed it a white noise signal it will give you random tones. 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. 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 ^___^



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)

If you would like to support my projects and the upkeep of this website, you can 'buy me a coffee'. There's a button for that below the main menu if you're on a PC or Mac. You can also use the PayPal Me option by clicking - HERE- .  All donations go towards the purchase of components for new projects. THANK YOU!

10 comments:

  1. Eddy, als je meer ruimte had gehad, zou je dan de noise module en de S&H op 1 frontplaat bouwen ?

    ReplyDelete
    Replies
    1. Ja absoluut. Dat is de beste manier om zoiets te bouwen. Dan kun je oof de noise intern met een schakelaartje doorverbinden naar de input van de Sample and Hold. Wel zo handig.

      Delete
  2. Hey I built the module almost 1:1 except for some minor resistor differences and I can't get it to work porperly. I hear a single tone on the cv out. The offset and the switch for the cv out work just fine. I can hear the change in sample rate but it seems like the input signal won't get sampled if that makes any sense. The output never changes when I input noise (from your noise module btw). Do you have any idea where to start debugging?

    ReplyDelete
  3. I hear a single tone on the cv out. -> sorry I mena always the aame CV value. It obviously doesn't output a tone

    ReplyDelete
    Replies
    1. Sorry you're having problems with it. You should first make sure the LF398 chip is good (try an other one if you have an other one). Otherwise, follow the input signal path through the print to make sure all the connections are as they should be. An oscilloscope would be a great help here. You can print out the schematic by Rene Schmitz and check the signal path on there and compare it with the print you built. Als make sure the 1 nF polystyrene capacitor good.

      Delete
    2. Thanks for the quick response. I already tested the input path with my multimeter and it seems okay. Next I will swap the IC and see if that changes anything. I have bought two of them as well as two of the polystyrene capacitors. I'll let you know if I get it to work. 😬

      Delete
    3. Okay good. It's quite a simple circuit so if all connections are correct it must be a component failure. The only thing I added myself was the offset option and that, you mentioned, works fine so I think it almost certainly has to be the LF chip. Also make sure there are no short circuits between the strips.

      Delete
  4. Just a quick note on the output circuit for your offset voltage corrector. You provide a switch-selected attenuator after the output of a buffering/invertting op amp. For the 0.5X switch selection this will greatly increase the output resistance of your S/H module.

    When plugged into another module with control voltage inputs with usual 100KΩ resistors, you will see a 56kΩ output resistor in series, paralleled with the 56KΩ attenuation resistor, which will scale control voltages differently than if driven directly by the op amp. What you've done for the 0.5x case is taken the low-impedance buffering ability of the last op amp out of the picture.

    What you might do instead is insert the attenuator between the offset correction op amp and the output op amp. Then the output op amp can be used directly for both 1x and 0.5x scaling. Or if you prefer a small (100Ω-1kΩ) resistor could be used to isolate the output op amp, help with potential capacitive loading of a patch cable, etc. But that won't cause a large scale error, 1kΩ << 100kΩ typically used for control voltage summers.

    ReplyDelete
    Replies
    1. That's a very good point you're making and shows my lack of understanding when I started out on this synthesizer project. I just took a practical approach which worked for my particular situation but you're right of course with the change in output impedance. I'll make a note of that in the article. Thanks for bringing it up!

      Delete