0. Introduction
Embedded system refers to a hardware and software system with a microprocessor or microcontroller as the core that is embedded in various products or engineering applications. The embedded Internet technology formed by the combination of embedded system and Internet technology is an emerging technology that has developed in recent years with the popularization of computer network technology. Engineering technicians, managers or debugging personnel can obtain remote data through the Web without going to the site in person, and control and calibrate the measurement and control instruments. Here we introduce the use of embedded soft-core processor Nios II and widely used embedded operating system uClinux to realize the function of remote measurement and control server of power grid parameters.
1. Function and architecture
Figure 1 is the system structure, in which the embedded Web server and the monitoring terminal are located on site, and the connection between them can be realized by serial port, parallel port, USB, etc. The on-site monitoring terminal completes the detection of the power grid parameters (voltage, current, harmonics and other data) in the target area, and transmits the detection results to the web interface in real time, so that no matter where the monitoring personnel are, as long as they are connected to the Internet network, they can observe the power grid parameters in the target area in real time. The implementation process is as follows: the three-phase voltage and current are transformed by the voltage transformer and the current transformer respectively, and then sent to the AID for conversion after circuit conditioning. 128 points are sampled per cycle, and the DSP chip performs FIR digital filtering, FFT operation, calculation of various parameter values, storage, and display on the sampled data. The communication between the measurement circuit and Nios is transmitted through the serial port. According to the pre-agreed communication protocol (based on the Modbus protocol), the measured data can be easily sent to the embedded server with the Nios II processor as the core. Through CGI technology, the command transmission of the remote monitoring end is completed and the measured data is transmitted to the remote monitoring end in real time.
Figure 1 System structure diagram
2. Hardware Structure
The hardware structure of the system is shown in Figure 2. The core of the hardware system is the Nios II embedded soft-core processor built in the Ahera Cyclone FPGA. The Nios II series embedded processor is a general-purpose RISC structure CPU, which is positioned in a wide range of embedded applications. The Nios II processor series includes three cores: fast (Nios II/f), economical (Nios II/e) and standard (Nios II/s) cores, each optimized for different performance ranges and costs. All three cores use a common 32-bit instruction set architecture (ISA) and are compatible with binary code.
Figure 2 Hardware system diagram
The configuration of Nios II is completed in SOPC Builder. By configuring the required external/internal components, SOPC Builder will automatically generate a CPU suitable for the selected components to meet the system requirements. The 16M CF card is used as the system's external memory to store measurement data, web page files and applications. The Ethernet interface chip uses SMSC's Lan91cl11 chip, which is a single-chip network controller without PCI interface. It has an 8k FIFO and can implement 8-bit, 16-bit, and 32-bit CPU interfaces. It is widely used in embedded system design.
3. Software Structure
The system software structure is shown in Figure 3. uClinux is a project and fully developed code that fully complies with the GNU/GPL (General Public License) convention. It is a branch of standard Linux and is now supported and maintained by Lineo. It is specifically designed for CPUs without MMU and has done a lot of miniaturization work for embedded systems. uClinux For Nios is a uClinux operating system customized by Microtronics for Nios CPU. It is easy to use, does not require a complicated transplantation process, and is automatically integrated into the Nios/Nios II development environment (IDE). As long as you configure the kernel and file system according to your own needs, the WEB server, TCP/IP protocol stack and underlying interface driver are integrated into uClinux. In addition, you can write CGI scripts to realize the function of dynamic web pages. CGI (Common Gate Interface) dynamic gateway interface is a standard interface for external extension applications to interact with WWW servers. External extension applications written according to CGI standards can process collaborative work data input by the client (usually WWW browser) and complete the interactive operation between the client and the server. You can write CGI external extension programs to access external data systems, and client users can query data through it and WWW servers. CGI can be written in PERL, C and most scripting languages. However, since it is a program used in embedded systems and the scripting language requires an interpreter, it is more appropriate to choose C language to write CGI scripts, which can also save a lot of system resources.
Figure 3 Software structure diagram
3.1 uClinux operating system kernel and file system configuration
(1) uClinux kernel configuration. The kernel is the core of an operating system. It is responsible for managing the system's processes, memory, device drivers, files, and network systems, and determines the system's performance and stability. Embedded uClinux has a highly flexible and customizable kernel, which maintains the characteristics of Linux source code being open, stable, and resizable. Here, we use the uClinux 1.3 version ported by Microtronix specifically for Nios/Nios II, and reconfigure it as needed: In the "Developing Board" option, you need to select the development board you are using, add a CF card as the system's hard disk, etc.
(2) File system configuration. The file system is an important part of the operating system. For users, the file system is also the most directly visible part of the operating system. It is responsible for managing files on the external memory and providing file access, sharing, and protection functions for the operating system and users. Here, in the file system configuration, select Install Minimal, and then add options such as agetty, boa, dhcpcd, ftpd, inetd, init, ping, route, and telnetd.
3.2 Web server configuration
Figure 4 WEB server workflow
The Web Server used in this article is Boa, which is a single-task http server with open source code, high performance and fast speed. Its workflow is shown in Figure 4. At present, the source code of Boa is already included in the code of uClinux. To implement Boa under uClinux, some configuration and modification of Boa are required. Configuring Boa includes the following steps:
(1) Open the "boa.conf' file in the "/target/etc/config" folder in the established file system.
(2) Change "ChRoot" to "/mnt/ide0/www". The purpose is to use the "www" folder on the CF card as the main folder of the Web Server. When the system IP is entered, the server automatically resolves to find a web page named "index.htm" in this directory, which is the homepage of this design.
(3) Add the command "ScriptAlias/mnt/ide0/www/cgi-bin//cgi-bin/" in the "SeriptAlias" option. The purpose is to map the address of the previous folder with a full path to the latter folder. First, it can save a lot of time entering the address in the address bar, which is convenient for users to operate; second, it increases the confidentiality and security of the system. For other options, you can choose the default options.
(4) Save the configured files. After downloading the file system, create a "csi-bin" directory in the "/mnt/ide0/www" file to store CGI script files.
3.3 CGI Program Design
The CGI program is written in C language and embedded with HTML scripts. Therefore, when CGI is executed, it can complete the operation of the specific port and display the returned results on the web page for monitoring personnel to view. The specific operation is: First, the CGI script uses the GET method to receive the "QUERY_STRTING" transmitted from the web page parsed by the Web Server, which represents the user's monitoring command. After receiving the command, the CGI program decodes the command and transmits it to the serial port, sends the acquisition command to the field monitoring module, and receives the acquisition results sent back by it, and quickly transmits it to the Web interface browsed by the monitoring user. It should be noted that after the CGI program is written and successfully compiled, it should be moved to the relevant directory of the CF card, that is, the "www/csi-bin" set by the Boa Web Server introduced above, and its suffix is changed to ".cgi", and the attribute is changed to "executable", so that the Web Server can correctly identify and execute this CGI program.
Figure 5 Web page showing real-time measurement results
4. Conclusion
This paper combines embedded systems with Internet technology, develops an embedded WEB server on FPGA, and combines it with power grid parameter measurement instruments to form a remote power grid parameter measurement system, which provides technical support for the network management of power grid systems and has good application prospects.
Previous article:Interesting low-power data acquisition system based on M-BUS
Next article:Overview of Automotive Electronics Measurement System Solutions
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Smart water meter
- 【NXP Rapid IoT Review】W5 Final Summary
- Why don't the numbers match? I've refreshed it several times, but they still don't match. How come the administrator didn't notice it all these years?
- Comparison between fixed-point dsp and floating-point dsp
- Reliability Design of PCB Board for High-speed DSP System
- How to daisy chain 485
- Silergy SY5072 specification sheet help
- Please help me find out which movie the characters in the attached picture are from. Thank you.
- Renovation of old items + transformation of discarded charging heads into bathroom lighting
- How should I draw the various layers of the Allegro pad pins?