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 16783 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

    Thanks for your help Robert.

     

    Yes I did change them, the earlier pin spacing was a close. I've changed the locations of the Transformer and reduced the track size of the other components (would that be ideal here as there is not current flowing through them). I've also removed the set of resistors and replaced it with just one and connected to ground such that all the LEDs are grounded via this resistor. No two LEDs would light up simultaneously, tested on the breadboard and that worked well. Hoping this would be a better layout.

    image

    • 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 05/09/16 11:56, George Thomas wrote:

    Thanks for your help Robert.

     

    Yes I did change them, the earlier pin spacing was a close. I've changed the locations of the Transformer and reduced the track size of the other components (would that be ideal here as there is not current flowing through them). I've also removed the set of resistors and replaced it with just one and connected to ground such that all the LEDs are grounded via this resistor. No two LEDs would light up simultaneously, tested on the breadboard and that worked well. Hoping this would be a better layout.

     

    Looks good from the mains side. I can see quite a few opportunities for

    improving the low voltage routing and I would probably put all

    components at a multiple of 90 degrees rotation (i.e. not like R23 and

    IC4) but those are not critical matters. You might want to position IC5

    and R20 for maximal clearance between tracks, particularly the T1 gate

    track and the one from R19.

     

     

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

    Well, after a while, i've managed to move IC5 away from R20, i've also changed the angle for the R23 and IC5 making them more routable during Auto tracking

    .image

    • 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 05/09/16 23:57, George Thomas wrote:

    Well, after a while, i've managed to move IC5 away from R20, i've also changed the angle for the R23 and IC5 making them more routable during Auto tracking

    .

     

    No, I think you misunderstood. There's no problem with IC5 being close

    to R20, there's a problem with the tracks connected to IC5 being close

    together. You absolutely don't want them passing between the pins!

     

    Rotate IC5 by 180 degrees and move it left by 0.2" or so. Then rotate

    R20 by 180 degrees and move it due south of R22.

     

    IC5 is an optoisolator - its whole purpose is to isolate - so make sure

    you maintain an isolation gap across it.

     

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

    It might help you with getting the separation between mains and low voltage side stuff if you make sure that there is a gap of at least 4.5 mm between mains and low voltage tracks (this is about the separation on the opto isolator package).

     

    Here's a useful guide to this kind of thing:

     

     

    cache.freescale.com/files/analog/doc/app_note/AN3962.pdf

     

    MK

    • 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 michaelkellett

    Thanks mate that was very helpful.

    there is a gap of at least 4.5 mm between mains and low voltage tracks (this is about the separation on the opto isolator package).

    ah that explains the use of the opto-couplers. I do know that but that made more sense to why they should be separated.:)

     

    so what all the knowledge gain from this post I am guess this the layout should be ok.

    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,

     

    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 this latest version is quite substantial. I do wonder if the placement of the connectors, transformer etc could be rearranged such that the AC traces flow much straighter into the transformer, it's hard to see when you don't have the actual design files to experiment on but I think there is scope for further improvement there. I do also wonder if some of your clearances between conductors, for example around the connectors, are a little small. It might also be worth looking at some reference designs for mains power supply circuits to see how they deal with things like EMI filtering, circuit protection and most importantly safety.

     

    The latter is something I can't stress enough. Do your own research and ensure that your circuit, how it's fitted into your final design, and the system as a whole work together to ensure neither you, nor anybody else, can hurt themselves. Sorry if that sounds a little nannying but as you are new to circuit design and you're jumping straight into a mains powered product it probably should be said. All the advice people can give you here is great but you need to do your own research and ensure that what you finally make is safe and this is entirely your own responsibility.

     

    Best Regards,

     

    Rachael

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

    Looking better on the mains side, although I would still make the tracks to IC 5 thicker - just for durability.

     

    Please review your ground connections, you have some that go through very thin slivers.

    Also under the big IC you have floating copper (not connected to anything).

    A poor return will make your board bad for EMC also.

     

    Matt.

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

    Am 06.09.2016 um 17:08 schrieb MattyLad:

    Looking better on the mains side, although I would still make the tracks to IC 5 thicker - just for durability.

     

    Please review your ground connections, you have some that go through very thin slivers.

    Also under the big IC you have floating copper (not connected to anything).

    A poor return will make your board bad for EMC also.

     

    Matt.

     

    --

    To view any images and attachments in this post, visit:

    https://www.element14.com/community/message/205233

     

     

    Actually I didn't want to cut in here, but I don't like your AC section

    at all.

    Distances on terminals are usually just above the minimums.

    With your track from transformer pin5 to the AC terminal you lessen the

    distance to the second AC terminal pin.

    Although the rule says the shorter the better for large currents it

    doesn't say to forget the minimum distances image

    I would:

    1. exchange the transformer pins 1/5

    2. move R22 right above R20

    3. move the triac about half way between the terminals and R22

    4. move your tracks straight away from the terminals to get a save

    distance before turn towards the triac pins.

    5. The trigger line should go a little straight away from the triac

    before turning towards the optocoupler.

     

    --

    Mit freundlichen Grüßen / With best regards

     

    Joern Paschedag

     

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

    so talking about removing floating copper, how can it be done manually ? tried to find it but could not. So I checked the creepage table and to me it was so much unfamiliar terms and French. I managed to learn that 8mm is the minimum distance between AC and DC that needs to be kept. other than that nothing.

     

    Would anyone be knowing a simpler document that I could read.

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

    so talking about removing floating copper, how can it be done manually ? tried to find it but could not. So I checked the creepage table and to me it was so much unfamiliar terms and French. I managed to learn that 8mm is the minimum distance between AC and DC that needs to be kept. other than that nothing.

     

    Would anyone be knowing a simpler document that I could read.

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

    The way to take a little foil off of a pc-board is to slice through it with a sharp, newish pen-knife and then heat up the foil one wants to remove with a soldering iron and scrape it away.  The adhesive usually melts precipitantly.

     

    As an aside, the colored boards have a top anti-static layer, sometimes it is important to scrape this away between op-amp inputs. 

    • 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/16 17:47, George Thomas wrote:

    so talking about removing floating copper, how can it be done manually ? tried to find it but could not.

     

    Assuming you mean how to avoid the unconnected bits on an Eagle board

    design, the trick is to turn the "orphans" setting OFF on the polygon.

     

    • 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
  • 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
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