First time during my entire engineering career I have been to an emc lab last week. My design has failed to satisfy FCC requirements. The board uses a 25mhz clock and we have failed at 500mhz but I can also see other harmonics being high. It turns out a connector with an unshielded cable is acting as an antenna and failing us however i suspect the problem is deeper. I can probably shield the cable and pass however this feels like a band aid solution. How do I trace the deeper problem without accessing to a full blown lab. ( every day at the lab cost about 3k). I am specifically looking for troubleshoot advice of where to look and methods of verifying or tracing the problem without a lab but with a low end spectrum analyzer.
You should change your terminology to 'oscillator' instead of crystal. Oscillators are the type of component with an OE pin such as you have and require quite different layout requirements than those required by a crystal. We should also see the schematic of the oscillator connections and we should know the oscillator frequency.
In general your circuit and wiring for the oscillator should follow the sequence below:
a) Make sure that the oscillator circuitry is matched with a full pour GND plane under it.
b) Make sure to bypass the oscillator Vcc and GND connections in a way that there is copper without vias between the both sides of the bypass capacitor and the oscillator pins.
c) Keep the copper length between the bypass capacitor and the oscillator pins as short as possible.
d) Place a small value resistor in series with the oscillator output. The copper distance from the oscillator output to the resistor should be as short as possible. Resistor value can be determined from simulations done during signal integrity analysis or can be selected by value swapping on your prototype PCB and observing signal quality on a good quality oscilloscope.
e) Route the clock signal from the resistor to the nearest destination load and minimize the number of vias on the way. Best is no vias.
f) Continue the clock route from the first load as series layout. (Do not take the clock signal and route it as a branched Y to the two loads). The continued series connection is best if it simply passes through the pad of the first load. If a stub to the first load is required then keep it as absolutely as short as possible.
g) Route the series clock signal to the second load where it will terminate at the pad. Minimize the number of vias in the path. Best is no vias.
h) It can be an advantage to route the critical clock signal first in the layout so you can achieve the above goals. Then fit the remaining traces around this initial layout. Do note that the clock signal can couple to adjacent parallel signal routes in the same layer or in adjacent layers. You should check carefully that any adjacent signal routes are non-sensitive to some coupling, are not very long traces the go all over the board and are not signal lines that go off plane or out to I/O connectors. If parallel routes cannot be avoided then it may be necessary to impose minimum spacing design rules to help minimize the amount of coupling.
While you have freewheeling diodes on the relay coils, you don't have any kind of spike attenuation on the relay contacts. The contacts need transient suppression for the same reason that the coil driving transistors do.
The inductance of whatever load you are switching can cause a large (several kilovolts) voltage transient with a very fast rise time when the relay contact opens. The transients will then couple capacitively and inductively to the rest of the circuit (and over time destroy the relays). These spikes are sporadic in nature, as their magnitude varies with the amount of current that happens to flow at the instant the contacts open. You will sometimes see multiple smaller spikes when a relay closes, caused by the contacts bouncing a few times before finally settling.
To suppress these spikes, there are several options that can be either used alone or combined together for more difficult cases:
- A RC snubber network won't eliminate the transient, but even with a rather large resistance it will significantly reduce the voltage rise time, greatly reducing the radiated and capacitively coupled EMF. It has the drawback of passing a slight amount of AC current even when the contact is open.
A bidirectional transient voltage suppressor diode is designed to start conducting significant current once the voltage over it reaches a certain treshold. They activate extremely fast (typically in the picosecond range), but they get costly when high transient energies are to be dissipated, and ratings above 500V are rare. Example: P6KE440CA
Metal oxide varistors are available for higher power and voltage ratings than TVS diodes, but they are inferior in response time (nanosecond range). They also have the drawback of having a lifetime limited to a few thousand activations, and they like to fail shorted, requiring external protection. Example datasheet
Gas discharge tubes contain a gas which ionizes when the voltage reaches a certain level, allowing the electrodes within the device to arc to each other. They are only available for large currents and voltages, and degrade over time.
Synchronous switching. Since you are switching AC, the current crosses zero 100 or 120 times each second. If you manage to time the relay actuation just right, you can (theoretically) open the relay with no current flowing trough it. You would need a mains voltage zero crossing detector and significantly more complex programming to pull it off, and it would only be possible with predictable and consistent relay closing and opening delays. The likely phase shift between voltage and current should also be taken into consideration.