My first PCB - any obvious mistakes?

Greetings!

I’ve just laid out my first PCB in Eagle and thought I’d post it here for some feedback before sending it to the fab :slight_smile: I’m planning to use BatchPCB.

It’s a Thermometer that depicts temperature as a color on an RGB LED. A 10K thermistor connects to the TEMP header. The pot is for brightness control.

http://dl.dropbox.com/u/190333/Color-Th … v1-sch.png

The PCB uses 10mil traces (24mil for VCC). Both top and bottom layers have a ground pour.

http://dl.dropbox.com/u/190333/Color-Th … v1-brd.png

I’m a bit worried about the footprint for the [RGB LED. In order to have the LED sit flush to the board, the pins have to be quite close to each other. I had to reduce the pad size to 10mil to get a 10mil clearance between them. Do you think this is cutting it a bit short?

How about the ADC wires from the pot and thermistor - are they too long? I’ve read that long wires will increase noise, but how significant is this?

Should I move the bypass capacitors closer to the Vcc / GND pins of the ATtiny?

Any feedback greatly appreciated :slight_smile: Thanks!

The RGB LED pads look fine but as long as you are meeting the rules then it should be fine. Just make sure the holes are the right diameter.

Long traces are more likely to conduct noise but considering your output and your intention for this project… it wouldn’t be significant. I would shorten them anyway for practice and to save money in terms of board real-estate.

Move the bypass capacitors as close to the Vcc pin of the ATtiny as possible. You can insert another capacitor in front of your LDO if it is needed for stability.

The angle that your traces meet is a little weird so you may want to make them meet at right angles of one another. You can also vastly shrink the board size down as well to save money. For the pads of your RGB LED, you can try to line the traces up with them so that the traces don’t look like they are hitting their respective pads off-center.

  • As mentioned, the bypass cap should be right next to the VCC pin of each chip

  • Atmel recommends a 4k7 - 10k pullup resistor on ~RESET

  • Traces should not connect at acute angles; that can form acid traps

  • I’d place a footprint for a 470p cap from byp to ground on the regulator, just in case you need it

  • I would use a more direct and wider (lower impedance) Vcc trace

  • Can you change the LED pads to oval instead of round? That may gain some clearance between them

/mike

Thank you for the feedback! :slight_smile:

trophosphere:
Long traces are more likely to conduct noise but considering your output and your intention for this project… it wouldn’t be significant. I would shorten them anyway for practice and to save money in terms of board real-estate.

Right, so I forgot to mention that the board will fit in a 10cm x 10cm box, so that's why I chose the rather big PCB. The thermistor will also be at the end of some rather long wires anyways (for measuring outside temperature), so I figured the length of the PCB traces won't matter much anyways...

trophosphere:
Move the bypass capacitors as close to the Vcc pin of the ATtiny as possible. You can insert another capacitor in front of your LDO if it is needed for stability.

Actually I have omitted the bypass cap altogether (on pin 4 of the LDO). The MIC5205 datasheet states that an output capacitor of at least 1.0uF is recommended, but doesn't say if it should sit close to the LDO. Should I move the output caps closer to the ATtiny and add another cap to the LDO output?

trophosphere:
The angle that your traces meet is a little weird so you may want to make them meet at right angles of one another.

Hmm, which traces are you referring to?

trophosphere:
For the pads of your RGB LED, you can try to line the traces up with them so that the traces don’t look like they are hitting their respective pads off-center.

Good idea, will do :-)

n1ist:

  • Atmel recommends a 4k7 - 10k pullup resistor on ~RESET
Ah, good catch! I totally forgot :)

n1ist:

  • Traces should not connect at acute angles; that can form acid traps
Learning a lot here! So as a general rule of thumb, avoid 90 degree turns? What about the angles for trace branches?

n1ist:

  • I’d place a footprint for a 470p cap from byp to ground on the regulator, just in case you need it
Good idea, that should reduce output noise. Can I use a 0.1uF cap instead? I've already ordered parts, but didn't include any 470p caps...

n1ist:

  • I would use a more direct and wider (lower impedance) Vcc trace
In general or just to the ATtiny? It's currently 24mil, but I guess I could ramp it up a bit.

n1ist:

  • Can you change the LED pads to oval instead of round? That may gain some clearance between them
Thanks for the tip - I'll see if that helps.

I’ll make adjustments based on your feedback. Thanks again :slight_smile:

  • Johannes

I’ve changed the schematics and layout based on your feedback.

Changes to the schematic:

  • Added 10k pullup resistor on RESET

  • Added 470pF cap on the regulator BP pin

Changes to the layout:

  • Moved output caps close to the Vcc pin on the ATtiny

  • Increased width of the Vcc trace to 32mil

  • Changed the traces to meet at right angles

  • Traces now make 45 degree turns only

  • Aligned the traces with the RGB LED pads

  • Changed the RGB LED pads to oval instead of round

  • Added some GND vias (thought this was a good idea)

Looks good? :slight_smile:

http://dl.dropbox.com/u/190333/Color-Th … 1b-sch.png

http://dl.dropbox.com/u/190333/Color-Th … 1b-brd.png

