Designed first PCB -- Will you take a look?

Hey all,

So as the title implies, I just finished designing my first PCB. I used Eagle Layout Editor 5.4 Light. It came out much more complex than I expected. I have uploaded a large .png file that shows the schematic.

If anyone would be willing to glance over it and look for glaring errors I would really appreciate it. Besides just going over it again and again, there’s not much more I can do before I submit it! Also I have never used the ATmega168 without the arduino board, so please pay special attention to that area in case I’ve missed something.

Thank you very much! -Andrew

http://www.rpi.edu/~berga/files/sch2.png <<<

Below is the created board (barely fits!!)

I see that you've left all the tracks at the same width. You will probably need to widen some of them, particularly the power supply and ground tracks. It'll probably be wise to add a few decoupling capacitors, too:

http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

I don't know if it's cause for concern or not, but the metal back plate of a TO-220 package (your IC6) is usually connected to one of the three pins, such as the collector or emitter. You have a signal path with a via that is going to be in contact with the package, unless you put in an insulating shim here. If you're using "tented vias," that is letting the solder mask cover the vias, it's slightly less chance of an unintended connection, but it's not a guarantee.

When I needed to put some TO-220 type devices on a board, I gave it a solid rectangle of exposed reflow-solder to sit on. This can act as a poor-man's heatsink, and also helped the auto-router to avoid the area.

It is usually considered "good practice" to have all your ICs with pin 1 at the same side of the board. Personally, I'd trade that for a cleaner layout, but in you case it' s not clear whether the max7219 orientation is helpful or not.

I agree that you need wider traces and bypass caps for the power connections.

It looks like you're at the limit of the freeware; otherwise I'd suggest that your design could benefit from being a bit bigger (if physically possible...)

Just to put this out there (I'm not an expert) - Put the crystal and caps closer to the ATmega? - Consider using a ground plane?

Nice work and nice board though!

One of the terminals of R2 seems to be touching the display. Maybe you want to move it up a bit. The 22pF capacitors look pretty big, compared to the crystal. Are you sure about their dimensions? Good job !

Hi guys,

Thanks for your comments. I made most of the changes you all recommended. Embarrassingly, I couldn't actually figure out how to change only VCC and GND to a thicker trace. Instead I just made everything .02 inches. Do you think this will be OK, or can someone advise on how to make only those two signals bigger (and what dimension do you recommend?)

Yes, I am definitely on the edge of what the trial software will allow. Luckily though it will route the wires outside of the available area, so that helps with the routing.

So here are most of the changes: -added 10uF and 100nF caps to both max7219 chips -added .1u cap to ATmega168 -added 47u cap to input power supply -made all wires .02" thick (would like to fix this.. leave all at .01, but increase +VCC and GND to perhaps .03"?) -changed package for crystal capacitors to 2.5mm x 2mm -added a restricted zone under the TO-220 regulator -moved crystal and 22pF caps as close as possible to MC -fixed R2 so it doesn't interfere with a display unit

So do you all think this is the correct amount and placement of filter capacitors? I've never experienced these voltage irregularities and I certainly don't want to start now.

The only thing I think I didn't do is to rearrange the ICs to all face one corner. Honestly, right now I feel like it's just too packed to ask for a much better layout. I'll have to settle with paying a bit more attention when I solder it.

Thank you once more for your time. If you see more errors, feel free to let me have them! -Andrew

Schematic: http://www.rpi.edu/~berga/files/sch3.png

Board: http://www.rpi.edu/~berga/files/brd3.png

Oh, one other thing. I plan to have it made by Advanced Circuit. Their deal is $33 for up to 60 sq. inches. Once I have this all finished, would someone out there with Eagle Pro be willing to copy the board layout four times over so I can buy one board with this circuit four times over?

To change the width of individual traces, use the wrench on the board editor. Select width, choose the width you want, and start clicking on traces. Remember to run DRC afterwards to make sure your changes didn't violate a design rule.

OK, I think I've got it. Here's a new layout. I went with: signals = .01", power/ground = .024". Does anyone feel I need more capacitors?

And it would still be great if someone could combine my layout for me so that I can put in an order of about 60 sq. inches. You can email me at berga [a] rpi.edu

Also I have never used the ATmega168 without the arduino board

You are using Atmega 8 in this project. How are you going to burn/program it? Not with an arduino, I assume.

florinc, the ATmega8 and ATmega168 (and 328) have identical pinouts. The differences are entirely internal. That's why we can swap them in and out of the Arduino boards and choose new settings.

berga, it looks like you're trying to position all your capacitors near one corner of the board. Generally, the 10uF that is suggested for decoupling for each chip (or every other chip) really must be placed NEAR the chip it's decoupling. It's kinda like shock absorbers... you can't put all the shocks on one wheel.

The noise considerations are caused by the chips themselves, and having a capacitor in very close proximity to it (short leads to the power pins) helps to isolate the noise so it doesn't affect other chips.

Hi halley, good analogy with the springs, that cleared things up. I've now moved everything to positions much closer to the chips. I won't upload a new picture until the wires are re-sized, however. Because I ripped up my auto-routes, I also lost all my thickness data. Thanks for bearing with me! -Andrew

the 10uF that is suggested for decoupling for each chip

It's usually 0.01uF or 0.1uF for each chip (depending on operating frequency.) Or perhaps for each supply pin on a chip (so the AVR should have two bypass caps.) (except for REALLY heavy power users like pentium class CPUs.) And they should be as close as possible to the chip. You already have the 47uF cap near your regulator, you can probably get by with one more ~10uF cap at the other side of the board...

It seems that your 7219s have some minotauresque wiring. I would suggest swaping some outputs and writing some conversion routines in code, but that will not be easy stuff to do, even though I always find it easier to troubleshoot code rather than having to re-fab PCBs ^^

Do you plan on soldering your 7 segments displays directly to the board or do you want to put them in sockets ? If you put them in some socket (like female header pins, you might have enough room to put your 7219s and 74LS148s directly under them. This will save you a lot of room on the board... ^^ In addition, it will be easier to put your project into a case.

You may also check the dimensions of C8 and C10, shouldn't they coincide with C6? As far as I know, C7 and C9 (10uF) are usually electrolytic capacitors, polarized. Their shape is cylindrical. To minimize space, if it is not too late, you can also place the resistors standing (0.1" between pins). That works pretty well when the resistors are 1/4 watts. They would even fit under the female header mentioned by melka.

Out of curiosity, what does this project do?

OK, I think perhaps I've got my finished layout, unless anyone has a pressing error.

Here are the most recent changes: -Swapped capacitor packages to align with Mouser components -Moved LED driver ICs under LEDs themselves -Made most resistors vertical where prudent -added a debug LED (with 500 ohm resistor) to an output pin for Atmel debugging -Added a 2x2 header for added functionality -tied Iset (each max7219) to VCC instead of GND!! -moved screw holes around for better positioning

I took melka's advice and placed the driver ICs underneath their respective displays. I'll use regular female header sockets to elevate the displays, and then install the ICs underneath. You'll note that each max7219 driver has an electrolytic capacitor below which will not fit vertically (they're 11mm tall) so I left room to lay the caps on their sides. And you're right, with the displays sticking up higher it will be simpler to make the case's front panel fit better.

melka, I didn't understand what you meant about the 7219's minitauresque wiring. I'm pretty sure that I have done the bare minimum of wiring to get the displays setup correctly. My question is.... will it work how I have it wired now? (Again, I did update Iset to be pulled to +5) Right now there are three outputs from the microcontroller: Load (CS), Clock, DataIn. I don't believe I need any more...?

At this point I'll shoot to send in the CAM files for Wednesday morning, unless anyone can point out more serious mistakes in my layout or schematic. Once more, thank you for your time! I have since found several mistakes that really would have kept the board from working.

Oh, and the purpose of this board: This is a tool called a "Digital Readout (DRO)" for a metalcutting lathe. It takes a BCD waveform from Chinese linear measuring scales and outputs the current actual position onto the 7-segment displays for both axes. I have a thread going on a machining forum about it here: http://www.practicalmachinist.com/vb/showthread.php?t=176632

Once I was able to read the data from the linear scale and see an exact position on my serial port, I decided to go ahead with the PCB because everything after the data input is definitely possible. Thanks everyone, Andrew

http://www.rpi.edu/~berga/files/brd5.png http://www.rpi.edu/~berga/files/sch5.png

Also I found a tool called Gerbmerge (freeware) that will copy my layout and repeat it four times before I sent it out to the PCB house.

I used the term "minautoresque" to say that the routing looks like a labyrinth to me, it may be possible to have something cleaner. There's a lot of vias that it may be possible to avoid, but that would take a bit of work. If Eagle tells you there's no error, let go with it ^^ By looking at the schematic, I think that you're current routing for the MAXs and Displays would work (event though I'm no pro at wiring 7 segment displays).

Sounds great, berga... keep us in the loop.

Buy all the components it would take to fill out your first board, but solder as little into the board as you can, testing as you go, to see what needs fixing. You can patch around problems as you figure them out, using bits of wire or cutting traces on the board. The wisdom is "make the board work, no matter what" but it's a waste of time, energy and components to solder EVERYTHING before your first test.

Halley is right !! Have you tested your circuit on a perfboard or breadboard before making your own PCB ? Was it fully functionnal ?