Author Topic: AC return voltage on DC GND plane  (Read 5343 times)

0 Members and 1 Guest are viewing this topic.

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
AC return voltage on DC GND plane
« on: October 24, 2017, 10:39:56 am »
Hi All,

I have peak detector circuit (attached) taken from dave's tutorial to sense the section of the  ac voltage from the secondary of a transformer to calculate the amps put out using Ohm's Law. The rectified voltage 4.3v is fed into an arduino. I know there are CT to do this but no taking that path.

Now would it be ok to layout the AC signal on the dc plane as well ?

Thanks in advance
 

Offline homebrew

  • Frequent Contributor
  • **
  • Posts: 293
  • Country: ch
Re: AC return voltage on DC GND plane
« Reply #1 on: October 24, 2017, 04:07:08 pm »
Hi anishkgt,

well I would NOT recommend to do the layout like that AT ALL. It looks quite dangerous. To me, the clearance looks WAY TOO SMALL on the 230V side. Are the SMD-Components even rated (and/or certified) for that voltage? Please bare in mind that you'll have a lot of high voltage spikes on the mains that could potentially cause an arc to form.

There is absolutely no reason to skimp on safety - especially at fun projects.

A number that is apparently often cited is a minimum clearance of 8mm - at least between primary and secondary side. Try google this! Here is one random source: http://www.minntronix.com/application/files/2914/5948/1301/CreepageandClearance.pdf
I personally would even go higher, or additionally mill out isolation slots between primary and secondary side ...

Also look at the placement of you components. Here for example the fuse and the USB connector. If mounted in a metallic case, either the distance between the case and the fuse would be WAY too small, or you wouldn't reach the USB port. If used without a case, accidents are waiting to happen ...

So please redesign this!

Now regarding your question: Assuming that the signal is isolated from the mains, I would't have much objections using the same ground plane. The signal is of very low frequency (i.e. 50/60Hz), low/no current and very moderate voltage. You might want to add some ESD/EMC and transient protection to the input like a low-pass filter and a TVS diode. Additionally, as the board is two-sided anyway, I would also use the top layer as GND plane as well and stitch them together with some (actually a lot of) vias thereby creating a (more) continuous 'plane'.

 
The following users thanked this post: vk6zgo

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: AC return voltage on DC GND plane
« Reply #2 on: October 24, 2017, 08:40:29 pm »
Thank you Homebrew.

I've done board earlier with the same specs but all were through hole components and this is the SMD version but with a bit more features and enhancements from the previous version based on customer feedback.
Quote
Also look at the placement of you components. Here for example the fuse and the USB connector. If mounted in a metallic case, either the distance between the case and the fuse would be WAY too small, or you wouldn't reach the USB port. If used without a case, accidents are waiting to happen ...
I've rearranged the USB connected bit more to the right away from the mains. Thanks for pointing it out. The pcb will enclosed inside a wooden box (idea attached)
Quote
Now regarding your question: Assuming that the signal is isolated from the mains, I would't have much objections using the same ground plane. The signal is of very low frequency (i.e. 50/60Hz), low/no current and very moderate voltage. You might want to add some ESD/EMC and transient protection to the input like a low-pass filter and a TVS diode. Additionally, as the board is two-sided anyway, I would also use the top layer as GND plane as well and stitch them together with some (actually a lot of) vias thereby creating a (more) continuous 'plane'.

I did have in mind a TVS diode but have no idea how to do a Low pass filter. Would this TVS diode be ok https://www.digikey.com/product-detail/en/on-semiconductor/MMBZ5V6ALT3G/MMBZ5V6ALT3GOSCT-ND/6007823. The max weld time would be 500ms but that would be over kill for spot welding.

