Remote Control Signal Conditioning System Based on Ethernet

Publisher:TranquilOasisLatest update time:2011-11-16 Source: 21icKeywords:Ethernet Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

In the data acquisition process of many physical experiments (such as the discharge experiment of the Tokamak nuclear fusion experimental device), due to factors such as weak signals to be measured and severe electromagnetic radiation in the test environment, signal conditioning operations such as filtering and amplification are often required at the front end of the data acquisition to filter out signal noise and adjust the signals to be measured to the optimal range of the back-end data acquisition card, ultimately improving the resolution of the entire data acquisition system.

It is generally believed that adding a preamplifier circuit with a gain of 2 before the A/D converter can increase the measurement resolution by 1 bit, and a gain of 4 will increase the resolution by 2 bits, and so on. Therefore, it is necessary to add a signal conditioning circuit to the front end of the data acquisition system to expand its dynamic range. Ethernet remote control of the signal conditioning system can achieve unified management of the signal conditioning system, effectively improve experimental efficiency, and reduce the number of times the experimenter enters the experimental site to adjust the conditioning circuit.

1 Design of program-controlled signal conditioning system

Design requirements:

①The input signal voltage amplitude (peak-to-peak value) is 100mV~10V;

②The 8 gain levels are 0.1, 0.5, 1, 2, 5, 10, 20, and 50 respectively;

③The filter type is optional, and the center frequency and quality factor can be remotely controlled;

④The amplifier gain selection and various parameters of the programmable filter are all remotely controlled by Ethernet;

⑤The upper computer control program is designed based on Socket;

⑥The lower computer IP address, amplifier gain, and various filter parameters are managed through a visual interface.

Based on the above design requirements, this system mainly includes the following parts: controller module, programmable filter module, programmable amplifier module and host computer data acquisition control program. The system uses AVR microcontroller as the controller to realize embedded Ethernet communication, remote control of filter parameters and amplifier parameters, and stores the above data in non-volatile memory. After the system is turned on or reset, the parameter values ​​set before shutdown can be restored.

2 System Hardware Design

As shown in Figure 1, the system hardware circuit consists of a controller circuit, a programmable amplifier circuit, and a programmable filter circuit. The controller circuit implements embedded Ethernet communication, parameter settings for the programmable filter circuit, and the programmable amplifier circuit. The programmable filter circuit implements the selection of the filter type, as well as the setting of the center frequency and quality factor. The basic programmable amplifier circuit implements gain control of the input signal.

2.1 Controller Circuit

The embedded controller circuit based on AVR single-chip microcomputer is the control core of the entire program-controlled signal conditioning system. It is used to receive instructions from the host computer data acquisition control program to implement operations such as setting the amplification factor of the program-controlled amplifier. The controller circuit is reconstructed based on the Ethernut 1.3g open source software and hardware embedded system design scheme, and the structure is shown in Figure 2.

The circuit uses the core chip AVR microcontroller ATmega128. The performance of ATmega128 is up to 16MIPS when working at 16MHz; it has built-in 128KB system programmable Flash and 4KB EEPROM, and an external 32KB SRAM KM62256; the 10Mbps Ethernet controller RTL8019AS compatible with IEEE802.3 can realize full-duplex Ethernet communication. The 4KB EEPROM can be used to save the parameters of the 32-channel channel-controlled amplifier, and is used to automatically restore the amplifier state before power failure after the system is powered on or restarted. LM1086 provides a 1.5A, +5V regulated power supply for the system. When the manual reset button is activated or the system power supply voltage is lower than 4.63V, MAX825L will send a reset signal to ATmega128, causing the system to restart.

The controller controls the parameter settings of the amplifier circuit and the filter circuit through the I/O port on the ATmega128. The digital ground and analog ground of the entire system adopt a single-point grounding design to reduce the noise of the digital signal of the controller circuit interfering with the analog signal in the signal conditioning circuit.

2.2 Programmable filter circuit

