Author Topic: PCB desgin - Mix digital and audio on the same board - help seeking  (Read 5285 times)

0 Members and 1 Guest are viewing this topic.

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Hi guys

Armando 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 tried
to lay it down separating digital and audio signal and ground, did 2 ground pours, one for power and one for auditio that
will 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
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #1 on: March 23, 2017, 12:40:55 pm »
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.
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #2 on: March 23, 2017, 12:48:37 pm »
Thanks TiN

will post everything tonight (at work at the moment).

Again thanks
 

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #3 on: March 23, 2017, 09:44:19 pm »
Hi


here are some pictures


What I've done since now :

Power on the righthand bottom corner

Coupling cap close to IC (c6 need to be down at the UNL)

digital stuff on bottom/center

audio stuff on top

one ground pour covering power and digital part bottom/center

one ground pour covering audio part top

gnd pours will be connected top/right

DRC passed

Net Connectivity passed


Thanks for help in advance


Top w/o pours




Top with pours




Bottom





" class="bbc_img
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5029
  • Country: ro
  • .
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #4 on: March 24, 2017, 01:04:35 am »
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 up
 
JRLY1 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 ugly

that 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 thin

to 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 shape
something 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. 


 
« Last Edit: March 24, 2017, 01:07:15 am by mariush »
 
The following users thanked this post: arma61

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: 00
  • mmwave RFIC/antenna designer
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #5 on: March 24, 2017, 07:06:48 am »
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.
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #6 on: March 24, 2017, 12:11:47 pm »
Thanks mariush!  8) 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 pin

that 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 one


Again thanks!!
Ciao
Armando
 

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #7 on: March 24, 2017, 12:16:40 pm »
Thanks TheUnnamedNewbie! for reply

indeed 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!!
Ciao
Armando
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #8 on: March 24, 2017, 02:07:01 pm »
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.
 
The following users thanked this post: arma61

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #9 on: March 24, 2017, 02:26:23 pm »
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 point

here' s a video of it in "action"  :)

https://youtu.be/TYqRM7xWSsQ

I'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 thanks
Ciao
Armando
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #10 on: March 24, 2017, 02:43:45 pm »
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?

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #11 on: March 24, 2017, 02:56:52 pm »
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
 

Offline Hideki

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: no
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #12 on: March 24, 2017, 05:24:57 pm »
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.
 
The following users thanked this post: arma61

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #13 on: March 24, 2017, 09:26:15 pm »
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)
 
The following users thanked this post: arma61

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #14 on: March 25, 2017, 01:30:44 pm »
Thank b_force

indeed you got it about creating and switching presets.

About the buffer, thx will change it to audio gnd and see.

Thanks
Armando
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #15 on: March 25, 2017, 03:11:11 pm »
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)

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #16 on: March 25, 2017, 03:41:43 pm »
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.

 

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #17 on: March 25, 2017, 04:01:54 pm »
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 area
Changed ground on the buffer to audio ground as suggested
Still need to change the thikness of some pins
Still looking for the correct place for mounting hole.

Hereunder a picture with top and bottom together, marked in red 2 things that "I don't like"... ant suggestion ?

Thanks!!




Bottom with ground plane


Top with ground plane


 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #18 on: March 25, 2017, 05:48:24 pm »
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.
Oh, yes, sorry. That makes sense :)

I 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.
« Last Edit: March 25, 2017, 05:52:20 pm by b_force »
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #19 on: March 25, 2017, 06:03:58 pm »
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.
 

Offline arma61Topic starter

  • Contributor
  • Posts: 11
  • Country: it
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #20 on: March 25, 2017, 06:35:06 pm »
Thanks Kalvin , isn't C8 filtering out the noise from power supply ?
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #21 on: March 25, 2017, 07:12:46 pm »
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.
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #22 on: March 25, 2017, 08:15:16 pm »
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.
With 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).

Offline Neganur

  • Supporter
  • ****
  • Posts: 1138
  • Country: fi
Re: PCB desgin - Mix digital and audio on the same board - help seeking
« Reply #23 on: March 25, 2017, 11:17:16 pm »
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).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf