I was able to use a PCF8547 GPIO Expander Board to reduce but not eliminate RFI from my Arduino. Here’s how that works.
More progress with getting my relay controlled antenna switcher to work. As you know, I got everything working. But, I discovered the digital output lines from the Arduino to the relays generates a lot of radio frequency interference. At some frequencies, my Arduino controller increases the noise floor by 30 dB. Not good.
So, I thought I would try using a PCF8574 GPIO Expander Board between the Arduino and the relay optocoupler inputs. The PCF8574 uses the I2C serial bus, a low speed short distance serial line. I connect these modules to four pins on an Arduino: V+, Ground, A4 (serial data) and A5 (serial clock).
On the PCF8574 GPIO expander board there are eight output pins, plus an interrupt pin. You can use these devices to read or write data to and from the Arduino. You can also daisy chain up to eight of these boards, each with a separate address. So, at present, I have reprogrammed the Arduino code to control 16 relays through two expander boards.
Some success with RFI reduction. As you can see above, the GPIO expander creates a 15 dB noise level on the relays, a big improvement but not enough to make me happy. These boards will sink up to 100 mA when used for relay optocoupler control. My optocouplers draw about 15 mA each, so I can switch up to 6 relays at a time without difficulty.
You can get these boards for a few dollars each. They are great for expanding GPIO on more limited micro-controllers like the Arduino Pro Mini or NodeMCU.
PCF8574 GPIO Expansion Board Details
Part of the reason for lower noise emission is that the I2C bus runs slowly, typically 100 kHz. So, I get less clock hash. They work fine with either 5 or 3.3 volts, as do the optocouplers on my Sainsmart relay boards.
You can check out the specs here.