New to KiCad, how am I doing so far?

Hello,

I just started learning KiCad, following the tutorial, the program is very intuitive and I found it easy to learn, thank you for all the hard work.

The first schematic and layout I created is a simple board for a PCB-mounted transformer, which will eventually be part of a PSU for a Raspberry based audio streamer. Apart from the transformer, it includes a fuse, a voltage switch, and in- and out- terminals. Really quite simple, but since I am new to electronics, I would really appreciate if someone could take a quick look at my work. The board will be a standard 1.6mm FR4 board with 2oz copper weight.

I have uploaded the zipped up project to here: AC Board Project

Any comments, good or bad, are greatly appreciated!

It should work. All else is pure luxury.

If you give the same PCB-Job to 10 people, you’ll get at least 12 different results.
What would look different if I had to do it is about the following:

The terminal block on the primary side could have a bit more distance between the pins. (What do you have? At most 3 mm.) I would go for the 7.5 or even 10mm - version of the same series.

“+” and “-” has no place on a AC-board, that’s DC stuff. It kills nobody, but on the first glance it would puzzle me if I had to repair such a board. “L” and “N” on the primary side (“L” leading to the fuse) would be OK, on the secondary side, not even that, “AC out” (or “~”) is enough, mentioning the voltage would be nice.

The footprints (self made it seems) are OK if they never get close to a pick-and place machine. The coordinate 0,0 is at an edge, it should be at the center of the part.

On the secondary side, where you connect the coils, I would get rid of the short 45°-segments. They form an acute angle between traces, forming an etch trap. With those tracks it’s no issue, but on fine tracks it could ruin your day.

On the primary side, the distance between the tracks looks good. As you have a two sided board anyway, I would move all the tracks to and from the fuse holder to F.Cu, so there is everywhere PCB between the voltage difference of 230VAC, not just a possibly contaminated surface.

Depending on the secondary current, it might be good to have wider traces, even copper fills on F.Cu and B.Cu, easy to do as you have both outputs on different sides. Just leave that nice gap between primary and secondary open.

As I said at the beginning, it should work, so you’re doing fine.

Walter

1 Like

Thank you so much for your reply. I am glad to hear that I am generally on the right track.

The terminal is a Phoenix 1985881, with 5mm pin spacing. I agree, it should have a 10mm pitch, considering it is 115 or 230V. So many variables to consider, I missed this one!

Very true, I had already wondered about that myself; from what I learned, AC is alternating voltage, so the + and - marks are definitely irritating. I will fix that.

Footprints are self-made, since I couldn’t find the parts anywhere (library or online). I didn’t know about the centering, I will keep this in mind for the future. I will solder the components on myself, so for now I should be OK.

I will do that. The reason I made these is, that I thought I should try my best to get traces away from the transformer. But I can still keep them away with a longer diagonal trace.

I can do that, although I don’t 100% understand what you mean…

I have not really understood the purpose of copper fills yet. I thought this was of importance in low-level circuits, not necessarily in a power supply. I calculated the trace width for 2A current, and 2mm seemed sufficient.

The transformer is a Triad VP16-1900, wired in parallel gives 8V output.

It has also been suggested that I should use a fuse on the AC out side as well, especially since the voltage regulator I am using does not have its own fuse. I suppose I add that on top of the output terminal on the right(?).

I have changed the terminals to larger ones and updated the layout according to @Walter’s tips.

What I haven’t implemented yet are copper fills (as I don’t quite understand their purpose yet), and a fuse on the secondary side.

Everything else I think looks pretty good now: AC Board v.0.2

Here is a simple, and rather extreme, example of how you might use filled zones in your design.

In this case, the zones are used to create connections between the transformer and the output connector. They provide the lowest possible impedance. They might make it possible to use the “standard” copper weight (thickness) rather than paying a surcharge for thicker copper.

By leaving more copper on the board they will not deplete the etching chemicals as much as a board with large areas free of copper. This may result in more consistent etching of the board, as well as less chemical waste to dispose of.

Dale

1 Like

If you have two tracks with 230VAC between them, the weakest part considering insulation is the surface between the tracks. (That’s the reason for gaps milled in the PCB if good insulation against high voltage is needed. Look at the PCB of a decent multimeter.)
If the PCB is new and clean, all is well. Dust and humidity will change that over the years (not even talking about serious contamination…), it can lead to the point current will start flowing over the surface, a process that will damage the surface further, leading to even more current flowing. It ends either with a blown fuse or the fire brigade coming to a surprise visit, in the worst case.
If you keep the traces on different sides of the PCB, you have always the insulation of the PCB between the 230VAC, a far better insulation as the possibly dirty and humid surface.
I guess the PCB will stand 10kV between both sides for a short time, that would give a spark over about 10mm air or clean PCB surface.

The Copper is free, you already paid for it, it’s just less material to remove :slight_smile: . It is just a lot more area for the current to flow through, less resistance (and impedance) is always good.

That’s almost a philosophical question. Some people do, some don’t.
I don’t, I just use voltage regulators able to stand a short circuit (by either shutting down, going into a “hiccup-mode”, or simply oversized cooling fins able to deal with that heat dissipation.
Feel free to do it if you feel it is needed.

Walter

1 Like

Thank you @dchisholm and @Walter, I now understand the purpose and reasons for using copper layers, as well as why to separate the high voltage tracks on back and front of the PCB.

A couple of questions I have about this:
Is it OK if the copper layers overlap? I mean overlapping in the sense of one layer of F.Cu being directly on top of another copper layer on B.Cu?
Should I fill as much as possible on the right side of the transformer with copper layers (with appropriate space to the edge of the board and the screw holes)?

Regarding separating the high voltage traces:
I have in the second revision moved all traces to- and from the fuse to F.Cu. I suppose I could additionally move Net S1-Pad1 to the front (the one going out of the upper primary, to the switch), but I am not sure if that is necessary.

Now I have some time to look closer at it - all I have done before was (ab)using some time between meetings and stints in a clean room. Hey, at least that way I got payed for it :wink:

Looking at the data sheet of the transformer, I see it’s a tiny 30VA one. Looking at the fuse ratings on the primary side I expected quite a bit more power. The data sheet states those “recommended fuses” belong to the secondary side, see the fine print, footnote number 3. And it even states the reason, UL class 2/3 operation, and places me deep in CE-territory where UL is not of much concern. A fine point learned for me :blush:
So, you should recalculate the fuse on the primary side (and add one on the secondary if UL-territory is an issue).

As a transformer is a hefty chunk of metal, are you OK with the bending and shear forces on the PCB and the M3-screws if the case containing the PCB gets dropped or just handled roughly? I would think about two more screws at the middle of the PCB to reduce the bending forces. The four holes through the transformer core are there for a reason, but it would be a bit much using those additionally to fix the transformer. Another option would be using those holes in the transformer core, with distance pieces to the case, to mount the whole assembly, not using the four screws now present. The mass of the PCB and the terminal blocks is negligible compared to the transformer.

BTW, the Board v.0.2 is a bit hard to load, the “drtebi.com”-part of the link is missing. (I got it anyway.)
It looks a lot better (or, at least, more to my liking…), the etch-traps on the secondary side are still present. Join those tracks at right angles, not 45° (or, in this case, use copper fills).

The voltage regulator should do it’s job, but the person drawing the schema on the website should learn how to do it, and the text contains a bit of audiophile-crap like “The RC filter before the voltage regulator unburdens the regulator from having to deal with sharp transients.” Hell, exactly that is the job of the regulator: Keeping the output voltage as constant as possible, and that as fast as possible - that’s how to deal with “sharp transients”.
(Audio and “sharp transients”, that needs much imagination in itself. A constant current power supply (0…10V in, 0…100A out, 2kW sustainable) able to hit a load with 3000A/ms, that’s a “sharp transient” in my book. :smiling_imp: )

Now, 10 seconds meditation to let the blood pressure drop again. Done: :innocent:

That’s perfectly OK. You have 1.6mm Glass and Expoy in between.

Not “as much as possible”, dchisholms solution is about what I would do.

I would change the layer of Net-(S1-Pad2), connecting pin2 of the switch with pin 2 of the transformer. You have “L” connected to the lower row of the switch, and would never have leakage current issues from that trace to Net-(J1-Pad2).

Walter

1 Like

A lot of great tips, thank you @Walter!

About the transformer weight: I didn’t expect it to be that hefty. Today I got most of the parts, and when I took the transformer out of the box I definitely had the same thought, that I should support the PCB board in the middle somehow.

What I would like to do is take advantage of the holes in the core, and put a couple of mounting holes right underneath, connected to posts on the chassis. That way I would have eight posts, which is probably a bit overbuilt, but I like overbuilding things… and this is a “personal” project, so a couple of $ more won’t make really a difference. It will just be a little fiddling to get the screws and screwdriver through those holes. I should probably unplug the transformer while doing that (of course I will, just kidding!).

Regarding the etch-traps, I misunderstood. I thought a 90° angle should be avoided, but if I understand correctly now, any two traces that meet at a sharp angle should be avoided… But anyhow, I will use copper-fills for the next version.

I will take the additional mounting and your tips into account and redesign. Stay tuned!

Here is now the third version: AC Board v.0.3
Link should work this time (also fixed the older link).

I have edited the Transformer footprint by adding the core-mounting holes as circles on the Dwgs.User layer, I suppose that is the correct layer for this type of “orientation” info. While I was at it, I also changed the origin to the center.

Then, in the PCB layout, I placed four more M3 pads exactly where these new circles of the transformer footprint are.

I moved Net-(S1-Pad2) to the front layer.

The copper fills are also there now.

A couple of questions remain:

  • In the 3D view, the pads within the copper fill have an X through the center… I don’t know if that’s a glitch in the viewer, or if I have done something wrong.
  • I still need to change the voltage rating for the fuse… but I must admit I don’t know how to calculate it. The load (a Raspberry Pi with a DAC add-on card) draws at max 2Amps from the 5V power supply.
  • I don’t know anything about UL class 2/3… I suppose it’s a safety standard? So if a country requires that standard, my home-made device doesn’t comply, the house burns down because of a short in my device… the insurance won’t pay? Something like that? I am still not certain if I should add a fuse to the secondary side; I asked the designer of the regulator yesterday, I am curious to see what he will suggest.

I hope the PCB layout looks good now.

You’re going to the trouble and expense to make a PCB to hold a transformer but buying someone else’s regulator?

Your primary fuse needs to have a much smaller current rating, about 1/2 Amp for 115VAC, 1/4 Amp for 240VAC. Although a 1/2 Amp would probably suffice for both voltages. Add a 2.5A fuse to the secondary.

I would put standoffs between the transformer and PCB and use longer screws to hold the transformer in place. Insert the standoffs and tighten the transformer down to the PCB before soldering to ensure a proper fit.

I would seriously consider putting your own regulator on the board, it’s only a few more components.

1 Like

I will do that.

If I understand correctly, the standoffs would have to be female on both sides then, correct?
Mounting the transformer to the PCB does no help supporting the weight of it on the board’s center though, or were your thoughs to additionally mount standoffs directly under the standoffs that hold the transformer? E.g. transformer->standoff->pcb board->standoff->chassis.

You make a good point. When I started this project, my options were

  1. Buy an assembled PSU
  2. Find a nice kit and build it myself
  3. Build everything myself, from scratch

Option 1 seemed to simple… I do want to learn something, and also want to be able to have a bit more “control” over everything. Option 3 seemed to complicated for a beginner… well, I did find a number of good tutorials on linear power supplies, but whenever I did look at “respectable” schematics, they seemed to be a lot more involved than just a rectifier bridge, filter capacitors, regulator(s). That’s what threw me off, and I went with option 2… only problem was, that the kit that I found did not include a transformer; additionally, my case is very short (about 2.25 inches or ~57mm of height inside), so the only option was to use a flat PCB mounted transformer… hence this AC board project.

I do already have the regulator parts, not soldered onto their board yet though.
I like the idea of having only one board, so I could potentially redesign my board to accommodate the regulator parts I have. But since I am still new to all of this, I would rely on a bit of help to get this all right… For example, there are numerous holes in the regulator board, which I assume are there to prevent leakage(?).

On the other hand, the regulator board also has some things I don’t like: The AC in connector is not at the edge of the design, it sits in between capacitors and diodes; it also must be soldered, I would have preferred a screw-terminal (integrating the regulator with the transformer on one board would however eliminate this entirely).
Also, the heat sink is sort of in the middle of the board; I would have liked to add a bigger heat sink, but with the provided board, options for a larger heat sink will be limited.

The schematic and layout of the regulator can be seen here.

Well, what do you think? Is it worth the trouble to redesign my board, implementing the regulator? Or stick with the original plan…?

They have those spokes even in the gerber files I hope. :slight_smile:
Those are what’s called “thermals”. Copper has an exeptionally good heat conduction. If a pad or hole for a pin doesn’t have those spokes, the heat applied for soldering will dissipate very fast into the surrounding copper, making the soldering hard to do (oversized soldering iron, very long processing time, risk of damaging parts by overheating).

The voltage rating is OK, the current rating isn’t. :slight_smile:
The transformer is 30VA type, so 30VA / 230V is 0.13 A. Just basic physics, electrical power is voltage times current.
At the moment of connecting the transformer to the power grid there is a larger current flowing into the transformer itself, the magnetic field inside the core is zero at this moment. On the secondary side, the capacitors are fully discharged and act for a short time like a short circuit.
This inrush current (expect about 10 times the nominal value) is mostly taken care of by the fuse specification “slow blow”. Additionally you need to add some safety margin to the fuse specification, you don’t want to blow the fuse every time the line voltage is at it’s allowed maximum, you plug it in at the exact moment of peak voltage and the room temperature is on “ice cold”, so I would end up at 0.25 or even 0.315A for 230V and 0.5 or 0.63A for 115V.
If you want to have a fuse on the secondary side, the transformer is rated for 4A, so 5 or 6.3A might fit. If you want the secondary fuse according to the regulators specification, 2 or 2.5A would be OK too.

I don’t know much about UL, “Underwriter Laboratories”, myself, I’m outside UL territory, it’s just a gang of blokes given the permission (by the OSHA for the USA) to check and certificate devices regarding safety, in exchange for a sizable sum of money. Different country, different gang, subtly and annoyingly different rules. I won’t and can’t read the UL rule books, it’s no fun reading such stuff and trying to make sense of it. If UL is an issue where you live, install that secondary fuse.

Yes, it boils down to exactly that. And it’s the reason if ever possible I buy a power supply (not a cheap chinese one), so that if shit happens, I or my heirs can sue someone else.
I tend to use wallwarts or laptop-bricks (moving the responsibility to someone else) and, if needed, feed that power to DC-DC converters (again, good insulation at someone elses responsibilty) making all the voltages I need. So all I’m doing is playing around with harmless low loltage, at greatly reduced hinderance by rules and laws.

Yes, it does. No objections anymore.

Walter

2 Likes

Sorry, I said “standoff” but I meant spacer. The idea being to mount the transformer to the chassis, sandwiching the PCB in between. This way any stresses due to impact or vibration are transferred directly to the chassis rather than the PCB.

transformer->spacer->pcb board->standoff->chassis.

If it was my board I would definitely include the rectifier and regulator but I would probably use a switcher instead of the linear regulator. But you have to decide what is right for you. If you already have the regulator then there is no cost savings just the convenience of a single board.

1 Like

Except it’s not quite that simple. Firstly, basing your calculations on 230V is not going to yield a fuse rating that is sufficient for 115V. Additionally, transformers are not 100% efficient. Well designed transformers can approach 95% efficiency and well designed transformers with a properly matched load can even approach 98%. But a good rule of thumb would be to use between 90% and 95% depending on how conservative you want to be.

When the load is fixed and known the fuse rating is usually based on the max expected load current. If the load is not fixed, such as a bench power supply, then the fuse rating would be based on the max power rating of the transformer. Given a load of 2A, and providing a little overhead to allow for future expansion, we might use 2.5A as the max load. 2.5A x 8V = 20VA. Using an efficiency factor of 90% this translates to 22VA on the primary side. 22VA / 115V = 0.191A. The fuse rating is 125% of this result. 0.191 * 1.25 = 0.239. The next size up would be 0.25 A.

The same calculations as above based on the transformer’s 30VA capacity yields a value of 0.359A, with the next size up being 0.5A.

Use a slow-blow fuse for inductive loads and a “fast” fuse for non-inductive loads. The fuse must have a voltage rating that is equal to or greater than the voltage for which they are used. In this case 250VAC. A fuse’s DC voltage rating is usually half of it’s AC voltage rating.

1 Like

It’s never that simple.
For non-precision parts, where for me transformers and fuses belong to, all I do is trying to get it “close enough”, my assumptions (yes, there is always an “ass” in it) will be verified on the first prototype, by extensive measuring and testing (sometimes even destructive, be it intentional or not :wink: ).

At this stage, there might be some twiddling and tweaking involved (like a second SMD resistor soldered on top of the first one to “just get it right”. A fuse a size up of down would not raise an eyebrow.
On the second prototype, I hope all my expectations and all requirements to be met on the first powering on. Well, hope is what dies last…

Fuses are something special in itself, I would not expect parts with the same rating from different manufacturers to have exactly the same properties (but they will be close enough).
Even less if I compare some parts from a reputable manufacturer with parts labelled as identical, including manufacturer, from a very very cheap E-Bay source. Beware of chinesium :slight_smile: .

If I need precision, like on an active IF bandpass where even the capacitors have 1% tolerance, there I will calculate extensively (and probably simulate). And still test and measure.

Walter

1 Like

Hello there,

an update… I received the circuit boards today (from PCBWay). They look great, but it turns out that I miscalculated the drill hole sizes for the transformer!

Problem was, that the pins are square, and I took the square dimension (0.045 inch = 1.143mm) and used that as the drill hole size. But geometry doesn’t work that way :frowning: The “diameter” of a square (corner to corner diagonally) is not the same as its length, oh well… The proper drill size would have been ca. 1.6mm.

I suppose it’s a bad idea to drill the holes bigger? I could try a 1.5mm drill (measuring the pins, they appear to be slightly smaller than 1.6mm diagonally). I have a good drill press, too.

I just don’t know how that would affect the pads?

You risk tearing the copper foil pads. I’ve not done it personally so this is just from reading. Can you easily jumper the pins to the next pad if you do mess them up? A sharp bit and suitable lubricant and you will probably be OK. Also, high bit speed and slow feed rate. Decide first if something goes wrong in the process can you recover?

I have 5 boards (minimum order was 5), so I figured I can try drilling on one. It worked well, but (as you said), the pads lost their foil (tinning between layer 1 and 2 that is).

I resorted to filing edges of the pins of the transformer down, and used the next board with its original small holes. It was very little that had to be filed off, so the pins are still strong and it fits well (tight fit, but not too tight either).

Was that the better option? I assume it was… I think I will solder the components on today or tomorrow and see how it turns out.

I have not looked at your design layout.

You will lose the through hole plating, and risk tearing the copper pad off the board; two separate issues.

It is not a problem to lose the through hole plating if there is only a connection on side of the Pcb. However, if you can physically solder both the top and bottom, or use flux and good soldering techniques to get a nice solder fillet on both sides of the board that would be a good thing.

However, your solution to file down the edges probably makes the most sense. Solder in and of itself is not a great conductor. Having a direct physical connection of the pin and the copper of a board is a good thing, especially with higher wattage requirements.