AC return voltage on DC GND plane - Page 1
Forum section: electronics / beginners

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 24, 2017, 10:39:56 am
content: 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

author: homebrew
author_rank: Frequent Contributor
timestamp: October 24, 2017, 04:07:08 pm
content: 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.pdfI 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'.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 24, 2017, 08:40:29 pm
content: 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.QuoteI'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)QuoteI did have in mind a TVS diode but have no idea how to do a Low pass filter. Would this TVS diode be okhttps://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

author: Zero999
author_rank: Super Contributor
timestamp: October 25, 2017, 09:01:43 am
content: 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-assemblyhttp://www.pcbtechguide.com/2009/02/creepage-vs-clearance.html#.WfBPLX7ysWM

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 25, 2017, 10:39:08 am
content: 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 ?

author: Jeroen3
author_rank: Super Contributor
timestamp: October 25, 2017, 02:24:46 pm
content: Isolation between secondary and primary should beat leastthe 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 arenot 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.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 25, 2017, 05:04:51 pm
content: Thank you Jeroen3i've added slots to the connectors and decided to not go to hell

author: Jeroen3
author_rank: Super Contributor
timestamp: October 25, 2017, 08:04:48 pm
content: 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.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 25, 2017, 08:20:26 pm
content: 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 ?

author: Zero999
author_rank: Super Contributor
timestamp: October 25, 2017, 11:26:28 pm
content: Quote from: Jeroen3 on October 25, 2017, 02:24:46 pmWhat'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.Quote from: Jeroen3 on October 25, 2017, 08:04:48 pmThere'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?Quote from: anishkgt on October 25, 2017, 05:04:51 pmThat's much better. Keep the slots on the connectors, if you like but they're not necessary at all.

author: homebrew
author_rank: Frequent Contributor
timestamp: October 26, 2017, 06:31:08 am
content: Great to see that the board makes good progress!Quote from: Hero999 on October 25, 2017, 11:26:28 pmWell 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.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 26, 2017, 06:47:41 am
content: @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?

author: homebrew
author_rank: Frequent Contributor
timestamp: October 26, 2017, 06:51:19 am
content: 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

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 26, 2017, 07:11:44 am
content: I use the registered standard version of eagle version 7.7Input to the op amp you mean jeroen3 ? It’s about 0.00299vac.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D

author: Zero999
author_rank: Super Contributor
timestamp: October 26, 2017, 08:50:31 am
content: Quote from: Jeroen3 on October 26, 2017, 06:47:41 amDon'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.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 26, 2017, 08:44:43 pm
content: 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 theircopper 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)

author: Zero999
author_rank: Super Contributor
timestamp: October 26, 2017, 10:46:26 pm
content: Quote from: Jeroen3 on October 26, 2017, 08:44:43 pmThat 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.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 27, 2017, 05:34:23 am
content: 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.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 27, 2017, 08:12:28 am
content: 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.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 27, 2017, 09:01:31 am
content: Looks much better with areal 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

author: Zero999
author_rank: Super Contributor
timestamp: October 27, 2017, 09:21:32 am
content: 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.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 27, 2017, 06:15:46 pm
content: QuoteEach 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.QuoteI've added polygons and vias at the cathode pins. Is that how its done to managed current ?QuoteWell 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 ?#Hero99QuoteI am actually using Jeroen3's layout, as he said all the routing was not completed.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 27, 2017, 06:59:43 pm
content: 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 coveredthecurrent 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.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 27, 2017, 07:56:50 pm
content: 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.

author: homebrew
author_rank: Frequent Contributor
timestamp: October 27, 2017, 08:39:13 pm
content: 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 ...Next iteration: Opto-isolated serial link ...

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 27, 2017, 08:49:01 pm
content: The chances of that happening would be minimum. After all the end user should have little more sense about it but it is a good point to note.In that case would it help if the gnd plane isolate from the ac pins on the pcb.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D, Brymen BM869s

author: Zero999
author_rank: Super Contributor
timestamp: October 27, 2017, 10:38:18 pm
content: How about a fuse with a low current rating, yet high breaking capacity on the USB connector?

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 28, 2017, 11:13:50 am
content: Or maybe disable the pcb controls when a usb is connected.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D, Brymen BM869s