I am designing a circuit that will sense an electric fence shock generator.
In my first prototype, it worked very well, except in the time the shock generator creates a spark, when it produces a lot of interference in my sense circuit. It seems to me that the wires that connect my circuit with the generator are carrying a lot of noise inside my PCB and I am looking for advices for how to reduce it. More details about my circuit below:
The PCB has two pairs of wire connections: The power supply, a 12V sourced by the shock generator circuit and the wires that came from the electric fence, with are connected to an optocoupler.
The signal generated by the optocoupler is processed by a digital circuit, which is experiencing a lot of false clocks and triggering in the moment a spark is generated in the fence.
I tried to start an investigation about what was happening and I almost concluded that the noise has been carried by the wires, because I put a scope probe with both terminals shorted together in the nearby of the wires and I found this:
I have repeated this test far away from the wires, but I did not obtained this results.
The image below is the noise in a track which work as a clock in the digital block:
As the image above indicates, the circuit has a lot of false clock that are may causing the erros I have mentioned. However, I feel I can not trust 100% in my scope in such high frequency. As a counter test, I tried to watch the voltage in the supply pins of the microcontroller of the shock generator (this part is working very well) and I obtained the following image:
If this was the real voltage across the supply pins of the microcontroller, I think it would burn in less than one second, as its maximum voltage was 5.5V and it has spikes grater than 8V (maximum values not shown in the scope snapshot).
Anyway, it seems to me that I can trust that I have a lot of noise inside my PCB, but not generating so much voltage as it is showed in the images above.
Finally, the questions:
- Am I right to think that the noise is propagating via wires and not via the air?
- If yes, how could I workaround it and decouple it in a proper manner? --> In the second version of the prototype, I am planning to use ferrite bead in the PCB entrances; RC low pass filters in some sensitive tracks (dont care about slowing down the signals); isolate the High Voltage block in one corner of the PCB and put a guard ring around it; What is your opinion about it?
Information that can be helpful: Voltage rating of the shock generator: 10kV; Distance between High Voltage block and digital block: 3cm;
EDIT Waveform of the HV pulse generated in the fence (the maximum amplitude is around 10kV);
This pulse happens once in a second. But this was captured in the case when the spark does not happen. I don't have the waveform of this case, but I believe that the dV/dt will be much greater in this case.