# Advice on laying out a PCB for a microcontroller

Small backstory: I'm bad at engineering, pretty new to it (only been a monthish). I have a few projects I'm working on with Arduino, I'm pretty good with breadboarding.

I want to make a couple permanent and since I have access to CNC machines, I figured why use perf board, I can just mill a PCB. I've milled them before, never really designed them. Wondering if this schematic would be correct?

The only warnings I receive are VCC & AVCC are connected to N$7 (not actually sure what this means, if someone can enlighten me), no errors though. I breadboarded it first, just wondering if I managed to turn it into a schematic correctly minus the really weird bends in my traces which I'll eventually fix. • I would advise you to look at what normal schematics look like (how many have diagonal lines!). While functionally it may not matter, it will make your life easier in the long run and it is good to learn proper practices. – Tom Carpenter Dec 17 '16 at 20:12 • Trust me, I know. This looks like crap, as I stated. My concern was with functionality. Aesthetics come second to functionality. Does it look functional to you? @TomCarpenter – Christopher Dec 17 '16 at 20:15 • Function and Aesthetics go hand in hand. If a board (or schematic) looks good, it will work well - the theory being that if you put in the extra time to make it look good, you will be more likely to spot any mistakes. For example, AREF should not be shorted to +5V unless you specifically ensure not to set the ADC to anything other than external reference in your code. You are also lacking any decoupling capacitors on AVCC/VCC/AREF. – Tom Carpenter Dec 17 '16 at 20:23 • p.s. I should add that I am not trying to be condescending. You say you are new to this, so I am offering free advice to help you improve. – Tom Carpenter Dec 17 '16 at 20:25 • @TomCarpenter makes a very good point! Please take this as a well-intended criticism, not condescending. For example, Eagle follows the (good) practice of placing a junktion "dot" wherever two lines are connected; where two lines just cross without being connected, there's no such dot. In a properly layed-out schematic (ie. only right angles, 45° being a rare exception), I could directly tell you that you forgot to connect VCC – there's no junction dot where VCC meets the supply net.In your schematic,I don't know whether you've connected it at C4 or not.This is the type of mistake you'd avoid. – Marcus Müller Dec 17 '16 at 20:49 ## 2 Answers First of all I would advise you to look at what normal schematics look like (how many have diagonal lines!). While functionally it may not matter, it will make your life easier in the long run and it is good to learn proper practices. Remember that the schematic is topological, it doesn't have to be arranged and routed like the PCB would. Secondly I would suggest naming your nets. N$* are the default names that Eagle gives to nets that you haven't named. When you are routing a board, it is much easier to tell where, say, the GND net goes if it is named GND rather than something like N$4. The same is true for signal nets and whatnot. The warning regarding VCC and AVCC being connected to N$7 can be safely ignored when you have verified what it is saying. In this case you have two pins on the ATMega which are marked in the symbol is being power pins. These are connected to a net called N$7 - assuming N$7 is the output of your regulator (see second paragraph), then this is correct and so the warning can be ignored.

As to why there is a warning, it is because the name of the power pin does not match the name of the net it is connected to. Eagle spits out a warning so you can make sure it is correct. Imagine you had a power pin called +3V3 and it was connected to a net called +12V. You would at this point be thanking Eagle for pointing that out to you.

• Awesome, thanks for the info! You've been a huge help. From your POV, does this board look functional? I'm assuming (based off of my limited knowledge) due to the lack of errors and the obvious layout of pinouts that it should work fine as I have set it up? – Christopher Dec 17 '16 at 21:37

If your breadboard "prototype" EXACTLY matches your schematic diagram, then you have good chance of success. Note that there are also layout and physical configuration considerations around Y1, C2, and C3. and their proximity to the U1 pins 9 and 10. Look at other Arduino boards to see how they laid out that part of the circuit.

Remember also that there are hundreds of inexpensive and readily available Arduino-like boards commercially available which will cost a tiny fraction of what you will spend making your own board. Even if the materials and equipment are free. I can't think of any legitimate reason one would want to build their own board when you can get them off the shelf for ridiculously low prices.

• Well, I have Arduinos. My thing was not dropping them into a permanent project. Arduinos are roughly $12 locally. I'll be building this for around$7 including the cost of the copper and ATmega328 however I have most other components so in reality it'll cost me about \$4 to build this main cost being the copper and MCU since I have everything else laying around. However it's not only for the cost, it's a learning experience! – Christopher Dec 18 '16 at 8:09