I don't really care about synth design, but you are a truly gifted electronics teacher. Your explanations are clear and concise, and you make subjects which can often be subjected to overcomplication incredibly simple. Bravo sir! Subscribed
Your explanations are wonderful. I just finished building my S&H and the debugging would have been better if your video was 1 week earlier! Something you didn't mention: if the input gets near the negative rail, the voltage between gate and source is too low, and it begins sampling. This behavior of JFET is confusing for newbies.
That's about the best break down of the "equivalent series resistance" and "self-discharge" topics I've seen on RU-vid. I think the application, in this case your synth, really helps illustrate the concept well -- with your 'scope, we can both see and hear the result. Good stuff. 👍️
I was going to make a video on the topic then I got your notification. Holy hell this video was good! hahaha Now I'll just reference to yours and show de differences, I'm not making it better than this. Thanks for the content Moritz!
First, immaculate diagrams...which significantly enhance (second) the excellent explanation. Leaning should always be this good. Thank you as always for sharing your knowledge.
you done did it again, brutha! you made about the clearest and best explained video step by step of the very thing i've been working on at the moment. i entirely appreciate the shit out of you, dude. these videos are great at explaining the shit between the lines so top speak, that is either absent most other places, or just explained way above the heads of anyone not formally educated in these matters. you're a fucking saint. thank you thank you thank you!
Many years ago I built my S&H module using a CMOS 4007 chip configured as a SPDT switch. The low resistance gave very snappy sampling. I also used an identical circuit as keyboard voltage hold so that I could have portamento and piano-style sustain pedal
Surprisingly simple for such a usable result. Considering how flat your output voltage was I bet you could have used a 10nF without issue. Split the difference and size a cap for the multiplicative average between the on-resistance and the off-resistance. I’d also consider an analog switch IC, as they can have much lower on resistances since they use an internal MOSFET instead of a JFET, and can be used in bipolar circuits due to connecting the body to the negative rail instead of the source. I figured that JFETs would always be far inferior to analog switches because of this, but considering a JFET’s very low leakage they’re actually decent. Don’t use a CD4053 though, they’re pretty bad. I think you can reduce the leakage problem further by using an op-amp feeding a signal to before the switch/transistor, think I saw it on EEVblog. Personally I was designing a sample+hold circuit to be used in some sort of convoluted phase comparator inside an audio phase-locked-loop.
Nice! But I think that the sampling pulse is too short. When you turned down the trigger frequency, you could see that the amplitude decreases as well, which means that there is not enough time to sample the the input during one pulse. One way to solve this problem would be to mimic the design of the master-slave D flip-flop: You have two sample and hold circuits in series. The first samples when the trigger is low, the second when it's high. Then when the trigger goes from low to high, the first sample and hold starts to hold and the second one starts to sample it, and that is when the new value comes through. Probably needs a few more components, but should give plenty of time to sample the signal (as long as the trigger isn't just made of narrow pulses).
A nice addition would be an offset which can be controlled with a potentiometer. Then, when lowering the range of sampled voltages, you can choose a higher pitch instead of having only the low pitch ones.
Looks like I at least have all the parts... I should probably do this then. Maybe I'll actually learn some JFET Basics too, as an added bonus! Thanks, Moritz👍🏽
Using a quantizer with an S&H is a pretty common use case for me.. just to sample every (n)th note of a sequence for a baseline. Still lots of useful information, thanks for sharing.
thats what i usually do to come up with a random pattern, but i sample a vco's (or something similar usually) output wave and even then sometimes i try to time it up to get a repeatable pattern or arpeggio. the sampled-and-held signal goes via a quantizer into the v/oct of another/second vco.
Great video Moritz! I'm not sure what to suggest next, but very much looking forward to the book. Also, can't tell if that's a PCB accident or a cat attack, stay safe!
This is way simpler than the idea I had for how to approach this. My concept was to add transistors to gate the Vs+ and Vs- pins of an op-amp, or use an op-amp with a shutdown or device-enable pin. When sampling the op-amp would be able to pump charge in and out of the capacitor to match the input, then when holding I'd cut the supplies so it can't pump any further. (Would probably need to use a FET-input amplifier to ensure we don't leak current in the switched-off state.)
Hi Moritz, Great explanation as always..one of the things i like about your videos is that you give inputs for "improperly creative" use of your circuits...so the question i am asking myself now is: if i use a gate rather than a trigger, have i done a track and hold circuit? i am sure there is a catch, but i am now curious to know how it sounds like 🙂
The only thing I would add is an op amp buffer before the 100k pot. This will give the circuit a very high impedance (tens to hundreds of megohms) vs 100k input impedance. And no harm to buffer the trigger input as well.
The J113 mosfets seem to be fairly expensive so I'm wondering whether anyone has substituted it with a Mosfet or CMOS switch gate. If anyone has done this successfully, could they please let me know the substitute part they used? I'm not sure about Mosfets as they have an internal diode as I understand it but I have not worked with mosfets much and there have been a few mentions in other comments that a mosfet may be suitable. BTW, I have just started learning about modular synths and have found that this channel is the best source of information, Well done Moritz, your explanations are brilliant.
for some reason I like seeing things on analog oscilloscope a lot more. yet newer digital oscilloscopes are so advanced and convenient they lack much style in it. They're fancy but don't look cool
as far as i know, the only difference between t&h and s&h is the duration of the sampling phase. so you could simply install a switch at the trigger input that bypasses the capacitor and diode. this way, the circuit will be tracking while the trigger in is high, and would hold when it goes low.
the circuit without all the pulse control shenanigans is already a track and hold. The slopes he describes as ''bad triggers'' are tracking the triangle waveform and then holding.
yes, you can use any kind of sound source for this. i'd recommend you watch my beginner's guide to breadboarding (ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-XpMZoR3fgd0.html)
Great video! Even though I disagree on the precision part. One of the main s&h use cases for me is holding a pitch cv using the gate that triggers a note when pitch and rhythm come from different sources. (As mylarmelodies does in his s&h vid around the 15min mark). Maybe that‘s something for a follow up? :)
Right on. I'm new to this channel and this electricity bullshit :-) . This video has revealed much to me. Thanks! As a matter of fact, I'm right in the middle of something I believe you just answered for me. Beeeuuuteeeful!!
Hi Moritz! Ii find it also faszinating what you are doing. May I ask if you learned it in some way, do you have a Ausbildung, or is it learning all that stuff by diy?
@@MoritzKlein0 Yes I get that! One day I bought an Arduino and then i was somehow hooked with electronics and also bought more stuff. Now what's frustrating for me somehow is the steep learning curve paired with everyday business stealing me time for what i am curious about. But now i have some parts the will be some time to go on...
You always upload videos on concepts I'm currently learning about, and I love it. I've been going deep into track and holds for the purpose of VpO bus bar keyboard designs. Have you any experience with the LF398 ic?
I've used the LF398 quite a bit. One can build an extremely simple S&H with it, but I've noticed that it droops a bit more than I like. I prefer to use a DG-series switch (such as DG418), use a Polypropylene capacitor, a good op amp that can drive capacitive loads, and a low drift output op amp like the OPA140. This combination works REALLY well.
@@DrJ3RK8 I really appreciate the detailed responce, thank you. I'd never heard of that series of chips, that'll save me many wasted switches. As a little bit of a capacitor noob, I've read the most reliable for this are polypropylene film, which checks out with what you are saying here. Would wima, small plastic box types be suitable? Or should i be looking at other packages? Thanks again
@@DollysplitBand I use the WIMA red-box polypropylene caps a lot. I use them for VCO integrators, filter integrators, S&H, etc. I use TDK MLCC (small blue) caps for everything else.
One day it dawned on me that every analog synthesizer has a sample and hold circuit because how else would the oscillator know what frequency to keep playing after you release the key?
I just yesterday started to figure out what would be my dream s&h module. It would have 2 channels, accuracy to sample pitch without quantizing, slew pots with range from musical portamento to looong rises and fall times, pre-patched noise in, internal clock, switches to select between s&h and t&h. Maybe that's it. I'm happy to hear dreams from other people too.
yours sounds almost what ive been trying to build recently. i want to be able to tune it somehow to get arpeggios out of simple waveforms. so im guessing an internal clock is a good idea but not sure if itd be necessarily mandatory. my thinking was that the frequency of the sampled wave would need to be a multiple of factor of the trigger rate, so that itd be a repeatable pattern rather than just random always. again though, im teaching myself all this shit so i could be far off base also... maybe as long as the cloak was sync-able to the waveform's...?
I'd suggest having a look at the LF398 IC, it's a relatively cheap monolithic sample-and-hold circuit - I believe that's what was used in the original Wogglebug and there's a great take on it by René Schmitz which you can find on his webpage! I've built a couple modules from it and with a bit of tweaking you can get it to sample waveforms as "microtonal" scales, anyway it's a good building block for any kind of random-voltage based circuits! Strongly recommend
As elec engineer I understand perfectly your nice elec lessons but i don't fu*king understand what is the audible purpose 🤔. Same for most of the other vids...
that was very well explained dude.. thank you.. i will put this video into the old grey matter... BUT ALSO! into my favourites.( for when the brain refuses to work for me ; ) .. ) P.S. and a screen picture of your final schematic for my ever growing circuit's file. : )
Great content and I personally appreciate the context of synth-eurorack based designs. Thanks so much and please keep up the great videos. You're explanations are very educational.
fantastic video, the timing for me seeing this is perfect as ive just finished my first electronics course, so i actually understand what youre talking about
@@MoritzKlein0 Not quite. There are "droop compensation" circuits that tend to make the hold voltage run away to the rails instead of actually drooping. In theory they can be fine tuned so they don't do either. In practice, not so much.
Hey Moritz, thank you so much for these videos they’re amazing! I just wanted to ask what your design process is for all these circuit videos? Do you have a background in electronic engineering?
no, i‘m self-taught, i‘m a humanities major. doing circuit design started off as a small hobby and grew from there. at some point i realized that explaining this stuff to someone is helping me learn much better, so i started this channel!
While working on a sample & hold filter unit for guitar, it occurred to me that one could, theoretically, vary the stability/perfection of the circuit's ability to hang on to a sampled noise voltage. So, I experimented with what I like to call the "droop" option. That is, a held voltage in the storage cap that is allowed to drain off before the next clock cycle, in a manner that is musically useful. The drain-off time is set by a resistance to ground in parallel with the storage cap - like any decay-time resistance in an envelope follower - but requires change contingent on the step-clocking rate. I.E., if the time between samples is very short, the drain-off time needs to be faster in order to be audible. It adds a musically interesting wrinkle to S&H effects, whether they are applied to filters, VCOs, or whatever. One can think of it as a sort of unidirectional (downward only) portamento. I'm sure those cleverer than I can mimic this with slewing modules that can add glide between steps, but this is a LOT simpler and easier. I use an on-off-on SPDT toggle and two selected resistors to provide faster and slower droop and no-droop. Hard to get simpler.
Just curious. How are you turning off the jfet without a negative voltage? Isnt that trigger pulse going from 0v to +ve voltage? I thought the jfet will only block with its gate voltage lower than the source voltage. Ie -ve. What am I missing? I can get the fet to turn off by negatively biasing the gate to the -ve rail so the +ve spikes bring it up to 0v (source on the other side of the diode) to sample than back down to -ve to hold.
I have exactly that problem. I tried to build the circuit this weekend and it doesn't work for me. It seems that the comparator output only swings between 0V and +12V. I need to do more testing to eliminate the possibility that the sound card I'm using as an oscilloscope isn't filtering out the DC component.
I will explain two concepts that someone wanting to build systems related to thing may find useful: 1) Imagine a typical inverting amplifier with a capacitor across the feedback to limit the bandwidth. For the moment consider the resistors still being connected to each other but not directly to the inverting input of the op-amp. The capacitor is connected directly. The resistors go through a switch (JFET) to get to the inverting input. With the switch "ON", the circuit works as normal. With the switch off, the output of the opamp is fixing in voltage. This makes and inverting sample and hold circuit. To make it work well, you really need a second JFET to ground the junction of the two resistors while you are holding so that the voltage across the first JFET is always small. 2) Given this inverting sample and hold, there is a slightly clever thing you can do with it. Imagine that the "sampling" time made so short that the output doesn't get all the way to the final value before you go into "hold". Also imagine that the sample/hold cycle repeats fairly fast. Instead of running the sample and hold circuit directly from the input, it could be run from another opamp that is adding the input signal (remember the circuit inverts) and the output signal and filtering that before sending it to the sample and hold. With care, you can make a circuit that makes an output that sort of "draws a smooth curve connecting the dots of when the sample signal is true". The circuit will tend not to make strong beats between the sample signal and the input signal.
Hi Moritz, I wonder if you could help. I’ve built this on a breadboard and double checked everything many times that it is as you have explained, but all I get is the noise from the white noise generator and nothing through the trigger input. And the pot is just adjusting the volume. I’m sure I’ve built it correctly but I can’t work out what’s wrong. Any help would be most appreciated. Thank you 🙏