https://youtu.be/WAoY9HTdF6o
« Last Edit: October 24, 2017, 08:42:16 pm by anishkgt »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: AC return voltage on DC GND plane
« Reply #3 on: October 25, 2017, 09:01:43 am »
There still doesn't seem to be enough creepage distance between the mains and the lower voltage side of the supply. The creepage is the distance, along the surface of the board, between tracks on the PCB. Unless there are slots between tracks, the distance between the tracks should not exceed the minimum creepage distance, which depends on the voltage, the class of insulation (see below), PCB material and the environment.

There are different classes of insulation: functional (non-safety critical, only required for correct operation), basic (between the mains and an exposed conductor or extra low voltage circuit, connected to earth) and reinforced (between the mains and an unearthed exposed conductor or extra low voltage circuit).

Functional insulation isn't really an issue for mains powered equipment, as long as a fuse is used or the transformer has one built-in, the standard footprints for components, designed to work at that voltage, will provide adequate creepage distance.

Basic and reinforced insulation are both necessary to protect against electrical shock. Reinforced insulation needs to withstand double the voltage of basic insulation. Therefore the creapage distance for reinforced insulation, should be double that of basic insulation.

In your circuit, there needs to be reinforced insulation between anything connected to the primary of that transformer and the secondary side. The same is true for the opto-coupler and current transformer. It's evident from your layout that this isn't the case.


8mm of creepage is generally the worst case for mains. 6mm is generally adequate for a domestic/office environment. See the links below for more information:
http://blog.optimumdesign.com/clearance-and-creepage-rules-for-pcb-assembly
http://www.pcbtechguide.com/2009/02/creepage-vs-clearance.html#.WfBPLX7ysWM
 
The following users thanked this post: anishkgt

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: AC return voltage on DC GND plane
« Reply #4 on: October 25, 2017, 10:39:08 am »
Thank you Herro999.

I've moved the components further from the mains, added slots and moved the top and bottom GND pour too. The distance from C16 to GND and transformer to the Bridge B1 is about 6mm now.

How good would this be ?
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: AC return voltage on DC GND plane
« Reply #5 on: October 25, 2017, 02:24:46 pm »
Isolation between secondary and primary should be at least the full width of the opto-coupler.
Otherwise a slot must be milled. Like you did at the bridge rectifier.

However, when I look at it I see more issues. (yellow)
You can use net classes to check clearances for you.
Your connectors are not suitable, for mains you need ~7mm connector, skip one at 5 mm or mill slots.

Key differences here are safety and functional isolated. A 5mm gap is enough at 400V, no worries for functional isolation. Yet, sometimes mains has transients of several kV, then you decide if you care about a few sparks or damages.
You can't protect common mode transients (primary to secondary) with a varistor, like you can on a connector, so you have to provide safety isolation. Then the pollution classes also have a multiplier on the distance, but let's not go there.

Also, you are probably going to hell for placing the chip at that angle. :scared:
« Last Edit: October 25, 2017, 02:31:38 pm by Jeroen3 »
 
The following users thanked this post: anishkgt

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: AC return voltage on DC GND plane
« Reply #6 on: October 25, 2017, 05:04:51 pm »
Thank you Jeroen3

i've added slots to the connectors and decided to not go to hell  >:D
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: AC return voltage on DC GND plane
« Reply #7 on: October 25, 2017, 08:04:48 pm »
Do you really need the mains selection jumpers? I mean, for the same price of the transformer you get something from vigortronix.
It's worth it, since you now have a spark gap jumper.
« Last Edit: October 25, 2017, 08:07:15 pm by Jeroen3 »
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: AC return voltage on DC GND plane
« Reply #8 on: October 25, 2017, 08:20:26 pm »
Yes there is one i did see it while shopping on DigiKey but i was more concerned on the price and pcb mountable. Hence decided on headers.

So there is arcing during transients that would jump but isn't that taken care by TVS diodes ?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: AC return voltage on DC GND plane
« Reply #9 on: October 25, 2017, 11:26:28 pm »
Isolation between secondary and primary should be at least the full width of the opto-coupler.
Otherwise a slot must be milled. Like you did at the bridge rectifier.

However, when I look at it I see more issues. (yellow)
You can use net classes to check clearances for you.
Your connectors are not suitable, for mains you need ~7mm connector, skip one at 5 mm or mill slots.

Key differences here are safety and functional isolated. A 5mm gap is enough at 400V, no worries for functional isolation. Yet, sometimes mains has transients of several kV, then you decide if you care about a few sparks or damages.
You can't protect common mode transients (primary to secondary) with a varistor, like you can on a connector, so you have to provide safety isolation. Then the pollution classes also have a multiplier on the distance, but let's not go there.

Also, you are probably going to hell for placing the chip at that angle. :scared:
What's wrong with the connectors? 5mm of creepage is more than enough for functional insulation. In fact, even 1mm will do for functional insulation. It also depends on whether the functional insulation is before or after the fuse.

Look at the creepage distance on the pins on an SCR or TRIAC, rated to 400V. They're not that great, yet many mains powered devices routinely use them and they're perfectly safe and reliable.

Do you really need the mains selection jumpers? I mean, for the same price of the transformer you get something from vigortronix.
It's worth it, since you now have a spark gap jumper.
There's nothing wrong with the voltage selection jumpers. The mains is not a high voltage. It can't arc over a visible gap. The creepages for basic and reinforced insulation are there purely to protect the user against shock, in the case of a transient, such as lightning. The equipment doesn't have to survive, high voltage (>1kV) spikes, although it's good for reliability if it does, although the electronic components will be far weaker than the gaps between the PCB traces.

What's the point in having ridiculously overrated functional insulation, when the it'll be much stronger than the insulation inside the transformer?

Thank you Jeroen3

i've added slots to the connectors and decided to not go to hell  >:D
That's much better. Keep the slots on the connectors, if you like but they're not necessary at all.
 

Offline homebrew

  • Frequent Contributor
  • **
  • Posts: 293
  • Country: ch
Re: AC return voltage on DC GND plane
« Reply #10 on: October 26, 2017, 06:31:08 am »
Great to see that the board makes good progress!

There's nothing wrong with the voltage selection jumpers. The mains is not a high voltage. It can't arc over a visible gap. The creepages for basic and reinforced insulation are there purely to protect the user against shock, in the case of a transient, such as lightning. The equipment doesn't have to survive, high voltage (>1kV) spikes, although it's good for reliability if it does, although the electronic components will be far weaker than the gaps between the PCB traces.

What's the point in having ridiculously overrated functional insulation, when the it'll be much stronger than the insulation inside the transformer?

Well it's better to be safe than sorry. That simple. I a project like this, where apparently neither PCB space nor cost ist an issue there is absolutely no need for doing any reasoning to skimp on safety. I (and probably some others here, too) won't call myself an experienced expert when it comes to mains stuff. Hence I like to approach things like that in the following manner:

1) As simple as possible! No unneeded complexity and/or components.  -> No voltage selection jumpers and the like.
2) Only use components that are rated for the purpose. -> No questionable SMD parts, no 5mm terminals etc. etc. Yes, big companies have the resources to perform a risk assessment properly and save a few cents on every board.
3) Maximum clearance wherever possible. Finger safe (at least from the top side)! Especially as this is a prototype project where you probably need to probe while operating the device. -> No jumper,  no Mains SMD-parts etc. etc.

Going back to the original issue with AC GND and Opamp input protection and filtering, I would probably try something like this:

But people here are for sure more experienced than me and will comment on the proposed solution.
« Last Edit: October 26, 2017, 06:37:55 am by homebrew »
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: AC return voltage on DC GND plane
« Reply #11 on: October 26, 2017, 06:47:41 am »
@Hero999 I suppose for a board made at home reliability and safety is not main concern. It just needs to be reliable and safe enough to use for a few hours.

What input range is that circuit?
 

Offline homebrew

  • Frequent Contributor
  • **
  • Posts: 293
  • Country: ch
Re: AC return voltage on DC GND plane
« Reply #12 on: October 26, 2017, 06:51:19 am »
Hi anishkgt,

if you have restricted yourself to the Eagle freeware, maybe you like to simply share your eagle files here?
It would be an interesting exercise to practice routing and placement.

We could try out different solutions and have an interesting discussion where a lot could be learned ...

Pete
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: AC return voltage on DC GND plane
« Reply #13 on: October 26, 2017, 07:11:44 am »
I use the registered standard version of eagle version 7.7

Input to the op amp you mean jeroen3 ? It’s about 0.00299vac.


Www.Georgehobby.wordpress.com

Equipments: DSO104z, Hakko FX888D
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: AC return voltage on DC GND plane
« Reply #14 on: October 26, 2017, 08:50:31 am »
@Hero999 I suppose for a board made at home reliability and safety is not main concern. It just needs to be reliable and safe enough to use for a few hours.
Don't get me wrong. Safety is important, even for a home made board. I just disagree that non-safety critical, functional insulation, on the PCB, needs to be ridiculously overrated. If the component is rated for use with mains voltages, then the creepage distances between the pins will be large enough, as long as it's used within the operating conditions, stated on the data sheet. In my inventory, I have some PCB connectors with a pitch of 2.54mm and are rated for 300VAC and some 400V rated SCRs in a TO-220 package. The creepage distances are much less than what you stated, yet they work fine, at mains voltages.

Use much larger creepage distances before the input fuse, than after it. The fuse will then protect against failure. In a domestic environment there's no need to go too over the top, as the main breaker provides adequate protection against fire.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: AC return voltage on DC GND plane
« Reply #15 on: October 26, 2017, 08:44:43 pm »
Look at this, I did some shoving around. Fixed the SOT404 shape for you. It was much too tight. And now they are using the fuse as heatsink, which works very good. Any through hole parts is a heatsink for smd parts.

I'm not going to finish it for you, but you can at least take some inspiration.
Look at how much space there is left for the transformer jumpers, which you now could make using the same screw terminals if you'd like.

Note that I have no used any slots here. If you want slots, most PCB houses have a minimum of 2mm slot. Smaller is possible at a price.
Also lookup their copper to edge, and draw the shapes with small width it on the outline instead of the milling layer.
The milling layer is not always exported, the outline is.

You might also still need some practice on how to make nice schematics. This one isn't particularly obvious. (hint: use multiple sheets)
« Last Edit: October 26, 2017, 08:50:42 pm by Jeroen3 »
 
The following users thanked this post: Zero999, anishkgt

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: AC return voltage on DC GND plane
« Reply #16 on: October 26, 2017, 10:46:26 pm »
Look at this, I did some shoving around. Fixed the SOT404 shape for you. It was much too tight. And now they are using the fuse as heatsink, which works very good. Any through hole parts is a heatsink for smd parts.

I'm not going to finish it for you, but you can at least take some inspiration.
Look at how much space there is left for the transformer jumpers, which you now could make using the same screw terminals if you'd like.

Note that I have no used any slots here. If you want slots, most PCB houses have a minimum of 2mm slot. Smaller is possible at a price.
Also lookup their copper to edge, and draw the shapes with small width it on the outline instead of the milling layer.
The milling layer is not always exported, the outline is.

You might also still need some practice on how to make nice schematics. This one isn't particularly obvious. (hint: use multiple sheets)
That looks much better.

The only potential problem is it might not be possible to move the transformer, as it might foul on other components in the enclosure, which neither of us have seen.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: AC return voltage on DC GND plane
« Reply #17 on: October 27, 2017, 05:34:23 am »
Ah yes. It is also a heavy component that you might prefer somewhere else.
I also couldn't fit the snubber circuit very well here.
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: AC return voltage on DC GND plane
« Reply #18 on: October 27, 2017, 08:12:28 am »
Thank you jeroen3. The board does look better now and yes it was an inspiration. I did not use the files that you send but did it myself keeping yours as a reference.

Initially i had the transformer placed like that but i was lost half way not sure how to route the remaining and secondly i though drawing long routes on AC signals wouldn't be a good idea. Added some slots as well but are all of these slots necessary ? especially from R15 to T1.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: AC return voltage on DC GND plane
« Reply #19 on: October 27, 2017, 09:01:31 am »
Looks much better with a real connector!  :-+

What current are you looking at doing here? With these <2mm traces you looking at 5A peak max, I would use a 2AT (2 amps slow) fuse.
The traces will raise in temperature. If you are looking for more current, use wider traces or polygons.
Avoid via's carrying the current. But if you have to, use multiple and remove solder mask (tick the stop tickbox). One via is 1 Amp.

http://www.saturnpcb.com/pcb_toolkit.htm
 
The following users thanked this post: anishkgt

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: AC return voltage on DC GND plane
« Reply #20 on: October 27, 2017, 09:21:32 am »
I'd be more concerned about the trace connected to  R15 being too close to OPT1.

The connector looks better though.

I strongly recommend using Jeroen3's layout, but with the new connectors.
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: AC return voltage on DC GND plane
« Reply #21 on: October 27, 2017, 06:15:46 pm »
Quote
What current are you looking at doing here?
Each SCRS are rated for 20A continous but the max time i would ever user it for is about 500ms. So i am guessing less than 2A. Both fuse are 5A but that has to be replaced as needed when using higher current. Since we are talking about the fuse. Would it be ever necessary for the second fuse near R16, the one just above the transformer.

Quote
The traces will raise in temperature. If you are looking for more current, use wider traces or polygons.
I've added polygons and vias at the cathode pins. Is that how its done to managed current ?
Quote
Avoid via's carrying the current. But if you have to, use multiple and remove solder mask (tick the stop tickbox). One via is 1 Amp.
Well i had to to use VIAs to get around and i've added them along the trace. Why not use solder mask ? it would protect the vias from corrosion. What is the reason for not covering ?

#Hero99
Quote
I strongly recommend using Jeroen3's layout, but with the new connectors.
I am actually using Jeroen3's layout, as he said all the routing was not completed.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: AC return voltage on DC GND plane
« Reply #22 on: October 27, 2017, 06:59:43 pm »
Looks like your average current is quite low then, which is good.
You should refer to the saturn pcb toolkit I've linked above. It helps you calculate the current capabilities of the board. (make sure with copper thickness is correct)
It also helps you calculating clearances.

See the attached image, I think I've covered the current path. You will quickly see the weak spots.
The transformer won't take much current, the via's are not required there. I referenced to "the" current, as in the thyristor switched current.

I'm glad my design isn't burned down. I've actually not designed a thyristor circuit myself before though. Only igbt and semitops. So I didn't do a "design review" in that aspect.
Remove the stop layer on the via so you can fill them, or at least they will be covered by hasl. Tenting (covering it up) won't be possible above certain size.
If you want to prevent corrosion you should use a coating. This stuff for example.

« Last Edit: October 27, 2017, 07:07:25 pm by Jeroen3 »
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: AC return voltage on DC GND plane
« Reply #23 on: October 27, 2017, 07:56:50 pm »
Thank you Jeroen, i did try using it but its way too complex for an average hobbyist like my self. The attached should be ok as long safety and functionality is concerned.
 

Offline homebrew

  • Frequent Contributor
  • **
  • Posts: 293
  • Country: ch
Re: AC return voltage on DC GND plane
« Reply #24 on: October 27, 2017, 08:39:13 pm »
Perhaps one additional safety comment. You are measuring the voltage at the output of the transformer, right? Hence you galvanically connect the actual welding circuit to your board, right?

If now for some reason your USB cable is plugged in AND you accidentally make contact to mains ground with your welding electrode, you might run the full welding current through your board, usb-cable and PC mainboard ...  :bullshit: :bullshit: :bullshit:

Next iteration: Opto-isolated serial link ...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf