Hello, everyone!
I'm designing a circuit that uses a sensor to monitor temperature and switch a relay on or off based on that input.
Here is the electrical diagram of the
Also, the PCB design:
and
.
The brainbox will be an ESP8266-01 chip. The chip controls the Q1 transistor which, when on, will cause the relay to close the circuit. There's a switch (SW1) which would also turn on the transistor (backup in case the transistor / esp chip fries for whatever reason).
Powerwise, PWR1 is a SMPS converting 240VAC to 3.3VDC with an MOV in parallel on the input side, and 2 caps on the output side (or the input side of the chip): a 1u for filtering and 470u as a power reserve.
The relay switches power for a pump. It connects the live line on pin 3 of the screw terminal (J1) to pin 1 on the screw terminal.
The ground of the pump is connected to the ground for this circuit (pin 5 and pin 4).
I should also mention that I will be initially making the boards myself, atleast for testing purposes. After all is done and tested I will probably order some PCBs.
Regarding the mains voltage side of the circuit, my concerns are related to the width of the mains PCB tracks. It is my first PCB that deals with mains voltage and I'm not sure how wide to make those tracks. They are currently 3 mm wide.
The relay is rated for a max of 8A, but the pump itself draws a maximum of around 4. Just to be safe, I calculated the trace widths for 8A. Since I don't know the specs of my PCB boards, assuming a minimum of 1 oz/ft^2 of copper, I get a maximum trace width of ~15mm, and for 4 oz I get a minimum width of ~2.5mm.
I looked at several other circuits I have lying around that connect straight to mains and none of them seem to have tracks wider than 1.5 mm. Most notably, the PCB of a vacuum cleaner that draws 6 amps
at mains voltage whose traces seem to around 1.2 mm wide but are tin plated.
What are your recommendations regarding trace width and should I also tin them, just to be on the safe side?
Another concern that I have is the spacing between the mains tracks. The spacing between the high voltage 240VAC side and the low voltage 3.3VDC side is atleast 8mm at any point, which I believe to be sufficient but please advise. However, the minimum spacing between L and N tracks is of 2mm, the minimum that the screw terminals allow. Would this be enough, or are there risks of sparks between the tracks? I also added isolation slots in the PCB which can be seen in the PCB images in light blue.
Finally, any critical remarks or advice regarding the PCB in its entirety is welcome.