PCB desgin - Mix digital and audio on the same board - help seeking - Page 1
Forum section: electronics / projects

author: arma61
author_rank: Contributor
timestamp: March 23, 2017, 11:54:30 am
content: Hi guysArmando here from Italy, new to the forum, just registered today, seeking help for a PCB I'm designing, ie did I stick to the rules?My electronics skills are quite limited, building effect guitar pedals as hobby.I've already have fabbed a prototype of the board and tested and it's working, though it's being criticized (in other forum).So after some re-search, tutorial and whatever, I've re-designed the board with all tips&tricks I could digest...If this is the correct place to ask.. is it possible you could have a look to the board and check it's layed out correctly, I mean sticking to the PCB's rules ?It's a mix of digital (Arduino, port expander, shift register, LCD ecc) and audio (it's a loopers switcher for guitar), so I've triedto lay it down separating digital and audio signal and ground, did 2 ground pours, one for power and one for auditio thatwill be eventually connected in one point of the board.How should I, in case, post the board here(couldn't find any "How to post" thread)?Suppose you need the top and bottom layers separated and also the 2 grd pours, and what else ? what format?Thanks for reading guys and thanks in advance for help.Armando

author: TiN
author_rank: Super Contributor
timestamp: March 23, 2017, 12:40:55 pm
content: Well, you can start with screenshots, as big as you possible can make, save in PNG and post in here, one per layer.That would get you going.

author: arma61
author_rank: Contributor
timestamp: March 23, 2017, 12:48:37 pm
content: Thanks TiNwill post everything tonight (at work at the moment).Again thanks

author: arma61
author_rank: Contributor
timestamp: March 23, 2017, 09:44:19 pm
content: Hihere are some picturesWhat I've done since now :Power on the righthand bottom cornerCoupling cap close to IC (c6 need to be down at the UNL)digital stuff on bottom/centeraudio stuff on topone ground pour covering power and digital part bottom/centerone ground pour covering audio part topgnd pours will be connected top/rightDRC passedNet Connectivity passedThanks for help in advanceTop w/o poursTop with poursBottom

author: mariush
author_rank: Super Contributor
timestamp: March 24, 2017, 01:04:35 am
content: strictly layout related* in general, the board would look cooler if you use only 45 degree bends, you have some 90 degree bends* maybe try moving the traces under the relays further away from the pads, there's plenty of room ( see REL_1 trace from top center pin to third pin from left)* should't you be more consistent with those traces under the relays instead of placing some on top layer and some on bottom ( ex you have that Y shape of traces between REL_1 - REL_2 and REL_4 - REL_5 and then you do the same with REL_2 - REL_3 on the bottom ?)* what's with the R22 .. r26 text on the bottom that's not visible on top .. weird* consider align to grid or something like tht, to move those LOOP_x headers a tiny bit so that traces would be straight (from headers to relays)* any reason for the \/\/\/\ with the trace on the bottom . you could keep that in a more straight line , stay above and under the relays and only dip down towards the pads and then back upJRLY1 header / connector* ... make the pads wider, doesn't seem any reason to be that thin.* move that trace going from header to first relay up a bit so that it wouldn't go under the other connector's housing (just visual stuff, nothing wrong with it)to the right* C4 could be moved a bit lower to keep the traces straight.* you could move c7 to the right of C8 or in better words flip them around . maybe rotate C7 so that square is above the IC pad it's supposed to go in , and rotate C8 so that the square pad is above its IC pad.* what's the point of C6 there ... move it to the left of c4 , seems like plenty of room there, and you won't have a need to do vias this way* you could probably also move R2 below VO1 so that you won't have a copper pour break between vo1 and r2 (the thermal relief shapes are messed up in your picture) and the trace cuts that ground pour on the bottom (if there's any pour) pointlessly, when you could place the resistor below the IC (or shift the MainOUT pad up since you won't have the trace there if you move C6 , and then put the R2 resistor to the left of VO1)I'd move TRIM1 up a bit, and move C9 under it, and now there's room to move the 595 IC to the right and have all those traces more or less straight. the 90 degree bend on the trace from TRIM1 looks uglythat long trace from m1 to r2 is kinda ugly but if it must be...again, maybe you can make the pads of that IC slightly wider, they seem to be unnecessarily thinto the right again .. any reason why the trace is thinner between R17 and R18 ?If C5 is some decoupling capacitor for the MCP23017 IC, it really should be placed as close as possible to that pin, not all the way up there. move that voltage trace or whatever it is through the bottom of the chip but place the decoupling cap near the pin, not at the top.* maybe remove the fill between the pins of jledpset, it looks pointless* no reason not to use thicker traces between jledpset and mcp IC and maybe get rid of those orphan fills in the middle of the header* same with the traces from mcp IC to the ULN IC on the right and then to the JRLY header there. it's small distance so it's not a current issue, but there's also no reason not to make them thicker.* that copper pour between LR4 and LR3 is sketchy, i'd try to move the traces a bit and/or make them a bit thicker so that there won't be that orphan fill there.maybe rotate U1 so that the bottom pin is at the top and then you don't have to move that trace like you do now .. and you'd have the three pads in a straight line on the bottom layer instead of having that Y shapesomething weird with that trace going from the center pin directy into the copper fill ... shouldn't that pad have thermal relief then? worried you may have some mistake there.

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: March 24, 2017, 07:06:48 am
content: Seeing as the relay's are isolated, one of the things you could do is not ground the shield conductor (except maybe to a local shield surrounding the thing?). This would make it even harder for the digital noise to get into the analog section, since there is no actual connection between the two. To ensure that you don't have strange issues with stuff floating around, you can always use a very high resistor value to pull the two grounds down together without significant coupling of noise into the analog circuit.IE, Treat the high and low signals of the guitar (or whatever other source it is) as two signal lines, and not signal and ground. I think (but I'm not an audio guy so I could be totally wrong here) that it would e better.

author: arma61
author_rank: Contributor
timestamp: March 24, 2017, 12:11:47 pm
content: Thanks mariush!That's a great help!I will go through all of them and work it out on the weekend and re-post picture for a "final" check....just a couple of things* what's with the R22 .. r26 text on the bottom that's not visible on top .. weird *these are soldered on the bottom on the board, got to sqeeze it in 10cm width... is this a bad practice?* If C5 is some decoupling capacitor for the MCP23017 IC, it really should be placed as close as possible to that pin, not all the way up there. move that voltage trace or whatever it is through the bottom of the chip but place the decoupling cap near the pin, not at the top. *If above, about R22..R26, is good then I can move C5 on the bottom and get it close to the pinthat long trace from m1 to r2 is kinda ugly but if it must be...yes, as you say it muse be if I want to keep the audio part of the board separated from the digital oneAgain thanks!!CiaoArmando

author: arma61
author_rank: Contributor
timestamp: March 24, 2017, 12:16:40 pm
content: Thanks TheUnnamedNewbie! for replyindeed only the guitar signal is reaching and travelling throuh the relays, the grounds will be connected in the top right corner, AudioGnd (from the audio jacks) & PWRGnd, with a jumper.Being the above, could you pls clarify this* you can always use a very high resistor value to pull the two grounds down together without significant coupling of noise into the analog circuit*Again thanks!!CiaoArmando

author: b_force
author_rank: Super Contributor
timestamp: March 24, 2017, 02:07:01 pm
content: Having many years experience in pro-audio PCB design I can give a few tips.It's all about proper grounding!!!Be very aware where you connect both ground together and how the 'flow' of the analog ground goes.Unfortunately, guitar effects (and other guitar related stuff) is by definition a bit of a mess.(still don't understand why they don't use proper balanced inputs and outputs).So there is only so much you can do.Work with a start ground and enough buffering (capacitors)A second thing is proper decoupling and voltage isolation.Ideally two separate voltage sources, otherwise enough decoupling and buffering.Decoupling caps should always as close to the pins as possible.Try to use SMD when possible.The last thing is to get the gains right in all the stages to prevent extra noise etc.

author: arma61
author_rank: Contributor
timestamp: March 24, 2017, 02:26:23 pm
content: Thanks b_force for reply!indeed grounding is almost always an issue, though I've already build a prototype of this and looks it's working good, pwr and audio gnd separated, only connected at one pointhere' s a video of it in "action"https://youtu.be/TYqRM7xWSsQI'm just trying to get a good and reliable PCB... and why not learn how to layout PCB properly, though I've already designed pcb and build some guitar effects.Again thanksCiaoArmando

author: b_force
author_rank: Super Contributor
timestamp: March 24, 2017, 02:43:45 pm
content: I looks just like a switcher.I have to see the schematic, but I wonder why there is even a connection between the analog and digital ground?

author: arma61
author_rank: Contributor
timestamp: March 24, 2017, 02:56:52 pm
content: Yup just a looper switcher, effects are in the loops.Indeed the grounding is something I need to go deep.I mean, in this working prototype, if I power effect and the switcher with the same psu, they have the gounds connected anyway, isn't it?Though I have an optocoupler to send signal to gnd for muting (VO1), and it seems that if I do not connect the two gnds on the board, it doesn't shut 100% the signal, just 25/30 %, but If I connect them together on the board it mute the whole switcher let's say 90/95% (except for high gain pedals...)Schematic is something like this (this is the old version, but only connectors are added now, connection are more or less the same)thanks

author: Hideki
author_rank: Frequent Contributor
timestamp: March 24, 2017, 05:24:57 pm
content: Don't draw traces that break the ground plane into many small areas where some are hardly connected to ground at all (except by slivers snaking across the board) and some are actual islands with no connection to ground or anything else. You can probably move a lot of the traces to the other side of the board. Completely disconnected areas can likely be automatically removed by configuring some setting.On the schematic, don't use the (+) symbol for anything except the positive power supply. Right now it's being used in strange ways for anything from ground to digital signals.

author: b_force
author_rank: Super Contributor
timestamp: March 24, 2017, 09:26:15 pm
content: Well, the weird quirks with guitar signals (where I was complaining about not being differential/balanced), also is in your advance.Because it means that you only have to switch the signal cable and NOT the ground.I don't find the schematic really clear to be honest.For what I understand is that you just switch signals (relays) to combine to a certain preset?So you have 6 effect pedals, which you would like to combine with each-other or just simply bypass etc.In that case these is NO interaction between the digital part and analog part.The only part is the buffer at the end (U2), which should be connected to the analog ground.Make the analog ground as short as possible and take the outgoing ground (to the amp) as your 'star ground'.Although most pedals already have some kind of buffering, so you can also keep it out maybe.In this case it's easy to isolate the analog power voltage (9V) from the digital voltage, because you're using a regulator anyway.Btw, I would do a mute with a relay, not with a transistor (or optocoupler)

author: arma61
author_rank: Contributor
timestamp: March 25, 2017, 01:30:44 pm
content: Thank b_forceindeed you got it about creating and switching presets.About the buffer, thx will change it to audio gnd and see.ThanksArmando

author: b_force
author_rank: Super Contributor
timestamp: March 25, 2017, 03:11:11 pm
content: Actually, why using relays?I would rather use an hard switch (foot switch).Makes the whole design a lot easier and cheaper.Simply use a DPDT footswitch so you can still use your little screen (with information)

author: arma61
author_rank: Contributor
timestamp: March 25, 2017, 03:41:43 pm
content: Because with hard switch you need to stomp on 3 switches to get 3 effects on, with this setup you can memorize in the EEPROM which effect have to be in the loop, and just pressing one switch you got the 3 or less or more effects activated. Again with hard switch if you need to change from those 3 effect to other 2 you have to stomp on 5 switched, 3 to off and 2 to on, with this setup you just change preset with one stomp on the correct switch and you got 3 off and 2 on with just one stomp.

author: arma61
author_rank: Contributor
timestamp: March 25, 2017, 04:01:54 pm
content: So.... this is where I'm so far, again thx for all suggestions.Did change somenithg, like dec. cap are now ceramic, so smaller can be fitted almost everywere.Made a top ground plane for power ground and a bottom ground plane only in the audio areaChanged ground on the buffer to audio ground as suggestedStill need to change the thikness of some pinsStill looking for the correct place for mounting hole.Hereunder a picture with top and bottom together,marked in red 2 thingsthat "I don't like"... ant suggestion ?Thanks!!Bottom with ground planeTop with ground plane

author: b_force
author_rank: Super Contributor
timestamp: March 25, 2017, 05:48:24 pm
content: Quote from: arma61 on March 25, 2017, 03:41:43 pmOh, yes, sorry. That makes senseI don't know which type of pedals you're gonna us?. But instead of a buffer, you can already replace it very easily with a booster/tube screamer like pedal.A dual opamp has pretty much the same package size as a single one. These booster/distortion/tube screamer pedals are just an handful of passive components around it.The question is how far you're wanna go (you're making a PCB anyway).Little tip is to use something like a 100-220ohm resistor in series with the output. Just to make sure you don't overload the opamp (capacitance).It's also a little nicer to use a little capacitor at the split-rail voltage.The red marks are technically not really wrong. It just doesn't look very pretty, but it's not going to be a major problem.I can look at the rest another time maybe.I personally wouldn't use a massive groundplane for the analog ground. More change of picking up noise etc.Btw, you can buy these types of pedals very cheap.In fact, sometimes it's even cheaper to buy such a pedal. Strip the inside, use the parts you wanna use in your own idea.In the end you will save monay and have a better looking pedal.

author: Kalvin
author_rank: Super Contributor
timestamp: March 25, 2017, 06:03:58 pm
content: Bias resistor R1 at the input of op amp U2 will couple the noise from the power supply to the input of the op amp. That might be a problem unless you are designing a noise source.

author: arma61
author_rank: Contributor
timestamp: March 25, 2017, 06:35:06 pm
content: Thanks Kalvin , isn't C8 filtering out the noise from power supply ?

author: Kalvin
author_rank: Super Contributor
timestamp: March 25, 2017, 07:12:46 pm
content: Possibly. I would split the R1 into two resistors so that there would be 100 ohm ... 1 Kohm connected to 9V and the rest connected to the op amp input. In the junction place a bypass capacitor. In this way you can reduce the noise from the power supply rail significantly.

author: b_force
author_rank: Super Contributor
timestamp: March 25, 2017, 08:15:16 pm
content: Quote from: Kalvin on March 25, 2017, 06:03:58 pmWith enough filtering, that's doesn't have to be an issue.It looks like this thing going to run from a battery anyway?If not, go for a symmetric power supply!!!Here is also exactly the big trade of. 2kOhm constant load is pissing away already 4.5mA constantly!Say good bye to your operation time! (energy capacity of most 9V batteries is also pretty poor).

author: Neganur
author_rank: Unknown
timestamp: March 25, 2017, 11:17:16 pm
content: What's the size (in Farad) of your C8 btw? I'd whack a 100nF in parallel with still. Mind that the value of C8 will depend on the voltage rating.Also it's a good idea to have the supply trace go through the cap before it goes to the IC's VCC pin (as a general rule of thumb).