Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: frank26080115 on January 30, 2008, 12:59:04 AM

Title: Tight PCB Design, Need Opinions
Post by: frank26080115 on January 30, 2008, 12:59:04 AM
My next robot's PCB is semi-finalized. It's a single layer board. ATMega644P will run the show. It will connect a GPS module, a USB to TTL serial converter, analog compass module, wireless USB module OR a Nordic transceiver module, also supports Wii Nunchucks, it can check it's own batteries, 6 servo ports on the PWM pins, with 5 ADC left over and 6 digital I/O left over.

One of these boards will be used on the robot, with only the sensor related items attached. the other will be used as the "base station" with the GPS replaced with a serial controlled LCD and the Wii Nunchuck attached too.

The design is meant to be toner transfer etching friendly, lots of room, wide copper, and a filled ground plane to save acid.
It took me a few days, the traces are all hand routed, I think they are as optimized as I can get. There are components that goes under the MCU, the MCU is on a socket so there should be room, if there isn't, then use the back.

The design is just small enough to fit within Eagle's limits for it's free version.

The thick grey rectangle is the actual board size, the thin gray rectangle is the maximum area Eagle lets me put things inside.

Please take a look and tell me what you would change. It's my 2nd ever PCB design, but the 1st one that I will actually be making. Eagle files and Eagle library files included in attached .zip file.
Title: Re: Tight PCB Design, Need Opinions
Post by: hazzer123 on January 30, 2008, 01:40:10 AM
There are a couple of optimisations i can see. There is a line below the AT chip which starts on the bottom layer, then goes on top, then bottom, then top then bottom... This could be replaced by one longer jumper without causing any damage and less soldering - less chance of something not working.

There is also a bit in the bottom left of the board, where two horizontal routes are made to go onto the top layer because there is 1 diagonal layer in the way. This would be more efficient if the two horizontal routes stayed on the bottom and the one diagonal layer was taken to the top.

Title: Re: Tight PCB Design, Need Opinions
Post by: Steel_monkey on January 30, 2008, 03:18:00 PM
The first advice- for space (and cost) saving, use Surface Mount Technology- it may look a little hard to solder, but in reality it is much faster to mount then through hole. I personally use all chips in TQFP/SOIC packages, 0805 resistors and capacitors, SOD80 LL4148 and even low profile aluminium capacitors. It really save space. I will attach board to show it.
About schematic- I really can`t find 7833 datasheet ( it must be linear. regulator, but it appear not to be too common). If You have datasheet on it, look there, if it is Low Drop Output reg. or not. The thing is average 7805 requires input voltage to be at least 2 Volts (really more) bigger then output, here You have only 1.7 ( I use LM1117-33, it can give 800 mA and can be fed from 5 Volts, i.e. it is LDO).
    7805 requires 4.7-10 mkF aluminium or (better) tantalum capacitor at the output, and same with 7833.
    Each digital chip should have 100nF ceramic capacitor close (as close as possible) to  its POWER leads, ATMEGA have it, but other two lack of it.
    If it is possible, connect crystal capacitors ground wires directly to GND of MCU, or close to it. Crystal capacitors are connected to the same ground wire as PWM. Try to avoid it ( if possible).
   If You have precise analog sensors, special care must be taken about AGND (GND2), AREF and AVCC pins. Try to decouple AREF and AVCC with 10 Ohm  resistors (from VCC) and 100 nF ceramic+ 10 mkF tantalum capacitors (caps to AGND). Also AGND should have only 1 connection point with GND- under MCU package.
   10 KOhms for RESET resistor is a little too big in noisy environment, try something from 5 to 7 KOhms. Also RESET must be grounded with 100 nF capacitor (required in noisy environment).
   Some tricks about Laser and Iron Technology (LIT). Traces shouldn`t be too wide (until You have high currents), 0.35 mm is OK. The thing is, the thiner trace more toner you have on it (it is especially important for SAM...G printers, which are poor on toner ;((  ), so You have 0.6mm etched trace or 0.35mm OK trace. Also paper is very important- I use film for B/W laser printers- it worth nearly nothing, but works very well.

For more info, see AD, TI and other application notes, AVR application notes and a lot of different info in the net. Also Admin posted few amazing links about PCB tracing.
Hope, this helps.

Here is my example. Don`t look on some wiring (aaaargh SA.....G), it works well  :P.
Title: Re: Tight PCB Design, Need Opinions
Post by: frank26080115 on January 30, 2008, 05:09:17 PM
Thanks Hazzer, I've made those changes, although I think you meant bottom right

Thanks Steel_Monkey

I can solder SMT resistors and capacitors, but I have a stockpile of through hole parts and SMT parts would take some ordering (a problem since I don't have my own credit card, and digikey doesn't take paypal, and prepaid credit cards are a ripoff), also I'd like this circuit to be easily replicated by others who might not be able to solder it up. It's tempting though, it'd be my first SMT project.

I'm actually using a LDO so I don't think there will be a problem, the 7833 is actually a UA78M33 I have

About the caps

I'll try to squeeze in that cap on the output of the regulator
everything that uses the 3.3V supply is a module/evaluation board so I don't think I need another cap since it would be already installed onto the module/board
the caps by the crystal are very close to the GND of the MCU
ADC sensitivity isn't a problem, I've added another cap near the AVCC, but there's no way to get a resistor near that area
I've included that cap on the reset line

Apparently Cypress stopped sampling the wireless USB modules, who ever is making my board design will need to get the Nordic modules from SparkFun

Latest revision here (some values are not right but the PCB is there)
http://franksjunk.thespudmall.com/actor_jan30.zip

I can't find the links you are talking about
Title: Re: Tight PCB Design, Need Opinions
Post by: Steel_monkey on January 31, 2008, 12:42:13 AM
Everything looks cool  ;D!
Here are links:
http://www.atmel.com/dyn/resources/prod_documents/doc4278.pdf
http://electronicdesign.com/Articles/Index.cfm?ArticleID=5944&pg=1
AVR040 and AVR042 application notes from atmel.com.
I will add app notes from other companies later.
Title: Re: Tight PCB Design, Need Opinions
Post by: Admin on February 04, 2008, 10:39:17 PM
Another motivation to use surface mount . . . much cheaper! ;D
Title: Re: Tight PCB Design, Need Opinions
Post by: frank26080115 on February 04, 2008, 10:51:23 PM
I'll consider a redesign after I get some results out of the circuit, but I still don't know whether I'm ready for a smt chip, but if I am, then I'll buy atmega128s!

I'm still praying Atmel shipped the samples of the atmega644 I requested, the design won't work nearly as well without it, but a mega32 can be subbed in but you'll need to emulate a second UART if you want to add a serial LCD.