MPA – Multipurpose Alarm System
The MPA, a flame detection system with high reliability and easy maintenance in mind
Description
Note : Please read the attached PDF for the full report including schematic, PCB layout, and other images The Plan The idea behind this project is to construct a fire suppression system that achieves the following goals • Reliable (above all else) • Low maintenance cost / simple to fix • Low installation cost • Reduction of complexity During the planning stage it was first believed that each fire detection system could utilize an off-the-shelf microcontroller such as the ESP8266 range. Such use of a microcontroller would have given the possibility of turning the fire modules into IoT devices that could be monitored through any browser capable device including smart phones, tablets, and computers. The Wi-Fi capabilities could be expanded to create a mesh network where all devices can talk to each other and make joint decisions as whether to turn on sprinklers. However, the use of Wi-Fi for device interconnectivity has some serious drawbacks including • Expensive • Unreliable Wi-Fi network • Unexpected reboots of modules (a common occurrence) • Difficulty in EMC control for selling commercially • Difficult setup by the end user • Networks have a limit of 254 devices (192.168.1.x where x is between 1 and 255) Therefore, it was decided that a PIC16 device would be used as the main controller and wired communication between devices would provide a much better solution that would not only be cheaper, but more reliable. How It Works – The Design Overview The fire system in this project is designed to provide user functionality and ease of installation all while keeping the final cost down and ensuring reliability of the system. The main features of the schematic for the fire system include the following features • Flame detection and IR signal immunity • Test button • Super-bright white LED • Loud beeper • Internal battery backup • Chained design and bus failure detection • Power failure detection • Common trigger bus • Low operating speed (< 9kHz) for better EMC compliance • Interrupt driven system When the system starts it begins by checking the watchdog overflow bit to see if the system had recently crashed and therefore performing an emergency reboot. Then, IN, TRIG, and the voltage level on the bus are checked to ensure that the system is functioning correctly (more on the IN and TRIG signal later). With the basics checked the device then starts performing the basic standby procedure which involves flashing an LED once every so often as well as probing the flame detection pin (while the system is interrupt driven for flame detection the PIC still routinely checks this pin in the unlikely event that the interrupt system is disabled). The test button is used to test the flame detector by forcing an interrupt service routine, but the sprinkler is disabled (for obvious reasons). The TRIG line is also untested as this would cause a water sprinkler cascade (i.e. every device down the chain enabling their sprinklers), but a pulse is sent down the IN/OUT line which tests the devices down the chain. When a flame is detected, the system starts by beeping the alarm and flashing the LED for 10 seconds. If the test button is not pressed in this time, then the PIC enables the water sprinklers to start extinguishing the fire. However, nearby sprinklers are not enabled if the flame is put out within a predefined amount of time (this prevents damage to goods and equipment). If, however, the flame is not put out then every sprinkler on the system engages to prevent the spread of fire. How It Works – The Sprinkler System Each module in the chain controls its own sprinkler which consists of a 12V 5W ½ inch male / male water valve. These valves are made of plastic and are very easily attached to standard hose pipe using ½ inch adaptors. Since the objective of this project is to create a fire alarm system that is easy to install and maintain hosepipes seemed to be one of the better options for water delivery for a number of reasons: • Readily available in DIY stores • Easy to install • Very easy to maintain • Controlled by simple taps The sprinklers themselves are garden sprinklers for hosepipe systems which not only further reduces the cost, but it also helps for maintenance and installation. The installation of copper piped systems often requires skilled labour that can be costly to install. Hosepipes are not only easily detachable but are highly customisable and easily laid. Of course, hosepipes are not without their flaws with the following being potentially problematic • Dependency on mains supply that might not always be available • Poor quality connections can leak However, the dependency of modern water supplies is beyond 99% so the chances of water being disconnected during a fire is unlikely. Poor quality connections can leak water but regular maintenance (by simply checking hose connections), can solve the issue. Since each sprinkler uses a solenoid valve that is normally closed sprinklers will not leak and will require next to no maintenance. How It Works – Reliability Reliability of the system is realised using multiple techniques • Single wire bus for detection of any single alarm • In / Out chain that allows devices down the chain to detect chain breaks • Simplistic software using interrupts on fire detection • Multiple power sources The first (and most important), feature of the fire system is a single wire that connects to all modules. This wire is typically pulled up and each device connects to this bus with a single pull-down transistor. If any device on the chain detects a fire, then it can pull down the bus to 0V and this will be detected by all devices on the chain. Each device is also connected to a device before and after in a chain. This allows a device to check if it is still reliably connected to the chain that provides power and the detection bus. The first device connects to a special power unit that also pulls the first IN line high. The first device checks this wire and if it is high then it passes a high signal to the OUT line. The next devices IN line is connected to the first devices OUT line and if that line if high then it passes a high signal to its OUT line. This continues down the chain right to the last device and if any device detects a low signal on the IN line then it knows there is a problem with the chain. Software reliability is just as important as hardware reliability and this is achieved with the use of watchdog timers and interrupts. The main loop of code is used to scan the detection bus, the IN / OUT signals, and the current voltage on the power input. The main loop also periodically clears the onboard watchdog timer so in the event that a piece of code runs into an infinite loop then the system will reboot, and a special routine can be executed to handle the watchdog overflow (using bits sets upon RESET by the PIC). Fire detection is done using a fire detection module that outputs a logical 1 when a hot object is detected (flame, not smoke). But instead of the PIC scanning the fire detection module output the output is instead connected to the INT pin of the PIC which triggers an interrupt upon detection. This forces the PIC to execute the Interrupt Service Routine which is more reliable that simple bit scanning (as it is a hardware procedure). However, all these reliability systems are useless in the event of a power cut which is likely to happen during a fire (if the fire starts near a wire and/or electrical system). This is why the design incorporates a backup battery in parallel with the incoming power bus. While the current design is simplistic (being a prototype), it does show the use of two parallel diodes where a 12V battery is connected to the battery backup connection. Since the nominal power supply from the bus is 13V~14V the battery diode is reversed biased which means the battery does not power the system. Only when the power supply from the bus drops below 12V does the battery begin to take over and this voltage drop from the main bus is detected using the PIC and a simple potential divider connected to the PICs ADC input. The result is that if battery power is being used then the system can still function, but the PIC immediately signals an alarm that there is power disruption (such as a fast continuous chirp). Later Expansion One of the major advantages of this fire detection system is that sensor modules such as gas, CO2, and others are easy to connect to (typically using only one GPIO pin). This means that this system is easy to expand and connect different sensors to which allows this product to be customizable to its environment. The use of ½ inch solenoid valves can also be used to disperse other liquids and gasses as they are suitable for both liquid and gas. This would give rise to a fire system that could be designed to protect against different types of fire as well as different degrees of protection. The use of the IN/OUT chain (as well as the TRIG wire) also allows for a device such as an ESP8266 or Raspberry Pi to connect to the start / end whereby any detection could trigger an automated response that informs local authorities. However, such a system would need to be proven before being put out onto the market as false claims of fire to the authorities is often a fine.
References
• ½ inch solenoid - £3.98 • Garden sprinkler – As low as £1 but typically £5 • PIC16F628 - £1.33 (£34 for tube of 25) • DC-DC Module – 67p • Fire detection module - £2.41 • Ethernet cable (interconnect) – 48.2p / meter • Various components – Approximately £2~£3 • PCB - £1.51 for 10 prototypes from JLCPCB (15.1p)