Electronic – Cheap USB device for capturing state of ~64 sensors

sensorusb

I've been researching home security systems. Honeywell, GE, DSC, Napco – all seem expensive and behind the times.

I want private monitoring of my doors and windows, partitioned to floors of my home and the garage. I figure I could even do without the wall-mounted control panel because I will always have my phone with me to arm or disarm and check status.

I can get a raspberry pi for $25 (at worst) to run the system and standard sensors which aren't so expensive.

The main problem for me then is interfacing with the sensors (wired). I'm new to hardware so I think I should stick to an off-the-shelf USB device rather than try to build it, if possible. I found at least one promising device but it's $100 for few ports and I don't even know that it will meet all the requirements alone.

I thought maybe a salvaged usb/midi keyboard would be a fairly generic solution in which I could brute-replace the keys with sensors. But at $45+ for 25 key device, that's still kinda pricey and complicated. Benefits are that all "keys" can be pressed at once, unlike on a qwerty keyboard and that switching from 25 "zones" to 61 "zones" and up is as simple as upgrading the salvaged keyboard to a longer model.

  • The door/window sensors are magnetic and I don't know if the new wire distances and power requirements can be driven by a keyboard's hardware without amps for each one.
  • I only need binary input on each channel. Circuit closed or open?
  • For power considerations, I don't need to power all devices constantly, but rather scan them individually several times a second.
  • Ok, motion detectors and glass break sensors might be nice, if they work the same as the magnet sensors. They need to be powered all the time. Nice-to-have.
  • Since this is a security application, anything that can be done to avoid or mitigate sabotage by overloading the hub device from a sensor site seems smart.

Recommendations on how to get this done in a cheap device that is fluent with a standard computer interface? Or is it very very easy to create a custom USB device that can perform this task?

Best Answer

You arn't going to find any generic device that does everything you want, with an unknown amount of different sensors or modules. The dedicated alarm system devices have custom computer interfaces, and have hardware designed to account for power needs and protection from shorts or esd, considerations for the sensors it is designed for, etc.

What you want to do will require multiple parts. The first is the computer interface. That is easy. You can go the diy route and go for an arduino or launchpad or similar microcontroller board with usb to serial adaptors. You will need to program the microcontroller for your final system. There is dedicated hardware you can use though. What you are looking for would be "USB GPIO Boards" (GPIO = General Purpose Input/Output) with how ever many channels you need. A quick google can show you some, like a 32 channel one for 45 bucks.

The other other option is a gpio port expander. If you are going with a raspberry pi, you can skip the arduino and it's programming, and just go directly with making a linux program for which ever port expander you decide on. With an i2c port expander, you can put multiples on the same raspberry pins, making it as expandable as you need. These can even interrupt so your computer doesn't need to constantly check to see if there has been a change in a sensor. And since it's linux, most port expanders already have drivers for them.

-- The second part is the actual interfacing to the sensors. It will depend on the individual sensors you go with. You will need to power them over the entire length, will need to protect the port expander from over current (transistors or optocouplers) and it's a bit hard to even guess at without knowing what you will be using.