Development of a six-channel data acquisition and processing system

Publisher:花开堂前Latest update time:2012-03-08 Source: 微计算机信息 Keywords:Amplifier Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction
Single-chip computer application systems have broad application prospects in the acquisition and processing of biomedical micro-signals. This paper introduces a single-chip computer application system for six-channel data acquisition and processing that we developed based on actual needs. A total of two prototypes were produced and both were put into practical application. The system amplifies six weak electrical signals from sensors, converts them into digital signals through A/D converters, and performs preliminary processing on these data with a single-chip computer under the control of a PC, and then transmits these data to the PC. By selecting different sensors, the system can be used for the acquisition and processing of various biomedical micro-signals, and has a certain degree of versatility.

2 System Hardware Circuit Design



Figure 1 System block diagram

As shown in Figure 1, the system consists of sensors, micro-signal amplifiers, A/D converters, single-chip computer interfaces, and serial communications. The weak electrical signal from the sensor is amplified by the signal amplifier circuit and then sent to the A/D converter. This electrical signal is converted into a digital signal by the A/D converter and then sent to the single-chip computer for preliminary digital processing and transmitted to the PC via the serial communication interface. At the same time, the PC's instructions can also be transmitted to the single-chip computer through the serial communication interface.
The various parts of the system are introduced as follows:
2.1 Micro-signal amplifier circuit
The micro-signal amplifier circuit uses the precision data amplifier INA118 produced by Burr-Brown, USA. The operational amplifier has the characteristics of high precision and low temperature drift. Its internal structure is shown in Figure 2 [1].
INA118 has eight pins. An external amplification control resistor Rg is connected between pins 1 and 8. Pins 3 and 2 are the positive and reverse input terminals, respectively. Pins 7 and 4 are +5V and -5V power input terminals, pin 6 is the output terminal, and pin 5 is the reference voltage terminal, which is generally connected to the ground.



Figure 2 INA118 internal structure diagram

A1, A2, Ra, Rb and Rg form the first stage amplifier circuit. According to the "virtual short" characteristic of the operational amplifier, VA=VIN-, VB=VIN+. Therefore, the current flowing through Rg is

A3, Rc, Rd, Re and Rf form the second stage amplifier circuit. This stage is a differential amplifier circuit. Since Rc=Rd, Re=Rf, its voltage gain is [2].

It can be seen from the above formula that to change the gain of INA118, just change the size of Rg. In the actual circuit, Rg uses a 1KΩ precision potentiometer to form an amplifier circuit with adjustable gain, as shown in Figure 3.



Figure 3 Micro signal amplifier circuit [page]

Since the system needs to amplify the signals from six sensors separately, six INA118s (U1~U6) are used to form a six-channel signal amplification circuit. The reverse input terminals VIN- of the six INA118s are connected to the signal output terminals of the six sensors through the 1st to 6th pins of the J1 connection port; the forward input terminals are connected together and connected to the other end of the six sensors through the 8th to 10th pins of the J1 port, and are grounded through a 1KΩ resistor to reduce the common-mode input component and improve the amplifier's amplification accuracy.
Potentiometers W1~W6 are voltage amplification adjustment potentiometers, which can adjust the amplification of U1~U6 as needed. In this system, the amplification of the six channels is preset to -200 times. The output terminals Vo1~Vo6 of U1~U6 are connected to the six input terminals AIN0~AIN5 of the A/D converter U7 respectively, so as to convert the amplified voltage signal into a digital signal.
2.2 A/D conversion circuit
The analog-to-digital conversion circuit uses the serial A/D converter TLC2543 developed by Texas Instruments. It is an 11-channel, 12-bit, high-precision (maximum linear error of ±1/4096), fast (conversion time within the operating temperature range is 10μs) analog-to-digital converter [3]. Its internal structure is shown in Figure 4.
The TLC2543 is composed of seven parts: channel selector, input address register, sample-and-hold circuit, 12-bit analog-to-digital converter, output register, parallel-to-serial converter, and control logic circuit. The channel selector selects the input channel according to the address stored in the input address register, and sends the signal in the input channel to the sample-and-hold circuit. Then, the sampled analog quantity is converted into a digital quantity in the 12-bit digital-to-analog converter and stored in the output register. These data are converted into serial data through the parallel-to-serial converter and output to the microprocessor from the DOUT terminal.



