You are on page 1of 25

Lecture9Eagle:PCBLayout

TolearnhowtouseEagle,wearegoingtocreateasimplebreakoutboardforapopularUSB
IC.TheFT232RLisaUSBtoTTLserialconverter.Thissectioncoversthephysicallayoutof
thePCB.
We'vegottheschematiccapturedandtheconnectionsshouldbemadecorrectly.Thenext
step is to arrange various components on a board and then send the board files out to a
manufacturer(alsocalledafabricationor'fab'house).
Layout is an art and engineers make bad artists. It's all about the small polishing text
labels, stand off holes, correct footprints. Just keep turning out PCBs and you'll see your
layoutsimprovedramaticallywithpractice.
Beforeyoudoanything,turnonvectorfonts!Ifyoudon't,yoursilkscreentextwillbeoffon
everyPCByoucreate:

FromtheEaglecontrolpanel,clickOptions>UserInterface


Select'Alwaysvectorfont'.

AboveisabreakdownofallthedifferentbuttonsintheLayoutwindow.Youcanviewthe
nameofeachbuttonbyhoveringoverthebuttonwithyourmouse.Manyoftheshortcuts
fromtheSchematicwindowstillapply:

PressescapeatanytimetostopthecurrentactionandreturntotheLayoutwindow
F7tomoveapart
Alt+F7togroupabunchtogether
F3todeleteapart
F4torenameapart(changeC7toC2)
F5torevalueapart(change0.1uFto10uF,etc)
F6tosmashapart(beabletomovethenameandvaluetags)
F9tostartroutingawire
Alt+F9toripupawire

Ifyougetthiserrorwhilemovingbitsaround:

Thisjustmeansthatyouaretryingtoputacomponentoutsideoftheallowedarea.With
the Light edition of Eagle, you can only place components in quadrant I (upper right
quadrant),whereasthecomponentsshowupbydefaultinquadrantII(upperleftquadrant).
JustmovethepartstoapositiveXandYcoordinateandyoushouldbeok.
Startingwithourcurrentlayout:

Thefirstthingtodoiscorrecttheboardoutline.Idon'tknowwhyEagleslightlyoffsetsthe
defaultborder.
Makesureyou'reona0.1"gridbypressingF10.ThenhitF7andholdcontrolwhileclicking
near the origin. This will grab the frame corner and force it onto the 0.1" grid. Make the
bottomleftcornersitat(0,0):

Dothisfortheotherthreecornersbringingthemintomakea1.5x1.0"squareboardsize.

Nowgototownbringingthecomponentsintotheboardarea.Keepinmindthegoldcolor
unrouted 'air' wires. The less twisted you make these by creatively arranging your
components,theeasierthetraceroutingwillbe.

Remember:

PressF7tomoveacomponent
Rightclicktorotate
Holdcontroltograbacomponentatitsorigin
Scrollwheeltozoomin/out

HittheRatsnestbuttonfromtimetotimetorecalculatetheairwires.

Herearethecomponentsarrangedinabasicconfiguration.AnotherbeefIhavewithEagle
is the default colors for the various layers make it impossible to see what is going to be
printedonthesilkscreenlayer.Let'schangethe'tPlace'layertopurewhiteandchangethe
'tDocu'layertolemonyellow.
Clickonthe'Display'button,scrolldowntolayer51anddoubleclickonthegrayboxnextto
'tDocu':

Thenclickonthegray'Color'boxandchangeittosomethinginterestinglikelemonyellow,
then click ok. Anything you do on this layer will now be yellow. Do the same for layer 21
'tPlace'.


Nowthisisstartingtomakesense!Anythinginyellowisjusttheretoindicatephysicalsize.
TheyellowpartoftheUSBconnectorisonlytheretoindicatethattheconnectorsticksover
theedgethatfar.OnlythewhitepartoftheUSBconnectorfootprintwillactuallyshowup
onthesilkscreenprintonour PCB.Anythinginlightgray(tNamesandtValueslayers)will
not print on the silkscreen layer. They're just there for your own reference. We can of
coursechangehowthevariouslayersareprocessed(andincludethevalueandnamelayers
onthesilkscreen)butthiscancausealotofsqueezingandhassle.It'suptoyouandyour
designbutwewillleavethepartindicatorsandvaluesoutofthislayout.
Thenextthingweneedtodo,forallPCBlayouts,istoaddstandoffholes.Theseholeswill
allowyoutoinsertasimplescrewandholdastandoffinplace.Withoutstandoffs,PCBswill
sit uneven against a flat surface (because of the bumpy solder joints protruding on the
bottomoftheboard).HavingaPCBsitflatagainstasurfaceisalsoabadideaelectrically
I'vesent$200upinsmokebecausesomebitsofclippedwireshortedagainstthebottomof
myboardwhenIwastroubleshootingit.
I like to use 440 screws and 0.25" diameter plastic standoffs on everything. These 440
screwsneeda0.13"diameterholeandthestandoffshavea0.25"outsidediameterthatwe
willneedtotakeintoaccount.Ifyouhavenotalreadydoneso,addfourofthe'StandOff'
componentstotheschematic(andthereforePCB).Thiscomponentwascreatedtocouple
the0.13"drillwithakeepoutring.Thiskeepoutringhelpsshowwerethescrewheadwill
fall.Ifyoufailtotakethiskeepoutlayerintoaccount,thescrewwillgothroughthehole,
butthescrewheadmayrunintoorshortcomponents.
Throwfourstandoffholesaroundthecornersofyourboard.


Ahah! Now I see why I made that keepout circle. You can see where the standoffs would
haverunintotheUSBconnector.Lookslikewe'vegotsomebumpingtodo...

Byusingthegroup(Alt+F7)andthemove(F7)commands,Iincreasedtheborderto1.5x1.2"
whichisabitbiggerthanIwouldlike,butforthepurposesofthistutorial,we'renotgoing
tostresstightpackingofcomponentsratherwewanttostressthebasicsforagoodPCB.
NoticehowIflippedanddroppedC3andC4downabit?Timetoaddlabels!
A 'C2' label is handy when you're populating a board or when you're troubleshooting a
complexcircuit,butonadaytodaybasis,youprobablywon'tneedtoknowwhereC2is.On

theotherhand,theTXandRXpinswillprobablybeusedeverytimeyouusetheboard!You
reallyshouldlabelanythingthatwillbeconnectedtotheoutsideworld.Toaddatextlabel
toapin,clickonthe'Text'button:

Awindowwillpopupaskingyouwhattextyouwouldliketoadd.Type'TX'andpressenter.
Youwillnoticethatthetextmaybeappearingonanoddlayer.Besurethatyouaddtexton
thetPlacelayer.

DropdownthelayermenuandselecttPlacefortopsilkscreentext
Onceyou'veplaced'TX',pressescape.Eaglewillnowshowthetextwindowagain.Enter'RX'
andpressenter.RepeatforRX,VCC,andGND.Whendone,pressescapetwicetoreturnto
thelayoutwindow.

InthiscasewehaveVCC/GND/TX/RXtolabel:

Makesureyouaddyourlabelstothe'tPlace'layer!

Tocheckwhichpinisconnectedtowhichnet,hittheeyebuttonandclickonapin.


CheckoutthetextatthebottomoftheEaglewindowpin1isVCC.Dothisforallthepins
andarrangethelabelsaccordingly.Youshouldalsotakethefontsizedownto0.05:

Tochangethefontsize,clickontheWrench('Change'button),select'Size',then0.05.Now
clickoneachtextthatyouwanttochangethesizeon.

Labelsinplaceandlinedup
Trytogetallthelabelswiththesameverticalandhorizontalalignment.Thisisanitpicky
aestheticthing,butitshowsonthefinalboard.
Youwillhavemanyboardrevisions.It'salwaysgoodtoaddadatecodetotheboardsothat
youcanmatchyourfilestotheboardversioninhand.Addtexttothebottomcopperlayer
toaninconspicuousspot.Theeasiestwaytodothisistoaddtexttothetopcopperlayer
then hit the mirror button (you can also hit the scroll wheel on the mouse to move the
component to a different layer). This will automatically mirror the text and drop it to the
bottomlayer.


6307 mirrored, on the bottom copper layer, and underneath the USB connector. There
shouldn'tbeanysignaltracesinthispartoftheboardsowe'renotwastingspace.Youcould
addtexttothebottomsilkscreenlayerbutsomefabhousesdon'tallowbottomsilkscreen
(itaddsanextraprintingstep).
Also add some text to the top silkscreen layer indicating what the board is, what it does,
whomadeit,etc.


Aboveisthecompletedboardreadyfortracerouting.
Manypeopleswearupanddownthatanautorouterisabadidea.Itmaybe,butifwe're
notconcernedabouttraceimpedanceorhighspeedsignals,anautorouterisagreatwayto
whipupprotos.Spendyourtimeinnovating,notroutingmundanetraces.

Toautoroutetheboard,clickonthe'Auto'button.Thedefaultsareallfineexceptforthe
50milgrid:


ChangetheRoutingGridto8(ourfabhouseuses8miltracesandspaces).

Demoboardautorouted.Eaglefiles/PDF
It'snotimmaculate,butitwillworkjustfineandtheroutertookunder2secondstoroute.It
wouldprobablytakeme510minutesbyhand.Iwillhandroutesensitivepartsofcertain
boards,butthisisaverysimpleproto.
Thingstocheckoneverylayout:

Datecode
Silkscreentitleandpinlabels
Standoffholes
Allconnectionsrouted
TXandRXroutedcorrectly
Printoff1:1andcheckfootprints

Routing TX and RX correctly? What does this mean? I can't tell you how many times I've
heardnewbiessay'wellmyPCBwouldhaveworked,butthemanufacturerswappedtheTX
and RX pins'. No, the manufacturer did not swap them, the newbie neglected to actually
read the datasheet (RTFD!). Sometimes an RX pin is an input. Sometimes an RX pin is an
output. If you get it wrong, you'll look like a dunce. Read the datasheet and verify that
everythingiskosher.InthecaseofourFT232RLbreakout,theTXpinisanoutputandRXpin
isaninput(prettystandard).I'mgoingtochangethesilkscreenindicatorstoread'RXI'and
'TXO'.ThisshouldremoveanydoubtinmymindwhenI'musingtheboardayearfromnow
andsoIdon'thavetogodiggingupthedatasheet.
Thelastthingtocheckprintoff1:1meanstoprintonpaperand1to1scaleoftheboard
layout. Then place the components on top the paper to verify that everything fits their
associatedfootprint.
Anotherquicknoteaboutprintinglayoutsthiscanbeagreatwaytocreateanassembly
sheet.Whileyou'vegotthePCBeditoropen,pressAlt+F11.Thiswillturnoffallthelayers
thatarenotpertinenttoassembly.Printthis,Inormallyscaleitup3times,andhandwrite
inwhatpartsgowhere.QuickandeffectivewaytocreateacheatsheetforPCBpopulation.
Pressing F11 will bring back the normal layers but you may want to activate/deactivate a
fewothers.
Now that we've got the board laid out, standoff holes in place, date code in place, and
accuratepinlabels,it'stimetomashupthelayersandcreatesomegerberfiles.
What'sagerber?
There are lots of different layout packages out there (Protel, Orcad, Eagle, PCB, etc). One
way or another all thePCB fab houses out there need away to control theirmachines to
workwithyourlayoutfiles.TheuniversalformatissomethingcalledGerberFiles.Basically
thesearetxtfileswithcoordinatesthattellthePCBmachinestogotolocationX,Yanddo
something (drill, expose, etch, print, etc). Because there are different layers to your PCB,
youneedtocreatedifferenttextfilesforthedifferentlayers.ThisiswheretheEagleCAM
programcomesintoplay.


Onceyou'regoodandhappywithyourPCBlayout(thereisnoturningbackafteryousubmit
thefiles!),clickontheCAMbuttontobringuptheprocessor.Thiswindowwillallowyouto
do different things to different layers. Eagle comes with a couple default *.cam files. The
most common ones are the gerb274x.cam and excellon.cam. I got tired of running two
seperateprocessors.IamalsoaholdoverfromProtelandadifferentnamingconventionso
IcreatedmyownsinglefileCAMprocessor.Youcansnagithere.Thesfegerb274x.camis
basedonthedefaultEaglefilewithafewtweaks:

Layersarerenamedforeasierreadingtopcopper,bottomsilkscreen,etc.
Allthemirroringisturnedoffthiswillmakegerberinspectionmucheasier
Atoppastelayerwasaddedincaseyouwanttocreateasolderpastestencil
Excellondrillfileiscreatedalongwiththe6magiclayers
Drillfileis2:4Leading(rememberthis!)

What are these magical layers you ask of? Anytime you transmit a PCB layout to a gab
house,youneedtopassthem7files,and7filesonly:

TopCopper(GTL)
TopSoldermask(GTS)
TopSilkscreen(GTO)
BottomCopper(GBL)
BottomSoldermask(GBS)
BottomSilkscreen(GBO)
DrillFile(2:4leadingrememberthis)

WhatisthisGTL,GTS?ThesearethefileextensionsthattheCAMprocessorwillproduce.A
silkscreen is also calledan 'overlay'(hence, GTO). And for your reference, a soldermask is
alsocalledasolder'stoplayer'becausethesoldermaskpreventssolderfrombeingwhereit
isnotwanted.
Some fab houses will charge extra for a bottom silkscreen layer. You can just ignore this
layerifyouneedto.YouwillalsoseeaGTPfileextension.ThisistheGerberTopPastefile.
Youcanusethisfiletogetasolderpastestencilcutityouwant.OnewouldthinkthataGTP
filewouldbethesameastheGTS(topsoldermaskfile).Butno!


On the left, the soldermask layer. On the right, the top paste layer. The soldermask layer
exposesthepadsandthevias.Youwouldn'twantsolderpasteinvias!Sothepastelayer
onlyhastheSMDcomponentpadsexposed.
Tocreatetheselayers,clickonFile>Open>Job


Andselectthesfegerb274x.camfile.Thenclick'ProcessJob'.Somestatusbarswillblinkby,
andwithinafewseconds,youshouldhaveahandfulofextrafilesinyourprojectdirectory:

Themagic7gerberfiles
Something I highly recommend is to review the gerber files before submitting them for
fabrication.Viewingjustwhatisgoingtothefabhousecanexposedpotentialproblemsthat
wereshroudedbeforebyalltheextralayersandgraphicsintheEaglelayoutwindow.There
aresomefreeviewersouttherethatwillletyouviewthegerberlayerstogether.Mostof

thefreeviewersrequireyoutoenteranemail,require15secondsforthemtoadvertiseat
you,limitedtoonelayer,orotherreallyannoyinglimitations.Luckily,Viewplotstillexists.
Thisfreeprogramwillletyouopenandlookatyourlayerseasilyandyoudon'thavetofill
out any silly forms to get to the download link! Be sure to select the drill file type '2:4
Leading'tomatchuptheholestothelayers.

Simple
Butohwait,whatisthat?

Silkscreenontopofavia

Thissilkscreenbeingbrokenupbytheviaisnotabigdeal.Mostlythisisjusttoshowhow
difficult it can be to detect problems from within the layout program. By viewing what
you're actually submitting to the fab house, you can see exactly what they are going to
deliverbeitgoodorbad.Reviewyourgerberfilesbeforeyousubmit!You'llsaveyourself
timeandmonstrousamountsofmoney.Ifyouwanta$50coaster,I'llsellyouatruckfull.
Zip these 7 files together and shoot them off to the fab house of your choice (Shameless
Plug:weuseBatchPCB).Dependingonwhoyouuseandhowdeepyourpocketsare,you'll
havetositonyourhandsfor1dayupto20days.WhatdoIdo?Istartotherdesigns!While
thisboardisbeingfabbedin2weeks,Icreateandsubmitanewdesign7daysintoit.That
wayIalwayshaveanewPCBprotocomingineveryfewdays.It'slikeChristmaseveryweek!
WhatamIgettingthisweek?Isitgoingtowork?Ican'twaittotestoutmynewcattracker!
Withthemagicoftelevision,Icanjump20daysintothefutureandshowyou...

Intheflesh
Itlooksgreat!Timetowhipoutsomepartsandthesolderingiron.


Assembleyournewboard!
Solderingwasnottoobad.Silkscreenlooksgood.Standoffslookgood.Timefortesting!
Alwaysassumeaprotowillshortoutthefirsttimeyouuseit.Beverycautiousandbeready
tokillpowerimmediately.Pluggingthisboardontothecomputerguesswhathappens?

Uhoh
Whatwentwrong?Nothingisheatingup.Nothingsmokedorpopped.TheFT232ICdoesn't
seemtobeenumeratingontotheUSBbus.Butwhy?Let'schecktheschematiconemore
time...


FT232Breakoutv1.0Schematic
Sonofa...Thisiswhyweprototype!Mistakeslikethishappenstothebestofus.Whatisthe
problem you ask? Checkout the GND pin on the USB connector. It's not connected to
anything.Withoutagroundconnectiontotheboard,nocurrentcanflow,theFT232RLwill
neverenumerate.Theboardisshot!Orisit?

Thegreenwirefix
(I know the wire is not green, but this is the nickname for an oops! fix) This is my final
thoughtsonPCBlayoutanyonecanlayoutaPCB,butittakesatruemagiciantogetabad
PCBworking.Scratch,cut,splice,andotherwisemodifyyourPCBuntilyougetitworking.
Thisexamplewasaneasyfix.I'veseensomereallyimpressivefixesovertheyears.

FromtheSFEPCBHistoryMuseum
Don'timmediatelythrowupyourhandsandlayoutanewboard.Instead,makesureyouget
every bit of the functionality of your board working, by any means necessary, and then
makealltherevisions.Otherwise,you'llconstantlyspinyourwheelswithPCBrevisions.
Thingstoremember:

Besuretosaveyourschematicasanewfilename:*v11
Besuretoupdatethedatecodeontheboard
Besuretoupdatethesilkscreenontheboard


Updatedv1.1schematicwithGNDconnectionontheUSBconnector

Updatedv1.1boardlayoutwithnewGNDconnection,updatedsilkscreenanddatecode

You might also like