Custom board review please

Designed an atmega1284p board for controlling my cnc. Just like to get some opinions before I send out to have it made up.

R1 - R6 = 22 ohm
R7 - R18 = 220 ohm
R19 - R26 = 10k ohm
Q1 - Q6 = 2N3906
Q7 = 2N2222A
C5 & C6 = 22pF
C1, C3, C4 & C7 = 0.1uF
C2 = 100uF
D7 & D8 = 1N4001
D9 = 1N4148
Y1 = 16MHz

Board has a ground plane front and back.

What should we check ?

I guess I have a few questions.

The under/over travel limits are NPN. The common comes back on the middle terminal, goes through a 22ohm resistor to the base of the 2n3906 transistor with a 220 ohm resistor to 5v. 5v to collector. The emitter goes to the arduino digital pin with a 10k resistor to ground as well as another 220 ohm resistor inline with a led.

I went off this tutorial to get the resistor values. SECARS Homepage - SECARS Not sure how I came to 22ohm the first time I did the calculations but now I think is not correct. . Now I'm coming out to around 2k ohm.

Does the reset line look correct? I had a similar board made up but the transistor inputs from the prox's are not on the board or the relay. On my first design I had the receive and transmit lines flipped. I broke the traces and used pieces of wire to fix my screw up and was testing the board out today and it reset on its own a few times.

Got a schematic? That's way more helpful for reviewing a design.

I do not currently. I should start doing those first, probably lead to less mistakes.

How'd you layout the board without a schematic to start?

How'd you layout the board without a schematic to start?

Yeah that seems kinda crazy - looks like it was laid out with Eagle...

OP - Generally looks pretty tidy but I'd pick up on 2 things:

  1. Appears to be through-hole components on both sides of the board - that's what I'm assuming for those inside the bounds of the Mega chip. There's plenty of space on the board so could these not be moved out and up to the top side? Liable to suffer less damage there.

  2. End-mounted resistors - nothing technically wrong with this, but it looks unprofessional to me, and again there's plenty of space to lay them out flat.

It was layed out in eagle.

I kind of just went off what I had in my head as well as looked at other schematics. I know it's kind of like having the trailer before the tractor. My boards are not usually overly complicated but I know I need to start creating a schematic first as I always seem to have 1 or 2 small mistakes in my boards. Maybe this weekend I get one made up.

All components are mounted on the same side of the board. The crystal, capacitors, resistor and diode all fit within the dip socket under the chip. I already had a board made up with this arrangement and it worked well and looks very clean.

I did go through and change the resistors so they lay flat.

Also is it ok to have a ground plane on both sides of the board?

Ground plane on both sides if you can, with vias Named GND to connect them.
Boards start with copper plate on both sides, and is etched away to make the pads & traces. I leave as much in place as I can.

looks good, id second gnd plain both sides as wekk, just out of curiosity how much current are you switching on that relay have are your tracks man enough for the current?

Can't see a problem with the reset line as you have included the 10k pull-up. Keep in mind that connecting and disconnecting the serial interface if the port is open at the time, will cause a reset.

You certainly did get the crystal close to the chip - as it is supposed to be. While the crystal should have a ground surrounding its connections, you want to space that ground away from the connections to minimise load capacitance.

I presume you are expecting to socket the main chip and thus have the crystal and other components inside the socket profile. If you are going into production and decide not to use sockets (as there should be no reason to replace the chip; it can be programmed in-circuit and sockets are a source of failure) then that would be a problem.

And as others have pointed out, you should have ground fill on both sides, and enough ground vias linking "fill" lands of any size to form a redundant net.

I see an error in the ground net/ground plane net... there are 6 connectors at the top of the board and I notice that the ground pins are connected to the power connector - pin and D7 appears to be in series with the - pin to ground while the other grounds are to the ground plane... So the ground pin from the power connector doesn't connect directly to the ground plane... This is a real problem as noise will develop across the diode, assuming that you want the ground plane to be 1 diode drop above ground a .1 and a 220 uF cap should be across the diode. This is sometimes a valid design technique for reverse polarity protection but I believe that it is a mistake as using the 'protection' diode in the minus lead from the power supply creates a lot of other issues. If a series diode is the reverse polarity protection it should always be in the positive side of the power supply connection and both ends of the diode must be bypassed...
the method I generally use is a 1N5822 schottky diode across the power input and a .1uF cap and a 220 uF cap from pos to neg at the power connector. Series protection for reverse power protection is always a poor idea because of the voltage drop across the diode. It is worse if the device is battery powered because the internal resistance of a battery will always increase as the battery becomes depleted. Without a big bypass cap the battery cannot deliver all the usable energy contained in the battery...


The 6 3 pin connectors at the top are for the 24vdc NPN under and over travel inductive proximity sensors. The 24vdc power for the prox's connects using the 2 pin connector on the right. I had a weird issue with the leds on all the prox's being on constantly. When the prox was made active then the led would get brighter. This was with the gnd of the 5vdc supply and the gnd of the 24vdc power supply connected together directly. I found adding in the diode prevented that from happening. I replaced my original prox's with some better ones and I haven't tested them without thus diode in place to see if the react differently.

I found adding in the diode prevented that from happening.

Well I simply take my hat off to your design skills, as I imagine most of the others here do also, as I cannot imagine any of us would have ever dreamed of approaching a "cipher" problem in the LEDs in such a manner. :wink:

I just tried bypassing the diode with and my new prox's do not have the same issue.

Old prox's

New prox's