joh:
Right, so I forgot to mention that the board will fit in a 10cm x 10cm box, so that’s why I chose the rather big PCB. The thermistor will also be at the end of some rather long wires anyways (for measuring outside temperature), so I figured the length of the PCB traces won’t matter much anyways…

I see what you are doing. Yeah, the length of the trace won't be much of a problem in this case.

joh:
Actually I have omitted the bypass cap altogether (on pin 4 of the LDO). The MIC5205 datasheet states that an output capacitor of at least 1.0uF is recommended, but doesn’t say if it should sit close to the LDO. Should I move the output caps closer to the ATtiny and add another cap to the LDO output?

You will need a capacitor right at the output of the LDO (pin 5) to ensure stability. You can use a 10uF capacitor to meet that requirement as well as to improve the LDO's transient response.

joh:
Hmm, which traces are you referring to?

Your revised layout solved it so no worries.

Edit: By the way, there is a collection of copper pads right below the ICSP footprint that looks a bit weird.

trophosphere:
You will need a capacitor right at the output of the LDO (pin 5) to ensure stability. You can use a 10uF capacitor to meet that requirement as well as to improve the LDO’s transient response.

So because of the long Vcc trace from the LDO to the ATtiny I need to add an additional 10uF cap right at the output of the LDO?

trophosphere:
Edit: By the way, there is a collection of copper pads right below the ICSP footprint that looks a bit weird.

Whoa, how did *that* get there!?

Looks good. The cap by the LDO is so that it won’t oscillate. In this case, I’d put the tantalum cap there. The bypass cap is for the processor, os it goes next to the Vcc pin to reduce trace inductance.

The 45-degree recommendation is for bends in the traces. For T-junctions, the branch should be 90 degrees from the main trace

The width of the Vcc trace, at least in this case since the current is low, is to reduce inductance.

/mike

n1ist:
Looks good. The cap by the LDO is so that it won’t oscillate. In this case, I’d put the tantalum cap there. The bypass cap is for the processor, os it goes next to the Vcc pin to reduce trace inductance.

Ah, so I should put the 10uF tantalum cap next to the LDO and the 0.1uF cap next to the Vcc pin of the ATtiny?

Thanks again :slight_smile:

  • Johannes

Moved the tantalum cap next to the LDO:

http://dl.dropbox.com/u/190333/Color-Th … 1c-brd.png

Looks good now.

Does your power connector have snap-in pins to hold it to the board? If not, I’d add some vias in the pads to help keep the pads from ripping off the board if you apply upwards pressure to the connector.

/mike

n1ist:
Looks good now.

Does your power connector have snap-in pins to hold it to the board? If not, I’d add some vias in the pads to help keep the pads from ripping off the board if you apply upwards pressure to the connector.

/mike

It has two straight plastic pins that fit into the drill holes, but I doubt they will help against any upwards pressure. So the idea is that vias will increase the strength of the pads?

Hmm, perhaps I should use a through-hole power connector instead for added robustness…?

Does it have to be so large for such a small circuit?

It looks like it can fit on a 1/4 size board that is single sided.

I can’t see why there is so much wasted space, either.

mattylad:
Does it have to be so large for such a small circuit?

It looks like it can fit on a 1/4 size board that is single sided.

joh:
Right, so I forgot to mention that the board will fit in a 10cm x 10cm box, so that’s why I chose the rather big PCB."

Another suggestion: If your pot is through-hole then you can move R1 to the other side of the board and avoid having to place another via.

mattylad:
Does it have to be so large for such a small circuit?

It looks like it can fit on a 1/4 size board that is single sided.

I decided to make it a bit smaller:

http://dl.dropbox.com/u/190333/Color-Th … 11-brd.png

He said that it’s that size to fit a specific case, with mounting holes in the 4 corners…

/mike

I missed the comment about why that size.

Although looking at some components, they only have tracks on one end.

Is this a double sided board with copper pour that we cannot see all over?

Re the ICSP connector, you are making a big loop with some of those tracks, can the connector

go closer to the IC and the tracks in a smaller loop.

The temp and pwr connectors both look like simple 2 pin headers, if these are both outputs its OK but

if there is a chance that inadvertently swapping them may cause something to go bang then its better to

have different connector types.

And please thicken some of those connections entering connector pads. :slight_smile:

So I’ve already sent the PCB to BatchPCB so I can’t make any changes now.

mattylad:
Although looking at some components, they only have tracks on one end.

Is this a double sided board with copper pour that we cannot see all over?

Yes, both top and bottom layers have a ground pour. So the tracks without any visible connection are in fact tied to ground :)

mattylad:
The temp and pwr connectors both look like simple 2 pin headers, if these are both outputs its OK but

if there is a chance that inadvertently swapping them may cause something to go bang then its better to

have different connector types.

You mean if they are polarized? The temp connector is not polarized (it's a resistor). For the power connector, the polarity of course matters, but the regulator has built-in reverse polarity protection so nothing should go bang.

mattylad:
And please thicken some of those connections entering connector pads. :slight_smile:

Could you elaborate a bit on this? :)

Thanks!

  • Johannes