
ARMAC's control modules
A fire defence system needs to know, at least: how much water is left, whether the pump is running and delivering, how hot it is, and whether embers are arriving. This page describes a simple, proven pattern for reading a group of such sensors with low-cost boards.
The pattern: one sensor hub
- One board reads all the sensors in turn, on a fixed cycle (every few seconds).
- It sends one line of readings each cycle, as key:value pairs, for example:
EXT_TEMP:35.2|INT_TEMP:30.1|TANK:2.41|FLOW:147|OIL:1|WATER:1|BATT:12.9|EMBER:0
- Another board or computer decides what to do, drives the relays, and passes the readings on to the dashboard.
Keeping reading, deciding and displaying in separate boxes means a fault in one doesn't stop the others.
Choosing a board
| Board | Good for | Watch for |
| Arduino (e.g. UNO R4 WiFi) | Reading sensors and driving relays; starts in a second and simply runs its program; analog inputs built in; 5 V logic | Limited memory; Wi-Fi is basic |
| ESP32 | Cheap, plenty of memory, good Wi-Fi | 3.3 V logic (care with 5 V sensors); analog inputs less accurate |
| Raspberry Pi | Running Home Assistant, dashboards, internet access, logging | A full computer: slower to boot, SD cards can fail; no analog inputs (needs an add-on converter) |
| PLC | Industrial reliability, 24 V inputs and outputs | Costly; different programming tools |
A common combination - used by ARMAC - is Arduinos at the pump shed for sensors and relays, and a Raspberry Pi in the house for Home Assistant and remote access.
Connecting the sensors
| Type | Examples | How to read it |
| 1-Wire digital | DS18B20 temperature probes | Several probes share one data wire, each with its own address; a few dollars each |
| 4-20 mA current loop | Tank depth (pressure) sensor | Pass the loop current through a resistor and read the voltage: about 235 ohms turns 4-20 mA into roughly 0.9-4.7 V; good over long cables |
| Pulses | Water flow meter | Count pulses per second; average over a couple of seconds |
| Switch contacts | Oil and water pressure switches; ember detector relay | Digital input with a pull-up resistor; contact to ground reads LOW |
| Resistance | Fuel level float sender | Voltage divider with a fixed reference resistor, read on an analog input |
Getting the readings out
- MQTT to Home Assistant over Wi-Fi or Ethernet - the usual route to a dashboard.
- RS-485 for long cable runs (tens to hundreds of metres), e.g. house to pump shed; robust against interference.
- Wi-Fi (UDP) between boards close together.
Add a checksum to each message and ignore any that fail it.
Dashboards: Home Assistant and the alternatives
Once the readings are out, something has to show them on your phone and let you send commands back. Home Assistant is one choice among several:
| Option | What it is | Watch for |
| Home Assistant | Runs on your own Raspberry Pi or mini-PC, with an MQTT broker (Mosquitto) alongside; dashboards, automations, email and SMS alerts | You look after the computer; remote access needs a VPN or its paid cloud link |
| Adafruit IO | Cloud service from Adafruit with its own MQTT broker built in: boards publish and subscribe by MQTT (or send by HTTPS); drag-and-drop dashboards and simple triggers; Arduino libraries and many guides | Depends on the internet and Adafruit's servers; the free tier limits how much data you can send |
| nodrix | An open-source (MIT) alternative to Adafruit IO that you deploy into your own Cloudflare account, so the data stays yours and there are no free-tier limits (you pay Cloudflare for use): boards send data over HTTPS or WebSocket (no MQTT broker needed); realtime dashboards and automations | Newer project; depends on the internet and on Cloudflare |
| Arduino Cloud, Blynk, ThingSpeak | Other cloud dashboards with ready-made board libraries | As for Adafruit IO |
| Node-RED | Visual "flow" programming on your own Pi; can provide a dashboard | More building to do yourself |
Cloud dashboards are quick to start with, but in a fire the internet may fail: whatever you choose, the equipment at the pump should keep working without it (see Autonomous operation and fail-safes). More on the choice: Controls, sensors and dashboards.
ARMAC first looked at Adafruit IO, then chose Home Assistant: it runs locally on the Pi in the house, so the dashboard and alerts work on the house network, and remote access is through a VPN. See Home Assistant for fire defence.
Making it reliable
- Separate power supplies for relays and for sensors, with decoupling capacitors and ferrite beads, so relay switching doesn't disturb the readings.
- Filter readings: ignore single-sample spikes; average where appropriate.
- Watchdog: let the board restart itself if its program hangs.
- Safe defaults: outputs should fail to the safe state (water flowing to the sprinklers), and a restart must not switch the pump (use a latching relay).
- Backups for the readings that matter most - ARMAC has a second temperature-probe bus wired to a different board.
How ARMAC does it
Sensors, Electronic modules and wiring, Arduino pin allocations and Communications on ARMAC.AU. The Arduino code is public: ARMAC code on GitHub (CC0, use at your own risk).
Pages here are kept under the Site Editor's control; see Contributing to add to them.
Discuss this page
Questions, corrections or your own experience of this topic? Add a comment below. You need to be signed in to the forum to comment.