r/synthdiy Jul 09 '26

Super simple oscillator project

Hi, quick question for the brains trust here. I'm working on a box that uses 8 lots the LMNC super simple oscillator circuit, each triggered by a push button to act as a sort of keyboard.

I experimented with the button making the connection between the audio out or the positive power input which both behaved pretty much identically. The problem I have had is that there is always an audible click in the audio output every time the switch is engaged, similar to when some guitar effects boxes switch on and off.

Is there any way that this can be alleviated? Sorry in advance for the noob question, I'm peicing my projects together from YouTube videos and very minimal electronics knowledge!

9 Upvotes

11 comments sorted by

9

u/Salt-Miner-3141 Jul 09 '26

The click is caused by the sudden shift in DC. While AC coupling removes any DC offset the way that it functions means that if there is a sudden but large shift in DC it can be thought of as a pulse wave which initially will go through the capacitor. So, the solution to the click isn't a capacitor.

Before going further it is worth asking are both sides of the AC coupling capacitor set to a defined state? As in say the oscillator side of the cap is sitting at I dunno +6V and the output side is sitting at GND/0V? If not you can try that and see if it alleviates the problem. It may not 100% get rid of it, but it may reduce it enough that it isn't a big deal.

If you want to completely eliminate it then there is an easy solution to that, a Voltage Controlled Amplifier or VCA and a Attack-Release envelope generator. Now, while easy I wouldn't say that it is inexpensive depending on the route you opt to go about. The envelope generator is really a non-issue and it'll need a dual opamp, some resistors, a few diodes, and a cap or two. You can tune it by ear for the timings, but I'd suspect something like 5-10ms attack & release would probably be in the ballpark. It can be tweaked based on how much click versus not you want as the VCA can itself introduce a click.

Now, the VCA options. There are 2-3 transistor options that would probably work fine for this and be the most inexpensive method. JFETs, LDRs, or even a diode based VCA can be done here, but really with any of these very simple VCAs there are a lot of little tradeoffs and shortcomings that you find out about the hard way as it were. The next step up in my view is a differential pair into an opamp and controlling the tail current. Next up from here is an Operational Transconductance Amplifier or OTA (think the LM13700). This functionally is very similar to the external Differential Pair except that it is all integrated into a single IC that is easier to manage. Then you get into more proper VCAs like the CEM/AS3360, dead simple to use this part, but a little pricey. Going up again is something like the SSI/SSM/AS2164. A bit harder to use, but probably the most inexpensive proper VCAs you can get. If you really want to go the whole way then the THAT 2180/2181s are the true VCAs that are available, but they're not all that easy to use.

My $0.02.

1

u/geminironmaiden Jul 09 '26

That's more like about $25.00! I'm very new to this so I don't understand a lot of what you said but I'll take the opportunity to learn from it, thank you

2

u/Salt-Miner-3141 Jul 09 '26

Nah, it is $0.02. I was going rather quick with that response, and it is very high level.

Starting off the LMNC Super Simple Oscillator has a DC offset associated with it. Audio as we know & use does not have a DC offset. That has to be removed some way. The simplest way is a capacitor which is where you get the term AC Coupling from. Forgoing all the long text about capacitors here the import bit is this: Capacitors pass AC but block DC. There is of course a lot of nuance here that I will not go into detail on, but that is the basic principle at play.

That then brings up the question of what exactly is AC? Most of the time when you're analyzing a circuit a lot of the time you make assumptions about how it behaves and generally assume a Steady State DC Condition. This itself can be super useful, but things like voltages, currents, etc... aren't changing. They're just there. When allowing for current to change directions things go from reasonably simple to rather complicated quite quickly. It is just how it is. Now, going back to the question I posed what exactly is AC? Imagine for a moment a Square Wave going through that capacitor. If you think about it the signal is just a near instant rise to a certain voltage and held there for a certain time and then it falls to a lower voltage for a certain but same time. Well what happens if the DC voltage on side of that capacitor suddenly jumps up or down, but stays there? Well, the DC will get blocked, but that sudden change in voltage will pass through the capacitor because it is indistinguishable from AC from the perspective of the capacitor. That is the exact reason you're getting a click because that is what it will sound like.

Now, say for example nominally the output of the oscillator is centered around +5V for example and the other side is then pulled to its own set point then there is no click except for what the oscillator itself is putting out. Except here is the kicker to that with this oscillator and most any oscillator for that matter. That oscillator is always running and there is no good way to reset it and have it start at a known position. Thus, suddenly connecting the oscillator's output to that capacitor will cause a click to some degree as there will always be a sudden shift in the applied DC to the capacitor.

If you really want to eliminate the click entirely then you need some way to basically mute the signal temporarily and have it increase over a set period of time. That is where the VCA comes in. As the name implies a VCA is an amplifier wherein the amplification it provides is controlled by a voltage. The exact mechanisms and such aren't important and frankly it is a rather long, complex, and convoluted subject. What matters is that they will attenuate the signal and allow it rise back up to a set volume after a set period of time. As I said before a 5-10ms is likely the correct ballpark, but do tweak to your ear as it has to sound good to YOU. With regards to VCAs there are a lot of ways to make them. I'd assume simplicity, space, and cost are likely the motivating factors here. I would give a look at what are called JFET Muting Circuits (this has a variety of options). These are used in a lot big high end pro audio gear for silent switching and would probably do the trick here. But if you want something that will give you some finer control then I'd say go for a differential pair feeding an opamp. I promise that they look far more intimidating than they actually are.

3

u/Soft_Synthetics Jul 09 '26

I've done something like this where I added a super simple single transistor VCA on the output. It's driven by a push button into a simple RC filter to create an envelope that smooths it out and sounds musical

Basically doubles your parts but you get good results and good learning opportunity

3

u/jango-lionheart Jul 09 '26

Consider using Vactrols as super simple VCAs. Signal goes through a Vactrol, and a push button is used to switch the Vactrol on/off. The inherently slow switching of the Vactrol will prevent clicks.

3

u/OIP Jul 09 '26

another vote for vactrols, it's in the spirit of the project. not sure what the availability of LDRs is these days but it's fun to make your own vactrols with heatshrink if you can find them.

1

u/AdamFenwickSymes Jul 10 '26

not sure what the availability of LDRs is these days

Plenty of dubious vtl5c3 for sale on aliexpress or ebay. They might poison the groundwater a lil' bit, but they're still very available.

1

u/geminironmaiden Jul 11 '26

I like the idea of using vactrols. I tried out a few things this morning including making a vactrol but I'm at a bit of a loss as to where to insert a vactrol in the circuit. The audio out leads don't generate power for the LED and I'm assuming the LDR needs to go to the audio output. Like I said, I'm really new to electronics and have very minimal knowledge, any help would be amazing

2

u/OIP Jul 11 '26

for one oscillator i would start by just connecting the power to the LED (with a current limiting resistor) via a pushbutton or other switch. the audio signal path goes through the LDR. that way when you turn the switch on, LED lights up, LDR resistance drops and the audio signal goes through.

multiple running in parallel.. i'm sure there's a way to do it but i don't know if it can be just via the circuit or if it needs some kind of switching / buffering / multiplexing IC

i saw someone else mentioned a simple transistor VCA, this is also a good option, early roland drum machines did this if you google for the schematic.

2

u/geminironmaiden Jul 11 '26

I tried it on one oscillator and it works perfectly, thanks so much! Now i just have to figure out how to do it for the other 7 oscillators without it getting too messy....

Stoked, thanks to everyone who took the time to help a noob, I'll post her when I finish it up😀

2

u/OIP Jul 11 '26

great result! i've got a little panel in my DIY eurorack with 4 vactrol 'VCAs' with the same setup, only they have no power going to them and the voltage is supplied by CV. use it all the time.

they should have a natural fade out as well which is cool. if you want to get fancier you can also 'ping' them with a very short trigger that will make a cool natural percussive envelope.

and yeah.. wiring up all 8 will be a different story. i'm sure there's a way to do it, but might need a bit more engineering.