Back to Blog
EN-004·design-decisions·10 min·

Gas Control Panel Development: Hardware and Firmware

A gas control panel is the central unit that collects measurement data from gas detectors deployed in the field, manages alarm decisions, and notifies the operator through auditory and visual means. In this article, we cover the key parameters to consider when designing a 4–20 mA based gas control panel — from ADC input to alarm management, from event logging to EN 50271 compliance — drawing on our project experience.

A gas control panel is the central unit that collects measurement data from gas detectors deployed in the field, manages alarm decisions, and notifies the operator through auditory and visual means. No matter how well a detector is designed, system integrity cannot be achieved if the panel's hardware design, firmware layer, and user interface are not properly structured. In this article, we cover the key parameters to consider when designing a 4–20 mA based gas control panel — from ADC input to alarm management, from event logging to EN 50271 compliance — drawing on our project experience.

Note: this article focuses on the control panel used in industrial gas detection systems. Sensor selection on the detector development side — particularly for electrochemical sensors — as well as analog circuit design and firmware layer are separate engineering topics; we cover these design decisions in detail in our gas detection device development guide from sensor to product.


1. 4–20 mA Communication in Gas Control Panels: Why Is It Still the Industry Standard?

The communication method between the gas control panel and field detectors directly determines the system's scalability and reliability. The 4–20 mA current loop is a communication protocol that has been used in industrial gas detection systems for a very long time.

Current-based signal transmission is virtually unaffected by cable length and line resistance, unlike voltage-based methods. Even if the distance between the detector and the panel is hundreds of meters, signal integrity is maintained and the effect of distance on the signal is negligible. This characteristic is critical in large areas such as industrial facilities and factories.

In the 4–20 mA standard, 4 mA represents the lower limit value ("zero measurement") and 20 mA represents the upper end of the measurement range. The most important feature of this standard is that a 0 mA condition means "fault" rather than "no signal." When a cable breaks, a detector loses power, or a connection fails, the current drops to zero and the panel automatically interprets this as a fault. This mechanism forms the basis for the panel's reliable detection of disconnected or faulty detectors.

Fault Detection and Connection Status Monitoring

In the panel software, current range evaluation must be performed for each input channel. Current values below the normal operating range are interpreted as open circuit (cable break or detector power loss), while values above the range are interpreted as short circuit or out-of-range conditions. Detection of these out-of-range values forms the basis of the panel's fault management mechanism.

In field applications, determining whether a detector is connected is also done through this current range. When the panel is first powered on or during a periodic scan, if the value read from each input is within the current range, the detector is evaluated as connected and active; if outside the range, it is evaluated as disconnected, faulty, or out-of-range.

Additionally, we recommend applying hysteresis to threshold values at the software layer. This way, when a detector oscillates around a threshold value, the device will not continuously switch between fault and normal operating states. This detail directly affects the panel's field reliability.

Universal Detector Connectivity

Another significant advantage of the 4–20 mA standard is its manufacturer-independent operation. Any gas detector with a 4–20 mA current output can be connected to the panel — whether it measures CO, NO₂, H₂S, CH₄, O₂, or any other gas. What needs to be done on the panel side is correctly configuring the measurement range and unit for each channel. We will address this in the next section.


2. Gas Control Panel User Interface Design

Using a display for visual operator notification on a gas control panel also enables on-site device configuration, reducing costs on the commissioning, maintenance, and service side.

Channel-Based Configuration: PPM, LEL, VOL

Each detector connected to the panel may represent a different gas type (explosive, flammable, or toxic) and measurement range. The following parameters must be configurable for each channel via the menu:

Measurement unit selection: A choice is made between PPM (parts per million), LEL (percentage of lower explosive limit), or VOL (percentage by volume). The panel software converts the 4–20 mA current value to the relevant measurement unit taking into account this selection and the measurement range, and displays it to the operator on screen.

Measurement range definition: Used to define which concentration values the 4–20 mA range values correspond to for the selected unit. For example, for a CO detector with a 0–300 ppm measurement range, the panel will calculate 4 mA = 0 ppm, 20 mA = 300 ppm. For a methane detector with a 0–100% LEL measurement range, 4 mA read by the panel represents 0 %LEL and 20 mA represents 100 %LEL.

Alarm thresholds: Independent alarm threshold values (typically Alarm 1 and Alarm 2, and Alarm 3 depending on the application) can be defined for each detector channel. The ability for users to set alarm thresholds in the field provides flexibility for different application scenarios. For example, on a panel reading a CO detector with Alarm 1 at 50 ppm and Alarm 2 at 100 ppm, a user can set the panel's Alarm 1 to 30 ppm and Alarm 2 to 70 ppm, obtaining 4 distinct alarm levels between 30–100 ppm. However, this flexibility requires input validation on the firmware side — illogical configurations such as the Alarm 2 threshold being lower than Alarm 1 must be blocked at the software layer.

Real-Time Status Display

The primary function of the display is to present the operator in real time with information such as the gas concentration values measured by the detectors connected to the panel, alarm status (normal, Alarm 1, Alarm 2, Alarm 3), connection status (connected, disconnected, fault), and detector/gas type. In multi-channel systems, this information can be displayed simultaneously or on a page-by-page basis depending on the design decision. In the 4 and 8 channel 4–20 mA gas control panel we developed for a client, we displayed detector information (gas value, gas type, measurement unit, connection status, etc.) to the operator as a summary table, and in more detail on each detector's dedicated page. This way, the operator could review summary information from the on-screen table and examine the status in detail from the relevant page.

In fault conditions (communication loss, sensor failure, power supply issue), the display's clear notification of this condition is one of the fundamental requirements of the EN 50271 standard. For example, in a page-based display specific to each detector, a strategy such as showing the page in green for normal operating status and yellow in fault conditions can be used.


3. ADC Design: Analog-to-Digital Conversion in Gas Control Panels

At the panel's analog inputs, the 4–20 mA current signal is converted to voltage via a shunt resistor for processing by the microcontroller, and then digitized by the ADC unit for processing. Each stage in this measurement chain directly affects measurement accuracy and reliability.

Shunt Resistor and ADC Selection

The most important factor in shunt resistor selection is the target concentration resolution (i.e., current resolution) and the dynamic range of the ADC unit used. For example, a 100Ω shunt resistor will produce a signal in the 400 mV – 2V range for the 4–20 mA range under ideal conditions. When this signal is fed as input to an ADC with Vref = 3.3V, the ADC's dynamic range cannot be fully utilized. On the other hand, with a 200Ω shunt resistor, a voltage of V = 4V will be generated for a 20 mA current value, which exceeds the same ADC's dynamic range and the Absolute Maximum rating of the input channel. Shunt resistor selection must be made by finding a balance between these two constraints.

The primary criterion determining whether the microcontroller's internal ADC unit or an external ADC will be used is the resolution jointly defined by reference voltage and bit count — this value directly affects gas measurement resolution. For example, consider a 0–1000 ppm CO detector connected to the panel with a 100Ω shunt resistor. For this detector, 1 ppm resolution corresponds to approximately 1.6 mV. Taking noise margin into account, the ADC resolution needs to be below this value. For a 10-bit ADC operating in the 0–3.3V range, 1 LSB is approximately 3.3 mV — which exceeds the resolution required for 1 ppm. Similarly, in low ppm ranges (e.g., NO₂ measurement, 0–30 ppm), if sufficient resolution is not provided, the difference between measurement steps directly affects alarm threshold calculations. For this reason, we recommend using an MCU with a minimum 12-bit internal ADC, or a 12-bit external ADC, in panel design.

Sampling frequency must also be considered in ADC selection. Gas concentration is not a rapidly changing parameter — a few samples per second is sufficient for most applications. However, if software-based filtering (averaging, IIR filter, etc.) will be applied, the raw sampling rate must meet the filter requirements.

Overcurrent and ESD protection must also be considered in the input circuit. In industrial environments, unexpected voltages may reach the ADC input as a result of cable connection errors or field accidents; protection circuits prevent the ADC from being damaged in such cases.


4. Alarm and Fault Relays in Gas Control Panels

The most critical outputs of a gas control panel are alarm relays and fault relays. Through these relays, the panel triggers external systems such as ventilation fans, gas shutoff valves, fire panels, and BMS (Building Management Systems).

Alarm Relay Structure

Independent alarm relays must be present for each zone or channel group. In a typical configuration, Alarm 1 (pre-warning, low threshold), Alarm 2 (main alarm, high threshold), and Alarm 3 (emergency response) levels, depending on the application, are assigned to separate relay outputs. This separation allows different alarm levels to trigger different actions. For example, the Alarm 1 output can be connected to a siren for auditory warning, and the Alarm 2 output can be connected to a ventilation fan for evacuation.

Dry Contact Outputs and External Integration

Alarm and fault relay outputs must be designed as dry contacts. A dry contact means the relay output is not associated with the panel power supply — the connected external system uses its own power supply. This design enables safe integration of the panel with systems operating at different voltage levels such as fire alarm panels, BMS, or SCADA.

Fault Relay

The fault relay is the output that reports system-wide fault conditions to the outside world. Conditions such as power supply issues, detector not connected errors, self-test failures, and MCU lockups activate the fault relay. This relay operates independently of the alarm relays. In safety applications, the fault relay is preferred as normally closed (NC) per the "fail-safe" principle (EN 50271). When the relay is de-energized (in case of panel failure, power loss, or fault condition), the contact opens and the connected system enters alarm state.

Buzzer and Auditory Alarm Management

The buzzer on the panel audibly warns the operator in alarm conditions. However, a continuously operating buzzer causes operational problems, especially in prolonged alarm conditions. Buzzer silencing can be done via an "acknowledge" button placed on the panel, or through the menu. This operation silences the buzzer but does not reset the alarm condition — the alarm LED continues to light and relay outputs remain active. The alarm condition is automatically reset only when the gas concentration drops below the threshold. This distinction ensures that while the operator confirms awareness of the alarm, alarm functions do not become disabled.


