2026.01.23
  • Detection Principle:MOS-type
  • Refrigerant Gas
  • Evaluation method

How to Use a Gas Sensor (Digital Output Part -2) - Acquiring Data Using UART (RS485) Communication -

Table of Contents

In the previous article of the Figaro Journal, we explained how to acquire data using open-collector output and introduced the fact that the mainstream in current digital communication is "serial communication."

In this article, we will focus on "digital communication" among the digital outputs of gas sensors. After briefly explaining an overview of "serial communication," we will discuss UART communication as its foundation, as well as its relationship with "RS485," which is also widely used in industrial equipment.

In the latter half, we will actually use the gas sensor module "FCM2630-K1A" to go through the full process from setting up UART (RS485) communication to checking its operation.

What Is "Serial Communication"--the Mainstream in Digital Communication?

"Serial communication" is a method of communication in which data is transmitted and received one bit at a time in sequence, and it is broadly classified into "synchronous" and "asynchronous" types.

In "synchronous" communication, data signals and clock signals are transmitted and received simultaneously. Since both the transmitter and receiver operate with a common timing (clock), data exchange is accurate and the method is suitable for high-speed communication.

On the other hand, in "asynchronous" communication, the transmitter and receiver each have independent clocks, or communication is carried out without using a clock signal. It's like exchanging letters.

While the timing for reading a letter depends on the recipient, if there is information such as "this is the first letter," "this is the second letter," and "this is the last one," the recipient can correctly understand the content.

Advantages of Serial Communication

In asynchronous communication, accurate transmission is achieved by using a "start bit" and "stop bit" to clearly indicate the beginning and end of the data, respectively.

Since it does not require a clock signal, fewer wires are needed. Although its communication speed is slightly lower, it has the advantages of a simple structure and ease of handling.

There are several types of serial communication, and the optimal method should be selected according to the applications and requirements.

Among the widely used serial communication methods today are "UART," "I²C," and "SPI". In this article, we will focus on "UART" as the fundamental one.

What Is UART (Universal Asynchronous Receiver/Transmitter)?

UART is commonly introduced as a "hardware communication protocol for serial communication."

Here, "protocol" refers to the data format and communication procedure used when transmitting and receiving data.

UART can be understood as a system that defines the "data format and communication procedure" for transmitting and receiving data serially (i.e., one bit at a time) between two devices, asynchronously.

Now, let's take a closer look at the specific data formats and communication procedures used in UART.

Basic Elements of UART Communication

UART communication includes the following elements:

1. Signal lines
In UART communication, two types of signal lines are used to transmit and receive data between devices:

  • TxD (Transmit Data): Transmission data line
  • RxD (Receive Data): Reception data line

In addition to these signal lines, proper connection of "GND (Ground)" is also important for correct UART communication.

GND is the line used to share a common electrical reference voltage between devices. If it is not properly connected, it may cause communication errors or unstable operation.

2. Connection method

As shown in the diagram (UART communication connection diagram), UART communication connects the Tx (transmit pin) and Rx (receive pin) between two devices.

Connect Tx (transmit pin) of the device-1 to Rx (receive pin) of the device-2, and likewise, connect Tx of the device-2 to Rx of the device-1.

3. UART communication timing (baud rate)

Communication speeds

2,400 bps

4,800 bps
9,600 bps
19,200 bps
38,400 bps
57,600 bps
115,200 bps

In UART communication, both devices must be configured with the same baud rate (bps) before communication begins. If the baud rates do not match, data synchronization cannot occur properly, resulting in communication failure. Commonly used baud rates are shown above.

*bps: bits per second

4. Communication frame structure

In UART, data is transmitted and received in "frame format." One frame consists of the following four elements:

① Start bit (1 bit)
This bit indicates the beginning of communication. It is usually represented as a Low level (0) and serves as a signal to the receiver that data is about to be transmitted.

② Data bit (usually 8 bits)
This represents the actual content of the data to be transmitted. Typically, 8 bits (1 byte) are used, but it can be set between 5 and 9 bits depending on the configuration.

③ Parity bit (0 or 1 bit)
This bit is used to detect communication errors. It can be configured as even parity, odd parity, or no parity.

④ Stop bit (1 or 2 bits)
This bit indicates the end of communication and is represented as a High level (1). Either 1 or 2 bits may be used, depending on the device configuration.

Total bits per frame: Start bit (1) + Data bit (e.g., 8) + Parity bit (0 or 1) + Stop bit (1 or 2) = 10 to 12 bits

The UART frame format is as described above. The total number of bits transmitted in a single communication ranges from 10 to 12 bits.

5. Basic knowledge of data units

In data communication, units such as "bit," "byte," and "word" are frequently used to represent the amount of data. Let's briefly look at their meanings and differences:

◆Bit: Short for "binary digit." It is the smallest unit of information, represented as either 0 or 1. For example, UART start and stop bits are
◆Byte: A unit composed of 8 bits. It is the standard data size used in computers, often corresponding to one character (alphanumeric) or one instruction. In UART communication, one data unit is usually transmitted/received as "1 data = 8 bits = 1 byte." (Example: 1 byte = 8 bits)
◆Word: Refers to the data unit that a CPU or microcomputer can process at once. The size of a word depends on the system architecture, such as 16-bit, 32-bit, or 64-bit. Some communication protocols use expressions like "word transmission" or "word reception" for data units. (Example: For a 16-bit microcomputer, 1 word = 16 bits; For a 32-bit microcomputer, 1 word = 32 bits)

Relationship Between UART and RS485

UART refers to the hardware (communication function) used to implement a "serial communication method" that transmits and receives data one bit at a time in sequence.

On the other hand, RS485 is a communication interface specification that defines the electrical characteristics (voltage levels and signal types) and physical connection methods for the signal lines through which data transmitted/received via UART flows.

In short, UART is the "communication mechanism or logical protocol," while RS485 serves as the "physical layer (hardware standard) that underpins the communication."

UART and RS485 are often used together, and can be summarized as follows:

  UART RS485
Concept Part of hardware Interface specification
Transmission distance Short range, from a few cm to a few meters Long range (resistant to noise), up to 1200 m
Use case Internal communication, short-distance communication Long-distance communication, industrial networks
Max transmission speed Several Mbps 10 Mbps
Voltage level TTL level (e.g., 0V-5V, 3.3V) Differential signal (e.g., ±5V)

In summary, UART provides the functionality to convert data into serial format, while RS485 provides the electrical characteristics and physical connection methods necessary to transmit that serial data over long distances and in a noise-resistant manner.

Thus, UART handles the "logical aspect" of serial communication, while RS485 handles the "physical aspect."

In practice, data is converted into serial format by the UART function built into devices such as microcomputers, and then transmitted via RS485. This enables stable, long-distance communication over several hundred meters, even in noisy environments.

As such, UART and RS485 serve different roles, and combining them enables highly reliable serial communication.

RS485 Communication Using a Gas Sensor Module (FCM2630-K1A)

Next, using the gas sensor module (FCM2630-K1A) as an example, we will briefly explain how the "RS485 conversion IC" receives data that has been converted to serial format by the UART function within the microcomputer and how it then is transmitted to and received from external control boards via RS485 communication.

The diagram above shows the relationship between UART communication within the device and RS485 communication to external control boards, etc.

First, let's go over the equipment required for RS485 communication using the gas sensor module (FCM2630-K1A).

Required Equipment

The following items are necessary to acquire data from the gas sensor:

  • Gas sensor module (FCM2630-K1A)

  • Connector with lead wires (connector harness) *Receptacle for connector: MX44004SF1 (made by JAE)

  • RS485-USB conversion adapter

  • USB cable (Type A-C) + USB power supply

  • Breadboard + USB conversion board

  • PC (e.g., laptop) *Used for communication verification

Communication app (free versions)

*In this article, we will use COM-T, which offers an easy-to-understand visual interface.

USB driver (free)

*Prepare a driver compatible with your USB conversion adapter.

*You'll need a communication app capable of binary transmission and reception, such as Tera Term or RealTerm. Below are some examples:


・Tera Term (Latest version: Ver. 5.4.0)

https://teratermproject.github.io/

・RealTerm (Latest version: Ver. 2.0.0.70)

https://sourceforge.net/projects/realterm/files/Realterm/


・COM-T (Latest version: Ver. 1.2)

https://www.vector.co.jp/soft/dl/win95/hardware/se471464.html

Example: Silicon Labs CP210x Universal Windows Driver (Ver. 11.4.0)


https://www.silabs.com/software-and-tools/usb-to-uart-bridge-vcp-drivers?tab=downloads

Preparation for Data Acquisition

Now, let's proceed with the steps to prepare for data acquisition. The procedure is explained below:

(1) Prepare a connector with lead wires

Product: Receptacle for connector: MX44004SF1 (made by JAE)

Prepare a connector harness with four lead wires attached, as shown in the photo above.

(2) Connect the gas sensor module

Connect the corresponding connector harness to the connector of the gas sensor module (FCM2630-K1A) as shown in the photo.

At this point, it is very important to understand the role of each pin (pin assignment) correctly. Refer to the pin assignment table above for details.Incorrect connections may not only prevent proper communication but could also damage the sensor or connected devices.

Please pay close attention to the following when connecting to the sensor module:

  • Make sure that the pin assignments for both connectors are correct
  • Align the connector's orientation (insertion direction) correctly

  • Insert the connector firmly and fully

Also, before making any connections, be sure to check that the pin connections match not only on the sensor side but also on the microcomputer and RS485 conversion adapter side.

(3) Connect the RS485-USB conversion adapter and DC power supply

First, as shown in the photo above, connect the AC adapter to supply power to the USB conversion board. At this point, verify that the "USB conversion board" outputs a voltage of 5V ± 0.2V DC.

If the output voltage exceeds 5V ± 0.2V or is unstable, it may damage the sensor or other devices.

After verifying the output voltage, temporarily unplug the AC adapter to turn off the power. This is an important step to ensure safe wiring.

Next, connect the four lead wires from the connector harness as shown in the photo above. Refer to the table below for details.

  • Connect Pin No.1 (VDD) and Pin No.4 (GND) to the power output terminals (5V / GND) of the "USB conversion board"
  • Connect Pin No.2 (RS485-A) and Pin No.3 (RS485-B) to the differential signal terminals (A / B) of the "RS485-USB conversion adapter"

When wiring, make sure that the pin number, signal name, and terminal name of the connection destination all match correctly.

Once the wiring is complete, reconnect the AC adapter to power on the sensor module.

(4) Install a communication app (free version)

For verifying communication in this article, we will use the serial communication app "COM-T," which is easy to use and visually intuitive.

The latest version is Ver. 1.2 and can be downloaded from here.

After extracting the downloaded ZIP file, you can immediately use the COM-T app.

Installation is not required--just run the executable file directly.

(5) Install a USB driver

The "RS485-USB conversion adapter" used here is the SH-U10L USB-RS485 cable from DSD TECH.

This adapter is equipped with a USB-UART bridge IC (CP210x series) made by Silicon Labs, so a dedicated driver must be installed to enable communication with your PC.

We will use the Silicon Labs CP210x Universal Windows Driver (Ver. 11.4.0), which can be downloaded from here.

If the driver is not installed on the PC, communication will not be possible. Be sure to install it in advance.

Preparation for Communication and COM-T Configuration Steps

① Connect the adapter
First, connect the USB terminal of the RS485-USB conversion adapter to the USB port of the laptop PC.

② Confirm the COM port

Right-click the Windows Start menu and open "Device Manager."

If the connected adapter is recognized correctly, a device labeled something like "Silicon Labs CP210x USB to UART Bridge (COM3)" will appear under the "Ports (COM & LPT)" section, as shown in the red box in the image above.

From this image on the monitor, confirm the COM port number being used (in this case, "COM3").

③ Launch the communication app (COM-T)

Next, launch COM-T. The interface shown in the image above will appear.

From the "Communication" menu, select "Communication", then "Communication Parameters," as indicated by the red box in the image.

Item Detail
 Interface RS485
 Transmission 2-wire half-duplex
 Synchronization Asynchronous
 Speed 9600 bps
 Data format Start bit 1 bit
Data bit 8 bits
Parity bit None
Stop bit 1 bit

The "Communication Settings" window shown in the image above will open. Enter the values according to the red-framed section in the table above, then click OK.(*These settings are tailored for FCM2630-K1A.) 

From the "Communication" menu, select the "Transmission Command" dialog to open it, as shown by the red box in the image. Switch to the "HEX" button indicated in the red box of the next image.

This completes the communication setup in the app. Next, we'll proceed to actually transmit and receive data.

Data Transmission and Reception via RS485 Communication

Adress Register Name   Description
00H-0FH   Reserved  
10H Total operation time (unit: month) From 0 × 0000 to 0 × 0175 Counts the sensor usage period by month (up to 373months)
11H Operating Status 0 × 0001: Initial State Mode When the module is warming up after power on
0 × 0002: Monitoring Mode Normal module operation under A2L gas concentrations below alarm threshold
0 × 0003: Alarm Mode When the module is detecting A2L gas concentrations at or above alarm threshold
0 × 0004: Malfunction Mode When the module works with some errors and can't detect A2L gas leak
 12H-1FH    Reserved  

As shown in the table above, according to the communication specifications of this module (FCM2630-K), the following information can be obtained by reading the internal register addresses "10H" and "11H":

Address 10H: Total operation time (cumulative run time)

Address 11H: Current operating status (operation mode)

This allows you to monitor and manage system operation status in real time.

Now, let's verify the actual data acquisition flow by trying to transmit a READ command.

The module communicates based on a predefined communication format, so it is important to first understand this format and construct the correct command accordingly.

Reading Registers (10H-11H) in Clean Air

This module uses the communication format (message structure) shown in Table 1 below for transmitting and receiving commands.

Table 1

① Transmitting the command

We will explain the procedure for transmitting a READ command, assuming you want to read data from two addresses (10H and 11H) simultaneously.

First, in the app's transmission window indicated by the red box in the image above, enter the command from Table 1 above using lowercase characters. Each byte should be enclosed in angle brackets (< >), one byte at a time, as shown in the image above.

Once you've finished entering the command, click the "Transmit 1 Line" button to transmit the READ command.

② Receiving the command response

After the command is transmitted, the module's response will be displayed in the app's reception window indicated by the blue box in the image above. The displayed data will follow the "response message" format shown in Table 2 below.

Table 2

This response message contains the data corresponding to the requested addresses, confirming that communication was successful.

According to the communication specifications for this module (FCM2630-K), this response message indicates that the "total operation time of the gas sensor" is within 0 to 1 month, and the "operation mode" is monitoring mode.

Reading Registers (10H-11H) in the Presence of Gases

① Transmitting the command

To read data from two addresses (10H and 11H) simultaneously, enter the command shown in Table 3 below into the app's transmission window using lowercase characters. As before, enclose each byte in angle brackets (< >), one byte at a time.

Table 3

Once you've finished entering the command, click the "Transmit 1 Line" button.

② Receiving the command response

After the command is transmitted, the module's response will be displayed in the app's reception window. The displayed data will follow the "response message" format shown in Table 4 below.

Table 4

According to the communication specifications for this module (FCM2630-K), this response message indicates that the "total operation time of the gas sensor" is within 0 to 1 month, and the "operation mode" is alarm mode.

* If the response message is <fe><03><04><00><00><00><01><34><fc>, it indicates that the sensor is in the initial warm-up phase.

If the response message is <fe><03><04><00><00><00><04><f4><ff>, it indicates a module failure.

Conclusion

In this article, we used the FCM2630-K as an example to explain the procedure for data acquisition using RS485.

In modern digital communication, serial communication is the mainstream, and among its types, RS485 is widely adopted in industrial applications.

By covering the basics of UART, which serves as a preparatory step for RS485, we hope this article helps deepen your understanding of digital communication fundamentals.

In the next article, we plan to cover other types of serial communication--such as I²C and SPI--explaining their characteristics, applications, and communication methods.

World Leader in
Gas Sensing Innovation

Figaro Engineering is a world-leading gas sensor manufacturer, known for its top-tier production and sales volumes. Since our founding in 1969, we've been dedicated to our mission: "To enhance the safety, security, and comfort of people around the world through our unique gas sensing technologies." We specialize in the research and development of a wide range of gas sensors, including semiconductor-type sensors, and are committed to advancing and promoting their applications.