Oscillator leaking into power rail

Started by dkling8, July 31, 2010, 12:05:28 AM

Previous topic - Next topic

dkling8

I'm working on a design for a tremolo pedal, and I'm looking to use a square wave oscillator, then integrate it to get a triangle waveform as well. For some reason, my power rails get thrown all over by the oscillator. When debugging, I totally disconnect the oscillator from the rest of the circuit and send the DC blocked power rail to my amp just to listen, and there are audible clicks at low frequencies, and audible tones when the oscillator reaches the audio range. I haven't been able to get my hands on a scope, so I can only hear what's going on, not see anything...

Has anyone else experienced this, or have any ideas for quieting down the power rails? Here's my power section and oscillator:
<a href="http://s83.photobucket.com/albums/j300/dkling1717/Stuff/?action=view&current=osc.png" target="_blank"><img src="http://i83.photobucket.com/albums/j300/dkling1717/Stuff/osc.png" border="0" alt="Photobucket"></a>


...and here's where I got the oscillator circuit...
http://www.play-hookey.com/analog/triangle_waveform_generator.html

R.G.

Quote from: dkling8 on July 31, 2010, 12:05:28 AM
I'm working on a design for a tremolo pedal, and I'm looking to use a square wave oscillator, then integrate it to get a triangle waveform as well. For some reason, my power rails get thrown all over by the oscillator. When debugging, I totally disconnect the oscillator from the rest of the circuit and send the DC blocked power rail to my amp just to listen, and there are audible clicks at low frequencies, and audible tones when the oscillator reaches the audio range. I haven't been able to get my hands on a scope, so I can only hear what's going on, not see anything...
Welcome to the real world. And may God have mercy on your soul.  :icon_biggrin:

Decoupling of noisy circuits from other stuff to keep the noise where you want it is a continuing requirement of all electronics work. It's particularly troublesome in audio because the human ear has such a huge range of sensitivity, and the human brain does such a fine job of digging something annoying out of the stuff it likes and noticing the annoyance.

Every time you switch something, it creates a voltage step. Generally it creates a current step to make the voltage step. A step in current or voltage is composed of a huge number of higher frequency components. Voltage transients couple through the air through parasitic capacitances and through power cables if the power supply is not a zero impedance source, which is impossible. Current transients couple through magnetic fields through the air to other current loops, and through power supply cables if the power supply cables are not zero resistance cables, which is impossible. So you always have noise decoupling issues if you switch. Or change a voltage or current. Ever.

The trick is to isolate the noise source from the amplification. Since zero impedance power supplies are impossible, you make the impedance as low as you can by using local decoupling capacitors to move a low impedance up really close to the switching/noisy stuff. This also eliminates the resistance of the power traces/cables to make transient voltages in, because the source of transient current is very close to the current using part of the circuit. The decoupling caps provide a local bucket of charge that the switching circuit can gulp from. The capacitor bucket is charged from the main power supply on a slower, more continuous basis that's easier to filter out back at the main power supply.

With a local decoupling cap, you can then insert resistance in your power supply. That would otherwise be bad, but with local decoupling, the resistance attenuates the power cable transient going back through the power supply. Have you noticed that all tube amps tend to have a power supply which consists of a number of sections of a series R and a cap to ground? That's what's going on. The capacitor in the next section shunts any interference from this section to ground, and the R creates a voltage divider effect with the next section's capacitor to cut down any power supply noise generated in this section.

In your case, I'd put a 10uF cap paralleled with a 0.1uF ceramic right on the leads of the LFO oscillator. I'd then isolate the LFO section from the main power supply with maybe 100 ohms. I'd do the same going OUT of the main power supply to the amplifier sections.

Notice that your Vref is generated from the power supply? Ooops. Yes, the Vref can get transients in it from the power supply. Worse, if your oscillator can affect Vref, that is coupled directly into the sensitive amplifier stuff through Vref. Generate two Vrefs, one for amplifier, one for switching, or split and separately decouple both.

Then there's ground. You can't decouple ground. What you can do is do clever routing of wires so that the currents from the noisy/switching parts do not flow through the resistances of the ground return wires which are shared with the quiet parts of the circuit. Since all wires are resistors, just small ones, current noise on wires causes voltage noise on wires, and if that wire carries reference ground, it's fed right into the amplifier circuits that share the ground reference.

You've uncovered a little bit of a huge rock. You'll spend the rest of your electronic life worrying about and solving ground and power supplies issues. When you quit messing about with this issue, you will have quit doing detailed electronic design. It's part of the life.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

dkling8

Thanks, R.G., that helped a ton.

I'll be sure to post my design when I'm satisfied with it...

smallbearelec

Hi--

I had to deal with this issue in doing the Tremulous Bear:

http://www.smallbearelec.com/Projects/TremBear/TremBear.html

The pedal is remarkably quiet between beats. In doing the board design, I implemented a comment of R. G.'s from an earlier thread about LFO ticking:

"Ground oscillator and modulator separately, and bring them together only where the negative supply lead enters the board." This, together with the decoupling capacitor, got rid of a lot of noise.

The .68 mf. cap across the LFO output is also important, because it rounds off the edges of the square wave.

I hope this helps.

SD