Commonly used filters are active filter circuits composed of RC components and integrated operational amplifiers. Its filtering characteristics are closely related to the accuracy of resistor R and capacitor C. The parameter-adjustable filter composed of them not only requires high precision of the device, but also has a complex circuit structure and is not easy to implement program control. MAX261 is a dual second-order switched capacitor active filter. The filter parameters f0 (center or inflection frequency), Q value, and MODE (mode) can all be programmed and written by the microprocessor, and bandpass (BP), lowpass (LP), highpass (HP), notch (N) and all-pass (AP) active filters can be formed without external components.

Figure 3 shows the program-controlled filter circuit composed of MAX261. The 4-bit address lines (A0-A3), 2 data lines (D0-D1) and 1 write enable signal (/WR) of MAX261 are connected to the I/O port of ATmega128 respectively, so that the controller can program the parameters of MAX261 through the I/O port. As shown on the right side of Figure 3, 3 different filter types (low-pass, band-pass and high-pass) can be selected by short-circuiting.

2.3 Programmable Amplifier Circuit

The combination of a multi-way switch and an operational amplifier is a simple and effective method to realize a programmable amplifier. By using a multi-way switch to change the feedback resistor or input resistor of the inverting operational amplifier, the gain can be changed. For applications with high precision requirements, high-precision operational amplifiers and resistors can be selected, and the corresponding gain calibration can be used to meet system requirements.

As shown in Figure 4, the programmable amplifier circuit is mainly composed of a low-noise precision op amp OP27 and an 8-to-1 analog switch MAX308. OP27 is a low-noise, precision operational amplifier with an offset voltage of 25μV and a maximum drift of 0.6μV/℃, which is very suitable for precision instrument applications. At 10Hz, the characteristics of low noise, low noise corner frequency and high gain enable it to perform precise high-gain amplification of low-level signals. The 8MHz gain-bandwidth product and 2.8V/μs conversion rate enable the amplifier to maintain excellent dynamic accuracy in high-speed data acquisition systems. When the programmable amplifier is in unity gain, the bandwidth requirement is 100kHz, which can be met by OP27. The input and output range of MAX308 is -10 to +10V, the on-resistance is less than 100Ω, and the on-resistance consistency is less than 3Ω, which can meet the system requirements. In order to save I/O ports, the control signal is converted serially/parallel by MC74HC595 before the switch of MAX308 is realized, thereby completing the signal gain adjustment. The resistors used are RJJ type precision small metal film resistors with an accuracy of ±0.5% and a temperature drift coefficient of ±50×10-6/℃.

In the circuit of Figure 4, the software controls the closing or opening of the switch to select different feedback resistors to change the gain of the circuit. However, the disadvantages of this method are also obvious: since the switch is connected in series with the feedback resistor, the on-resistance of the switch will affect the gain of the amplifier. Considering the requirements of speed and accuracy, the input resistance Rin=10kΩ, and the feedback resistance Rf corresponding to the 8 gears of 0.1, 0, 5, 1, 2, 5, 10, 20, 50 are 1kΩ, 5kΩ, 10kΩ, 20kΩ, 50kΩ, 100kΩ, 200kΩ, 500kΩ respectively.

3 System Software Design

According to the design requirements, the software part requires:

① The controller circuit supports Ethernet communication of TCP/IP protocol;

② Log in to the programmable signal conditioning system through a web browser or host computer data control software, and view, modify and save filter parameters and amplifier gains.

The embedded software running on ATmega128 is an embedded Ethernet application design based on RTO Nut/OS. The core task of the application is to realize Ethernet communication and parse instructions to control the subsequent hardware circuits. The application contains two threads: one is the main thread (i.e., the TCP server thread), and the other is the amplifier parameter group setting thread. In Nut/OS, these two threads are set to the same priority.

The main thread program flow is shown in Figure 5. The main thread first configures the CPU I/O port, sets the timer T2 mode, and configures IP, MAC, Mask, and Gateway, restores the amplification factor of the programmable amplifier and the filtering parameters of the programmable filter before the CPU is powered off, and enters the TCP, Socket server program after creating the amplifier parameter setting thread, and starts to listen to the connection introduced by the TCPSocket client. After receiving the command from the client, it will perform the corresponding action. The WrAmp string is the amplifier amplification factor instruction, which can be used to set the amplifier amplification factor; the RAAmp instruction is used to obtain the amplifier parameters from the EEPROM and send them to the client; SetMX is used to obtain the filter parameter value from the instruction; q[uit] is used to disconnect.

The amplifier parameter group setting thread program flow is shown in Figure 6. This dual-thread parameter setting structure can shorten the TCP Socket connection time and speed up the batch control of multiple program-controlled signal conditioning systems by the host computer data control software, while ensuring that the instructions are correctly executed by the subsequent hardware circuit.

In order to facilitate stand-alone debugging, an http service thread is added to the embedded program design. The system administrator can use a web browser to access the static web page on the ATmega128 to view, modify and save the filter parameters and amplifier gain.

Develop visual data control software on the host computer, and realize communication between the data control software and ATmega128 through Socket. The ATmega128 program is used as the server, and the host computer data control software is used as the client. After the client sets the IP and port number of the server, it can enter the connection state through the Socket, and the two sides can exchange information. The host computer data control software controls the filter parameters and amplifier gain of the program-controlled signal conditioning system, and can view, modify and save them. This control method can meet the unified control of many program-controlled signal conditioning systems by the host computer data control platform.

4 System Performance Test

The settings of the filter MAX261 can be programmed and controlled by the controller ATmega128 to form a low-pass and band-pass filter. The filter has 8 levels of cutoff frequency, center frequency and Q value. The ideal frequency setting range is 18-32kHz (adjustable in 2kHz steps), and the Q value setting range is 0.5-4.0 (adjustable in 0.5 steps). The filter is tested using an oscilloscope dual-channel tracking.

As shown in Table 1, CH1 is the input signal and CH2 is the output signal after the fourth-order low-pass filter. The peak-to-peak value of the input signal CH1 is about 1.00V. When the frequency gradually increases from 100Hz to 40kHz, the cutoff frequency is set to 25kHz. Its value can be modified through the program. The passband is relatively flat and the roll-off characteristics are average.


Table 2 shows the test results of the same input signal with different Q values. It can be seen that as the Q value increases, the amplitude attenuation coefficient of the output signal also increases. The frequency, Q value of other points of the low-pass filter and the test results of the band-pass filter are not listed here one by one. The specific characteristics can be observed through an oscilloscope.

Conclusion

The program-controlled signal conditioning system based on embedded Ethernet technology uses an embedded real-time operating system and TCP/IP protocol to achieve program-controlled signal conditioning. Users within the network can remotely control the input signal filter parameters and amplifier gain. The system is safe and reliable to operate, easy to set up, and suitable for large-scale physical experiments that require signal conditioning.

Keywords:Ethernet Reference address:Remote Control Signal Conditioning System Based on Ethernet

Previous article:Realization of fuzzy control system of traffic lights at road intersections based on PLC
Next article:Five-way touch alarm composed of CA3083 and CW9561

Recommended ReadingLatest update time:2024-11-17 02:36

OK6410A development board (VIII) 1 linux-5.11 OK6410A ethernet dm9000 porting
Code: https://github.com/lisider/linux/tree/ok6410a-linux-5.11 Submit id: 4459e78a4d845f08286623b98546bcefbb45ddb9 defconfig : arch/arm/configs/ok6410A_sdboot_mini_net_defconfig Configuration CONFIG_DM9000=y driver drivers/net/ethernet/davicom/dm9000.c device $ git diff arch/arm/mach-s3c/mach-smdk6410.c  diff --
[Microcontroller]
Overview of common vehicle buses CAN, CANFD, LIN, FlexRay and Ethernet
As modern cars become more and more electronic, automotive bus systems are becoming more and more complex. Automotive bus testing is an important task that helps identify problems in vehicle electronic systems and ensures vehicle safety and reliability. This article will introduce five common automotive bus systems
[Embedded]
Overview of common vehicle buses CAN, CANFD, LIN, FlexRay and Ethernet
Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号