i have attached the photo of my pcb. There are 9 wires coming out of the PCB. all the wires are about 1 meter long. the wires are 0.5 mm square multicore wires.
Hi,
Think you have really answered your own question.
You have the mains power wires going all over the top of the pcb.
The pcb is next to a contact breaker.
The signal wires to the left are I assume the switches on a long unshielded cable,
The white devices on the front of the case, again, unshielded cables, also running alongside the ac cables to or from the small transformer.
The micro does not stand a chance.
What current is the contactor switching and what devices is it powering ?
Does it have any contact suppressors anywhere.
I know very little about all detailed methods of circuitry shielding etc, but its seems the first place to start is to rewire so all those mains cables are as far away from the pcb as possible, the remote signal cables, however short, should all be shielded and fitted with ferrites or similar.
Perhaps even having the pcb in a separate grounded metal box from the mains devices, though some people say this does not work ??
All that before you look at your actual pcb layout to see if it has been designed to minimise interference pickup, a subject which I'm sure others can explain better than me.