Does anyone here know anything about PCB design?

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
I've been having a ah heck of a time with my first "serious" PCB design, a simple headphone amplifier based of of the LME49740 quad op-amp and LME49600 buffer (bascially a BUF634 clone.) It's a direct copy of the headphone amplifier in the LME49600 reference sheet:

http://www.national.com/an/AN/AN-1768.pdf

I think I've done an okay job with layout, but I'm stumped when it comes to routing the copper traces. Does anyone here have any advice? I'm trying to keep the board size down to 2" x 2" for reasons of cost.

 

PottedMeat

Lifer
Apr 17, 2002
12,363
475
126
Skimming your design, I see you've replaced some SMT devices with thru-hole and eliminated the big battery spaces.

What's wrong with just copying the layout given in the reference sheet? Follow and make connections for the bottom and top layers, interconnecting the two with vias when needed. Keep the power traces thick and away from the signal lines when possible - pretty much what they've done with the demo board.

If that's eagleCAD I've never satisfactorily used the autorouter - it always gives me some stupid spaghetti looking crap, I've probably got to screw around with the settings some more though.
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
Not sure what program you are using to do the layout, I use Ares. My normal process is layout the parts then let the autorouter layout the traces. Then I go back and adjust them however I want them .

Is the board one or two layers ? If that line on the left is the board edge then the capacitor C6 is too close to the edge . You need more space between holes and the board edge.

On a mailing list I use people are recommending kicad as a free alternative to other software out there. It might be worth checking out:
http://kicad.sourceforge.net/wiki/index.php/Main_Page
 
Last edited:

boardsportsrule

Senior member
Jun 19, 2003
431
0
0
looks like Eagle to me; thus use the auto trace to get started, then go back and manually fix it a bit. as mentioned power lines>signal; keep them distanced;use top and bottom layers. shouldnt be too bad.

C6 does look a bit close.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
Not sure what program you are using to do the layout, I use Ares. My normal process is layout the parts then let the autorouter layout the traces. Then I go back and adjust them however I want them .

Is the board one or two layers ? If that line on the left is the board edge then the capacitor C6 is too close to the edge . You need more space between holes and the board edge.

Two layers.
I'm using EaglePCB - the autorouter does seem to be a bit useless, so I'll probably end up doing this manually. My main issue is one of grounding - I'm not sure whether to try a star ground, a ground plane, or something else. This is an analog circuit with very low noise tolerances, so keeping the hum down is a big deal.

Any suggestions?
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Skimming your design, I see you've replaced some SMT devices with thru-hole and eliminated the big battery spaces.

What's wrong with just copying the layout given in the reference sheet? Follow and make connections for the bottom and top layers, interconnecting the two with vias when needed. Keep the power traces thick and away from the signal lines when possible - pretty much what they've done with the demo board.

If that's eagleCAD I've never satisfactorily used the autorouter - it always gives me some stupid spaghetti looking crap, I've probably got to screw around with the settings some more though.

Through hole parts actually make routing easier as you can route underneath them. And you're right, the autorouter is not good to use except for bus traces.

I recommend you do the power and signal traces by hand for sure and probably the rest of the traces as well. Use copper pours for the ground trace (then select and give the pour the name of your ground net).

If you'd like to send me the file I'd take a crack at it. I've layed out some pretty hefty boards using Eagle - one example, a 100W amp board: http://i4.photobucket.com/albums/y125/bob_smith1492/Home Stereo Amp/Board-bottomside-nofill.png
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
If you'd like to send me the file I'd take a crack at it. I've layed out some pretty hefty boards using Eagle - one example, a 100W amp board: http://i4.photobucket.com/albums/y125/bob_smith1492/Home Stereo Amp/Board-bottomside-nofill.png

That there is a pretty nice piece of PCB design. :)

Here's the schematic in EAGLE format if you'd like to take a crack at it. All of the components except the ICs (which I got as freebie student samples) are available from Mouser, and I'm pretty sure you could get everything from Digikey (which stocks more items, but charges more for them.)

http://rapidshare.com/files/324122697/Attempt2.sch.html

Please note that the LME49600s (essentially BUF634s) are left near the edge of the PCB for a reason. They were originally designed for the terminals to be soldered flat against the PCB SMD-style, and for the metal bit on the back to be soldered to a very large pad. However, in order to fit the whole mess on a 2" x 2" PCB, I've elected to just solder them upright and attach a heatsink.
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Hi Cheesehead,

Couple of questions and comments for you:

1. Are you going to get silkscreen on the board (and where will you get it from?) I have a recommendation, particularly if you are a student of some sort.
2. Will this be a two-sided board? (Please?? It makes things work out much nicer!)
3. I took the liberty of adding some ESD protection diodes on the input and output. I also added a 10K resistor to ground on each input (it's in the schematic as a variable volume control but the input should have some impedance if you don't want it variable).
4. One more, would you mind using a few surface mount parts? These through-holers are pretty big particularly if you want to keep the board small. I'd just do a few resistors and capacitors... they are very cheap at Digi Key, like under 10 cents apiece.
 
Last edited:

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
1. I was planning on having the PCBs made up by Seed Studio's Fusion PCB service, which gives you ten 5cm x 5cm PCBs of one design for $30. This price is for a 2-layer board, complete with silkscreening and whatnot. The thought of shoving this thing on to a 2" x 2" single-layer board makes my head hurt.
http://www.seeedstudio.com/depot/fusion-pcb-2-layer-5cm5cm-max-p-513.html?cPath=64_12

2. The amp is designed for use with a panel-mount volume control - you don't need the input resistors. I severely doubt the output diodes are necessary, either - people have been using BUF634s in headphone amps for ages without them, and I've never heard of there being a problem.

3. Through-hole is used for ease of soldering. However, if you want to use some really large SMD packages, go ahead.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
A note:
The capacitors I was hoping to use for the audio bypass are size C7.5B6 (10mm x 6mm), not C7.5B5. My mistake.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
A note:
The capacitors I was hoping to use for the audio bypass are size C7.5B6 (10mm x 6mm), not C7.5B5. My mistake.
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Hi Cheesehead,

Here's a routed board with the schematic changes I mentioned:
(new link below)

I like that rapidshare site, by the way - looks pretty convenient.

There are 3 types of surface mount parts that I added: 0.1uF ceramic, 1uF ceramic, and a dual ESD protection diode. You don't have to use the ESD part if you don't want but I'd recommend it to help give the board longevity. The capacitors are 0805 which should be easy enough to solder; I can give you some tips if you'd like.

Anyway, take a look at the gerbers; I didn't check them but you can use a Gerber viewer (try GCPrevue: http://www.graphicode.com/).

ED.: Here's the board (updated):
LME49740layout2.png
 
Last edited:

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
Nice job! If you wouldn't mind explaining the "hows" and "whys" of your design, I'd appreciate it - I'm learning, but very, very slowly.

Now, to order some parts and figure out how to get EAGLE to produce the gerbers so that Seed Studio will take them...
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Here are some basic principles I use for layout.

1. Lay parts out so they follow the schematic - first make sure the schematic is neat and orderly. Lay it out so the signal flow is left to right.
2. For amplifiers, keep the input away from the output to prevent feedback. Also keep the input away from the power leads.
3. Use ground planes and make sure they are contiguous.
4. Route power first; use thick traces, and place decoupling caps so the pad is in the middle of the power trace (power->cap->component). Place decoupling caps as close as possible to the intended IC.
5. Bring separate traces from the bulk filter capacitors to each IC (don't daisy chain, particularly with high-power components).
6. Don't run traces in parallel to prevent noise coupling; try to cross them at right angles.
7. Place connectors toward the outside of the board for easy access.
8. Label components with silkscreen: keep the labels off of vias and pads or they won't show up.
9. Keep traces short - no winding, wandering traces particularly for high-speed or noise-sensitive lines.

Here's a good website with tips (from one of my profs back in school):
http://claymore.engineer.gvsu.edu/egr326/Eagle

Particularly, use the silkchange script to fix up all the component text so it prints properly. Then, use the "fullmonty" cam processor setup. I usually add component values to the top and bottom silkscreen provided there is space on the board.

I noticed the silkscreen on the bottom-right of the top (red) layer got messed up. Here's a link to the reprocessed file (gerbers are included):
http://rapidshare.com/files/328576261/LME49740_project_rev1_1.zip.html
 
Last edited:

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
After a lot of work, I've managed to swap all the SMD ceramic caps for polypropylene film caps of the appropriate value. (Apparently, they have rather nasty noise issues and aren't recommended for audio use. Oh, well.)

However, for some inexplicable reason, the TO220-5 package isn't showing up the same way on the board as it is in the library, and the pads are so close together that they trip the DRC. Any tips?
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
After a lot of work, I've managed to swap all the SMD ceramic caps for polypropylene film caps of the appropriate value. (Apparently, they have rather nasty noise issues and aren't recommended for audio use. Oh, well.)

However, for some inexplicable reason, the TO220-5 package isn't showing up the same way on the board as it is in the library, and the pads are so close together that they trip the DRC. Any tips?

EDIT:

Here's a picture:
http://img503.imageshack.us/i/screenshot9.png/

You can download the files here:
RapidShare: 1-CLICK Web hosting - Easy Filehosting
 
Last edited:

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
The only time you'd have a potential noise problem with ceramics in an audio circuit is if they are used a an AC coupling component, that is, the signal is going through the capacitor. Even then, they are quite linear as long as you stay within the center 50% of the voltage range of the part; so if you have +/-12V rails and you use a 50V ceramic you'll be fine.

For bypass capacitors, ceramics are perfect and are not in a position to affect audio quality - for example, components C9, C10, and C12. The key for bypass capacitors is to have extremely low ESR and be small enough to locate directly next to the bypassed component.

C8 and C7 are the only components that might be worth looking into, but even there, with 50V ceramics, you'd never know the difference. I'm trying to find a study I read comparing the linearity of different capacitor types but haven't been able to yet... ED.: here's a good read regarding audio capacitor myths: http://sound.westhost.com/articles/capacitors.htm

I've had that problem before with the TO220 package spacing. It should turn out fine, though. If a space in the copper is too thin for the manufacturing process, what happens is the gap simply gets bigger than what you specified. You should still have isolation between the pins.
 
Last edited:

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
First - apologies for ham-fistedly ruining a rather nice piece of printed circuit board design. I don't want to appear ungrateful for the help, and just wanted to say "thank you".

The only time you'd have a potential noise problem with ceramics in an audio circuit is if they are used a an AC coupling component, that is, the signal is going through the capacitor. Even then, they are quite linear as long as you stay within the center 50% of the voltage range of the part; so if you have +/-12V rails and you use a 50V ceramic you'll be fine.

I suppose you're probably right. That said, the 0805 components you have suggested are very small and hard for inexperienced hobbyists like myself to solder. Aside from any theoretical (and admittedly dubious) sonic improvements, film caps are much easier to use. This PCB was intended as a first project for audio enthusiasts getting into DIY, and through-hole components only add a few dollars to the cost. That said, if you can suggest any very large SMD packages, I'd be open to using them.

In any case, I might go and swap the 1uF ceramics for film caps - the additional expenditure is very small,. is there any reason not to use great big SMD caps in place of the 4.7uF film caps remaining?

I've had that problem before with the TO220 package spacing. It should turn out fine, though. If a space in the copper is too thin for the manufacturing process, what happens is the gap simply gets bigger than what you specified. You should still have isolation between the pins.

The problem is that when using the supplied DRC file provided by the PCB manufacturer, it's labelled as invalid. I'd try swapping it for a stepped-pin package, but the way the pins are attached on my buffers means that I can't really bend them into a stepped configuration. Should I try sending it to them as-is?
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
You could definitely move up to a 1206-size package; they are huge. Honestly though I doubt you'd have a problem soldering 0805s. All you need is a pair of tweezers.

You should be fine either way, it looks like you laid out the film caps well.

I recommend you route the traces at 90- and 45- degree angles; it looks better that way.
 

uclabachelor

Senior member
Nov 9, 2009
448
0
71
Ceramic caps also have higher voltage and temperature coefficients than other types of caps... something to keep in mind if you are using a filter in your audio path and are running a hot signal through that network.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
I think I've finished the PCB revisions following bobsmith's recommendations. The whole thing is a bit messy, but I have managed to keep the trace lengths fairly short and generally avoid parallel traces. I might try swapping the SMD zeners for through-hole zeners for even easier construction - I'm really not very good at SMD.

http://rapidshare.com/files/330457596/Amp_Stuff.zip.html


screenshotbj.png

screenshotad.png
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Looks like you're missing the power traces to the top buffer amp; also, some of the components seem to be overlapping (unless, did you place some through-hole parts on the bottom of the board??) Type "Rat," hit enter, and look at the status bar on the bottom of the screen. It should say there are no airwires; otherwise you haven't routed all the traces.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
Looks like you're missing the power traces to the top buffer amp; also, some of the components seem to be overlapping (unless, did you place some through-hole parts on the bottom of the board??) Type "Rat," hit enter, and look at the status bar on the bottom of the screen. It should say there are no airwires; otherwise you haven't routed all the traces.

Thanks for pointing that out - fixed both issues.

I'm still a little stumped on how to get the TO220-G5 package to show up properly. Any thoughts?
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
I'm not sure either, I played with it a bit but didn't find anything. You could make the holes a bit smaller.