Considering these requirements:

  • 40 modules or sensors (one movement/presence sensor or one windows/door open/closed sensor)

  • read state (boolean, or 0/1) of all modules as fast as possible (once per second would be ideal, but once ever 2 seconds is acceptable)

  • keep list of sensor states in memory at all times

  • send the status update via usb cable to a pc

  • receive commands via usb cable from a pc and reply

  • maximum length between the arduino and a sensor - 50 meters

can this be built with an arduino-based system? or are these too many sensors?

Sensor details:

Updates: 1 - hall effect sesnsor added, looking for motion sensor

  • \$\begingroup\$ Yes. Easily enough. Some form of input multiplexer is needed but that is "just a matter of engineering". \$\endgroup\$
    – Russell McMahon
    Commented Sep 17, 2012 at 21:15
  • \$\begingroup\$ You might consider multiple Arduinos, or <insert popular MCU prototyping platform here>, to handle separate zones. This could be a simple way to avoid having to engineer any of the input multiplexing and it would give you more overall sampling power. Also, they could all respond back independently to your controller system. This means that instead of a single Arduino failing and knocking out your entire alarm system, at least some portions of your home might still be able to function. Just a thought. :) \$\endgroup\$ Commented Sep 18, 2012 at 2:25
  • \$\begingroup\$ i am now thinking of conecting multiple arduinos with a raspberry pi, and run the managing code there, with a ssh and web interface from the pi. also run a usb dongle from the pi to send sms alerts. I will update here with more information if there is enough interest. \$\endgroup\$
    – vlad b.
    Commented Sep 18, 2012 at 5:32

2 Answers 2


You should be able to do this easily enough if you equip one Arduino with an appropriate shield. Take a look at something like MaceTech's Centipede Shield, which offers 64 GPIOs.

enter image description here

They provide a library that will make it easy for you to integrate the shield, and from the code samples it looks like you use I2C at 400kHz, though I assume the default is going to be 100kHz.

Not being an I2C expert, I can't tell you exactly how many I/Os you should be able to support at 100kHz. However, my guess is that with 40 sensors, 2.5kbits (100kHz/40) is plenty of bandwidth for sending all of the I2C commands required to read a single sensor in one second.


If each sensor only needs to transmit a single bit of information then that is on the order of 10s of bytes per second (including any protocol overhead you want to include). There isn't a processor in the world that can't handle that speed and memory requirement (that I know of).

Only potential problem I see is number of I/Os, but you can get around that with some multiplexing or by upgrading to an Arduino Mega.

  • \$\begingroup\$ You could probably handle 10s of bytes a second with an MCU built from relays :) \$\endgroup\$ Commented Sep 17, 2012 at 21:27
  • \$\begingroup\$ I'd like to keep it as simple as possible, using two arduino or arduino mega will probably be better for me right now (it's easier to swap out one to test in case of issues, than debug more components) \$\endgroup\$
    – vlad b.
    Commented Sep 18, 2012 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.