Electronic – Radio interferes with I2C bus communication

i2cnoisepicRF

I have a PCB with a Microchip PIC18F97J60 on it and every time I key a 5 watt radio transmitting at 144 Mhz next to the board it resets the processor. The processor resets when it’s attempting to communicate over the I2C bus. The watch dog timer times out waiting for the MSSP (Master Synchronous
Serial Port) interrupt flag to be set. This happens most often when waiting for the interrupt flag after the master (PIC18F97J60) sends a restart or a NACK.

I’m using 2 kOhm pull up resistors and running the bus at ~96 kHz. On the oscilloscope it looks as though the interference on the bus is bad enough where it can pull the SCL and SDA lines down from 5V to 2.6 V. What can be done to protect the i2c bus signals from interference so the processor does not reset while waiting for an interrupt from the MSSP module?

Best Answer

Apparently the radio interference is messing up the IIC bus communication such that the slave doesn't think it is being addressed and there is no ACK. As Steven pointed out, it is bad software design to have a missed ACK cause the processor to reset. This needs to be fixed, but your question is mostly about the interference issue. You got lucky that the interference aggrevated another lurking bug in your code. Fix that while it is easily reproduced.

2 kΩ pullups on the IIC lines is about as low as you can go, so nothing more can be done there. You don't say what frequency and power level this radio is that is next to the board. Some level of closeness and power output is going to cause a failure. Put another way, there are only so many volts per meter your board can take before it operates incorrectly. The first thing you need to ask yourself is if the level of radiation hitting the board is reasonable to protect against. One solution could be "well, don't do that". Put the transmitter accross the room, shield it properly, move the antenna, etc.

If you do need to make the board less sensitive to this RF (again, it would be useful to know the frequency and power level you're dealing with), then there are probably various things to fix. Most likely this problem is due to bad layout, particularly the ground, and inattention to high frequency loop currents. All the same things you do to reduce emissions work symmetrically to reduce the susceptibility to received radiation. Put another way, physics tells us that anything that works as a transmitting antenna works as a receiving antenna and the other way around.

So show the layout, particularly the grounding strategy, of your board. Also look carefully at anything going off board because these are antennas. Since you are using a 18F97J60 which has a ethernet MAC/PHY, you probably have a ethernet cable coming from the board. What RF reduction is on the network side of the transformer? Does the transformer have a built in balun on the network side? Does the problem go away when you unplug the ethernet cable?