5. Event Logging

In a gas control panel, event logging is used for timestamped storage of alarm history, fault history, and user actions. These records are of critical importance for certification audits, identification and analysis of field issues, and maintenance planning.

Data Storage Options

Two basic approaches can be used for event logging.

External EEPROM: External EEPROM with I2C or SPI protocol (e.g., 24C256, AT25M01) provides persistent storage independent of the MCU. The advantage of this method is that it is unaffected by MCU changes and data is preserved during firmware updates. The most significant disadvantage is the cost of the external component.

Flash Emulation: In modern MCUs, internal Flash memory can be used as EEPROM emulation. For STM32 microcontrollers, for example, writing to Flash sectors using a page-swap mechanism is done with the method described in ST's AN4894 or AN2594 application notes. In this method, there is no additional hardware cost; however, the Flash write cycle count is lower compared to EEPROM and must be planned together with the firmware update strategy.

Which method is preferred should be determined based on the number of events to be logged, logging frequency, MCU selection, and cost targets. In the gas control panel we developed for a client, we used the microcontroller's internal EEPROM along with an additional external EEPROM. This allowed us to achieve a higher number of event records at lower cost. We managed records using a circular buffer structure, a common approach in field applications — when the buffer is full, the oldest data is overwritten with the most recent.

Events to Be Logged

At a minimum, the following events must be logged: alarm type, relevant channel number, alarm level, fault condition, and fault type. These records must be timestamped (RTC).


6. Backup Battery and Power Topology

A gas control panel must operate continuously; alarm and monitoring functions must continue even when mains power is cut. This requirement directly shapes the panel's power architecture.

In a typical configuration, the 230 VAC mains input is converted to the panel operating voltage (generally 24 VDC or 12 VDC) via an internal SMPS (switched-mode power supply). The backup battery activates when mains power is unavailable. A battery charging circuit may also be included on the panel. The fundamental problems to be solved in the power topology are:

Charge management (if applicable): The battery must be continuously charged when mains power is available but must be protected from overcharging. An appropriate charging profile must be applied depending on battery type.

Seamless switchover: When mains power is cut, there must be no interruption in panel operation. This transition time must be short enough not to fall below the MCU's reset threshold.

Battery status monitoring: The firmware must periodically measure battery voltage and notify the operator of low battery status. When battery voltage drops below a certain threshold, the fault relay must be activated and a warning displayed on screen.

Detector power supply: If the panel also needs to power the detectors in the 4–20 mA loop, the number of detectors and their consumption must be included in the power budget calculation. Battery capacity must be sized to meet the desired backup time under full load.


7. BMS and SCADA Integration via Modbus RTU

A gas control panel rarely operates independently; it is integrated with Building Management Systems (BMS), SCADA, or central monitoring software. For this integration, Modbus RTU is the most widely used protocol in the industry.

In this use case, the panel operates as a Modbus RTU slave. The BMS or SCADA system queries the panel as master and, depending on the design, reads alarm statuses, real-time concentration values, fault statuses, and system information. The register map must be openly documented to enable upstream system integrators to communicate correctly with the panel.

Operating over the RS-485 physical layer, Modbus RTU provides more detailed information transfer in addition to the panel's dry contact outputs. While relay outputs only provide binary "alarm present / absent" information, the real-time value of each channel, alarm level, fault type, and configuration information can be transferred over Modbus.


8. EN 50271 Compliant Firmware Requirements

EN 50271 defines reliability and functional safety requirements for the software layer of gas detection control units. Panel firmware must be developed and tested in compliance with this standard. Key requirements include hardware watchdog (software reset being detectable — EN 50271:2018 Article 4.6 d), RAM and Flash integrity tests (EN 50271:2018 Article 4.6 e and 4.6 f), and fail-safe relay behavior (EN 50271:2018 Article 4.8). We cover EN 50271 firmware requirements in broader scope in the context of panel design in our parking lot gas detection system design article.


Gas Control Panel Development as an R&D Partnership

Gas control panel development requires coordination of multiple disciplines such as analog circuit design, embedded software, user interface, and certification management.

In our gas detection device design service, with our experience developing 4 and 8 channel gas control panels, we work as an R&D partner from hardware design to certification support.

To evaluate your gas control panel project together, contact us →


References

  1. BS EN 50271, Electrical apparatus for the detection and measurement of combustible gases, toxic gases or oxygen — Requirements and tests for apparatus using software and/or digital technologies.
  2. IEC 60079-29-1, Explosive atmospheres — Gas detectors — Performance requirements of detectors for flammable gases.
  3. ST AN4894, EEPROM emulation techniques and software for STM32 microcontrollers.
  4. ST AN2594, EEPROM emulation in STM32F10x microcontrollers.

About the Author

Çağrı Faydacı

Co-Founder & CEO, HEFA Teknoloji

Çağrı leads HEFA Teknoloji's project management and R&D funding processes. With over 10 years of experience in electronics engineering, he has co-led 5 TÜBİTAK-funded R&D projects and co-authored peer-reviewed publications on sensor technologies.