my first board design

I’ve just finished laying out my first board and thought I should let the more experienced have a quick look.

It’s a pretty basic board that has an atmega168, a current sensor (ACS712-20A), and a relay. It will be used to automatically turn on a second machine (the slave) when my board detects current being drawn by another machine (the master).

Since it’s going to be controlling mains (up to around 10A), I would like some feedback regarding the width of the traces for the relay.

Here’s my schematic and board:

http://www.mediafire.com/file/ad5midzto … witch2.sch

http://www.mediafire.com/file/natymzimd … witch2.brd

(The specific mosfet I would like to use is the “BSS138”, since I have a bunch of them already. The relay is the Omron “G4A-1A-P-E-DC12”.)

Any comments/advice is greatly appreciated. :slight_smile:

EDIT: I have just been going over my design and I’m not sure if the mosfet is under spec’d. It is rated for max 200mA, and my relay will draw a nominal 75mA, but I don’t know how accurate that is.

Would I be better getting a slightly larger mosfet, since I’d also be able to use it for other circuits as well? Any suggestions on which one? (I’ve never used mosfets before, so I don’t know what the “usual suspects” are…)

Oh, and I also noticed the footprint for my relay is wrong. Lucky I noticed it now :slight_smile:

If that if your first go at designing a PCB, mate well done that is a superb first effort. No right angle tracks, good lables isn’t something you see to often on new boards.

I cannot comment on the actual circuit but as far as the schematic and board goes it looks ok.

The schematic:

I wouldn’t have bothered with that bus in the schematic. You can just put a short length of “wire” onto the pin and name it, then if you do the same on any other pin they will become “connected”.

This is how the 5v works, it’s all on the same net and you don’t have to connect all of the together.

The board:

Looks pretty good. I would radius the corners just to make it look nice.

If it was me I would probably have a GND pour completely covering the bottom up to that line where the mains power is. I would also have a 5V pour on the top of the same area.

I see 1 right angle track on the bottom layer near the “12v” label, I would fix that as it looks out of place.

The two vias near the regulator, what is their purpose? At the moment they are doing nothing.

I would route to a 25mil grid no the 50mil grid you have, just a personal thing. Although I normally route to a 9.xxx mil grid which is 0.25mm (metric makes more sense to me).

You might want to get someone to check the mains stuff, you don’t want to go killing yourself.

Thanks for the feedback.

gussy:
If that if your first go at designing a PCB, mate well done that is a superb first effort. No right angle tracks, good lables isn’t something you see to often on new boards.

I’ve laid a few out before, but never got past that stage. This time I’m actually going to get a bunch made (probably 5 to 10 to start with). I hate unlabelled connections on PCBs, and there is nothing worse than realising you guessed the wrong pins when you release the magic smoke. :evil:

gussy:
I wouldn’t have bothered with that bus in the schematic.

Normally I make the schematics fairly neat, but this time I did slacken off a bit (since I really just want the board made).

gussy:
If it was me I would probably have a GND pour completely covering the bottom up to that line where the mains power is. I would also have a 5V pour on the top of the same area.

I see 1 right angle track on the bottom layer near the “12v” label, I would fix that as it looks out of place.

Good spotting - I didn’t even notice that right angle. As for the pours, I wasn’t sure how much I was supposed to cover. I made the analog section have it’s own ground pour, but wasn’t sure how far to extend the digital section.

I think I’ll change the layers of a bunch of the traces in the digital section to get the ground on the bottom layer, and 5V primarily on the top. Should I extend the pour to include the power regulator section? (Since the tab is connected to GND, I wouldn’t be able to have the 5V pour in this section).

gussy:
The two vias near the regulator, what is their purpose? At the moment they are doing nothing.

Those “via’s” are actually a capacitor on the output of the regulator. :stuck_out_tongue:

gussy:
You might want to get someone to check the mains stuff, you don’t want to go killing yourself.

Don’t worry - my brother has just finished his electrical apprenticeship, and I’m a Mechatronic Engineer (currently postgrad), so I’m taking all the precautions I can. (Since I was worried about the AC current through the PCB & relay, I’ve now selected a relay that has tabs on the top for direct connection. This will also be sealed up in a nice little box with a fuse, etc).

I ordered all my parts on Friday - they are on the way, so I want to get this board made fairly soon. (I know there is a long lead time with batchpcb, so I plan submitting it tomorrow)

I made one mistake though - the mosfets I ordered (“NTS4172NT1G” from Mouser) are smaller than I realised. I didn’t notice the difference between SOT-23-3 and SOT-32-3… I haven’t soldered any SMD parts before, but I figure I should be able to pick it up pretty quick. (And I only need 5 of the 50 mosfets I ordered, so I can make a few mistakes) :slight_smile:

Ok, I just received my parts from mouser, and realised the power supply needs to be mounted to the pcb as well. I thought it would just need wires soldered to it, but I was wrong :-S Bugger! I had submitted by design to batchpcb already. Oh well, I guess I’ll use them as prototypes instead.

Here’s my updated design:

http://www.mediafire.com/file/jmytzjby0 … witch4.sch

http://www.mediafire.com/file/mldkzgnih … witch4.brd

Any changes you would recommend before I send them to Gold Phoenix?

(It’s much cheaper for me to get a whole panel made, instead of just 5 through batchPCB)

I’ve gone over my board and I think it’s all done properly. The only thing I’m not sure about is the mounting holes for the power supply - the [datasheet shows the mounting pin has a diameter of 1.02mm (0.040") with a collar diameter (the bit that sits up on top of the board) of 1.78mm (0.070").

So, for the footprint of the part I made in eagle, I used a drill diameter of 1.2mm (0.047"). Do you think that enough clearance? I don’t want them too tight (since the pins won’t always be perfectly straight), but I don’t want too much play in them either…](http://www.cincon.com/data/products/cfm1_1/CFM05.pdf)

That should be OK, I usually use a 10 mil clearance.

Leon

Ok, thanks. I think I’m all set now :slight_smile: I’ll print out a 1:1 layout and check the part spacing tonight. I don’t want to stuff up this second attempt :oops: