Share this

Development of an ARM-based Embedded Near-Infrared Spectrometer

2026-04-06 05:17:14 · · #1
1. Introduction Near-infrared spectroscopy is mainly generated by the non-resonance of molecular vibrations, which causes molecular vibrations to transition from the ground state to higher energy levels. It mainly records the overtone and combination absorption of vibrations of hydrogen-containing groups such as CH, OH, and NH[1]. It has rich information on the structure and composition of matter and is very suitable for measuring the compositional properties of hydrocarbon organic substances. As a rapidly emerging spectroscopic analysis technology, near-infrared spectroscopy has attracted more and more attention in the field of analytical testing. Since the sample does not need to be processed during analysis, and it does not damage or consume the sample, and it does not cause environmental pollution, near-infrared spectroscopy analysis technology can be regarded as a typical representative of green analytical instruments[2]. This technology has been widely used in various fields, including crop quality detection, food component analysis, pharmaceutical preparation analysis, blood oxygen measurement, petrochemical industry analysis, and tobacco industry applications. It is the most active hot spot in the field of analysis. In this paper, the near-infrared spectroscopy analysis instrument is developed using the S3C2410A embedded system based on the ARM9 core. As a 32-bit RISC (Reduced Instruction Set Computing) architecture, ARM-based microcontroller chips have high operating speed, large address space, low power consumption and high cost performance. They are capable of running a complete embedded operating system on them and have spread to various product markets such as industrial control, consumer electronics, communication systems, network systems and wireless systems. Using ARM to develop a near-infrared spectroscopy analysis instrument, a touch screen is used as a human-machine interface platform, replacing the traditional keyboard and eliminating the dependence of calibration and other analysis software on the microcomputer. Ultimately, users can perform sample detection through simple operations under guidance. 2. Instrument Structure and Working Principle Design 2.1 Overall Structure This design is a filter-type near-infrared spectrometer based on an ARM microprocessor. The overall structure is shown in Figure (1). The photoelectric detection signal in the optical system is input in parallel to the microcontroller after passing through the ADC for preliminary data processing. Then, the microcontroller sends the signal serially to the ARM microprocessor. The ARM microprocessor is used to calibrate and analyze the spectral data, as well as to control the optical system, printer and display operating system. Figure (1) Overall Structure Diagram 2.2 Instrument Optical Principle Structure In near-infrared spectroscopy measurement technology, discrete wavelength instruments measure spectral data of several specific wavelengths and establish the relationship between sample concentration and these data. Filter-type near-infrared instruments belong to discrete wavelength measurement instruments. The design selects 11 narrowband interference filters with different transmission wavelengths in the near-infrared spectral region as the spectroscopic system of the spectrometer. The working principle is: the light emitted by the light source passes through the filter to obtain analytical light with a certain bandwidth. When the light enters the sample, it returns to the surface through diffuse reflection with the sample interior and is detected by the photodetector. Diffuse reflection light is the light after the analytical light interacts with the molecules inside the sample, thus carrying the structural and compositional information of the sample and can be used for sample composition measurement. During the measurement process, different wavelengths of light are obtained by rotating the filter disk, thereby realizing spectroscopic separation. 2.3 Instrument Electrical Principle Structure This design is divided into two parts: a spectral data acquisition system and an embedded control system. Figure (2) Electrical Principle Design Diagram 2.3.1 Spectral Data Acquisition System The spectral data acquisition system is implemented by an ADC chip and a microcontroller placed close to the optical sensor. The signal-to-noise ratio of the spectral signal is an important indicator of instrument stability. The spectral data acquisition system should try to avoid the introduction of noise and the weakening of the spectral signal during the spectral acquisition process, so as to ensure the accuracy of spectral data acquisition. Therefore, in the design of the spectral data acquisition system, the ADC chip is placed close to the optical sensor, and the microcontroller acquires and preliminarily processes the spectral data before transmitting it to the ARM microprocessor. This design can reduce the data transmission distance and avoid the introduction of noise due to long-distance transmission, thereby achieving the purpose of improving the signal-to-noise ratio. 2.3.2 Embedded Control System The processor used in the embedded control system is the S3C2410A, a 16/32-bit RISC processor launched by SAMSUNG. The S3C2410A offers a rich set of internal devices, including: LCD control, support for NAND Flash system booting, 3-channel UART, 4-channel DMA, I/O ports, RTC, 8-channel 10-bit ADC and touchscreen interface, IIC-BUS interface, USB device, SD master card & MMC card interface, 2-channel SPI, and an internal PLL clock multiplier. The S3C2410A uses the ARM920T core, and its low power consumption, streamlined design, and excellent fully static design make it particularly suitable for cost- and power-sensitive applications. This design utilizes an ARM microprocessor to implement three main modules: spectral data reception, calibration, and printing; and a human-machine interface and optical system control. Spectral data reception and printing are implemented using the RS-232 standard serial communication module on the ARM board. The S3C2410 has two independent UART controllers, each with a 16-byte FIFO, supporting a maximum baud rate of 230.4Kbps. The serial port settings in the ARM are primarily implemented by writing a serial communication protocol program. This design uses an asynchronous communication format. Data bit writing is mainly achieved by writing to the 8-bit data transmit/receive buffer registers URXH1 and URXH2, which store the transmitted/received data characters. During character data transmission/reception, data bits are sent starting from the least significant bit. After all data bits have been sent, no parity bit is set; the stop bit is sent after the data bits. Setting the stop bit is achieved by clearing CSTOPB in c_cflag. Baud rate setting is achieved through the functions cfsetispeed and cfsetospeed. For example, this design uses a baud rate of 9600, which can be set using the statements cfsetispeed(&newtio, B115200); and cfsetospeed(&newtio, B115200);. 2.4 Precision Control of Spectral Data The precision of spectral data is an important indicator of the instrument's quality. To ensure the precision of the system's spectral data, the design improves the signal-to-noise ratio of the spectral data by increasing the precision of the acquired signal and reducing externally introduced noise. The ADC chip in the acquisition system uses a 24-bit ADC with digital filtering, with an accuracy of 224. In terms of noise control, in order to reduce the noise of the system, the optical and electrical systems are shielded in the design. The entire shell of the optical system is sprayed with black paint to avoid interference from external light. In terms of electrical system, the use of active devices is reduced, and each active device has independent shielding to reduce the introduction of electrical noise. After experimental measurement, the spectral data acquisition accuracy in the design can reach 4.5 bits. 3. Software Design 3.1 Design of serial port application based on Linux system under ARM9 Since the core microprocessor selected in the embedded control system is an ARM9 development board with Linux 2.4.18 kernel, the specific serial port module opening and reading and writing application is completed by C programming based on Linux. The specific flowchart is shown below: Figure (3) Serial port opening and setting flowchart After the serial port module is opened, the ARM microprocessor communicates with the microcontroller and thermal printer through the serial port module to realize the function of receiving and printing spectral data. 3.2 Design of Human-Computer Interface Application Software Based on Embedded QT The human-computer interface is mainly implemented using Qt/Embedded, a graphical interface design and development tool based on Linux. QT is a flagship product of the Norwegian company Trolltech. Its development language is C++. It provides cross-platform software developers with a unified and elegant graphical user programming interface, as well as unified programming interfaces for network and database operations. This makes operating systems like Linux more accessible to ordinary users with a more convenient and elegant human-computer interface. Qt/Embedded is based on the original QT, with many modifications to suit the embedded environment. Qt/Embedded is a QT version for embedded systems, an embedded Linux window for QT, and a complete self-contained C++ GUI and Linux-based embedded platform development tool. The design of the spectral acquisition and calibration application software consists of two parts: the establishment of the compilation environment and the compilation of the application software program. 3.2.1 Setting up the Compilation Environment The software packages required to fully establish a cross-compilation environment include: tmake-1.11 or a later version of the tmake toolkit, the Qt/Embedded 2.3.7 installer, and the Qt 2.3.2 for X11 installer. First, unzip the tmake-1.11 toolkit to obtain the tmake tool. The tmake tool is used to generate the Makefile in the application. Then, install Qt/X11 2.3.2, which is used to generate the application interface design tool designer and the C++ source code and header file conversion tool uic for the application interface. It is important to note that the source files of uic and the designer tool will be compiled along with the Qt/Embedded libraries. Therefore, according to the principle of "forward compatibility," the version of Qt for X11 should be older than the version of Qt/Embedded. Finally, the Qt/Embedded libraries based on the x86 architecture and the ARM architecture were compiled to obtain the QTE compilation library for the host PC and the QTE compilation library for the ARM target board, respectively. 3.2.2 Compilation of the Application Software Program: The compilation of the spectral acquisition and calibration application software program utilizes the designer tool in Qt/X11 to enter the QT graphical interface designer for interface design, generating interface graphic files with the .ui extension. Then, the uic tool is used to generate the C++ source code and header files corresponding to the graphical interface files. The main program and project files of the application software are created using vi to explain the dependencies between related files. The tmake tool is used to generate the Makefile of the application software. Finally, g++ cross-compiles to generate the binary file of the executable spectral acquisition and calibration application software program based on the ARM architecture, which can then be mounted on the ARM board for execution. Users can measure and calibrate samples by touching the touchscreen. The following is the specific design flowchart of the software. Figure (4) Software Workflow 4. Conclusion This design utilizes the rich interface modules of the ARM development board to realize the spectral data acquisition of the near-infrared spectrometer and the control of the printer. A touchscreen-based human-computer interaction platform was implemented through QT programming, allowing users to analyze substances through simple touch operations. The ease of use and operation of the ARM microprocessor-based embedded near-infrared spectrometer is a major highlight of this design. Furthermore, this embedded system can be applied to other types of optical systems to form different types of spectrometers, possessing a certain degree of universal applicability. The author's innovations include: the use of a 24-bit ADC with a digital filter in the spectral data acquisition system, which improves the instrument's accuracy to a certain extent, achieving a 4.5-bit spectral data acquisition accuracy. On the other hand, the embedded control system of the instrument uses an ARM microprocessor instead of the previous single-chip microcomputer, freeing calibration and other analytical software from dependence on a microcomputer.
Read next

CATDOLL 130CM Laura

Height: 130cm Weight: 27kg Shoulder Width: 31cm Bust/Waist/Hip: 64/60/72cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22