Circuit Design Considerations/Tips/Suggestions

Started by neutronarmy, February 01, 2013, 11:23:11 AM

Previous topic - Next topic

neutronarmy

Recently I decided that I would try to build a pedal of my own design. I don't mean to imply that I was reinventing the wheel - certainly not as the end result was a clipped opamp overdrive (one of approximately one thousand) - but I wanted to try to design a layout where each component was deliberately chosen by myself. I did as much research as I could pertaining to the individual components of opamp layouts and ended up with a circuit idea I was rather comfortable with.

I tried my hand at Eagle and drafted a schematic. It is likely not a perfect schematic, but once breadboarded it was functional. So far so good, a pretty empowering experience. So I took the functioning breadboard layout and translated it to vero with DIY Layout Creator and built a prototype. And the prototype functioned with a little modification. And now I am at the fine tuning stage.

When I run the effect without a load on the input, it oscillates. With a load, the pedal oscillates as well when volume/tone/treble are maxed. I assume the overall gain is a little too high, so I plan to cut it back. I also assume that my particular layout is probably not up to snuff. I'm going to chopstick the wires around see if that is also contributing to the oscillation.

And though I am trying to fix this one particular issue, I'd really like to get my mind wrapped around proper theory. I started searching and had a hard time trying to find resources on proper pedal/audio circuit layout. I am certain they are around, but I must be overlooking them. I found this post with some suggestions to my particular problem: http://www.diystompboxes.com/smfforum/index.php?topic=47554.msg350814#msg350814

However, outside of that post - or similar posts solving individual build issues - I couldn't find a solid resource on layout rules and considerations. If anyone could point me in a good direction (I am not adverse to books or dense PDFs if that is the best route), it would be greatly appreciated.

Thanks in advance for the help!
Chris

R.G.

The rules are simple in concept, but can require a lot of thought to actually accomplish.

1. Keep inputs and outputs as far away from each other as you can.
2. Know what currents are flowing in each ground, and avoid having output or power ground flowing in the same wires as input reference ground wires.
3. Every wire is a resistor, so every current through a wire generates a voltage, even if it's small. This is a second way of stating the special case of (2).
4. Every wire is also a capacitor, so keep them far apart **especially** wires which carry signals to high impedance inputs and wires from low impedance outputs. This is actually an underappreciated correllary to (1).
5. Schematics often don't show them, but every circuit and usually every IC needs a 10uF or bigger electrolytic within one inch of the power and ground pins and a 0.01uf to 0.1uF ceramic cap as close to the power and ground pins as you can get it.
6. Keep all traces and wires as short and direct as you can make them.
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.

neutronarmy

Quote from: R.G. on February 01, 2013, 03:32:29 PM
The rules are simple in concept, but can require a lot of thought to actually accomplish.

1. Keep inputs and outputs as far away from each other as you can.
2. Know what currents are flowing in each ground, and avoid having output or power ground flowing in the same wires as input reference ground wires.
3. Every wire is a resistor, so every current through a wire generates a voltage, even if it's small. This is a second way of stating the special case of (2).
4. Every wire is also a capacitor, so keep them far apart **especially** wires which carry signals to high impedance inputs and wires from low impedance outputs. This is actually an underappreciated correllary to (1).
5. Schematics often don't show them, but every circuit and usually every IC needs a 10uF or bigger electrolytic within one inch of the power and ground pins and a 0.01uf to 0.1uF ceramic cap as close to the power and ground pins as you can get it.
6. Keep all traces and wires as short and direct as you can make them.
R.G. - thanks so much for the design tips. Very, very informative and should be quite helpful with the issues at hand. Any additional reading you'd suggest? I've stumbled into a ton of theory, but not a lot directly related to circuit layout/design.

Tony Forestiere

"Duct tape is like the Force. It has a light side and a dark side, and it holds the universe together." Carl Zwanzig
"Whoso neglects learning in his youth, loses the past and is dead for the future." Euripides
"Friends don't let friends use Windows." Me

Jdansti

Thanks to neutronarmy for bringing up the question and to R.G. for his response.  I'm going to try to burn R.G's recommendations into my brain. Meanwhile I've stored them on my iPhone for future reference.  :D
  • SUPPORTER
R.G. Keene: EXPECT there to be errors, and defeat them...

R.G.

Quote from: neutronarmy on February 02, 2013, 01:50:18 PM
Any additional reading you'd suggest? I've stumbled into a ton of theory, but not a lot directly related to circuit layout/design.
That's kind of a problem, OK. The basis for why those maxims exist get into radio transmission, field theory, and other esoterica pretty quickly, so it's hard to find just the stuff to do.

Worse yet, although those concepts are pretty easy, it's tough to make trade-offs when you can't quite follow them. For instance: if you're forced by mechanical requirements or worse yet, accountants and bosses (!) to put an input wire near an output wire, is it better to put the traces leading to both on the PCB and work like crazy to keep the potential for interference down, or to take a wire off somewhere else remote on the PCB and take only that wire to the connectors? The wire lets you keep them separated on the circuit board, and only have one thing (the wire) to be careful with, as well as having all of 3-space to put it in for isolation. But the PCB approach lets you be SURE where the conductors run, so the performance of the final thing is not dependent on how the wire is bent around. And a wire can be shielded. It gets hairy.

The underlying ideas is that all conductors are really resistors, all conductors are really capacitors, all conductors are really inductors, and all conductors are really antennas, both for RF and for magnetic fields. The art of design lies in the maximum that everything that cannot be controlled must be made irrelevant.

So good design lies in recognizing which factors matter and which ones do not, then setting things up so that the things you can't control are shoved into irrelevance. For instance: voltages on ground return wires. We know from anecdotal tales of ground noise, hum, and oscillation that ground wiring matters. We know that high currents in ground wires make it worse. But everything labeled "ground" has to be tied together. How do you ground high-current speaker returns and sensitive input grounds? Thinking about "all conductors are resistors", you get the idea that you can't do anything about the voltages on the high current speaker ground wire. But you CAN put the input ground, which carries almost no current, on a different wire, so the two "grounds" don't interact. There's a voltage drop in the speaker return wire, but it's now irrelevant to the input.

We know that power supplies are not perfect; they have internal impedances, sag, conduct noise, etc. So we make that irrelevant by putting capacitors near the chip (item 5) to serve as local buckets of power for the chips, so they don't interact through the power supply.

There's an important item I forgot, item 7: if you simply can't keep two wires that should not be near each other from having to cross, make them cross at right angles. This minimizes the capacitance between them, minimizes the mutual magnetic/inductive coupling, and makes them least sensitive to RF coupling in the antenna sense.

Some of it is simply absorbing stuff through experience. There is vastly more information available today than when I was pounding my head on it at first, but as you note, not a lot of the info is there in a way that is easy to pick up if you haven't had physics, field theory, and RF practices backgrounds.

Each of the items I've listed can be unfolded into at least a booklet if not a full book, so take them more as a guide to what to think about and where to look.
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.