My first pcb

AVcc, Aref, and the GND pin near them are applicable to the analog inputs (that GND pin is sometimes referred to as "AGND"). The Vcc and GND on the other side of the chip are applicable to the digital inputs. In an ideal design those analog and digital GND connections would only intermingle right at the power jack. All of your analog pins would only use their AGND and be kept separate from the GND used by the digital pins. There would be three separate capacitors between AVcc and AGND, Aref and the same AGND, and Vcc and its associated GND.

As an example for why all this is, when you're blinking your LED on pin 7 and it's jumping between 5V and 0V you're causing small voltage surges/drops that can be noticeable by the analog pins. Normally the analog pins will only see slow changes in voltage around them -- which is great for stable readings -- so you don't want to introduce additional noise from your blinking LED.

You really only do most of this stuff if you're really concerned about getting the most stable analog readings possible and for most projects it doesn't matter. The official Uno doesn't even follow these rules. But, you asked, so I did my best at explaining :slight_smile:

The datasheet also recommends the AVcc pin be supplied via an LC network and there is also the ADC Noise Reduction sleep mode which stops the CPU to further reduce EMI. These measures can be taken to improve ADC accuracy, but as Chagrin says, most applications do not require them.

Tremendous, I'm learning a heck of a lot here. I hadn't connected 7 and 20 directly, I was routing the same power to them but through a number of the other components... I'll take your clue and run with it, so thanks again.

Another thing I need to learn from you is in how you hook up your capacitors - am I reading your schematic correctly, in that C8 is only connected on one leg? Is this what you mean by saying ' You can always leave the spaces unpopulated', which I didn't really grasp?

I'll keep this in mind for future projects for sure.

Chagrin:
There would be three separate capacitors between AVcc and AGND, Aref and the same AGND, and Vcc and its associated GND.

I hear you, and will seperate the digital/analog connections accordingly. Even though I won't requirethe most exact of readings, it's probably best to get in the groove of things from the first go. Thanks for the explanation! 'Preciate it :slight_smile:

harleydk:
Another thing I need to learn from you is in how you hook up your capacitors - am I reading your schematic correctly, in that C8 is only connected on one leg? Is this what you mean by saying ' You can always leave the spaces unpopulated', which I didn't really grasp?

He has a ground plane which isn't visible. The side that appears to be unconnected is actually connected to GND in a flood fill.

With respect to "leaving spaces unpopulated" I'm referring to not adding the part in the final circuit. For example, if you just wanted to run your 328 at 8MHz using the internal oscillator then you'd leave the spaces for the crystal and capacitors "unpopulated".

Chagrin:

harleydk:
Another thing I need to learn from you is in how you hook up your capacitors - am I reading your schematic correctly, in that C8 is only connected on one leg? Is this what you mean by saying ' You can always leave the spaces unpopulated', which I didn't really grasp?

He has a ground plane which isn't visible. The side that appears to be unconnected is actually connected to GND in a flood fill.

With respect to "leaving spaces unpopulated" I'm referring to not adding the part in the final circuit. For example, if you just wanted to run your 328 at 8MHz using the internal oscillator then you'd leave the spaces for the crystal and capacitors "unpopulated".

Correct, C9, C10, C11 and several others are the same way, connected to the ground pour. Here are images of the top (red) and bottom (blue) copper that may clarify things a bit. This is a multi-purpose board and was designed with the idea that several components would be optionally installed, depending on the ultimate purpose of the board.

Chagrin:
He has a ground plane which isn't visible. The side that appears to be unconnected is actually connected to GND in a flood fill.
With respect to "leaving spaces unpopulated" I'm referring to not adding the part in the final circuit. For example, if you just wanted to run your 328 at 8MHz using the internal oscillator then you'd leave the spaces for the crystal and capacitors "unpopulated".

I see. Well this has been great you guys, I've learned a lot and will now redesign and re-study. Very helpful you have been, both. Have a great weekend!

You could probably remove most, if not all of the vias with some routing changes. Is there a reason why tracks are not routed under the 328p? For example, you could route the top left pin of the 2x4 header to 328p pin 4 by going under it. Also, changing the assignments of the 2x4 header pins to 328p pins would allow you to route more efficiently. That's only possible if you're in complete control of the code, of course. Moving the crystal a bit closer to the 328p would allow you to route the nearby track with two vias around the outside of it.

gutbag:
You could probably remove most, if not all of the vias with some routing changes. Is there a reason why tracks are not routed under the 328p? For example, you could route the top left pin of the 2x4 header to 328p pin 4 by going under it.

Hello gutbag, thanks for your input,

the reason I did not route under the 328p was that I was not sure this was a good idea - being a pcb beginner I was worried about having to solder the 328p legs close to the routed tracks. I see now that others don't have the same concern, so I'll go ahead and do it.

I should add that my plan is to put a socket where the MCU will go, so that I'm able to easily replace it with another one. Just like it's done with my Arduino Uno.

gutbag:
Also, changing the assignments of the 2x4 header pins to 328p pins would allow you to route more efficiently. That's only possible if you're in complete control of the code, of course. Moving the crystal a bit closer to the 328p would allow you to route the nearby track with two vias around the outside of it.

The 2x4 header pins are for an SPI interface to a transceiver on a breakout board, so I'm afraid I can't change the assignments :frowning: Now that I know that routing below the 328p should be of no concern, I will certainly move things around quite a bit :slight_smile:

Thanks again for your input!

harleydk:
I've managed to design my very first pcb. It's a sensor board, with room for an atmega328 and 3 analog inputs, as well as a status LED and a 2x4 pin-header where is meant to go a nordic transceiver breakout module.

Very interesting. The first dedicated board I have seen and, if I can be sure of the Nordics delivering the goods, I am looking at doing pretty much the same thing.

Quite apart from the extra cap etc., I wondered about avoiding some of the through-board transitions. UI assume the large rectangle at the top is a regulator and can be rotated, and the nearby terminal can be reversed.

I submit the diagram below as intellectual exercise...

I would be interested to see how you finish up with this.

Nick_Pyner:
Very interesting. The first dedicated board I have seen and, if I can be sure of the Nordics delivering the goods, I am looking at doing pretty much the same thing.
I submit the diagram below as i9ntellectual exercise...
I would be interested to see how you finish up with this.

Hello Nick, thanks for the inspiration & I'll be sure to post the re-done schematic here. It's not the first dedicated board I'm afraid - search google for 'maniacbug' and you'll see some great stuff built with the nordic chip. It will deliver, I've had succesful tests with so I'm happy to go with it and I'm sure you will be, too.

Hello again,

as promised here's the revised board, in the case someone would find it useful.

Routing below the MCU certainly made it much easier!

P.S. I reverted to through-hole components, because I wanted go easy on myself, this being the first board and all...

Are ground pins 8 and 22 connected? They should be.

Ahem cough they are now. Thanks.

In case anyone could find use for this, here's the link to the Fritzing file:
https://docs.google.com/file/d/0B8b-I3PiuN9lZ1FsdHU4VnNROG8/edit?usp=sharing

Good progress...

A few more vias could be removed by re-routing tracks. For example, the one at the top of the 328p is redundant - you could just route the track on vertically to the next via. Also, the two under the 328p could be removed by taking a track from pin 8 below ResR and up to the LHS of PwrC1.

Will the PCB be through-plated? If not, you have to be aware when routing tracks to top-side pins, that you can actually solder the pin on the top side, to make the connection from one side to the other using the leg (e.g. 328p pin 8 ). This isn't possible with an IC in a socket, for example, but may be if you were soldering the 328p directly to the board.

I presume yellow is bottom, orange is top?

The top side track from 328p pin1 could be avoided by routing the track that's currently in the way below ResR.

Hope that helps...

That smiley should be pin EIGHT - how do I stop it doing that?

I don't see Avcc connected.
I don't see any 0.1uF caps on the power pins.
Are you programming the chip on the board? Or elsewhere, and then plugging it in?

gutbag:
That smiley should be pin EIGHT - how do I stop it doing that?

• Click Modify (upper-right corner of your post)

• Click Additional Options (lower-right corner of the edit window)

• Ensure Don't use smileys is checked

• Click Save

  1. vs 8 ) - just add a space.