Project review

Hi all,

if I understood correctly, this is the place to share projects and get suggestions and review from this fantastic community.

This is my first ever attempt to design an audio circuit (guitar effect pedal) as a side learning hobbyist project.

I’ve gone through numerous tutorials and posts and videos and followed a quite iterative procedure of studying and redesigning this again and again but I feel like I’m getting to the point where I need to verify that I am going down the correct route. I’m also getting eager to finalize this and sending it for production!

So I summon the community!

Here are some of the things which swirl my mind before jumping to the production stage:

  1. Validating the schematic. Is there something I am missing? I have implemented this on a breadboard several times. I even moved this to a hand soldered prefboard. I have some worries about noise especially noise coming from the power supply. Any suggestions on this point are more than welcome!

  2. Things which bugged my on the schematic stage had to do with a proper way of presenting off board components and wiring them correctly to the pcb. This discussion helped me get over this and it’s the reason I added all these connectors on the schematic.

3 Regarding the PCB design, I consider my routing skills as “close to non-existent”. I’ve read and studied many techniques mainly talking about how correct placement is the key to a nice layout but I am not sure if I have managed to balance all the tradeoffs. Again, I would love to read some justified suggestions from you gurus.

  1. I’ve gone down the THT route so that I can play around with things such as changing the values of some components to see how they affect the output signal. Also to have an easy access test when the pcb is populated. However I would like to make a second version with SMD components once the design is finalized.

  2. One of the tradeoffs I am completely unsure if is balanced enough is signal routing distance. I’ve read tons of articles talking about “keeping routes short” but what does “short” mean in each case? Same with grounding. Some suggest a ground plane, some suggest to use copper fills on both sides and I am really not sure if I have a good understanding of these concepts. Feel free to lecture me!

  3. Other things which I keep asking myself is “should I worry about which signal should be on which side?”, “should I try to squeeze as many signal as possible on one side?”, “should I spread things out a bit in order to keep all signals on the same side?”. “should I route signal X around all other signals or does this make the signal too long so it’s better to route it on the other side?”

Anyway, I will stop here as this is getting “TL;DR”. I think I’ve made my point.

Thank you all!

distortion-tht-jlc.zip (111.3 KB)


This circuit deals with audio signals, right?
If that’s the case, signal integrity is not much of a concern. But I’d add some ground vias to ‘stitch’ the grounds together.

More importantly, there is no decoupling capacitor for U1. I’ve had even simple DC circuits with opamps not work correctly without decoupling. Standard ceramic 100nF or 47nF capacitor between V+ and V- of U1 should suffice.
Place it close to the IC itself on the PCB layout.

These tracks look very thin. Did you set the track widths and via sizes in board setup? (Icon is on the top-left corner of the PCB editor window).
Set the track width and via diameter as per your PCB manufacturer’s recommendations.

Correct, this is an audio circuit, more specifically a distortion guitar effect pedal. (i’ll update the post)

All grounds are connected through vias to the copper fill added on the bottom layer. I have also added a copper fill on the top layer (having read some articles suggesting this as a good rule of thumb, but I am not sure if having both sides connected to ground adds anything valuable or if it is something which may cause issues)

Does this mean I should not worry much about track length and size of the PCB? It’s true that my PCB can be much larger. The posted design is approx 5x4cm while I do have space to make it up to 12x9cm

Oops, the decoupling capacitor was one of the first things I remember adding, I guess I mistakenly ditched it among redesigning attempts. I guess this will be fine.
image

I ve used the JLC manufacturing capabilities as posted at their website but maybe I do not need to stick that close to the minimums. Any suggestions? How wide could I go with those signals?

I don’t think the PCB size will degrade circuit performance in this case, assuming you have ground pour near all the signal traces, and that ground is stitched together, so electrically it ‘looks’ like a continuous plane.
Here’s a suggestion:
Do you know how you’ll mount the PCB in the case?
Use the extra free space on the board and add some mounting holes. You can add footprints in the PCB editor itself, and the mounting holes are in the ‘MountingHole’ library. If you’re using a metal case, use a ‘pad’ style footprint and assign it to a GND net. (or just add a schematic symbol- assign a mounting hole footprint and connect it to GND on the schematic).
If you’re using a non-conductive case, just use a standard non-plated mounting hole.

A while back I had to pay extra for using minimum sized tracks and vias. Not sure if that’s still the case.
Thicker traces are easier to re-work. (Example: If you need to cut a few traces and re-solder them together, it’s easier to solder a wire to a thick trace than a thin one), but will not fit between pads of some components anymore. You should decide for yourself what you need.

I have a few suggestions, mostly to do with readability.

  1. I would swap the TL072 for something rail to rail to give yourself more headroom.
  2. You have a lot of connections on the schematic that go over each other and several of them are avoidable. For example AUD_IN_T and R, swap them so they don’t cross over each other. There are lots of examples of this and it makes reading the schematics so much harder.
  3. Your 4V5 that you’re using as your pseudo 0V: I think it might be a good idea to buffer that with an op amp so the output of a simple non-inverting buffer provided the 4V5. You could use a quad op amp instead of the dual.
  4. I’d like to see U1A and B the other way up so the pseudo 0V is below it rather than above it. I’d also create a pseudo 0V power symbol so you don’t have super long wires stretching all around the schematic.
  5. On the PCB I would beef up your 9V and 4V5 lines a bit. At the very least 20 thou.
  6. I would hugely increase the dc blocking caps in the audio path. Min 10u. Electrolytics are fine, but large ceramics are so good and not outrageously expensive these days too.
  7. Your power gate for the TL072 could do with a box round it. Looks weird as is. I do wholeheartedly approve of you haveing a separate gate for power though. This is better with short wires to power symbols too rather than huge long connections.

As David says, you need a 100n for the op amp.

Absolutely no need to worry which layer signals are on really, but and this is especially true with SM, try to route as much as you can on the top side so that the bottom side has as big an uninterrupted ground plane as possible. Yours is going to be spotty because it’s TH, but it’s still just good practice to always, always have as much ground plane as possible.

My standard (since many years) is to use 0.25mm track and specify 0.2mm minimum clearance, but whenever possible I try to have clearance at least 0.25mm and when really needed I use 0.2mm tracks.
I use only SMD elements. 0603 footprint is my basic passive elements standard and ICs I use have pads in rasters 0.65mm down to 0.4mm.
For THT design I would probably be using 0.4mm typical track width with small segments (to pass between pads) being 0.25mm.

2 Likes

I guess part of being a newbie has to do with the difficulty to incorporate suggestions and tips from experienced users :crazy_face:

1+3. no idea what rail-to-rail means. If this has to do with the opamp physical size, the idea was to go with an IC socket so I can replace the opamp chip if things go wrong and i end up burning it. For the time being, I will try to not change the opamp as this will take me many steps back, but the tip will be considered for the next version! Same for point 3 i guess. Regarding which, this is an interesting approach and I am surprised I haven’t seen it in any of the similar circuits I have studied during this process!

2+4. Noted. I will try to clear things up for future use. I have to admit that I paid way more attention to the layout than the schematic readability.

  1. What does “beef up” mean? Make thicker traces I guess? Could you give me an idea about a typical trace width usually is?

  2. Noted. Cost is not an issue since this is not going for mass production. You suggest changing the caps on the audio path but i would love some further clarification.

  • C2 is part of a high pass filter. since f=1/π2RC i guess i can play with the values of C2 and R3. Changing C2 to 10u means I also need to change R3 value accordingly. Is that correct?
  • C3 is one of the components which people change to give a characteristic sound to such a pedal. This is a point of experimentation for me with which I intend to play after production of the pcb with the help of an analog discovery device and a real scenario (plug in a guitar and an amp)
  • C4 and C5 take their part among the amplification stages of the opamp and I dare not change them! Do you think these are also worth playing around with? If yes, would you like to give me a suggestion for reference?

7.I assume you are back to the issue of schematic readability, correct?

Rail-to-rail means that the output voltage will swing to +/-V. The TL072 can only get to something like 2V or so from the rails, so you are going from 9V potential swing to 5V or less. There are loads and loads of drop in op amps that go rail to rail. Unlikely you need it for input, but for output it would potentially help. You have absolutely nothing to lose by swapping it for a drop-in part. TL072 are awesome op amps for the money, they were invented by Noah in an idle moment on the ark (*), but after all that time they’re still are great for high quality audio when you have plenty of headroom on the power supply.

Beef up means thicken, yes. The thickness of track is dependent, to the main part, for how much current it needs to carry. In your case not very much at all, but for power and ground and indeed any heavy current tracks it’s sensible to make it as thick as is practical. In this instance, as I say, 20thou would be adequate. Your lower current tracks, again make them what you can, but 8 thou is perfectly good enough and 12 thou would be my preference for a circuit like this.

On the subject of caps I was only talking about the dc blocking caps which are C2 and C6 by the looks of it. The lower the capacitance the more roll off of lower frequencies you’ll get. As a rule of thumb, on audio gear we’d use minimum 10uF for this. Going back years when I started this it was all electrolytics as they were cheap and plentiful, but they do have issues with drying out over the long term especially if you don’t specify a high enough temperature part. TBH, they’re likely still to be the cheapest type, but low volume like this, ceramaics would be great. Absolute minimum 9V rating which likely means 16V in practice I think.

On point 7, yes, it’s just aesthetics and, to be fair, a matter of opinion to an extent. I do think it looks werid without the box though. :slight_smile:

In general, I find in many places I work people put way too little effort into the readability side of schematics. Not just in the layout, but the symbol side where they simply copy the pin number of the physical chip and put no thought into bunching the pins together to make schematic layout simple and easy to read. Lines criss-crossing all over the places is one of the most common and worst things for making schematics hard to read. For a first effort with no training you’ve done a decent job.

  • This part might not be true.
1 Like

BTW, just to address your issue of using TH to make it easier to change components. I find it way easier to swap SM parts than TH. Even down to 0603, it’s so much less likely to do damage to the board swapping SM parts out than TH and so much quicker to do. If your eyesight’s not so great those head magnifiers are perfect for the job!

1 Like

This is all immensely valuable information, and you got me triggered to jump in a part i’ve skipped which will also make the learning experience more complete: simulation.

I will give it a go and try different values for C2 and C6 and see how they affect the output signal. From what I understand R3 and RV3 may need to change too.

If I get tired of trying to learn SPICE I guess there are plenty of RC simulators out there and usually I also go hand-to-hand with testing everything on a breadboard and an analyzer like my Analog Discovery thingy. Falstad has also been my go to “simple-simulation-platform”.

Thanks again!

PS: Thou is a unit of length of a equal to one-thousandth of an inch. I thought it was a typo. Small things I learn beyond PCB design :smiley:

1 Like

I almost never use simulators, I find them more hassle than they’re worth! :smiley: One that I had ijn the late 90s that was not bad, but is so old now it won’t run on modern OSes. LT Spice is just about usable but REALLY clunky. Maybe I should have a play with the one in kicad if I ever find I need one.

In regards to thou, I am hugely critical of how the UK to a small extent and America to massive extent resist the metric system (although in the UK miles and pints are about the last standing in general use other than some old geezers on the markets who pander to the imperialists and still sell in the indescribably bonkers pounds and ounces). However…

…I will never get used to the clumsiness of trying to route tracks in millimetres. It is so much easier to have whole figures of 8, 10, 12, 20 etc than 0.374556283937476mm or whatever the equivalents are. :fire: war alert! :smiley: So, that’s my one concession to the wholly ridiculous imperial system.

Mils is a really bad word to use too because some people use mils for thou and some use it for millimetres, I have got so confused over that in the past when talking to people.

Why not use 0.4mm instead of 15.7480315mils :slight_smile:

Fortunately I didn’t met anyone saying mils for millimeters and I understand the problem is existing only when talking.

J1 is labelled “positive center” however it looks to me like its center pin is connected to ground. Might want to double check things here.

Power input is a little confusing to read and The positive center has been highlighted for you already but you will need a limiting resistor for D1 :grinning:
:mouse:

@Dmc @mousey thanks for your input. I guess I need to check my wiring again.
The idea in these circuits is that the circuit will operate on mains when a power supply is connected but when there is no power supply, the circuit can operate on battery only when an audio jack is connected to the input.

@mousey regarding the limiting resistor, since this is a learning project, would you mind elaborating a bit? Why is this needed and how is it connected? What is a suggested value?

I checked the math and the physical properties and i see this:
the cutoff frequency of the input filter is approximately 15.9Hz. Given that the minimum frequency of a guitar note is approx 80Hz this looks ok.

If I replace C2 with something on the range of 10us then I will need to also replace R3 with something on the range of 1KΩ to achieve the same result. In that case what’s the tradeoff between a 10uF 1KΩ versus a 10nF 1ΜΩ filter?

I’ll see if I can help. You have a 9v power source, battery or power, doesn’t matter. The typical voltage for a LED is about two volts. You can check the specs for your specific LED to be certain on voltage and current. So, 9 minus 2 equals 7. So, resistor should have about 7v across it at 20ma. 7 divided by .020 amps, same as 20ma, is 350. Standard resistor sizes that is higher but closest is 390 ohms. That should be fairly bright. If you want a little dimmer and better battery life, you can look for a 430 or 470 ohm resistor. The LED will likely light up with up to a 560 ohm or so resister. The higher the resistance, the dimmer it will be. This is just a example. You may need to adjust depending on the specs of the LED and how bright you want it to be. I’d use a 1/2 watt resistor. A 1/4 watt may get a little warm.

Usual thing. You need to double, triple, check based on what you are using. If your LED has different specs, you will need to adjust. If needed, look up ohms law wheel. It gives you all the formulas in a little circle. It has every option you could ever need. Works for AC or DC. The logic above should give you the needed steps for any situation, just adjust the variables. In other words, I’m giving you how with a example, you can adjust to your specs and desired outcome. I’m not responsible if the smoke gets out. :roll_eyes:

Gee @rdalek I put you in more effort than needed. You see on the original design D1 was the diode used on the opamp feedback so I was wandering why I need a limiting resistor there, that’s why I asked for the clarification. But, again, youa re correct, i have to fix this too.

@Dmc The idea is the one in the attached image. I think what is wrong is just the label. It should be "negative center’

I agree, the label is probably wrong. I have never worked with guitar things but I vaguely recall reading that they use “centre pin negative”.

Besides correcting the labeling, there’s another change you might want to make… when you plug in an external supply of power, you should internally disconnect the battery (so that the battery and the external power supply are NOT in parallel and trying to charge/discharge each other).

If you look at the schematic symbol for J1, it can be understood to connect pins 2 and 3 together. Then, when a plug is inserted, the sleeve of the plug will:

  • disconnect pin 3 from pin 2
  • make electrical contact with pin 2

You might want to do something like this: