If all units are plugged in to a single power point then you might get away with direct connecting each device but 25 metres is getting up to the distance limits, particularly if devices can be powered by different phases of the mains along the length. The common mode problems will almost certainly bite you.
Optical isolation, RS422/485 or transformer isolation were all devised to get around this problem. The simplest/cheapest is RS485 IMHO.
If the system will have only one power supply then a direct connect system with three signalling wires is what I would use. One wire is calle ATTention, the second is ACKnowledge and the third is DATa. These three are resistively pulled high and all devices are set with their three pins as inputs. When any device wants to send it pulls the ATT line low and repeatedly sends the ID it is trying to call on the DATa line. When the selected receiver senses its address on the data line it pulls the ACK line low. The sender now knows it has a link to the desired address and now the sender repeatedly sends the message (with checksum) until the ACK line floats high which signals the recevier has got a clean message through. I just use TTL RS-232 via SERIN/SEROUT for this and it works a treat.
HTH
Brian
Bookmarks