A basic question about grounding that i'm confused about.

Started by daryl, November 26, 2012, 10:28:55 AM

Previous topic - Next topic

daryl

On the GGG Big muff I'm building it has wires going to the ground track on the circuit board from the:
- foot switch
- output jack
- volume pot
- DC jack
- the enclosure case

I'm just trying to get a better understanding of grounding.

If the case is grounded to the circuit board then does that mean that the wires that go to the circuit board ground trace could go to the case instead?

midwayfair

EDIT for clarity: Yes, you could simply ground all the circuit board traces to the case instead of each other, but that would be tough.

Gound in stompboxes is "common." That means all ground points must be connected together in some way; the exact method you choose to do this varies, but my general rule is: no "circular" ground schemes (go for a U or horseshoe or a straight line if possible), off board wiring kept short and twisted, and keep power lines away from audio lines when possible.

The enclosure is generally grounded to prevent RF. I also find that it keeps things from buzzing when you touch the case with your bare hands. If you use metal jacks, your enclosure is grounded through the jacks' sleeves, which are connected to the ground either on your footswitch or whatever.

Soldering anything to your case is difficult. You'll have much more reliable grounding by just connecting the grounding points in a way that keeps the wiring simple and short, and letting metal jacks ground the case.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

daryl

Thanks for your reply, can you expand on
Quoteno "circular" ground schemes (go for a U or horseshoe or a straight line if possible)
as i'm new to electronics.  :icon_redface:

Surely if the jacks ground the case and then anything that connects to the case and the ground on the board would make it circular.

Just trying to get my head round it all.  ???

Kesh

if you use insulated jacks, then nothing connects to the case unless you want it to.

tubegeek

Quote from: daryl on November 26, 2012, 10:28:55 AM
On the GGG Big muff I'm building it has wires going to the ground track on the circuit board from the:
- foot switch
- output jack
- volume pot
- DC jack
- the enclosure case

I'm just trying to get a better understanding of grounding.

If the case is grounded to the circuit board then does that mean that the wires that go to the circuit board ground trace could go to the case instead?

How about the input jack? Its sleeve goes to ground too, unless it relies on the foot switch for its ground connection or has a plugged/not plugged switching function built in.

I'm guessing your reasoning is as follows: "Why run all those separate wires from these enclosure-mounted parts when I could just run one wire to the board from the enclosure and connect each of these other points to the enclosure too?

This is good thinking in that it will simplify your wiring plan. Unfortunately, partly because "ground" in an effects pedal is used for several different purposes, there is great sensitivity to noise and unwanted voltages on a ground circuit and this sensitivity requires special attention.

As one guy who taught me plenty of what I know has put it: think of each wire connection in a circuit as a very small resistor. For each wire, then, any current through it will result in a voltage difference between the two ends. This would include any wiring, or enclosure metal, connecting "grounded" points in the circuit.

This contradicts the desired behavior of the "ground" reference - a stable, noise-free, reliable source of exactly zero volts with respect to the rest of the circuitry and (hopefully) the rest of the system this circuit interacts with. The name "ground" - or in the UK, "earth," means what it says - connect to terra firma, which is the closest thing to an infinite source or sink of electrons we can find. No matter what kind of charge we dump into the earth, within the limits of, say, a lightning strike, we can't affect its voltage level. So we call it 0 V and rely on it for that. Then we hook up a bunch of small value resistors to it, call them "wires," and expect to find 0 V at the other end of that small resistor.

In general, there are some schemes for "grounding" within a pedal circuit that work reliably well, meaning you won't have to reinvent the wheel.

One is to provide a wide, very low-resistance trace on a circuit board for attaching "grounds" and double-check by testing that it works as intended.
Another is called "star" grounding: all grounded elements connect to one physically small point, and then that attaches once and only once to the ground reference outside the circuit. This is reliable enough that testing often is not necessary.
Another - and here is where your idea comes in - is to group grounds together and double-check by testing that it works as intended. If it works, then it works. If it doesn't you may have to re-route some of your ground connections to reduce noise. No babies will die from this, but it might give you, as the Baby Bear on Sesame Street says, a "three phooey problem."

Finally, here are the various purposes that the ground connections you mention are being put to:

- foot switch : (I think) choosing the signal path that connects to ground at the input to the circuit. This ground provides the input signal with a 0V reference so that the (unbalanced) input audio signal can be compared to that 0V by a single-ended input (one using the difference between audio and ground as its input signal.)
- output jack : provides a 0V reference for the output circuit of the effect; also provides the 0V reference (via the cable on the output) for the effect pedal with respect to the input of the next piece of equipment; also provides the return path for signal current assuming there is no other one.
- volume pot : provides a path for some, all, or almost none of the effect's internal signal current to be dumped to ground in order to reduce signal level at some place within the circuit
- DC jack : provides a 0 V reference for the external power supply which should be floating (meaning, no reference) until it reaches that jack
- the enclosure case : grounding the case affords protection from RF entering the circuit that is contained inside, and prevents other external sources from changing the voltage on the case for safety and noise isolation.

It's not rocket surgery but it IS more complicated than it at first appears.
"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR

R.G.

Yep.
@Daryl: I've posted similar explanations a number of times here. You may want to search them up for more views.

Ground is not one thing. There are broad subclasses of "ground" uses, and it's generally better to use a "ground" for one but not more than one of these.

I distinguish between
1. Reference ground; used to tell some part of a circuit where "0V" is. One generally expects that little or no current flows in a reference ground conductor, so they can be small (and therefore higher resistance) wires, or even actual resistors if the current really is zero.
2. Shield ground; used to prevent incoming electromagnetic radiation from being felt in the circuit. A conductive shield around things forces any radiated EM stuff to detour around the shield, so not be picked up by the circuit.
3. Power supply return, what I call "sewer ground"; this is how the "used electrons" flow back to the power supply after the circuit does what it does with the power.

In particular, letting the same conductor handle sewer ground and reference ground pollutes the signal reference with power-current feedback, and can cause hum, buzz, oscillation and other nasty effects.

It reduces down to the idea that you either have to know what currents flow in what conductors, or have big conductors and be lucky if you don't want to take the time to think about what currents flow where.
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.

tubegeek

Quote from: R.G. on November 26, 2012, 01:29:32 PM
@Daryl: I've posted similar explanations a number of times here. You may want to search them up for more views.

And, of course, the "one guy who taught me plenty of what I know" would be the very same "Texas Tesla," R.G. Keen. Let me tell you something: when I first started learning from R.G. I was pretty sure electrons orbited around atoms and that was about it. By paying attention to him and other generous souls on the 'net, I am currently (pun intended) teaching electronics at a school for audio engineering and I am considered one of the most knowledgeable faculty members on the subject of electronics.

I posted that above partly to spare R.G. the cut & paste effort, and also to thank him for all his help over the decades and to show him I've been paying attention.

One of my favorite lectures is balanced vs. unbalanced signal transmission - my favorite part is showing how ground (and ground noise) becomes completely irrelevant for a differential input.

Thanks Professor!
"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR

Kesh

Quote from: R.G. on November 26, 2012, 01:29:32 PM
3. Power supply return, what I call "sewer ground"; this is how the "used electrons" flow back to the power supply after the circuit does what it does with the power.

And if someone tells you electrons actually flow into your circuit FROM "ground", in all pedals except those pesky +ve ground pnp ones, it's best to just ignore them.

defaced

Quote from: Kesh on November 26, 2012, 03:39:59 PM
Quote from: R.G. on November 26, 2012, 01:29:32 PM
3. Power supply return, what I call "sewer ground"; this is how the "used electrons" flow back to the power supply after the circuit does what it does with the power.

And if someone tells you electrons actually flow into your circuit FROM "ground", in all pedals except those pesky +ve ground pnp ones, it's best to just ignore them.
So you would ignore me?  :icon_razz:
-Mike

tubegeek

Quote from: Kesh on November 26, 2012, 03:39:59 PM
And if someone tells you electrons actually flow into your circuit FROM "ground"... it's best to just ignore them.

It's true, those folks are just messing with you. The stork brings electrons, actually.
"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR

Kesh

another crazy fact: electrons' average speed along your typical pedal currents is a few millimetres per hour.

Seljer

Quote from: Kesh on November 26, 2012, 04:48:22 PM
another crazy fact: electrons' average speed along your typical pedal currents is a few millimetres per hour.

And if you're powring your pedalboard with an AC adapter, those electrons are being 'pushed' by multi hundred ton generators located hundreds of miles away (and the drift of the electrons in the transmission wires is still just in the range of meters per hour) :icon_eek:

Jdansti

Quote from: tubegeek on November 26, 2012, 04:24:38 PM
Quote from: Kesh on November 26, 2012, 03:39:59 PM
And if someone tells you electrons actually flow into your circuit FROM "ground"... it's best to just ignore them.

It's true, those folks are just messing with you. The stork brings electrons, actually.

Some if you guys already know this, but I'll say it at the risk of being ignored. :)  Historically, Franklin and other scientists thought that electricity was a fluid or like a fluid and it flowed from a higher potential (labeled positive as a convention) to a lower potential (labeled negative, also as a convention), much like water flowing down hill. Later when electrons were discovered, it turned out that they flow from what had been labeled as the negative pole toward the positive pole.  What we call "current flow", from positive to negative, is the appearance of a positive current due to the electrons flowing in the opposite direction. It's the same as the convention of "hole flow" in semiconductors.  The holes don't actually move, but the positive charge does and it "flows" from the positive pole to the negative pole due to the electrons flowing from the negative pole to the positive pole.
  • SUPPORTER
R.G. Keene: EXPECT there to be errors, and defeat them...

Jdansti

Quote from: daryl on November 26, 2012, 11:28:22 AM
Thanks for your reply, can you expand on
Quoteno "circular" ground schemes (go for a U or horseshoe or a straight line if possible)
as i'm new to electronics.  :icon_redface:

Surely if the jacks ground the case and then anything that connects to the case and the ground on the board would make it circular.

Just trying to get my head round it all.  ???

Sorry for the tangent. :)

If you connect the power ground, the jack grounds, and a wire from the board ground to a spot on the case (which as Jon said isn't always convenient) you do not have a circular path.

Here are a couple of examples:

  • SUPPORTER
R.G. Keene: EXPECT there to be errors, and defeat them...

amptramp

Quote from: Jdansti on November 27, 2012, 12:24:46 AM
Quote from: tubegeek on November 26, 2012, 04:24:38 PM
Quote from: Kesh on November 26, 2012, 03:39:59 PM
And if someone tells you electrons actually flow into your circuit FROM "ground"... it's best to just ignore them.

It's true, those folks are just messing with you. The stork brings electrons, actually.

Some if you guys already know this, but I'll say it at the risk of being ignored. :)  Historically, Franklin and other scientists thought that electricity was a fluid or like a fluid and it flowed from a higher potential (labeled positive as a convention) to a lower potential (labeled negative, also as a convention), much like water flowing down hill. Later when electrons were discovered, it turned out that they flow from what had been labeled as the negative pole toward the positive pole.  What we call "current flow", from positive to negative, is the appearance of a positive current due to the electrons flowing in the opposite direction. It's the same as the convention of "hole flow" in semiconductors.  The holes don't actually move, but the positive charge does and it "flows" from the positive pole to the negative pole due to the electrons flowing from the negative pole to the positive pole.

But Franklin got it right for flow inside the battery or generator.

totes

Noob questions:
If I understand the above correctly, can the enclosure act as a ground? If so, could someone please explain in a simple manner how to ground things to the enclosure? If not, what are components physically wired to for grounding, and how should they be wired?

LucifersTrip

Quote from: totes on January 10, 2013, 02:37:30 AM
Noob questions:
If I understand the above correctly, can the enclosure act as a ground?

yes, the ground of the in/out jacks are connected to the enclosure just by being screwed in







always think outside the box

amz-fx

Quote from: LucifersTrip on January 10, 2013, 04:03:31 AM
yes, the ground of the in/out jacks are connected to the enclosure just by being screwed in

Be careful with powder-coated enclosures. Many times the coating extends inside the box and can insulate the jacks from contact with the metal.

You should sand off the powder-coating inside the box around the hole for the jack to allow proper contact.

regards, Jack

totes

Quote from: LucifersTrip on January 10, 2013, 04:03:31 AM
Quote from: totes on January 10, 2013, 02:37:30 AM
Noob questions:
If I understand the above correctly, can the enclosure act as a ground?

yes, the ground of the in/out jacks are connected to the enclosure just by being screwed in


So should all other ground connections in the circuit wire to the same in/output jack in order to use the same ground?
And if the enclosure is grounded and conductive, how do I keep the circuitboard and other components from contacting the enclosure to prevent shorting parts of/the whole circuit?

R.G.

Quote from: totes on January 10, 2013, 11:38:18 AM
So should all other ground connections in the circuit wire to the same in/output jack in order to use the same ground?
Let's make a distinction between what should be done and what one can often get away with.

What one can usually get away with in guitar pedals because of the small size and low power/current involved is to just connect everything up to the conductive enclosure, power jack, battery, and circuit board any kind of way. The currents are so low that the voltage drops from the wire and case resistances are also low and don't cause problems. This is where most pedal makers' knowledge of ground starts and ends until they hit a harder case.

However, as input impedance on the pedal gets higher, gain gets higher, and frequencies get higher, this becomes less and less true. There comes a point where the gain is big enough or big enough at a high enough frequency that you get oscillation, noise, or silence, indicating the circuit is oscillating massively above human hearing. Also as frequency gets higher, the self inductance of wires becomes important. Up in the FM radio band, a wire longer than half an inch or so is not a wire - it's more an inductor.

So how it should be done is:
1. The input jack sleeve should be connected to the enclosure right where it punches through the enclosure. This can be done by just the screws holding it into the box, but as noted paint, and eventually just dirt and time will make this not so reliable. This ought to be done with a star/toothed lockwasher under the fixing nut to bite into the enclosure metal for long term reliability. This makes the input ground a solid RF/shield ground to bleed incoming RF from the wires into the surrounding enclosure and keep it out of the circuits. This can also be done with a small ceramic cap of maybe 0.001 from the input sleeve right to the chassis if for some other reason you don't want to - or can't! - DC-ground the input sleeve right there. The cap leads have to be as short as you can possibly make them to be effective.

In the ideal case, this connection to the chassis at the input jack should be the **only** conductive connection to the chassis.

2. The incoming DC adapter jack and battery leads, etc. grounded sides should not connect to the chassis where they come in or elsewhere. They should run directly to a point on the circuit board where traces split out to power the circuit.

3. The input ground should connect to the circuit board ground right at the input circuitry.

4. The output jack should be isolated from the chassis, and a signal ground wire run from its sleeve back to the ground common point on the PCB. This way, only output signal currents run through that ground wire. Hooking its ground to the input jack ground terminal forces both input signal currents and output signal currents to flow in the same wire resistance. This makes an explicit shunt feedback loop around the whole pedal. As long as gain and impedance are low enough, it doesn't matter, but when you get enough, it oscillates from the feedback.

5. The input jack should not be wired for the input-power switching trick by using a stereo jack and running power negative to the ring terminal. This forces 100% of the power supply current for the whole pedal down the input signal ground wire, and the currents used by the circuit are fed back into the input. When current, gain, and/or impedance get high enough, this can make it oscillate. The output jack is a better place for this, as the currents are higher and it's not automatically a feedback issue. But it does risk putting signal out  on the output line for the next pedal. The best way to do jack-based power switching if you want to do it is to use a bipolar transistor to switch power and a resistor from its base to the stereo jack ring terminal. This can only contribute a DC offset, and a very small one, instead of a signal.

6. LED ground returns should go either to the place power is brought onto the board from the power jack or back to the power jack. This keeps the large-ish current changes off the signal reference ground wires.

I'm still running a bit of fever as I type this, so if some of this is foggy, I apologize.

One can often get away with just ganging it all up. When you can't get away with it, it may help to know what's theoretically best.

QuoteAnd if the enclosure is grounded and conductive, how do I keep the circuitboard and other components from contacting the enclosure to prevent shorting parts of/the whole circuit?
You make arrangements and space on the circuit board for some kind of mounting hardware to hold it off the conductive enclosure. I like these:
http://www.mouser.com/ds/2/267/EPD-200767-202767.pdf
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.