Electronic – Monitoring serial communications between two PCBs

digital-communications

Someone was asking me if it would be possible to monitor the serial communication between two PCBs and output something that is readable. The PCBs are part of an automatic door system – I'm not sure of the baud rate, protocol, or anything right now.

Do you think it would be possible to use an Arduino or something similar to do this? Would it be able to output readable text? Can logic analysers do this? At this point I'm not sure whether it would be I2C, SPI, or just have RX/TX lines, but I'm sure that could be figured out.

Since it would just be listening to a bunch of 1's and 0's without the opportunity to transmit back, I'm concerned it would just end up incorrectly interpreting a bunch of 1's and 0's, resulting in useless data. What do you think?

I am just trying to gauge the difficulty of such a thing, and the best way to go about it.

Thanks!

Best Answer

This is the kind of thing logic analyzers were created to do. But you could try using an Arduino too in the beginning. To ensure you're starting from similar states, it might be best to first try listening when you turn on the unit. Try something low like 1200 baud then move up to 4800, 9600, etc. There is a list of common ones at http://digital.ni.com/public.nsf/allkb/D37754FFA24F7C3F86256706005B9BE7 It's also most commonly 1 stop bit, no parity, and no hardware handshake. But also have a look at what voltage level (RS-232, TTL 5v, TTL 3.3v, etc) it's transmitting at too.

If you have a logic analyzer like a Saleae Logic (they make very nice ones with good software) it even has an 'autobaud' that could try to detect what baud rate the input is operating at. Then you can try and monitor both sides and see what one side is saying to another. It may be binary data that you'd have to try to parse out, but you'd be surprised how often it's just readable ASCII too.

Good luck!