In this paper, we propose an implementation of machine-type communications by combining a novel hardware-accelerated serial interface and a conventional Internet of things (IoT) gateway. Even all home appliances with an infrared (IR) remote controller can be operated through the Internet. In the future, application paradigms will transfer from human-type communications to machine-type communications to provide services such as health care and smart-home control systems. Therefore, commercial IoT gateways are required for intranet-Internet bridging of various wireless access services. Home appliances that are currently used or will foreseeably be used in the future lack network capabilities but can be controlled by an IR remote controller. Accordingly, to leverage existing IR control capabilities, we implemented a smart-home control system, which enables an IR signal to be remotely controlled to emit through the Internet. The implemented system provides a hardware-accelerated serial interface to sample IR signals—including extremely high-frequency signals—and includes a hardware-based data compression mechanism able to reduce the size of oversampled data and save flash memory space. A more intelligent control style can thus be realized by leveraging existing home appliances for the smart-homes of the future.
The technology pertaining to machine-type communications over cellular network technologies such as Wi-Fi (802.11) and 4G-LTE (Long-Term Evolution) for Internet of things (IoT) control is promising. To meet different IoT application requirements, the Institute of Electrical and Electronics Engineers (IEEE) [
IR signal protocols and standards such as the Infrared Data Association (IrDA) standards [
Currently, commercial IoT gateways support various wireless services between intranet and Internet applications. However, home appliances are commonly controlled by IR remote controllers and do not support wireless interfaces such as Wi-Fi and Bluetooth. To bridge wire or IR signals to the Internet, a possible solution is to utilize general-purpose input/output (GPIO) interfaces controlled by a microprocessor (
The rest of this paper is organized as follows: In Section
In this section, we introduce characteristics, protocols, relevant studies, and application problems related to IR signals. The descriptions in this section follow on from those in the work of Tsai et al. [
For IR signal use, various protocols have been defined by different manufacturers, with notable protocols being specified by NEC, SONY, Philips (RC5/RC6), Toshiba, and Sharp. Consider, for example, the NEC protocol [
IR signal protocol by NEC.
The waveform in Figure
Pulse cycle of signal carrier of NEC protocol.
Figure
Waveform formats of leader code and logical data of NEC protocol.
The IoT gateway was implemented using ZEROPLUS Technology [
IR signals of (a) Terasic evaluation board, (b) SONY television, and (c) IRIS ceiling light.
Figure
We noted several causes of distortion between recorded signals and source signals, which are outlined as follows: Signal carriers with different frequencies: most IR remote controllers of home appliances apply the carrier frequency of 38 kHz as defined by NEC. However, for SONY, the carrier frequency is 40 kHz; for RCA, it is 56 kHz; and for certain applications, it may be as high as 80 kHz. Because an IR remote controller uses a fixed carrier frequency, it cannot control other appliances using different carrier frequencies, even if the frame format complies with the same protocol. Therefore, Vento et al. [ Different outcomes from pressing a button: operations for pressing a button to generate a pulse can be distinguished into several categories. For an inching operation, for example, a user presses an IR remote controller button, which sends out only one frame each time. For a continuative operation, the remote controller continues to emit IR signals until the button is released. Most television remote controllers use inching operations, and major air-conditioning controls use continuative operations. Repeat launching of identical signals: IR signal emitters are low-cost devices and cannot generate high-quality signals. In addition, the signals could be subject to noise and other interference. To avoid the possibility of such errors and disturbances, common IR remote controllers emit a predefined number of repeated signals to increase opportunities for receiving at least one correct frame and completing a successful operation. Outcomes depending on duration of button press: the duration of a button press can prompt one of several possible functions. For example, pressing a button for less than 1 s turns off the targeted machine’s monitor. However, constantly pressing the same button for more than 5 s causes the machine to shut down entirely. Encrypted signals for security purposes: IR signal data could be encrypted for interests such as privacy protection, antiattack, or antiplagiarism. The methods applied could be as follows: (1) Each time one button is pressed, the emitted frames are not equal but follow a changing rule known to both the sender and receiver or (2) the emitted frames are equal but coupled with different carriers negotiated by the sender and receiver.
We used an LA to log the signal data of a HITACHI air conditioner’s remote controller, as shown in Figure
IR remote controllers of (a) HITACHI air conditioner, (b) recordable URC, and (c) our interface.
IR signals for remote controllers of (a) HITACHI air conditioner, (b) recordable URC, and (c) our implemented IoT home gateway.
Referring to [
IoT is a promising technology for smart control of home appliances. Therefore, this study implemented an FPGA-based hardware-accelerated IoT home gateway that can be remotely controlled by network devices with the Internet. The proposed design methodology is provided in this section.
Figure
Application scenario.
First, the IoT home gateway can be set to operate in the study mode to record the specified IR signal emitted by pressing an IR remote controller button for a home appliance. The user can then use a smartphone to choose a prerecorded signal. The control message is subsequently transmitted to the IoT home gateway through the wireless network. Finally, the IoT home gateway emits a prerecorded IR signal to control the targeted home appliance. As shown in Figure Study mode: the IoT home gateway operates in the study mode to record the IR signal emitted by a remote controller. The IR signal is sampled at an extremely high frequency to avoid distortion. Because successive logical data bits might have identical values (e.g., 000 or 11111) owing to the high sampling frequency, data compression must be implemented to lower the memory storage capacity. User mode: a network operates in the user mode to remotely control the IoT home gateway, restoring a selected IR signal and then emitting it to the targeted home appliance. Because the data stored in the memory are compressed, a decompression process must be executed before the IR signal is emitted to the target home appliance.
Theoretically, if the emitted signal is identical to the received signal, then the targeted device can be controlled from our implemented IoT home gateway instead of using the original IR remote controller. However, due to limitations in signal processing speed and memory storage size, problems involving mismatches between the emitted signal and its original source may exist. When a mismatch (i.e., signal distortion) exceeds the system’s tolerance range, the operation can fail. To achieve distortion-free replication, we implemented a system architecture (Figure
Implemented system architecture.
In the FPGA design, a phase-locked loop (PLL) can be programmed to operate at up to 50 MHz, which can latch the control signals of most devices. Received signals are processed through a hardware and software codesign approach, and generated signals are emitted to the target device to be controlled. The signal processing flow includes several phases—namely, IR receiver, signal sampling, hardware data compression, hardware input buffer, data storage (flash), hardware output buffer, hardware data decompression, signal encoding, and IR emitter—implemented on an FPGA embedded system development board (Figure
FPGA development board (reproduced from Tsai et al. [
As depicted in Figure
IR signal sampling with 200 kHz sampling frequency.
In practice, using a low sampling frequency can cause more distortions of captured signals compared with the source signals. As illustrated in Figure
Consider, for example, the formats illustrated in Figure
To decrease distortion, an alternative 400 kHz (≥114 kHz) sample clock (CLK_400K) can be applied to latch that source signal (SRC_SIGN), as illustrated in Figure
IR signal sampling at 400 kHz sampling frequency.
To reduce memory capacity requirements, this section introduces our proposed data compression and decompression mechanism specifically designed for processing IR signals.
As presented in Figure
To evaluate the performance of the proposed scheme, we defined a data compression rate and a space-saving rate as follows:
Level 1 data compression (L1DC) is essentially a hardware-based logic design that can calculate the numbers of sequential data 0s and the number of sequential data 1s online and in real time. For example, suppose the source data pattern is as follows: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] (source data pattern)
After L1DC processing, the compressed data pattern is as follows: [21, 8, 7, 7, 21, 7, 8, 7, 21, 7, 21, 7, 7, 8, 6, 7, 21] (L1DC data pattern)
Therefore, the numbers of data units of these two data patterns are 191 and 17, respectively. Each data unit can be recorded by 8 bits (1 byte is the minimal addressable data unit in most computers). Thus, storage memory can be reduced from 191 bytes to 17 bytes to achieve a DCr of 11.24, as shown in equation (
Our system applies an LA to latch the NEC IR signal, as shown in Figure [21,
Accordingly, it is feasible to capitalize on the error tolerance margin caused by more sampling (data 8) or less sampling (data 6) and then to replace both data 8 and data 6 with data 7: [21,
Here, some data 6 and data 8 are replaced by data 7 in the proposed level 2 data compression (L2DC) scheme. Next, L2DC counts the number of sequential data 7s and replaces the recording format with a pair of L2DC compression flags (0), followed by several sequential data 7s: [21,
We observe that the numbers of data units for these two data patterns are 17 and 12, respectively. Thus, the storage memory can decrease from 17 to 12 bytes to achieve a DCr of 1.42, as presented in equation (
Example of operating flow of changing L1DC data pattern to L2DC data pattern.
As shown in Figure
Operating flow of data compression and decompression.
To further increase the data compression rate, our system includes software-based lossy L2DC/L2DD data compression and decompression schemes. Alternatively, users can disable L2DC (L2DD is disabled dependently) and simply compress data with hardware-based L1DC/L1DD, which can achieve lossless compression without computational overhead for the system microprocessor. In particular, both the lossy and lossless compression schemes implemented in our system can successfully control home appliances, as observed in experiments and demonstrations that are discussed in the following sections.
In this section, we focus on IR signal processing in accordance with the NEC protocol, which is commonly used for home appliance control and was applied in [
As illustrated in Figure
IR signals of (a) source data and (b) recovered data associated with play button.
In our experiment, the source data length was 881 bytes, L1DC compressed data length was 68 bytes, and L2DC compressed data length was 43 bytes. Consequently, our proposed data compression scheme achieved a DCr of 20.49 and an SSr of 95.12%. As seen in Figure
As shown in Figure
IR signals of (a) source data and (b) recovered data associated with mute button.
As presented in Figure
IR signals of (a) source data and (b) recovered data associated with channel change button.
Overall, Figure
Performance comparisons in terms of (a) DCr and (b) SSr for
To validate the practicability of our proposed IoT home gateway that can enable machine-type communication control for conventional IR controllable equipment (and other types of equipment), we applied it to control several home appliances. We determined that the home appliances could be successfully controlled by our interface through cellular networks. Figure
Application demonstrations of (a) LCD projector, (b) DVD player, (c) ceiling fan, (d) music box, (e) window-type air conditioner, and (f) split-type air conditioner (Figure
The main innovations and contributions of this study are outlined as follows: To solve problems of duplicating IR signals exiting IoT gateways, the contribution is to implement a hardware-accelerated serial interface to an IoT gateway (to replace the conventional software-based GPIO interface) To minimize distortion of the recorded signals, the source IR signal input to the IoT home gateway is sampled by the hardware-accelerated serial interface at an extremely high sampling frequency Accordingly, the innovation of this study is that a level 1 hardware-based data compression mechanism was implemented to losslessly reduce size of oversampled data in real time to save flash memory space Moreover, a level 2 software-based compression mechanism was implemented to additionally reduce the size of data compressed by the level 1 compression method
We determined that at least six home appliances could be remotely controlled through networks by using our IoT home gateway. Thus, the proposed gateway bridges the use of IR signals and network access to enable machine-type communications and thus constitutes a promising control style that can be leveraged in existing home appliances or in future smart-home systems. Experiments demonstrated that the proposed gateway can achieve signal duplication with almost no distortion and the required memory capacity for storing data is smaller than that for existing designs.
The IR signal data used to support the findings of this study are included within the supplementary information files.
This paper is an extended version of our paper published in 2017 IEEE 8th International Conference on Awareness Science and Technology (iCAST2017), Taichung, Taiwan, 8–10 November 2017.
The authors declare that there are no conflicts of interest regarding the publication of this paper.
This work was partially supported by the MOST, ROC, under grant numbers MOST 106-2221-E-324-007-MY2 and 107-2821-C-324-001-ES, and Chaoyang University of Technology (CYUT) and Higher Education Sprout Project, Ministry of Education, Taiwan, under the project “The R&D and the Cultivation of Talent for Health-Enhancement Products.”
The IR signal data used to support the findings of this study.