element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) AC mains on a PCB ?
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 107 replies
  • Answers 10 answers
  • Subscribers 184 subscribers
  • Views 16787 views
  • Users 0 members are here
Related

AC mains on a PCB ?

anishkgt
anishkgt over 9 years ago

A total newbie to eagle design and PCB fab. So plase bear with on my silly questions, trying to learn.

 

I have pcb that is schematically completed with the layout. Before i start the fabrication process i need some expert advise if the components placed and the wires routed are ok for the ac mains and the others. The load here will be a transformer. The ac mains are 240VAC and all works well as designed in the schematic on a bread broad except for the load for which MOC3023 is yet to arrive from where i've ordered.

 

 

 

Thanks in advance.

 

image

 

image

  • Sign in to reply
  • Cancel

Top Replies

  • rachaelp
    rachaelp over 9 years ago in reply to anishkgt +2
    Hi George, It looks like you're really learning a lot with this design and you've had lots of good advice from people on this thread already and the difference between the initial version you posted and…
  • michaelkellett
    michaelkellett over 9 years ago in reply to rachaelp +1 suggested
    For mains input spike suppression I think you are much better off with this kind of device: http://uk.farnell.com/epcos/b72214s0231k101/varistor-60-0j-230vac/dp/1004389 Farnell 1004389 This one is rated…
  • autodeskguest
    autodeskguest over 9 years ago in reply to anishkgt +1 suggested
    On 11/09/16 12:02, George Thomas wrote: Why two thrustirs to control the load and am trouble witching on yhe Triac. Triacs can suffer commutation problems with certain types of load - highly inductive…
Parents
  • autodeskguest
    0 autodeskguest over 9 years ago

    Ooops - looks like I accidentally hit the wrong reply button before...

     

    On 03/09/16 14:57, George Thomas wrote:

    A total newbie to eagle design and PCB fab. So plase bear with on my

    silly questions, trying to learn.

     

    I have pcb that is schematically completed with the layout. Before i

    start the fabrication process i need some expert advise if the

    components placed and the wires routed are ok for the ac mains and the

    others. The load here will be a transformer. The ac mains are 240VAC and

    all works well as designed in the schematic on a bread broad except for

    the load for which MOC3023 is yet to arrive from where i've ordered.

     

     

    You have a lot of traces running unnecessarily close to each other and

    to pads. That's fine to low voltage stuff but undesirable when high

    voltages are present.

     

    Your placement of parts results in quite a few traces being quite long.

    That's undesirable in all domains. I particularly note that the trace

    from C7 to R20/21 goes all around the houses, when a simple rotation of

    C7 could reduce it to nothing.

     

    I don't know how much current that BTA08 is expected to drive, but the

    text describing the board as a "spot welder microcontroller" hints that

    you might be looking at several amps. If so, your traces look rather

    thin to me, especially given how long they are.

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • anishkgt
    0 anishkgt over 9 years ago in reply to autodeskguest

    Thanks a lot to take the effort to correct me.

     

    I've removed C7 and R21 which are actually used to protect the optocoupler but i don't see they being necessary here and i have rearranged the the remaining too.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • anishkgt
    0 anishkgt over 9 years ago in reply to autodeskguest

    yea ! your right. That was un-ticked all the while. Ticking it would pour more copper in those empty spaces under IC1.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • anishkgt
    0 anishkgt over 9 years ago in reply to autodeskguest

    you mean pinswap, right ? well that would again make the other trace longer, wouldn't it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rachaelp
    0 rachaelp over 9 years ago in reply to anishkgt

    George Thomas wrote:

     

    you mean pinswap, right ? well that would again make the other trace longer, wouldn't it.

    I believe that's what was meant. It will lengthen the shorter trace slightly but shorten the other a lot more and stop it having to run around and under the transformer to get to the desired pin. You also need to make more space to get clearance between the two traces, you really don't have enough around the connectors. What is the pin pitch of your mains connectors, is it sufficient or do they need changing? Looking at the input on a typical 240V PSU I have here, the pitch on the input connector is 3.96mm. If you look at the clearance between the pads with connectors of this pitch you'll see that it's several mm. You should use this as a guide as to the minimum clearance between mains conductors and also their clearance to anything else. The advice Joern gave for moving parts and rerouting traces above is all valid and is what I would also suggest.

     

    Best regards,


    Rachael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • anishkgt
    0 anishkgt over 9 years ago in reply to rachaelp

    Well i hope this layout is what you guys suggested. When you said pitch is it the distance between the two terminals of the connector ? well on the physical connector it is 4.6mm

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rachaelp
    0 rachaelp over 9 years ago in reply to anishkgt

    Hi George,

     

    You've made some improvements in clearance and routing to the transformer but in the process you've changed a lot of other things in a very different way to what was suggested and now it appears the nice clearly defined isolation barrier you had between the AC side and DC side is gone. Your opto-coupler now has all sorts running underneath it again and doesn't sit across a clear isolation barrier. I suggest you take a step back to the previous layout and have another go. Draw some guides on tDocu or something to show the AC side and the DC side and lines to show the minimum isolation gap to help you place your AC side components and DC side components. Then don't route anything from the AC side or the DC side across the isolation barrier.

     

    Another thing to note, you shouldn't run traces underneath the transformer as you'll likely end up coupling 50Hz mains noise onto them and taking this into the rest of your circuitry.

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • anishkgt
    0 anishkgt over 9 years ago in reply to rachaelp

    Hmmmm knew there was something wrong when autorouting was completing at 100% for all the efforts image. So is there any option to avoid traces under or near IC's and opto-couplers and where else should i avoid traces, caps ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 9 years ago in reply to anishkgt

    On 06.09.2016 22:43, George Thomas wrote:

    yea ! your right. That was un-ticked all the while. Ticking it would pour more copper in those empty spaces under IC1.

     

     

    Dont forget those shielded holes in the corner.. I suppose you do want

    to put this pcb down in a box? Maybe even shielded metal box? image

     

    Interesting project. Without reading it all, I hope you have dimensioned

    the AC-LOAD wires for those high currents.

     

    Also, even if this is out of my experience field, I would take an extra

    look at this high current current loop. You don't want an EMP generator

    image For example, I would route the pulsed load pin direct to the AC

    input, not passing the transformer first. This will narrow the loop, and

    also avoid spikes at the transformer due to voltage loss during current

    pulses.

     

    Also, make sure its fire- and explosion-proof in case something should

    short circuit, or you get struck by lightning at the AC. I saw someone

    mentioning fuse, and I assume you have one at the AC inlet, prior to

    entering the pcb.

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rachaelp
    0 rachaelp over 9 years ago in reply to anishkgt

    George Thomas wrote:

     

    Hmmmm knew there was something wrong when autorouting was completing at 100% for all the efforts . So is there any option to avoid traces under or near IC's and opto-couplers and where else should i avoid traces, caps ?

    Yes, you can use the restrict layers to specify where traces are not allowed to go. Take a look at this article for a quick guide on how to do this: http://dangerousprototypes.com/blog/2012/08/08/how-to-eagle-keepout-and-restrict-layers/

     

    In general however, a lot of auto-router issues stem from deficiencies in the initial placement. With any routing job, manual or auto, but especially with auto routing, the placement will make or break the layout. Your latest placement has a number of issues, a few of which I highlighted in my previous post. You need to take a step back and think about how the circuit "flows" and try and place things to keep the flow simple.

     

    If I were you I would consider doing at least some of the more critical routing manually and leave the auto router for the less critical stuff. Also, don't just hit the autoroute button and let it do it's thing in one go, tell it to route specific smaller groups of more important signals first, inspect them and manually tweak if needed and then move on to the next. Breaking it down in this way and keeping an eye on how it is doing will give you a better chance of success.

     

    Jorge Garcia wrote a good blog post on the auto router a while back which is worth a read: https://www.element14.com/community/community/cadsoft_eagle/blog/2015/06/17/are-you-better-than-the-autorouter

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rachaelp
    0 rachaelp over 9 years ago in reply to rachaelp

    Morten Leikvoll wrote:

     

    Also, make sure its fire- and explosion-proof in case something should short circuit, or you get struck by lightning at the AC. I saw someone mentioning fuse, and I assume you have one at the AC inlet, prior to entering the pcb.

    Yes absolutely! The fuse in the mains plug probably isn't enough to protect the circuit though as it may be over rated and won't necessarily blow quickly enough. I'd consider adding a PTC and MOV's and/or TVS diodes as surge protection if this were my design. I'd also add some EMI filtering and have the earth connected in too.

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 9 years ago in reply to rachaelp

    On 07.09.2016 10:53, rachaelp wrote:

    Morten Leikvoll wrote:

     

    Also, make sure its fire- and explosion-proof in case something should short circuit, or you get struck by lightning at the AC. I saw someone mentioning fuse, and I assume you have one at the AC inlet, prior to entering the pcb.

    Yes absolutely! The fuse in the mains plug probably isn't enough to protect the circuit though as it may be over rated and won't necessarily blow quickly enough. I'd consider adding a PTC and MOV's and/or TVS diodes as surge protection if this were my design. I'd also add some EMI filtering and have the earth connected in too.

     

    Best Regards,

     

    Rachael

     

    Fuse in the mains plug? image That is UK-specific I guess. Either use IEC

    power inlet with embedded fuse (like farnell 1516059), or make sure the

    first thing the power line meets, is a fuse. (And ground meets the metal

    box).

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • autodeskguest
    0 autodeskguest over 9 years ago in reply to rachaelp

    On 07.09.2016 10:53, rachaelp wrote:

    Morten Leikvoll wrote:

     

    Also, make sure its fire- and explosion-proof in case something should short circuit, or you get struck by lightning at the AC. I saw someone mentioning fuse, and I assume you have one at the AC inlet, prior to entering the pcb.

    Yes absolutely! The fuse in the mains plug probably isn't enough to protect the circuit though as it may be over rated and won't necessarily blow quickly enough. I'd consider adding a PTC and MOV's and/or TVS diodes as surge protection if this were my design. I'd also add some EMI filtering and have the earth connected in too.

     

    Best Regards,

     

    Rachael

     

    Fuse in the mains plug? image That is UK-specific I guess. Either use IEC

    power inlet with embedded fuse (like farnell 1516059), or make sure the

    first thing the power line meets, is a fuse. (And ground meets the metal

    box).

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube