First PCB Layout


The extrusions intended to take screws, usually have more material than a simple U, more omega like, as mentioned above. They usually take self tapper screws.

Those look suited to wave soldering, I’d not like to try to solder those very solid round pegs, with the average soldering iron!!

If you are redoing the board, I’d suggest simply ditch the heatsinks entirely, and choose a SMD MOSFET that’s a standard package and easy to handle.


I recently soldered a similar heatsink when assembling a SparkFun Variable Load Kit. It took some time, but it wasn’t as bad as I was afraid it would be. I did end up charring the board around the heatsink pins a little bit, but not too badly.


Pretty much as I suspected :wink:
That PCB design also looks to have almost no solder ring, so relies heavily on the plating strength. Not such a good idea.


I think the right size self tapping sheet metal screw would thread right in. (see photo)


However if this were my project I would look into a TO-263 MosFet and add thermal vias around/under the Mosfet for heat spreading.


Ok, so I bought some IPB80P03P4L-04 which come in a TO263-3-2 packaging. I didn’t get them yet but updated the PCB board. There are a bunch of questions I have with this, though:

  • Will the big area for pin 2 of the MOSFET underneath the housing be exposed copper? In PCBnew that area appears red just like the tracks which do not have exposed copper. Shouldn’t this be yellow (like the pads) when there is exposed copper?
  • How do you assure solder is getting between the MOSFET and the PCB? Are you just applying solder paste, solder at the edge and then the solder is whisked underneath?
  • Because pin 2 of the MOSFET takes up so much copper (see red box #1) and because its surface mounted I don’t actually have 12V going to pin 3 of the MOSFETs. On the right side of the board I have jumpers (see red box #3) plus I have the back plane with vias so there shouldn’t be any problem there. However, on the left side I can’t really do anything on the top side. Instead, I have to bring 12V from the backside and then just rely on vias. Will this be enough to get 6A to each of the pin 3? Btw, I also turned the transistors 180 degrees so I can use the wire from the transistor (see red box #4) to get a bit more current to the top layer relatively close to pin 3.
  • I also have some vias that are right underneath pin 3 (see red box #2). Does this help or hurt getting more current directly from the back plane to the pin?
  • Are there any other things I am missing? I never did surface mounted devices before


?! That looks strange…
Yes, it should be exposed, but you seem to have FET pads on both Top and Bottom ?
Do you intend to mount the FETS on the Top, or bottom ? Is this a library footprint ?

I would avoid vias/plating where possible, which means place the FETS on the bottom of the PCB.
Then, the Drain - Screw connector, is a direct fat copper line, on the connector solder side. No plating used.

Pretty much - some designers extend the pad + mask 2~3mm past the FET tab, to give a better solder heating area.

It does not hurt, but you will need a serious soldering iron to solder that joint.
A row of vias either side of the Source lead might be more practical ?

You probably do not need all the vias on the top board edge, the ones nearer the terminal holes will be doing all the work, and the copper areas are quite similar top.bottom, so the via-path currents will not be large.

If you do have to use jumpers, you can consider placing those in low current paths, in order to free up high current paths. ie here, jumpers in the gate lines, might make more sense than jumpers in GND


When in doubt, Generate & look at the gerber files.
As BCB_Wiz noted: SMD pads should be only on one side of the PCB.

Normally this is done with solder paste, and the whole pcb is heated in an oven untill the solder melts.
For handsoldering I recommend:
1). Put a bit of flux on the big tab.
2). Place component on PCB.
3). Position carefully & solder the thin legs to keep the part from moving on the tab.
4). Put a bit of solder between the lip on the tab and your (80+Watt) soldering iron to make good contact.
5). Use an iron with a short thick blunt tip. There is a good reason (good) solering irons come
with interchangeble tips.
6). When the solder melts you will see it will wick under the TO263.

I have not looked up the spec’s of your MOSfets, but you might have a heating / cooling problem.
The tab is supposed to be soldered to the PCB for heat conduction into the PCB. Copper is a very good heat conductor. (Much better than Aluminimum)
The only copper the tab is soldered to, is under your connector, and that heat can not radiate away.
It is very common to make the copper under the TO263 a lot bigger to spread the heat. It is also common to put a bunch of via’s directly under the pad to conduct heat to the other side of the PCB, and have some wide copper there also.

Idea: For hand soldering you can make a via with a big diameter (5mm or so) directly under the tab. Then you can first fixate the TO263 with the legs, turn the PCB upside down, and solder the tab through the hole.

You have so many vias that the extra wire jumper does not seem usefull, but it does not hurt either.
Are the holes for those jumper wires big enough for thick wire? (Forget this, see below).

48 via’s for 6A seems plenty. The current handling of a via is however very dependent of the size of the via, and whether it is filled with solder.
But instead of relying on all those via’s and jumpers it is much better and easier to simply move the traces to the gates to the other side. Then you have a single continous slab of copper connecting all those pins together.
The gate traces are now also on the far south side of the PCB.
If you put them in the slot in the middle (Between the 12V plane and the GND plane) then both sides of the PCB can be a continous conduction for the 12V power.
Does it fit to put the 12V connector further south and put the arduino / uln2803 in the middle between the GND and 12V connector?

For production it is not recommended to put via’s on (small) pads. The main reason is that the (fixed amount of) solder paste will get sucked into the via and you may have not enough solder for a good connection.
For hand soldering, just apply more solder :slight_smile:

The amount of via’s in the groundplane on the top of your PCB seems excessive.
Have you counted them?
This might incease the price of the PCB.
Also, a lot of these via’s are drilled through the copper in the area near the connector, and that is the area where you want as much copper as you can get.
If you remove all the 4x4 via blocks and halve the 4 rows of via’s on the north side of the PCB you still have plenty of via’s there.

You have the 12V (&GND) power supply in the middle of your PCB. This is very good. It spreads the current.

octave:1> 12^2/1000 = 0.14400 // Power dissipation in pullups = OK.
octave:2> 12/1000*8 = 0.096000 // ULN2803 can handle maximum of 500mA (memory) Seems OK.
octave:3> 12/1000 = 0.012000 // Drive current for single MOSfet.

12mA to drive a mosfet is … not so much. Every time a mosfet switches it goes through a period when there is both voltage over the MOSfet and current through it.
This is good enough if you do not switch the MOSfet’s often, but it is not good enough if you want to PWM the MOSfets.
For such applications there are special MOSfet drivers.
Take for example the HCPL3120. This is an optocoupler (not needed here) whith special outputs which can deliver 2A peak current to switch MOSfets (or IGBT’s) fast.
El Cheapo:
I see: “LED Strip Light Dimmer”. This implies PWM.
You should calculate / simulate / build a real circuit to make sure the power dissipation is acceptable at your PWM frequency under full load.

I see a: “V1.0” on your PCB. V 1.0 was with the TO220 packages.
I would call this version at least V1.1. This makes it easier if you want to make notes and or keep track of things that (do not) work well.
Personally I prefer using dates in ISO 8601 format This automatically documents when you did what changes. It helps when you want to compare versions. I also use this date format for making backups. It makes file names sort in chronological order.

Where does the arduino get it’s power from?
How is the GND of the arduino / ULN2803 connected to the GND for the MOSfets?

I do not know how you intend to control this light dimmer, probably from J1 or the 7 pin connector near the ULN2803. You either need to connect the GND’s together, or use optocouplers (or other galvanic separation)

I would probably put a voltage regulator on the board to make the 5V for the arduino locally.
I also always put some inductor / filter in power supplies for uC’s. They are to easily upset by noise spikes otherwise.

Put readable text on the silk screen for all connector pinouts.

It seems that you “forgot” your data connectors. So many details in a PCB…
What circuitry do you use to control this dimmer?
If you put a 5V regulator on this board, can you use it to supply 5V to the rest of the circuitry?

You have a high powered 12V power supply, and you need to connect it to the GND of your arduino somehow.
This introduces a risc of GND errors.
Lot’s of power supplies have an EARTH connection, sometimes connected to the GND of the output.
Your PC is / should also be earthed.
This introduces the risk of conducting the full current of your power supply (40A or so?) through the USB cable. It will melt and catch fire.
What kind of connectors are you using for the LED strips?
Are these fit for the current?
In the 3D printer world quite a lot of printers have caught fire and often it is because of low quality connectors for the heater bed (which takes to most current to drive).

You can use a power resistor or polyfuse to prevent this from happening.
But if you place this betweent he 12V GND and the arduino GND, then you will burn the outputs of your arduino if there is a voltage difference between these GND parts.
Maybe you should have started with posting a schematic here first instead of the PCB. :slight_smile:

Another way is to intentionally use some thin traces as fuses.
For low voltages this is trivial to implement, for high voltage applications this is also used sometimes, but it can cause some extra damage if it is not implemented properly.
A very nice fault analysis of a PCB trace was done by MikesElectricStuff of such a trace which killed a Microwave because of a faulty light bulb:

Have you thought about replacing the arduino board with a ATMEGA328 in DIP package, and put it directly on the PCB?
Personally I never liked the arduino boards much. Nice for experimenting on breadboards, but cumbersome for PCB’s. The widht of the arduino board makes it hard to use wide traces for your 12V power trace.
ATMEGA328 also needs only very simple support circuitry, especially if you use ISP programming, or you can use RxD / TxD with an off board CH340 for the arduino bootloader.

(Damn. again a much too long post. I got carried away in the last hour (or more?)).

Edit (again):
Your via’s in your previous design got partially “tented” (covered by solder mask). They will work ok, but if you do someting similar to J7 through J12 (with exposed pads) then you can fill the via’s yourself with solder and you will have vias capable of a buckload of current and will need very few of them.


Thanks again for all the input. So I tossed out the design with the TO263 housing on the front. So now it’s between the TO263 on the back side or the original TO220 with some modifications (IPP80P03P4L with lower resistance and holes for supporting the heatsink).



TO263 Advantages:

  • The front allows +12V to get to all MOSFETs without any jumpers or vias.
  • The drain of the IPB80P03P4L is really wide supporting more current.

TO220 Advantages:

  • Much better heat dissipation, I think.
  • Easier to solder

Overall, I like the TO263 design better (thanks for that suggestion). My major concern with this design is heat dissipation. They are on the back (less air) and the drain is connected to a rather small area of copper that doesn’t distribute the heat to a large area. Granted, with just 4mOhm resistance it’s still little heat even with up to 6A (note this is for dimming LEDs so relatively fast on/off switching). Btw, I am also a bit concerned how the TO263 shows up in KiCad on the front (the blue/gray Gerbers seem to be fine). I used the TO_SOT_Packages_SMD:TO-263-2 footprint.

As for your inputs:

  • I think the ULN2803 allows 500mA per output, not for the entire chip. I am saying this because the datasheet says “The collector-current rating of each Darlington pair is 500 mA”. That means the whole chip can handle 4A. Thinking about it, that seems high. Maybe I misunderstand the datasheet?
  • Power for the Arduino comes from the USB connection. There will always be a USB connection because the Arduino is controlled from a PC for home automation.
  • Ground from the Arduino goes to the breakout connectors below the Arduino. From there it goes to the ULN2803 GND. And then it goes to the very right of the board up to the GND copper field.
  • Ok, you get me worried about the GND between PC, my PCB and the power supply. Aren’t all of them on the same ground? The PC is grounded through the power cable. Same for the PSU. And the ground/negative terminal from the PSU is connected to my PCB and Arduino ground comes from that.
  • I was planning to solder connectors to the LEDs but the cables are 12AWG (between 20-‘50’ away) so I still need to figure that one out.
  • I could extend the copper on the drain for more heat dissipation but that takes copper away for GND.
  • In the TO220 design ground goes
  • I moved the gate traces to the edge. That helped a lot.
  • I decimated the vias by about a factor of 2 and placed them a bit differently.
  • I changed the version. Actually, I am managing the designs through git and I have 3 branches for TO220, TO263 on top and TO263 on bottom.


For some reason I couldn’t include more pictures in the previous post so hers are the schematics:

And the GND connections from pin 29 of the Arduino to pin 9 of the ULN2803A and then up to the GND part (fed from the PSU) of the PCB. What’s that via below pin 9 you ask? That’s in case I mess up and I need to manually solder a wire from the bottom of the PCB to the top of the PCB. It’s the only such ‘backup’ I have as a common GND is important.


Yes, something seems awry there. The gerbers should be the gold standard, but the solder mask should really appear as expected on the bottom ?

The block of 4 fets furthest from the MCU routes nicely.
The others 4, I think I would try to get the gate leads so they do not slice into the high current areas.
Vias in the gate leads do not matter at all.

Heatsinks always have better ‘heat dissipation’ :slight_smile: - but the idea is to not need them at all.
At 4mOhms, you have just 144mW in that package, which is very modest.

To make soldering easier, you could consider using a hot plate to elevate the board temperature.
It does not have to go all the way to reflow temperatures, just ease the work of the large soldering iron you will be using on the tabs.



I’m more knowledgeable of switching circuits than Kicad so I have the following suggestion & question.

It is not valid to base power dissipation on the product summary “on” resistance. You will be hard pressed to achieve rds on in your circuit.

I see the only one component to turn off the MOSFET is a 1 k resistor. I believe this will result in higher than expected switching loss due slow off switching time.

If you fix the turn off speed and switch the outputs very quickly the circuit will generate a lot of EMI. I don’t know if this will be an issue for you.

If I were designing this product (even if it was for my own use) I would build a single output channel and test it for switching speed and thermal performance. I usually use my finger for the thermal part; hurts but I can still hold my finger on the MosFet = 50°C. Hurts but can only hold my finger for a second or so = 60 °C. If it leaves an impression on my finger its way too hot.


Literally LOL!

and more characters…


Don’t laugh it happened. I recall in my younger days touching a metal can transistor and being able to read the partnumber (at least part of it) on my finger.


I have been going back and forth between the TO263 and TO220 version of the PCB. For the TO220 version I also rearranged the gate traces based on paulvdh’s suggestion. I think that really did the trick. I was somewhat limited on the left side because I need that USB connector from the Arduino at the edge of the PCB which leaves little room for the gate traces. The right side also got crowded. But at the end it really helped and I got rid of all those jumpers and 4x4 vias. I also extended the PCB on the top to accommodate 3 mounting holes. I really some mechanical stability there because I have up to 8 pairs of 12AWG wires connecting to the board which will pull a lot on the board. That in return made the GND copper field much larger.
One concern I have is the gate traces. Since this is for dimming LEDs they switch at up to 1kHz (that’s pushing it, though). Right now I have traces for some channels on the top and some at the bottom. Could this create some ‘capacitor’ and affect the circuit in a negative way? Also are there any other potential concerns? I think this is pretty much the final design now.

KiCad Front:

KiCad Back:

KiCad Front & Back: Front: Back:


1KHz is slow, and fets have large Cgs values, so the trace C’s is going to be quite small.

You might want to add thermals to those terminal blocks, or soldering will be a pain…
and make the Terminals Pads rather larger as you have a quite small solder ring there.

On high current/high stress parts, a decent solder fillet adds strength.

I’ve also used oval pads in places like that, to give better soldering iron contact/transfer, and my high current annular rings are ~ hole diameter wide ie pad dia is ~3x hole.

No shots of the TO263 layout ? - I’d turf the TO220/heatsinks, as mounting TO220 parts is real pain…

How many of these do you expect to make ?


Ok, I think/hope I have the final design now. Since the Gerber’s are the gold standard I am just posting those below from To answer some of the other inputs:

  • This is a personal project. So the number of boards I need is 1!! :open_mouth:
  • The 2x 8-point + 2x 3-point screw terminal have rectangular (1.6mm x 0.7mm) connectors. I made the drill holes round to keep cost down. I know also adjusted the solder pad to 4.5mm x 3.5mm with a 1.8mm drill hole.
  • JohnRob mentioned that the 1k resistor results in slow switching time. I saw people argue for 10k resistors and others for 100Ohm resistors for the same circuit. So 1k is a compromise… Actually, there is some hopefully correct logic behind that. In order for the MOSFETs to turn off I need to get the gate to ~12V. A 10k resistor will slow down the pull-up resulting in more heat in the MOSFET. Going all the way to 100Ohm would increase the switching time but as JohnRob said this might increase EMI. That’s somewhat a concern because this board will be within a few feet of my wireless router, z-wave controller and other wireless devices. Hence I settled of 1k. Hopefully my logic is correct.

Gerber PCB Front:

Gerber PCB Back:

Gerber Copper Front:

Gerber Copper Back:


Looks ok. I trust you checked the heatsink hole sizes and heatsink footprint ?
You might want to add series gate resistors, as the Cgs of big FETS is some nF, and the driver chip has no real current limit. Maybe 100R ?



Regarding the gate resistor.
10K will work fine if not PWM’ing or PWMing very slow.
If you are making a high speed switcher you will be in the <100 ohms to 0 ohms area.
You are somewhere in the middle so your choice is logical and likely pretty close to the optimum.

For My Similar Circuit (lower current though)
I used 1K for an LED driver that has a PWM frequency of ~ 200 Hz. Works find but I have a lighter load and smaller FETs. The Good news the value does not affect the board design so you can change later.

For Home EMI testing I use a cheap AM radio. I tune to a lower end of the frequency band where there is no local station. Bring it right up to the circuit and run it along any long lines. If I can hear a detected “buzz” or (even worse) if the radio output gets a very quiet (i.e. normal no station static is gone). I know I will likely have a problem

I have a RC snubber on the MosFet output for extra EMI suppression. I did not test without the snubber.