Trace Width calculator for AC Circuit

I am designing a circuit for Controlling AC Motor By connecting the motor Contactor's Coil by my ESP32 (AC Coil) Here is my schematic circuit.


Now, I need to create a PCB design. I would like to ask: what should be the trace width for the AC circuit part?

Depends on the current, plating thickness, length of trace and temperature.
It's also very important to make sure there is sufficient physical seperation between the high voltage and low voltage side of your circuit

Just google "PCB trace width calculator"

Is C4 rated for AC?
Have you done a thermal analysis?
Does the BT139 come in a surface mount version?

You raised Good question
I have selected an SMD capacitor rated for 500V DC, but I need a capacitor that can also handle AC voltage. Could you please suggest which type of capacitor I should use? The X2 safety capacitor takes up a lot of space, and my design has space constraints. Additionally, I think I should use a through-hole resistor instead of an SMD resistor for better heat dissipation to the air.

If it not rated for the AC voltage you are using then don't use it.

Look for an NPO type. Make sure the specs give an AC rating.

You have a lot of wasted space in that design: move your components closer together to reduce trace lengths.

This design is for Just testing circuits individually

You will find that the capacitor explodes and the the TRIAC burns out.

I replaced capacitor with this capacitor


and resistor with this resistor

I can't read those blurry images.
Post the datasheets.
Have you done a thermal analysis on the TRIAC?
What is your AC voltage and current?

Please can you tell me how to do thermal analysis on TRIAC?

All this information is readily available on the internet if you search for it.
Google "thermal calculation for TRIAC"

Why not use an off-the-shelf SSR (solid state relay).
Leo..

You might want to look at this guide as to the sort of spacing you need when using mains voltages on a PCB.

A_basic_guide_to_Creepage_and_Clearance.pdf (1.9 MB)

Still waiting for the datasheets!

10nf capacitor datasheet.pdf (269.2 KB)
39ohmresistor datasheet.pdf (782.5 KB)
Sorry for late reply datasheet is in Chinese Language

thanks it would be helpful

Guys who are following this question i have a update for you regarding trace width and clearance calculation for AC Voltage after some research

How Trace width is calculated?
For Current we have to choose cross sectional area. use Trace width calculator (Trace Width Calculator | AdvancedPCB) where he will asked you some question like current and thickness on base of that it will tell you trace width ,basically calculator calculate cross sectional area on the base of current and thickness of copper trace.

Q) How to Choose clearance between Traces?
Ans)clearance between two traces depends upon the voltages ,basically voltages is insulation. To find the minimum safe distance we can use IPC-2221B standard we can find calculator for this like PCB Trace Spacing Calculation for Voltage Levels Here after entering your voltage you can get min.distance between 2 traces

Nice suggestion , but what if we add SSR in our board , Is it not convenient for customers ,or what is industrial practice for that?

The G3MB-202P SSR (US $1 each) seems to be a standard footprint, and can be used for loads up to 2A. They have a built-in snubber circuit. Just add a 2A fuse, like on many modules that use this part.
Leo..