Share this

Design of a Microcontroller-Based Intelligent Instrument Monitoring Platform

2026-04-06 06:47:10 · · #1
Abstract: Traditional analytical instruments are currently undergoing upgrades, moving towards digitalization and intelligence. This paper designs a portable intelligent instrument monitoring platform based on the Intel 80C196kc microcontroller, and systematically introduces the hardware and software design and functions of this embedded monitoring platform. The platform adopts a modular design, including decoding circuits, LCD display, keyboard, A/D sampling circuit, I2C bus memory, clock chip, etc. The software system of the monitoring platform is designed using C programming. Keywords: Monitoring and Controlling System; SoC; Instruments Abstract: At present, traditional analytical instruments are becoming increasingly digital and intelligent. This paper designs a portable, multi-component, analytical instrument, intelligent platform for survey and control based on an Intel 80C196kc microcontroller. The hardware and software design and functions of this platform are then introduced in detail. The platform adopts a modular design including a coding circuit, LCD, keyboard, A/D sampling, I2C bus memorizer, clock CMOS chip, and so on. Keywords: Monitoring and Controlling System; SoC; Instruments 1 Introduction The flue gas released during industrial combustion processes is a source of air pollution in modern cities. Flue gas detection is an essential part of atmospheric environmental monitoring, serving as a fundamental means to identify key pollution sources and detect and control them. To control the combustion air-to-fuel ratio, improve combustion efficiency, save energy, and reduce air pollution, it is essential to reliably measure the content of various gases in the flue gas. This paper introduces an intelligent instrument monitoring platform based on an Intel SoC for flue gas analysis. 2 Hardware Structure Design of the Monitoring Platform The hardware configuration should be selectable from various modules according to different combinations of analytical detectors. For example, when the platform is used for binary analysis, only two operation loops and signal loops are connected, while the other two are not connected. Due to the independent characteristics of the hardware modules, combined with the system parameter setting function of the software, the system can work normally, and the unconnected loops do not affect the working loops. The hardware structure of the monitoring platform is shown in Figure 1. [align=center] Figure 1 Hardware Structure Diagram of Monitoring Platform[/align] 3 Detailed Hardware Design of Each Functional Module 3.1 Selection of Microcontroller and Design of Memory Module The core of the intelligent instrument is the microcontroller, and its performance has an important impact on the performance of the entire embedded system. When selecting it, it is necessary to consider the background of industrial applications, the advanced nature and high reliability of functions, and the requirement of a multi-variety, small-batch functional platform for analytical instruments, as well as ease of development, porting and upgrading. Therefore, the Intel 80C196kc chip was selected as the single chip for information processing of analytical instruments to construct a portable instrument monitoring platform. This monitoring platform uses a 32KB flash memory 29C256 manufactured by Atmel, operating at 5V. Programming is disabled when the operating voltage drops below 3.8V. It combines the speed and ease of erasing and rewriting of SRAM with the data retention and online writability characteristics of EEPROM after power loss, providing both read and write functionality and data preservation even when power is off. The hardware design is shown in Figure 2. Port P4 of the 80C196kc is used for the high-order address bits, and port P3 is used for the low-order address bits and the 8-bit data bus in a time-sharing manner. A 74LS373 is used for low-order address latching. [align=center]Figure 2 Memory Hardware Circuit Design[/align] 3.2 A/D Sampling and Data Processing Module The 80C196kc on-chip A/D module has 8 sampling channels with a precision of 10 bits (of which 8 bits are reliable precision). This monitoring platform uses two of these channels: one is used for thermocouple temperature measurement. If an abnormal thermocouple channel voltage is detected, an alarm will be triggered indicating that the thermocouple is open; the other is used for instrument battery voltage detection. The detection result is displayed on an LCD screen, allowing users to easily monitor the battery level and prevent damage to the sensor due to low voltage. The remaining six channels are reserved. The external A/D sampling chip used is the MAX197, a 12-bit A/D chip manufactured by MAXIM, which is responsible for sampling signals from 6 different sensors and detecting ambient temperature and flue gas temperature. This chip is a 28-pin dual in-line package, operates at 5V, has 8 analog input ports, and completes one conversion in 6μS. Since the electrical signal converted by the analyzer sensor is 0-1V, it is obviously not possible to use the internal reference voltage mode for sampling. Therefore, the system uses an external reference voltage method. However, the authors found in practical use that the external reference voltage cannot be too low. Experiments showed that when the external reference voltage was below 1V, the sampling results were significantly inaccurate when the input analog quantity was below 90 mV, exhibiting severe nonlinearity and even a noticeable dead zone. Therefore, an amplifier was added between the sensor and the A/D sampling chip in the monitoring platform to amplify the signal transmitted from the sensor to the A/D sampling chip to 0-2V. Calculations showed that the external reference voltage at this point was VREF = 2/1.2207 = 1.6384V. This method proved effective, allowing the A/D sampling chip to perform well and meet the requirements of the monitoring platform. 3.3 LCD Display Module The LCD display is an important window for the human-machine interface and one of the features of this monitoring platform. All human-machine interaction functions on this platform are completed through the LCD combined with the keyboard. The keyboard uses a 2×4 touch button design, occupying 6 I/O ports of the CPU. One button is connected to the instrument's startup circuit, serving as the start button for the analytical instrument. The LCD uses a 240×128 dot-matrix large-screen wide-viewing-angle LCD. The display module has 21 external interface pins, among which Pin 18 is the font selection pin for the displayed characters. A high level displays an 8×6 font, and a low level displays an 8×8 font. The LCD screen has a built-in driver T6963C and peripheral circuitry, providing hardware initialization functionality. Pin 4 of the LCD is the contrast adjustment pin for the display area, and the input voltage can be adjusted between -6V and 18V. This monitoring platform uses the MAX749 chip, an 8-pin dual in-line package manufactured by MAXIM, to provide the oscillation voltage for brightness adjustment of the LCD screen. This chip is specifically designed for LCD contrast voltage adjustment, and its output voltage has good adjustability, which can be achieved through digital control, potentiometer adjustment, and PWM control. Its operating circuit is shown in Figure 3. [align=center]Figure 3 MAX749 Working Circuit Design[/align] 3.4 Infrared Printing and Serial Communication Module According to the infrared printing protocol, the hardware part of the printing module is mainly implemented by the infrared physical layer, including the infrared transceiver and the encoding/decoding hardware circuit. The physical layer encoding/decoding uses HP's infrared 3/16 encoding/decoding chip—hp-7001. This chip uses 1.63μs or 3/16 pulse mode for transmitting and receiving signals and can program the baud rate. The infrared transceiver uses Agilent's HSDL-3610, which is fully compatible with IrDA 1.1, has a maximum transmission rate of 4Mbps, a connection distance greater than 1.5 meters, and low power consumption. Considering that the serial interface of the 80C196kc microcontroller needs to be used for data communication, HSO and HSI are used to implement the serial port-like data input/output for infrared printing. Since the receive and transmit pins of the 80C196kc and hp7001 are both TTL level, they can be directly connected without the need for a level conversion chip such as MAX232. Considering that 9600bps is the basic baud rate for infrared communication protocols, the 80C196kc, HP-7001, and HSDL-3610 all use 9600bps for communication. Serial communication utilizes the 80C196kc's serial data interface, employing RS-232, with MAX232 handling the serial signal level conversion. It uses an 8-bit data, 1-bit stop, and no parity bit transmission method, providing three baud rates—4800, 9600, and 19200—for user selection to suit computer communication needs. Communication is achieved simply by connecting the instrument and computer with a serial cable and running the corresponding program. This communication only transmits historical sampling data stored in flash memory, with a maximum of 40 sets of data transmitted at a time. Each set includes all sampling parameters, calculation parameters, and system parameters (such as date, time, and fuel type) used for data storage. 3.5 Power Start-up and Conversion Module [align=center] Figure 4 Power Start-up and Conversion Circuit [/align] Since portable analytical instruments are powered by batteries, reducing overall current and standby current, and minimizing power consumption, is extremely important. The sensor section operates at 12V, while the single-chip system uses 5V. Therefore, a DC-AC-DC converter module was selected for the control platform to complete the power conversion. The XR031 voltage conversion module was chosen, with a conversion efficiency of 80%. The startup circuit uses a CMOS chip to form a flip-flop circuit with Schmitt trigger shaping, and the power on and off are controlled by the start button on the instrument's keyboard. In the power-off state, the battery still supplies power to this part of the circuit, with a very small current of approximately 4-8 microamps. In the operating state, the CPU's internal A/D sampling module detects the voltage. When the voltage is lower than the set value, the output port is set to an effective level. This level is used by the differentiating circuit to generate a +12V spike pulse, triggering the flip-flop circuit to flip, thus achieving a forced shutdown. The power consumption current of this monitoring system during normal operation is 50-60mA (LCD backlight off, excluding pump current), and the maximum current of the entire unit is 140mA (LCD backlight on). The power conversion and startup hardware design is shown in Figure 4. 3.6 Clock Module This design uses a real-time clock chip, DS12C887, which is a commonly used clock chip in microcomputers. This chip is an integrated component in a 24-pin dual in-line package, containing a quartz crystal, lithium battery, real-time clock, calendar clock, alarm clock, and 128 bytes of RAM. 15 bytes are used as the control register for the real-time clock, and the remaining 113 bytes can be used as general-purpose RAM. The data in this RAM can be retained for ten years. The DS12C887 stores the year, month, day, hour, minute, and second information in its internal registers. 4 Software Design of the Monitoring Platform The software system of the monitoring platform is designed using C programming, employing a C96 compiler, version 5.3. Although this compiler occupies more program space than assembly language compilers, it significantly reduces program development cycle, and its debugging efficiency and readability are significantly better than assembly language. Furthermore, the original program can be more easily ported to other chip models, facilitating product upgrades. This monitoring platform software system is a multi-tasking real-time operating system, mainly divided into five functional modules: human-machine interface, serial communication, data processing, infrared printing, and operation control. The software structure diagram is shown in Figure 5. Due to the modular design, each module is self-contained and can be debugged independently, which is beneficial for system integration and facilitates the development of monitoring programs for other analytical instruments. This software system supports both Chinese and English interfaces for user operation, with over 60 LCD display pages, a character library of over 250 Chinese characters, and a compiled program code of approximately 52Kb. [align=center] Figure 5 Software System Design[/align] The entire software system uses a super-loop structure. The application program is an infinite loop, calling corresponding functions to complete specified operations. The program sequentially checks each input condition of the system, and once a condition is met, it performs the corresponding processing; this part can be considered task-level processing. Interrupt service routines handle asynchronous events; this part is considered interrupt-level processing. This system includes modules such as A/D sampling, HSO real-time interrupt, HSO event interrupt, and serial communication. To ensure real-time performance, the interrupt service routines only contain flag processing; their implicit functions, such as filtering of sampled values ​​and queuing of HSO events, are handled at the task level. Real-time multitasking is categorized and processed according to task level, and each interface processing module includes a time event processing module to ensure timely event processing. The authors' innovation lies in the powerful CPU and good modularity, which provide a design platform with ARC functionality for intelligent analytical instruments. Through the selection of hardware and software modules, various combined analyzers with different requirements can be basically realized. The system improves the automation level of the analytical instruments themselves, enabling automatic calibration and diagnosis. References: [1] Zhu Shengmei. Research on intelligent monitoring platform of online multi-component analyzer [D]. Nanjing: Nanjing University of Technology, 2004. [2] QD-500 series online multi-component flue gas analyzer (data) [DB/CD]. Nanjing Nanfen Analytical Instrument Co., Ltd. 2004. [3] Guo Zhanlong. Design of intelligent home control system based on single-chip microcomputer [J]. Microcomputer Information, 2007, 2-2: 115-116 [4] Zhang Lifeng. Realize the infrared printing function of portable analyzer using 80c196 [J]. Microcomputer Application 2005 (3): 234-238. [5] Xu Aiqing. Intel 16-bit single-chip microcomputer [M]. Revised edition. Beijing: Beijing University of Aeronautics and Astronautics Press, 2002.
Read next

Research on Remote Monitoring System for Industrial Washing Machines Based on Embedded Web

With the continuous development of Internet technology in recent years, the integration of electromechanical equipment i...

Articles 2026-02-22