Alarm system protocols


I’m a high school teacher. This is not a real project, but a classroom project on TinkerCad.
Why TinkerCad? Because the school is closed and we do online learning.
That means no Wifi or MQTT.
We (as a class) go down to the basics of serial communication protocols.
We do know that UART is very unstable in TinkerCad, but what about I2C or SPI?
Let’s say students want to build an alarm system for a number of rooms, each room having it’s own Arduino UNO/sensors connected to a central Arduino control panel. It must be wired, not wireless.
Would we use a Master/Slave architecture? Would we use I2C or SPI?
Would we chain all the rooms/boards together?
Let me know what you think.

I’m not well-versed enough to debate whether to use I2C or SPI, mainly because I’ve only ever used SPI, but I’d like to suggest maybe using both. You can use I2C between UNOs and the master node and SPI between each UNO and its sensors, this way you can tackle each protocol’s strengths and weaknesses while having practical examples of both.

But what are the strength and weaknesses that you mentioned.
Would you remember any tutorials where you learned it, that you could share.
You see, I am happy to learn.

Inter-Integrated Circuit (I2C) Protocol is really designed to link chips on a board or very short distances - using it between rooms will probably be stretching things a little far.

You may be better off looking at RS485 as a bus for communicating between the Arduinos over a longer distance. You would need to convert from ttl to RS485 on each Arduino using a MAX485 board (for example).

1 Like

You could have a look at standards for alarm systems and how they are connected - you might for example what to add commercially available sensors to a system .

Conventional wired alarms have 6 wires

  • 2 for a continuity loop “ tamper “ ( detects cut wire).
  • 2 for 12v dc power
  • 2 contact closure type signal wires .

If I had to use some form of digital coms I would probably go for something like Rs485, needs to work with cheap cable and have high noise immunity ??

How about using network connection ? Ethernet for example and send the needed sensor values, say using UDP ?

RS485 is also excellent choice , like suggest above.