Showing posts with label random. Show all posts
Showing posts with label random. Show all posts

Tuesday, 13 April 2021

Synthesizer Build part-42: 8 RANDOM GATES by Yusynth.

 Creates 8 random gate outputs from one gate input signal which can be as high in frequency as an audio signal. Lots of creative possibilities with this module.

There is an other random gates project on my website already. That one is included in the Noise Module article and it creates random pulses on one output. With this module we have 8 different outputs which trigger in a completely random order. It needs a squarewave on the input that can come from an LFO, the gate out from a sequencer, the clock pulse from a sample and hold or even the pulse wave output from a VCO. To quote the YuSynth website: "If feeding the GATE IN with a high frequency pulse coming from a VCO, each GATE output becomes an individual coloured digital noise source usable for sound effects. The colour of the noise will directly depend on the frequency from the VCO. White noise is obtained for frequencies above 30kHz".. 

ABOUT THE CIRCUIT:
The module is fed with only positive voltage so no dual powersource needed. It works fine on both +15V or +12V. You can feed the gate-in with signals that have a negative cycle to them. It will simply ground the negative part of the cycle through diode D1. The output gate signals have an amplitude of 8 Volt when powered from a +15V powersupply.
This build consists mainly of wirebridges. My layout has 37 of them. All the output stages are made on separate pieces of stripboard with just 4 strips of 10 holes. They are soldered straight to the output sockets. I did this to save space otherwise I would have had to make a separate board with all the outputs on them. This way saves space and also hookup wire. The three 100nF capacitors you can see on the layout are meant to be de-coupling caps but where they are positioned is really too far away from the chips to be effective. So instead of putting them where the layout shows them, solder them straight over the plus and ground pins of the IC's (top right and bottom left of each chip).

Here's the layout I made. First the wiring diagram:


(Last revised: 14-April-2021: Added missing 1K resistor to output prints.)

In the box, on the wiring diagram above, you can see the schematic drawing of the output stripboards. I left out the 1K resistors in series with the output in my original design. I had simply forgotten it but I have now updated everything and the 1K resistor is now included. It helps to protect the transistor against short circuits, smooths the output voltage a bit and also determins the output impedance.
The 270 Ohm and the LED together with the 1K resistor to ground form a voltage divider that determins the voltage of the outputed Gate signal. That voltage is normally 8 Volt but if you want it to be higher you can make the 1K to ground a higher value like 1K5 or lower for a lower output Gate voltage.

Here's the main stripboard. It's only 24 by 48 holes but you could try to redesign it and make it even more compact so it would fit in a Eurorack system. For instance, if you connected the outputs straight to the correct pins of the chip instead of using the wirebridges you can save about 8 or 9 holes in width. Certainly enough room to make it fit a Eurorack system. And because it's a "Random" gates generator, the correct order doesn't really matter does it?


And here's a close-up of the little output stripboard that is soldered straight to the output socket: (If you print this one, choose the A6 format to save some printer ink.)
You need to make 8 of these output prints. Some cuts are a bit hard to see but the top two strips are cut at position 5 and there's an other cut at position C8.
(Forgive my use of the word 'print' when I mean stripboard. Print is the Dutch for printed circuit board so that's why it sometimes sneaks into the text.)


(Last revised: 14-April-2021: Added missing 1K resistor to output prints.)

Here's the Bill of Materials:



Here's the schematic by Yusynth. You can find the original YuSynth article by clicking HERE.


As you can see it's actually quite a simple circuit. It mostly consists of connections between the three IC's. It is mentioned on the YuSynth website that this module needs a bit of time before it starts behaving correctly. When you first start it up it will probably not fire on all cilinders and display a repeating pattern with only about 4 or 5 LEDs lighting up and after at least ten cycles this will change into a random pattern using all the outputs. However, since I changed the new CD4070 I had in there for a used vintage CD4070 from the 1980's that I had lying around, the module works good right from the start. 
The module that I built was at first prone to hanging. It would suddenly stop being random and get stuck in a 4 or 5 LED pattern. Only by changing the input gate frequency or pulling the Gate-In cable in and out a few times would I get it working again. It turned out this was also due to the IC's I was using. I don't know if it was a fake chip or if it was damaged but I changed IC-3 for an old stock CD4070 that I once de-soldered out of an organ circuit board and the problem was solved immediately.
So make sure the chips you're using come from a reputable source!

MODE SWITCH:
There's a mode switch that lets you choose between two settings. In the ON position the output stays high until it detects the next pulse, so the pulses don't have any dead time between them. In the OFF position the output pulse stops on the negative slope of the input gate pulse, so the output pulses will have the same length as the input gate pulses.
There's also an option to advance the pulses manually with a momentary switch (normally off). This switch is connected to the internal switch of the Gate input socket so it will only work when there is no cable connected to the gate input socket.

Some screenshots from the oscilloscope. The first one shows how extremely fast the risetime of the output gate signals is. Just over 123 nanno seconds! That's 0 to 8 Volt in 0.000000123 seconds. This means theoretically that it could handle signals upto 40MHz! (Agreed, this knowledge is of no use in the synthesizer world but it fascinates me personally because I also have a background in radio technology and transmitters ^___^).


Here's what the output sequence of one of the random gates looks like. A non-repeating sequence of pulses with an amplitude of 8V. 



Here are some pictures of the build proces:

Wirebridges. In this picture there's a little wirebridge missing connecting pins 7 and 8 of IC2 (CD4051).


Here's the finished print. Like I mentioned earlier, the de-coupling caps are much to far away from the chips to be effective so get some small ceramic 100nF caps and carefully solder them straight over the plus and minus connections of the chips on the copper side. I myself left it like this and it works just fine because I don't use a switchmode powersupply but a linear one, with a big transformer. 


Here's the main board with the 8 output prints. My output prints are missing the 1K resistor in series with the output sockets (I had forgotten those) but they are included in the layouts. That 1K resistor helps to make the output waves smoother. I could see that on the oscilloscope images. It also protects the transistors by limiting the current going through them should the output be shorted. (Although damage will be very unlikely even without the 1K resistors because the pulses are so short).


Finished panel backside wiring:


Frontal view of the mounted panel:


And here's a little test video showing the module firing randomly on all cilinders :)


TIP:
If you want a fast pulse train with random gaps in it, then connect 4 outputs from this module to the 4 inputs of a mixer, like the mixer/passive attenuator module on this website. At the output of the mixer you will get a pulse train with random gaps in them. It's cool to use this on the cut-off of a filter to add some random spice to the sound.
If you then set the switch on the random gates module to 'Stay high until the next gate pulse' you have sort of a random voltage generator, although there will still be random 0V gaps in the output but that makes it unique :)
You could even make a little TL072 mixer print and include it in this module. Choose how many inputs you want (less than 8 of course) and connect those mixer-inputs to whichever outputs you choose and then make an extra output socket on the panel that carries the output from the mixer and label it "Pulse Train". It's just a thought but there are many ways to adapt this design to your own needs.

Okay, that's an other one done. If you have any questions or remarks please put them in the comments below or post on the special Facebook Group for this website where we have a great community of synth enthousiasts willing to help you.

If you successfully built this module and you're using it in a cool way that others might enjoy, please make a video, put it on YouTube and contact me with the link. I'll add it to the article with full credit given.

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.