Connect multiple vias to ground pour. Heat transfer vs. ground loops?

I’m learning KiCad and board design. I know at the frequencies I am working with, I probably can make a lot of mistakes, but I want to learn good procedure. This circuit takes an 8kHz square wave input (18V peak max), rectifies it (pins coming in from the left), regulates it (the big area in the middle for a AMS117 5V regulator), charges a capacitor for a “keep-alive” (the next 2 pins that are vertical), and powers a few LEDs or similar up to 1A. Bottom layer is a ground pour, top layer is a Vdd pour. The grounds from the bridge rectifier, 5V regulator and 1000uF capacitor need to be via’d to the ground side. What is the right way to connect these? Can a create a polygon of some kind connecting the close-by grounds and put a via or 2 or inside them? Can I do it like I have with vias and traces to connect things together? I have made only to top, Vdd layer in red visible for clarity. Thank you.

EDIT: Great stuff! This is a very simple circuit. Someone else’s. I wanted to model it and design the PCB for it. All it does is take a bi-polar digital signal from a model train track, rectify it, regulate it charge a capacitor, and run a few leds for lighting in the train. Dirty wheels, dirty track, etc. mean for dropouts. So this is just so that the capacitor can power the LEDs for fractions of a second when these dropouts occur. I also questioned the design, because I don’t think it accounts for the voltage that appears at the bridge. First one rail is 12-18v with respect to the other, then it switches. 8kHz pulsed with 58us and 116us pulses. The bridge would see that as up to 18-1.2 = 16.8V. So 16.8 -5V is 11.8V wasted as heat. Here is the schematic:

What is the right way to connect these?

What are you worried about? EMC? decoupling peaks? Current vs track size vs heat?

For EMC and decoupling: Place a small ceramic capacitor next to every digital component (100nF or something like that), with short traces to the power pins. 8kHz is pretty low but that does not matter for EMC / decoupling, important is the rise/fall time. The edge frequency can easily be 10 - 200MHz even when the Signal is only 8kHz.

For the current: Use the PCB-Calculator from KiCad, it has a tab for that.

Can a create a polygon of some kind connecting the close-by grounds and put a via or 2 or inside them?

Yes, but it can make soldering hard, since polygons can remove a lot of heat.

Can I do it like I have with vias and traces to connect things together?

Yes. But i would check the trace width and current. Why are there 2 tracks and 2 vias at each location? How does the PCB look like on the other layers?
A 0.4mm is more than enough for 2A, you don’t need more than 1 via for your current expectation.

It is hard to see what you really want, maybe you can upload the schematic?

  1. I agree that a schematic would be helpful.

  2. How many layers are you planning? I think you have a relatively simple circuit. If that is true, it seems likely that a 2 layer board may be enough. In that case, you try to put as many of your tracks as possible on the top layer and use the bottom for a ground plane. There is some argument as to whether a single solid ground plane is best in most situations. But for a fairly simple low power circuit, I don’t think you will go too far wrong.

  3. I you have a 4 layer board, then it is usually best to make the upper inner layer a ground layer, with most of the tracks on top.

  4. I like to use multiple vias, especially when current is involved. I tend to be conservative. I would like to use 3-4 vias for 2 Amps of current.

Even at 8 kHz with switching current in Amps, you need to think where the high current loops are

1 Like

Yes indeed. The part shown on the PCB is just a linear voltage regulator. Apparently there is some bridge rectifier, but it’s not very clear what it is on the PCB. Maybe the footprint on the left with pad 4 as GND? If that is so, then it’s missing a buffer capacitor. Using a 1000uF buffer capacitor after the AMS1117 is also… unusual. I think a 22uF capacitor is recommended for the AMS1117. The 1000uF would do more useful work if you put it between the bridge rectifier and the voltage regulator. You also have to verify the ripple current of your electrolytic capacitor.

Using multiple via’s is just fine. It increases current handling, and also reduces track inductance, and therefore makes the connection capable of handling higher frequencies. But both your AMS1117 and 1000uF capacitor are not capable of “high frequency stuff”.

Max current for an AMS1117 usually is 800mA. (There are many manufacturers of this chip). It may also get quite hot at higher currents (and higher voltage over the regulator) Removing the thermal via from the big pad and directly connecting it to the big zone helps with keeping it cool.

Electrolytic capacitors do not like heat. Their lifespan decreases significantly with even small temperature rises, and electrolytic capacitors are already the most unreliably electronic parts. An electrolytic capacitor at it’s maximum rated temperature and ripple current may have a life expectancy as low as a few thousand hours. That is just a few months (Yes months, not years!)

So putting them a bit further away from heat sources is always a good precaution. According to the datasheet of the AMS1117 there can be up to 10cm between the AMS1117 and it’s output capacitor.

AMS1117 is also a quite old design (maybe 20 years?) Low-drop voltage regulators have some issues with output capacitors, especially if they are big and have low ESR. This may cause issues if you have lots of ceramic decoupling capacitors on the rest of your PCB.

It’s not clearly shown in the layout but I’d assume the component, with pins 1 and 4 visible, to the left of the AMS1117 is the rectifier bridge. If that is the case, you’re missing a buffer capacitor at the output of that rectifier bridge to smooth out the transition region where the rectifier isn’t conducting in a cycle of the square wave input.

More importantly as it seems to me, there could be better choices for the step-down regulator than the AMS1117.

Your regulator is to supply up to 1A current while subject to about 11V voltage differential, the resulted power dissipation, in case of a linear regulator as is the AMS1117, would be far exceeding the heat-sinking capability of the layout design by using copper planes on PCB as heat-sink, usually 2-3W max allowed around a SOT-223 device. The resulted power dissipation would be far exceeding the maximum allowed by the device itself as well. You’d likely need an LM7805 in TO-220 mounted on a massive-ish, real heatsink, if you have to use a linear regulator.

I would recommend switching regulator TPS82130. It suits your input voltage, almost as simple a circuit as an LM317, a lot smaller overall footprint than AMS1117, does not require an output capacitor that bulky, and you will not have thermal management issues. Just need to follow the recommended layout given in the datasheet.

1 Like

Oops, I missed that 18V input which would certainly overheat the LM1117 @ 1A.

I do agree with nattawa that an SMPS is a much better option for high voltage differentials over the regulator. TPS82130 is not a good choice though. It has a max input voltage of only 17V, but there are many small SMPS chips that can work from a higher input voltage.

You’re right about TPS82130 specified 17V maximum input voltage, paulvdh. Considering the 18V peak max square wave input to our application circuit being subject to a voltage drop of 2x P/N junctions at the rectifier bridge preceding the TPS82130, the device will be working within its specified range of operation. I’d be quite comfortable using it.

However if concerned, for a few nickels more and a slightly larger footprint, TPSM84209 offers 28V max input, and a lower but still satisfying output current at 2.5A.

It is correct that with 17V input and 5V output, a linear regulator will be producing a lot of heat. Not a practical design these days for current over 100 mA or so, unless you need to avoid switching regulators for some reason.

BTW TPS82130 is a module; not an IC. I think that Digikey is all ready to ship 0 pieces because that is what they have in stock. :frowning: Some other distributor might do better.

Yes, it is an all-in-one module that has the inductor integrated. We use quite many of them as point-of-load regulators.

It’s unfortunate that semiconductor is in short supply across the board, and equipment manufacturers have been stocking up and have emptied suppliers. But things always become better after a while.

There are 2 vias and 2 traces at each location because I was wondering if I needed to distribute the current and heat to the ground layer. (There are just 2 layers)

I see you added a schematic.

The way you drew it, the voltage regulator will be starved of input voltage during the time your AC input is below an absolute voltage of around 7V.

So replace the big 1000uF capacitor a 22uF capacitor and put the big one at the location of the “PWR_FLAG”.

And what is R1 doing? Even if you short circuit J3 & J4 your AMS1117 will never deliver more than 5mA into it, so where is that whole amp of current going?

How much experience do you have with electronics?

I would use a lot of vias, strip the soldermask to expose the copper plane, and not use thermal spokes around the collector tab and pin. The attached are cropped from a 2-layer layout I did. The SOT-223 transistors are required to each dissipate continuous 2W heat by using the copper planes as heatsink at 40C temperature rise on 2-Oz copper over 1.6mm FR-4 material, without using forced air flow.

Top side:

Bottom side:

All these vias are for heat conductivity.

At 1A max current in your layout, there is no need of sharing current with vias.

2 Likes

If you want linear regulator the better result you will get with 7805 I think. There the power pad is GND so you can have at top and at bottom GND planes and connect them under 7805 with vias to dissipate power through both planes.

1117 regulators have lover minimum voltage drop then 7805 but here you don’t need that feature.

But even for 7805 you can have better heat dissipation 11.8V * 1A = 11.8W is too much for such case.
See figure 15 for D2PAK and figure 16 for DPAK in:
https://pl.mouser.com/datasheet/2/308/1/MC7800_D-2315963.pdf
You see that maximum power dissipation is about 3W for D2PAK and 2.2W for DPAK.
I suggest to never dissipate more than 1W in DPAK.

That is correct.

Also correct (I did not check the math.)

If you insist on using a linear regulator in this way, one approach is to put a power resistor (a “burnoff” resistor) between the bridge rectifier and the regulator input. That will not help your terrible efficiency but it can move some heat out of the regulator and into the resistor. So for example a 7.5 ohm 15W resistor would drop 7.5V and burn 7.5 Watts of heat which would no longer need to be dissipated in the regulator. I would put the 1000 uF capacitor at the bridge output, and then a smaller value capacitor at the regulator input and another at the regulator output. That 1000 ohm resistor in series with the regulator output is nonsense.

Note that too high a value for the burnoff resistor will result in inadequate input voltage to the linear regulator when input voltage is minimum and output current is maximum.

But as paulvdh indicated, your schematic indicates that you need to get more understanding of circuit theory. It ought to be possible to “breadboard” this simple circuit before you spend money on a pcb. Unless your pcb is very cheap then I recommend that you do so.

BTW I have a hunch that you may have a fundamental problem with your square wave input.

You are passing it through a bridge rectifier. For this to work, the square wave input MUST be floating wrt the regulator circuit. The grounds must not be connected. In the typical example of a bridge rectifier, it is driven by a transformer winding which is electrically floating (not referenced to the ground of the output circuit.)

1 Like

I have a “moderate” amount of electronics experience, EE and CS 40 years ago after which I mostly used the CS part for my career and all electronics projects were hobby designs. So I am trying to get back in it.

This is just a keep-alive circuit that needs to be dirt cheap to power a few LEDs or 5V, 50mA incandescent lights. I don’t care about starving the regulator as long as it can pulse DC to keep the cap charged so that when there are dropouts of a half second or so, the lights don’t flicker. You are right about the resistor of course, thank you! Someone gave me this and asked about a board for it and I should have double-checked it. I am guessing he got a circuit for 12V and added a regulator and left the resistor in there. It doesn’t need a resistor since the current limiting resistors can go on the LEDs. Obviously sticking a resistor in there instead of the regulator and adding a Zener in parallel with the capacitor will accomplish the same task. You guys are helping me think through the circuit as well as the board, so thank you. In looking at the requirements, this doesn’t really need to supply more than 250mA

It is floating. This is a bi-polar signal where one pole is pulsed relative to the other (not to any ground) and then the other pole is pulsed. It would look like a square wave on a scope, but the voltage itself never goes negative, just the current reverses.

A 1F capacitors drops 1V/s with 1A (By definition).
So a 1mF (= 1000uF) capacitor and 50mA will drop 1000V/s = 1V/ms.

For 50mA the discharge rate will be 20 times lower.
With a “moderate amount of electronics” you should be able to work out how long your LED will keep alight.

Also, can you please make up your mind about power consumption? In a single post you mention:

  • A few LED’s.
  • 50mA incandescent lights
  • 250mA.

All the more reason to charge your 1000uF capacitor tho the full rectified voltage to make it last longer.

… and an SMPS IC. These things start at around 10ct, the inductor may cost more.

1 Like

Perhaps instead of 5V, you can instead regulate to 10V or so to further reduce the power loss the regulator alone has to handle. The 5V incandescent bulbs can be connected in series, 2 for 10V, so can LEDs. Series connection can reduce the total current and quickly reduce the power loss at the regulator.

The other alternative can be not regulating the voltage at all, but regulating the current instead with constant current source/sink circuit, one circuit per series of load. A constant current source/sink can be constructed with a couple diodes, a resistor, and a small signal transistor at very low cost and very small PCB footprint.

1 Like