Introduction: DIY Alarm Wireless Sensor, Compatible With DSC PowerSeries Alarm System, With Keypad Status Indicator

Did you ever forget to close your garage door because you simply didn't know it was open? And you have no way from inside the house to tell if the garage door is open? You don't want to get outside in the cold just to check if the door is closed?

Some relatives were in this situation, with an outdoor shed that they regularly forgot to close, as it was not visible from inside the house.


The purpose of this project is to implement a remote-controlled indicator (located inside the house) to show the status of a shed or garage door, either by reusing the infrastructure that an existing alarm system provides (as described below), or using another suitable receiver (pointers below). No more door left open!

And as a bonus, your garage/shed will be protected by your alarm system too.


This project is particularly suited to those of you with a DSC PowerSeries alarm panel with a radio receiver, but it is not a strict requirement as alternative receivers are available.


This project will show an example of how a combination of software, hardware, 3D printing, and creative reuse of an alarm system, can help solve a common day-to-day house maintenance issue, while keeping your belongings safer.


Let's get started!

Supplies

  • For the alarm panel (already installed):
  • DSC PC1616/PC1832/PC1864 alarm panel (NOT compatible with other systems such as the DSC Neo series)
  • DSC RFK5500 wireless receiver or equivalent
  • 1 5mm blue LED, 1 22K resistor
  • For the transmitter (built in this tutorial):
  • 1 MH-ET Tiny ATtiny88 board (not critical, most Arduino compatible board should work)
  • 1 ASK/OOK 433.92MHz transmitter (FS1000A or similar)
  • USB cable for power
  • Enclosure to protect from the elements
  • For the sensor:
  • 1 magnetic contact or similar (contact closed when door/shed closed)
  • Optional, one set of connectors, and extension wire
  • Regular project supplies (solder, heat shrink tubing, wire, screws, etc.)


Please note, this tutorial is not endorsed by DSC, and I do not provide any warranty of any kind as to the performance of the software/hardware, although I did not observe any problem during my testing. For any critical security/safety application, only use genuine OEM equipment. DSC, PowerSeries, etc. may be registered trademarks. To the best of my knowledge, this project is completely legal but do your own research.

Step 1: What Didn't Work

I initially tried using an off-the-shelf DSC transmitter (EV-DW4975, pictured above), but the range was not sufficient, the alarm receiver could not pick up the signal, and this is what started this project. The wireless sensor showed in this tutorial has a better range and the alarm system can pick its signal up without any problem.

Additionally, I am not a big fan of changing disposable batteries, so this project will be AC-powered, since I had a 5V supply already available at that location (powering some security cameras).


It is interesting to see that a commercial sensor completely failed (in my specific case), and a DIY solution works perfectly!


This application is pretty specific to one purpose, however I anticipate it may be valuable to others with a similar situation and a similar alarm panel, which is why I am publishing it. Let me know if you make it!

Step 2: Build the Transmitter

The core of this project is a microcontroller. The microcontroller will read the status of the door through a magnetic contact, and will report it to the alarm panel. From there, the alarm panel (when properly configured) will toggle a LED.


For this project, I used a MH-ET Tiny board based on an ATtiny88 microcontroller, with ATTinyCore and the Arduino IDE. I used this board because I had it in stock (and it is inexpensive), but many other boards are suitable, the code is pretty simple and does not have a lot of dependencies. Make sure to install ATTinyCore if you use this board. The code is self-contained and does not require any other library. You should be able to use an Arduino Nano or other similar board, but you may need to tweak the code as needed.


For the transmitter:

  • Connect pin VCC to the VCC of the MH-ET Tiny board (5V)
  • Connect pin GND to the GND of the MH-ET Tiny board
  • Connect pin DATA to the pin 3 of the MH-ET Tiny board
  • Connect a 17cm wire, or any other suitable antenna, to the ANT port of the transmitter (17cm is a quarter-wave at 433Mhz so the antenna should be somewhat tuned to this frequency)


For the sensor:

  • The magnetic sensor is connected between GND and pin 6 of the MH-ET Tiny board.
  • The board has an internal pull-up, but if your wires are too long, you may need to add a slightly stronger external one. I do not recommend wires longer than 6ft/2m, but you can experiment.


It is better to add a connector to ensure that the sensor can be easily disconnected/reconnected as needed. This will help a lot for installation and also for testing and servicing. In the picture, you can see the 2-pin red connector that I used.

Step 3: Program the Microcontroller

The microcontroller can be programmed with the code located here:

https://gist.github.com/The-Bootloader/bfe0ce6cc37569dba690c48a5e52b474

The code emulates a wireless sensor for the DSC alarm. Beyond the basic feature of transmitting the state of the sensor, there are a few other features:

  • It implements debouncing of the input
  • The transmissions are slightly randomized (in terms of timing) to help prevent collisions. This means that I had to collect some entropy, and it comes from the ESN and the timing of the contact opening/closing.
  • It supports a status indicator on the onboard LED, turning the LED on during transmissions, which is helpful for debugging
  • It will send the necessary hourly heartbeats to the alarm panel (otherwise the alarm panel thinks that the sensor disappeared, and goes into trouble mode)


The crucial step before compiling is to change the ESN in the code (serial number of the sensor, see the attached screenshot), compile it, and upload it to the MH-ET Tiny board. Make sure the ESN is unique in your installation (and in the area)! The ESN needs to start by the digit 2, as it identifies the type of sensor. If you use something else, it will most likely not work!

If you need to, you can also change pin numbers, although you need to be careful as some pins have reserved functions.


I cannot provide pre-compiled code since the ESN is hardcoded. Additionally, the simplest way to program the board is through the Arduino IDE anyways, so installing and configuring the Arduino IDE for this board is already the simplest path.


To test, you can try to toggle the magnetic sensor input on pin 6. After the brief debouncing delay (around 1.5 seconds), the red LED on the MH-ET Tiny board will briefly light up, indicating a transmission. If you have an oscilloscope or a logic analyzer, you can watch the serial data stream on pin 3.


There are several features that this sensor does not support, such as tamper detection, or battery status (since there is no battery). They were not needed here. As provided, the code uses only around 30% of the flash memory available in the microcontroller, so there is plenty of space available to add new features if necessary. This makes the design future proof. Another possible software improvement is to add support for multiple sensor inputs, each with a different ESN, each using a different pin on the microcontroller.

Step 4: Install the Magnetic Sensor

I reused an old magnetic sensor that I had in storage. I made 3D printed brackets to attach it to existing holes. I used OpenSCAD to design the brackets, Cura as a slicer, and an Ender 2 Pro for the printing in PLA.


The pictures show how the sensors are attached to the bottom of the door, which is a rolling shutter. Of course, each installation will be different here.


One thing to pay attention to, is to ensure that the magnetic sensor reacts reliably to open/close events. If the two parts are too close to each other, there is a risk of mechanical interference and damage. If they are too far away, they may not react reliably. So before attaching in a permanent way, test and find the best location and orientation. You can test the installation with a multimeter and get a feel as to how the sensor reacts.


Other types of sensors may be suitable too. For my other installation, I installed the sensor on the garage door itself, and I used a mercury switch to detect when the door is fully opened. The change of orientation of the panels (horizontal when opened, vertical when closed) triggered the switch. Be creative!

Step 5: Install the Indicator

Skip this section if you do not have a suitable alarm panel. Keep reading for an alternative solution.


This project uses the "Zone follower" feature of the Programmable Outputs (PGM) provided by the alarm panel.

The PGM outputs are open-drain outputs (active low) that are highly flexible. When programmed as a "Zone follower", they can be active when a certain zone is opened. Which is exactly what I want for this project: by connecting a visible indicator (LED) to a PGM output configured as a zone follower, I can have an LED that will display when the shed is open.

The PGM outputs are located either on the alarm panel itself, on the keypad, or on a PGM expander board. You can decide which one you want to use, based on your particular installation.

In my case, since the keypad was already in a convenient location, I decided to use its PGM output.


In particular, the RFK5500 keypad has a P/Z input that can be used either as a zone input, or a programmable output (PGM). I drilled a 5mm hole and installed a 5mm blue LED, with a 22K series resistor, and wired it between the red wire of the keypad (+12V) and the P/Z pin. The LED goes below the circuit board/black connector, there is little space so you have do make it small and tidy.


The result: a nice, visible but not too bright, blue light on the left of the panel when the PGM output is active. I used a 22K resistor because blue LEDs tend to be so efficient that they are often too bright. You can reduce the resistor, all the way down to about 560 ohms, if you need a brighter LED.

Step 6: Program the Alarm Panel

Skip this section if you do not have a suitable alarm panel. Keep reading for an alternative solution.


Complete programmation of the alarm panel is out of scope for this tutorial, as I do not intend to rewrite the (long) programming manual. I am assuming that if you are making this project, you are already familiar with programming your alarm panel. But please allow me to give you some indications to get you going.


The trick here is to:

  • Enroll the wireless sensor as a wireless zone. Check the documentation of the alarm system as to how to do this. In particular, make sure the zone is enabled, that the wireless flag is set, and that it is in the right partition.
  • Set a PGM output as a zone follower. I used PGM3, because on my PC1832 panel it did not correspond to anything else.
  • Configure PGM3 as a zone follower for whatever zone number you have enrolled the wireless sensor to
  • Configure the keypad P/Z pin as a PGM output, and set the PGM output of the keypad to 3

That way, the P/Z pin of the keypad will toggle to follow the activity of the sensor.


If you decide to use a PGM output on the panel itself, it is similar, except that you don't have to do the programming for the P/Z pin of the keypad.


You can decide whether you would like this sensor to only be used for an indicator, or to actually integrate it within your alarm system (where a violation of the sensor while the system is armed will trigger the alarm). You decide that by selecting a different zone type when programming the zone (such as Instant, 24Hr non alarm, etc.).


If you have issues, it may be helpful to program the PGM as a Zone follower to a known-working zone (such as your front door or similar). That way you can rule out an issue with the wireless sensor. Once you have verified that the PGM output works properly as a zone follower, switch it to whatever zone your wireless sensor is enrolled into.

Step 7: Bonus Section: But Wait! I Don't Have a Suitable DSC Alarm Panel!

Skip this section if you used a DSC alarm panel as described above.


If you do not have a suitable alarm panel, you have a few options:

  1. Acquire one. They are not terribly expensive, and having an alarm system can be a good idea. As this tutorial shows, they offer a lot of flexibility and can be used for DIY projects, and it is sad to see that they are often limited to only basic functions. I hope that this project shows they can do way more!
  2. Use rtl_433 with the DSC decoder (see the attached screenshot). You can let it run on a Raspberry Pi, and process the received signals as you see fit.
  3. Build your own receiver with an Arduino! The FS1000A transmitter is often sold in pair with a receiver. You can use the receiver, and write a suitable Arduino program.


If you have another model/brand of alarm panel, you could also change the protocol to suit whatever alarm system you have, although that's more work.

Step 8: Finish Installation and Test!

Install everything at the location where you want the sensor to be. Before permanently installing the transmitter, check the range! You may need to adjust the location of the antenna for a better signal. Make sure to protect the electronics from the elements - I used a small waterproof electrical enclosure.


I put the electronics into a small electrical box, and I used a 5V USB power supply as a power source, conveniently connected to the MH-ET Tiny board via a microUSB connector. That way the board can be unplugged easily from the power source, and connected to a computer, if it ever needs to be reprogrammed.


One important consideration to maximize the range, is that the antenna needs to be away from metal objects, and straight, and of the right length. You may be able to further increase the performance, if needed, by adding a counterpoise (another wire of the same length, connected to GND, extending the other direction parallel to the antenna).


If you accomplished all the steps above correctly, the LED on the keypad should light up when the shed is open, and should shut down when it is closed. Congratulations!


Project complete! It is now possible to see, from a convenient and warm location, whether the door is opened or closed.