Figure 4 TLC2543 internal structure block diagram

The analog-to-digital conversion circuit is shown in Figure 5. The analog signal input terminals AIN0~AIN5 of TLC2543 are respectively connected to six voltage signals Vo1~Vo6 from INA118, and the selection of each signal is set by programming; AIN6~AIN10 and the negative reference voltage terminal REF- are grounded. It is the chip select signal input terminal. The chip select signal comes from the P1.7 pin of the single-chip computer AT892051 (the signal is generated by software programming). When is low level, TLC2543 is allowed to input and output data. When is high level, it is prohibited to input and output data; DOUT is the conversion data output terminal. The conversion result is output to the P1.6 terminal of the single-chip computer AT892051. The output mode can be output bit by bit from high to low, or from low to high. The specific mode is determined by programming; DIN is the serial data input terminal. The command word (including channel selection, output data length, output order, polarity selection and other information) from the P1.5 pin of the single-chip computer is input from this terminal. The input mode is high first and low later. SCLK is the input and output synchronous clock terminal. The clock signal comes from the P1.4 pin of AT892051 (the signal is generated by software programming); when data transmission starts, at each rising edge of the SCLK signal, the microcontroller inputs a command word to TLC2543 (the first 8 rising edges), and at the same time, TLC2543 outputs a conversion result to the microcontroller (the first 8, 12 or 16 rising edges). The positive reference voltage terminal REF+ of TLC2543 is connected to the +3.0V standard voltage.
The standard voltage +3.0V is generated by the power supply integrated circuit TL431. Since the voltage difference between the 1st and 2nd pins of TL431 is the standard voltage of 2.5V, and the operating current of the 1st pin can be ignored, the standard voltage output by the 3rd pin of TL431 is:

In this system, the conversion result is output in 12 bits: When the analog voltage (voltage to ground) at the input of TLC2543 is equal to (or slightly lower than) 0V, the output result of TLC2543 is 000H; when the analog voltage is equal to (or slightly greater than) 3V, the output result is FFFH (In order not to damage TLC2543, the sensor connection method should be properly selected and the amplification factor of the amplifier circuit should be adjusted so that the input voltage of TLC2543 is in the range of -0.3V to +3.3V).



Figure 5 Analog-to-digital conversion circuit

2.3 Single-chip computer interface circuit The
single-chip computer uses AT89C2051 produced by ATMEL. It is a low-power, high-performance 8-bit CMOS microcontroller chip that is compatible with the MCS-51 instruction system. The on-chip 2KB flash read-write program memory can meet the needs of this system, and there is no need to expand the external program memory.



Figure 6 Interface circuit [page]

The interface circuit is shown in Figure 6. Among them, C0 and R4 constitute the power-on automatic reset circuit; K, R5 and R4 constitute the manual reset circuit, and X, C1, and C2 constitute the oscillation circuit of the microcontroller. In order to generate an accurate serial communication baud rate, the oscillation frequency of the crystal oscillator X is selected to be 11.0592MHz (it can make the initial value of the baud rate generator T1 an integer, thereby eliminating the initial value error).
The P3.0 pin of AT89C2051 is the serial data receiving end, which receives the serial data from the R1OUT end of MAX232; the P3.1 pin is the serial data output end, and the serial data sent by the microcontroller to the PC is transmitted to the T1IN end of MAX232; the P1.4 pin outputs the synchronous clock signal, which is input to the SCLK end of TLC2543; the P1.5 pin is connected to the DIN end of TLC2543, and the microcontroller inputs the command word to TLC2543 from this end; the P1.6 pin is the A/D conversion result input end, which receives the conversion result from the DOUT end of TLC2543; the P1.7 pin outputs the chip select signal of TLC2543 and is connected to the end of TLC2543.
2.4 Serial communication circuit
The serial communication circuit is shown in Figure 7. MAX232 is a bidirectional level conversion chip that completes the conversion between TTL level (0~5V) and EIA level (-10V~+10V): when sending data, the TTL level signal is transmitted from the TXD terminal of the microcontroller to the T1IN terminal of the MAX232, and after being converted into an EIA level signal by the MAX232, it is sent out from the T1OUT terminal and reaches the PC through the TXD terminal of the RS-232C socket; when receiving data, the EIA level signal from the PC is input to the R1IN terminal of the MAX232 through the RXD terminal of the RS-232C socket, and after being converted into a TTL level signal by the MAX232, it is sent from the R1OUT terminal to the RXD terminal of the microcontroller.



Figure 7 Serial communication circuit

3 System software design
The main program block diagram of the system is shown in Figure 8.
The main program of the system is designed as a loop program, which completes the following tasks in one loop: ① Send command words to the A/D converter, read the conversion results of the A/D converter, and perform preliminary processing on the read conversion results according to the instructions from the PC; ② Send data to the PC; ③ Receive commands from the PC and respond to the commands.
In this system, the output result of TLC2543 is set to a 12-bit unsigned integer, and the output order is high bit first. In order to make the sampling results more accurate, the following sampling method is adopted: in each main program cycle, the single-chip computer reads the sampling data of the six channels AIN0~AIN5 in turn, and stores the data of each channel in the RAM of the single-chip computer in turn. After the six channels are read once, the sampling data of the six channels AIN0~AIN5 are read in turn, and the newly read data of each channel are added to the previously read results. In this way, the reading is carried out 8 times in a row to obtain the sum of the 8 sampling results of each channel, and then these results are divided by 8 to obtain the average value of the 8 sampling results of each channel, and they are transmitted to the PC as the sampling results of each channel. Since the output results of the A/D converter do not directly represent the voltage size (000H represents 0V, FFFH represents 3.0V), the single-chip computer can convert these results into voltage values ​​(such as converting FFFH into 003H) according to the command from the PC, and the conversion of the results is completed by calling the subroutine.



Figure 8 System main program block diagram


Each time the system main program loops once, the microcontroller sends a set of data to the PC. This set of data contains three parts: ① three synchronization bytes #55H, #0AAH, #01H (for the PC to identify the content of the transmission); ② the sampling results of the six channels AIN0~AIN5; ③ the cumulative sum of the sampling results (for the PC to verify the correctness of the transmitted data). The data transmission is realized by calling the transmission subroutine. There is a delay program in the loop program. The PC controls the time required for the microcontroller to complete a cycle by transmitting the delay parameter, thereby controlling the frequency of the microcontroller sending data to the PC. The command from the PC is read in through the interrupt mode. Whenever a signal is received from the PC, the serial port of the microcontroller is interrupted. The microcontroller reads the command in the interrupt service program and executes the received command.
The working mode of the microcontroller serial port is set to mode 1, and the baud rate of serial communication is designed to be 4800. Assume that the initial value of the baud rate generator T1 is x, then [4]

that is, x=250 (+)=#0FAH (+16)
so TL1=#0FAH, TH1=#0FAH.
The data receiving program of the PC is written in Visual C++ 6.0 [5] and is made into an installable application software named "Gao Zeli-Serial Communication" using the installation program making software InstallShield Professional. Its running interface is shown in Figure 9.



Figure 9 "Gao Zeli-Serial Communication" application window


The main functions of "Gao Zeli-Serial Communication" are: ① Setting of communication parameters - click the "Set Parameters" button with the mouse, a parameter setting dialog box pops up, in which you can set the serial port number of the PC used, the frame format of asynchronous communication data, the time interval for automatically sending data to the single-chip microcomputer and other parameters; ② The PC sends control instructions to the single-chip microcomputer - the instructions to be sent can be sent to the single-chip microcomputer manually or automatically (the content to be sent can be sent by entering it into the "Send Content" edit box through the keyboard); ③ Receive data from the single-chip microcomputer - click the "Start Receiving/Stop Receiving" button with the mouse to switch between receiving and stopping, and the received data is displayed in the "Receive Echo" edit box; ④ Clear the received echo data - click the "Clear" button with the mouse to clear the data in the receive echo edit box, so that the newly received data is displayed in a directly visible position in the edit box.

4 Applications
The two prototypes were used to measure the action potential of nerve trunks in the "Nerve Trunk Action Potential" experiment for undergraduate students of clinical medicine. The experiment showed that the system has stable performance and high measurement accuracy, and has achieved initial success in the detection and processing of medical signals.

References:
[1] http://www.burr-brown.com.
[2] Wang Chenghua, Wang Youren, Hu Zhizhong (eds.), Basic Electronic Circuits Tutorial [M]. Beijing: Science Press, 2000. 133-134.
[3] Li Qunfang, Huang Jian (eds.), Single-Chip Microcomputer and Interface Technology [M]. Beijing: Publishing House of Electronics Industry, 2001. 168-172.
[4] Yang Huixian, Huang Huixian et al., Principles and Applications of Single-Chip Microcomputers [M]. Changsha: National University of Defense Technology Press, 2003. 136-137.
[5] Qiushi Technology, Tan Siliang, Zou Chaoqun et al., Viual C++ Serial Communication Engineering Development Example Navigation [M]. Beijing: People's Posts and Telecommunications Press, 2003. 73-130.

Keywords:Amplifier Reference address:Development of a six-channel data acquisition and processing system

Previous article:Data Acquisition System Based on MSP430 and USB
Next article:Serial communication between PC and single chip microcomputer realized by VB in temperature control system

Recommended ReadingLatest update time:2024-11-16 20:50

Active antenna amplifier circuit diagram for FM radio
This is the circuit diagram of an active antenna amplifier for FM radio. With just a handful of parts you can build this trusty FM amplifier to boost the signal of your radio transmitter. The circuit works with just 1 UHF/VHF type transistor MFE201. This amplifier will pick up all distant FM stations clearly. The ci
[Embedded]
Active antenna amplifier circuit diagram for FM radio
Student Zone—ADALM2000 Experiment: Tuned Amplifier Stage
Target The purpose of this experiment is to study the characteristics of a tuned amplifier. Background Many requirements for communications systems exceed the high frequency limitations of op amps. In such cases, discrete tuned amplifiers are often used. Discrete amplifiers
[Analog Electronics]
Student Zone—ADALM2000 Experiment: Tuned Amplifier Stage
Op amps: An alternative to driving PIN diodes
In a switching circuit, each PIN diode has an accompanying PIN diode driver or switch driver that provides a controlled forward bias current, reverse bias voltage, and an activation interface between a control signal (usually a digital logic command) and one or more PIN diodes. Depending on the application, this dri
[Analog Electronics]
500W power amplifier output circuit that can be used for high-power unipolar power supply
500W power amplifier output circuit that can be used for high-power unipolar power supply Function of the circuit This circuit is the output circuit of the power amplifier, with a load of 8 ohms, an effective output of 500W, an output voltage of 180VP-P, and an output current peak value of more than 10A, so it
[Analog Electronics]
500W power amplifier output circuit that can be used for high-power unipolar power supply
Design of a noise-optimized low-noise amplifier under power constraints
In a wireless RF receiver, the RF signal is transmitted through unit modules such as filters, low noise amplifiers, and intermediate frequency amplifiers. Since each unit has inherent noise, the output signal-to-noise ratio deteriorates. In a multi-stage cascade system, the noise coefficients of the first few stages
[Embedded]
Design of a noise-optimized low-noise amplifier under power constraints
Based on TDA2009 power amplifier application circuit diagram
  This article introduces the application circuit diagram of TDA2009 power amplifier. The maximum working power voltage is 28V, and the output power is 2×10W. The typical working power voltage is 24V, and the normal working voltage is 8-28V. The normal working voltage means that the integrated circuit can work normall
[Power Management]
Based on TDA2009 power amplifier application circuit diagram
Amplifier Noise Sources
Since their introduction, CMOS single-supply amplifiers have benefited single-supply system designers around the world. The main factors affecting the total harmonic distortion plus noise (THD+N) characteristics of dual-supply amplifiers are input noise and output stage crossover distortion. The THD+N performance of a
[Power Management]
Amplifier Noise Sources
Dual Difference Amplifier with On-Chip Resistors Enables Precision ADC Driver
Discrete difference amplifiers with op amps and external gain setting resistors have mediocre accuracy and significant temperature drift. Using 1%, 100ppm/°C standard resistors, an initial gain error of up to 2% can change by up to 200ppm/°C, and the monolithic resistor networks typically used for precision gain sett
[Power Management]
Dual Difference Amplifier with On-Chip Resistors Enables Precision ADC Driver
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号