-
Notifications
You must be signed in to change notification settings - Fork 0
1.2 Alarms
Alarms have been designed by NGeertinger, and the code originates from the nwaDTUArduino-repository. Alarms can either be control panels, and be used to arm or disarm a household, or sensor nodes. Both are outfitted with a LoRa shield and a sensor of choice. The two device types are displayed below (without sensors).
Control panel | Sensor node |
---|---|
![]() |
![]() |
Alarms have unique device values generated in The Things Network. The values must be defined in the alarm code in order to identify the device when communicating with the server.
Upon startup, sensor nodes and control panels follow a flow to keep updated with the alarm functionality:
Flow of sensor node program. NWS is the server. Image credit: baaabuuu
Control panels have the added functionality of a keypad and LCD, and the keypad is used to arm and disarm the system, as seen on the key press flow.
Key press flow. Image credit: baaabuuu
There are three sensors implemented so far, along with a panic button. The sensors are i LIDAR-Lite v3, a HC-SR505 PIR sensor (reported to be unreliable), and an ultrasonic range finder LV-MaxSonar EZ0 (EZ 1-4 would work as well). The ultrasonic sensor should ideally be soldered to connecting wires for reliability.
A breadboard-based setup is not ideal for permanent setups, but makes for quick and solderless hookup. A solderable breadboard is presumed to be an alternative for users with soldering equipment.
It could be an improvement to the setup to design a casing (e.g. 3d-printed plastic or cut-and-fold cardboard shapes) that can be used to protect the alarms from dust and accidental disconnection of wires, secure sensors, and ease installation in the home (with the option of fastening alarms directly to walls and the like).
More sensors could be implemented, or alarm components could have multiple sensors at once. If multiple sensors were implemented, and users could combine sensors as needed, there would have to be a modular code generation to ease the installation process. Furthermore, different sensors need varying pins, and Arduinos have a limited supply of pins. Breadboards can be used to create multiple power or I2C connections, but the number of analog and digital pins supplied on the Arduino of choice cannot be surpassed (however, an Arduino UNO can always be replaced by an Arduino Mega 2560).
If this modular design was to be implemented, the pin supply and demand of components in question would have to be tracked. Below is a table of pins in the current component selection, along with whether or not the hookup necessitates a breadboard: