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.
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
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- What methods do you generally use to recruit or find jobs? Which platform is used more often?
- Summary of the points to note when using CCS8.0 to program MSP430G2553
- A fire broke out at Foxconn in Shenzhen, with thick smoke billowing from the scene
- PCB copper plating
- Color card combination lock
- Taking a “family-first” approach to op amp design
- Design of smart greenhouse planting control system based on 5G network
- CCS5.5.0 compilation problem: "different version of compiler"
- Battery Charging Circuit Design Considerations
- Please tell me what is the withstand voltage of this 336 25K tantalum capacitor