The RFID readers communicate using the SPI protocol. SPI was originally designed for short-distance, high-speed communication on a single PCB. However, Musical Steps required SPI to function reliably over distances of up to seven feet, well beyond its intended range.
This limitation was a known concern from the outset and became a central focus of early unit testing. In those tests, I found that the RFID readers operated reliably at short distances or in small groups, but began to fail and become unresponsive when the wiring extended beyond four feet.
I achieved early success by combining several signal integrity strategies:
With these improvements, I was able to reliably operate two RFID readers simultaneously over distances of up to 7 feet.
But scaling beyond that, even to three readers, remained unreliable.
I tried just about every trick in the book: adjusting clock speeds further, experimenting with multiple RFID and Software SPI libraries, and even borrowing Professor Allan Weber’s portable oscilloscope to diagnose the issue.
One idea remained. Since I had verified that the readers worked reliably in pairs, I theorized that I could run SPI over five independent sets of Arduino pins: one for each pair of readers. The catch? I could no longer use the Arduino’s built-in hardware SPI library.
So, I painstakingly rewrote the entire SPI communication for the RFID readers in software.
And, it worked! With a bit-banged implementation of SPI, long-range communication was no longer an issue. The RFID readers responded reliably, even at full distance.