Share this

Design of an Embedded Remote Measurement and Control System Based on ARM Linux

2026-04-06 03:31:32 · · #1
Preface Currently, most remote monitoring and control systems utilize 8/16-bit microcontrollers for hardware and assembly language programming for software, which typically contains only a simple loop control flow. Communication between microcontrollers (or host computers) is achieved through RS232, RS485, or CAN bus to form a local area network, with a PC acting as a web server for communication with the Internet. Such remote monitoring and control equipment is costly, bulky, slow, and consumes a lot of power. Now, the price of 32-bit embedded CPUs has decreased, and their performance has improved, making the widespread application of embedded systems possible. Based on the above, we apply embedded systems to remote monitoring and control systems, significantly improving system performance while reducing cost, power consumption, and size. Embedded systems are generally developed using embedded operating systems. Regarding the selection of embedded operating systems, Linux is a better choice because it has complete open-source code, allowing for system modification and optimization, kernel stability, compatibility with various CPUs and hardware platforms, and network support. The ARMlinux-based embedded remote monitoring and control system proposed in this paper can not only realize local data acquisition and control, but also realize remote monitoring and control tasks. 1. Hardware System The hardware system is shown in Figure 1. The S3C2410 contains a 16/32-bit RISC (ARM920T) CPU core with a main frequency of 200Hz. It internally contains an 8-channel 10-bit AD converter and a large number of I/O ports, an LCD controller, and other rich interfaces. It can run Ucosll, ARMlinux, and WinCE embedded operating systems. The DM 9000 is a 10M/100M Ethernet interface control chip. This hardware system has a simple structure, low cost, and can directly connect to the Internet without a PC. 2. Software System The embedded operating system is the core of the entire embedded system. This system chooses the ARMlinux system. Due to the small storage capacity of embedded systems, the ARMlinux operating system needs to be customized to fit within the limited memory. Many resources discuss this, so it will not be repeated here. The following mainly introduces the design of the remote monitoring and control software based on the operating system. Its architecture is shown in Figure 2. 2.1 Boa-based Web Servers Embedded Linux systems primarily use three web servers: Hapd, Thttpd, and Boa. Hapd is the simplest web server, with the weakest functionality, lacking authentication and CGI support. Thttpd and Boa both support authentication, CGI, and other comprehensive features. Boa is a small, single-task Hapd server with open-source code and excellent performance, making it particularly suitable for embedded systems. The following describes the porting and compilation of Boa. For embedded Linux systems with an MMU, after downloading Boa to the Red Hat host machine, extract it to any directory and modify the compiler settings in Boa/src/Makefile. For example: CC=/opt/host/army41/bin/armv41-unknown-linux-gcc CPP=/opt/host/army41/bin/armv41-unknown-linux-g++ Afterward, simply execute `make` in the Boa/src directory to generate the Boa executable file. After copying it to the bin directory of the ramdisk's mount point, add the configuration file and HTML/CGI file, then redo the ramdisk. The Boa.conf configuration file is described below. It should be noted that Linux application configurations are provided in the form of configuration files, usually placed in the target board's /ete/ directory or /ctc/config directory. However, Boa's configuration file, Boa.conf, is generally placed in the target board's /home/httpd/ directory. The Boa.conf file for this system is written as follows: ServerName SAMSUNG—ARM DocumentRoot /home/httpd/cgi—bin/ ScfiptAlias/index.html /home/httpd/html/index.html. This specifies that the HTML page index.html must be placed in the /home/httpd/html directory, and the CGI executable file must be placed in the /home/httpd/cgi~bin directory. 2.2 CGI Program Technology Principles CGI (Common Gateway Interface) is a standard interface for external extended applications to interact with WWW servers. External applications written according to the CGI standard can process data input by the client's browser, thereby completing the interaction between the client and the server. The CGI specification defines how the web server sends messages to the extension application and how it processes the information received from the extension application. CGI can provide many functions that static HTML pages cannot achieve. The working principle of the WWW and CGI is as follows: The HTTP protocol is the foundation of the WWW, based on a client/server model. A server can provide services to clients distributed throughout the network. It is a "connectionless" protocol built on top of the TCP/IP protocol. Each connection handles only one request. When a request arrives, a child process is created to serve the user's connection. Depending on the request, the server returns an HTML file or, through CGI, invokes an external application and returns the processing result. The server interacts with external programs and scripts through CGI. Depending on the method used by the client when making the request, the server collects the information provided by the client and sends this information to the designated CGI extension. The CGI extension processes the information and returns the result to the server. After analyzing the information, the server sends the result to the web client. External CGI programs communicate with the WWW server, exchanging parameters and processing results via environment variables, command-line arguments, and standard input. The server provides a channel for information exchange between the client (browser) and the CGI extension. Client requests are transmitted from the server's standard output to the CGI's standard input. After processing the information, the CGI sends the result back to its standard input, and the server then sends the result back to the client. 2.3 The server program can receive information through three methods: environment variables, command line, and standard input. The specific method used depends on the client's configuration.
The `Method` attribute of the `<method>` tag determines the format. When `Method=GET`, the normal practice for passing form-coded information to a CGI program is through commands. Most form-coded information is passed via the `Queue-String` environment variable. If `Method=POST`, the form information will be read through standard input. There is also a way to send information to CGI without using a form: append the information directly to the URL address, separating the information and the URL with a question mark (?). This measurement and control system uses the GET method. Below is a program for remotely controlling the blinking speed of an LED. Its webpage is shown in Figure 3 on the next page, and the program is as follows. LED testing

<input type=“radio” name=“speed” value=“show” checked>Slow

<input type=“radio” name=“speed” value=“normal”>Medium speed

<input type=“radio” name=“speed” value=“rast”>High speed

<input type="submit" value=confirm "name="submit>

The leds.cgi program is as follows: #! /bin/sh Period=1+case $QUERY-STRING in *slow*) period=0.25;; *normal*) period = 0.125;; *fast* period=0.0625+;; *fast*) + period =0.0626;; esac /bin/echo $period ? /tmp/led-control // Passed to the application via the Query_String environment variable. echo “Content-type:texe/html;charset=gb2312” echo /bin/cat led =result.template exit 0 led-control is a pre-compiled executable application that controls the LEDs through the LED driver. Because the S3C2410 has an MMU, hardware control via the operating system requires a driver program. Its data acquisition part is similar and will not be described separately. 3. Test Results First, an embedded development environment based on S3C2410 was established. The compiled bootloader, embedded Linux kernel, and ramdisk were burned into the Flash memory. Then, the Boa server was started. Entering the embedded system's IP address into a browser on the PC displayed the webpage shown in Figure 3. By clicking slow, medium, and high speeds, and then clicking OK, the LED blinking on the control board increased from slow to fast, successfully achieving the design goal. 4. Conclusion The ARMLinux-based remote control system we developed truly achieves remote control via the Internet. It possesses general-purpose platform performance and is particularly suitable for home appliance network monitoring and remote industrial control where real-time requirements are not very high. Of course, with improvements in hardware and network speed, as well as the real-time performance of the operating system, the performance of this control system will be greatly enhanced, thus showing great application potential.
Read next

CATDOLL 123CM Sasha TPE

Height: 123cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/54/70cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22