Main Content

Get open/closed status of your garage (or any other) door, over Helium Network.

I wanted to design a low power device that could send open/closed status of my garage door. Initially just so I can check that I didn’t forget to close the garage, but later this data could also be used for an alarm feature.

Since the garage is multiple floors below my apartment, Bluetooth was not an option. Also, I wanted to avoid handling the receiver side myself, but rather use an existing network which can support as many devices as I want in the future. This is where the Helium Network comes in. Based on LoRa protocol, it provides long range communication, with very low power, for extremely low cost (100k packets for 1 USD at time of writing). In my area there is a good amount of Helium hotspots installed, so I only needed to design the device and connect to the network.

To detect open/closed state, I used a magnet on the garage door (moves with the door), while the GN PCB is in a fixed position cca. 5mm from the door. The magnet is read by magnetoresistive sensor U3 (Honeywell SM351LT). The sensor outputs state 0 when the magnet is close (door closed), and state 1 when magnet is far away (door open).

I used a relatively small magnet (less than 10 mm diameter) and it works great, but you should test this in your specific application. You can see what GN is doing by looking at the provided status LED, as described below.

GN status LED:

There is a dual-color LED on bottom side of GN PCB that shows current status. It always starts blinking when there is a change on the magnetoresistive sensor. Colors are as follows:

Green blinking: door is closed
Red blinking: door is open
In any state, the LED keeps on blinking until the LoRa message is sent.

Hardware
I designed the PCB needed for this project in KiCad 6.0, and produced a couple of prototypes through JLCPCB. I also used their assembly service to solder most SMD components on TOP side of PCB, to save some of my time and to test how well they will manufacture this (results were very good, no issues). I also used a VNA to tune the LoRa antenna to the specific Hammond RL6105BK housing that I used (see schematic for info).

On my github you will find all outputs needed to produce the board (gerbers, BOM with JLCPCB part numbers, pick&place). Feel free to modify the sources as you want and make it better in your own project.

Some credits before going further: The design is based on Adafruit’s nRF52 Feather board. They took care of nRF52 support in Arduino and provided a UART bootloader to make development simple. I kept the same MCU pins for UART, so my design is completely compatible with Adafruit’s bootloader and I only needed to write the Arduino application. I recommend to check out Adafruit’s documentation to get a better understanding of nRF52 with Arduino.

Here are some more details regarding hardware:

- You will need NRF52-DK or some other board with J-Link (I got the NRF52-DK from Mouser) to flash Adafruit’s bootloader the first time (only done once, see Bootloader chapter for details). After the bootloader is flashed, you can use a simple USB-UART converter for all future updates of Arduino application and even updates to the bootloader.
- I used the Raytac MDBT42Q module (nRF52832) instead of going for the bare nRF52832 IC. This makes the design and soldering much simpler. Additionally, if wanting to commercialize the design in the future, certification is much easier since the module already has the needed radio certificates.
- To allow changing the battery in the future, I used a battery holder together with a Panasonic CR123A battery. These 3 V lithium batteries give enough current for this project, and are easily available in my area. Additionally, there is a soldering footprint for 18505-size lithium battery, that battery squeezes right into the Hammond housing that I used.
- For LoRa, I designed with the standard RFM95W module. In the end the original HopeRF module that I put in the schematic wasn’t available, so I soldered the Seed Studio version. Not sure of the differences between manufacturers, but they seem identical, I didn’t notice any issues.
- I used a magnetoresistive sensor to detect the presence of magnet on the door (U3, Honeywell SM351LT). The sensor outputs state 0 when the magnet is close (door closed), and state 1 when magnet is far away (door open). There is also a footprint for a regular reed switch, but note that I have it wired inverted compared to U3, so if you want to use it then you should either change the Arduino sketch, or redesign schematic, to correctly identify open/closed state.
- There is an accelerometer on board (LIS3DH) but I didn’t use it yet. The idea was to skip the magnet altogether and have GN directly on garage door so it moves when opened. However, the magnet approach has worked reliably for almost a year, so I didn’t have the need to change it. Therefore, you don’t need to solder the accelerometer if you don’t have some other purpose for it.
- I used a 868 MHz antenna since I am in the EU. There is also a 915 MHz version available, so the design could be adapted to US requirements.
- Power consumption: when I tested the first prototype, I measured the standby current to be around 10 uA using EEVBlog’s uCurrent. As that was more than ok for me, I didn’t try to push it any further.”

Link to article