You are on page 1of 4

Modern Applied Science

www.ccsenet.org/journal.html

Vol. 1, No. 4 November 2007

Data Collection System of EEG Based on USB Interface
Xiang Li, Ping Wang, Ye Cheng, Jingli Yang Institute of Computer Technology & Automatization, Tianjin Polytechnic University Tianjin 300160, China Tel: 86-22-2458 4578 Abstract This article introduces a EEG synchronous sampling system and its hardware composing principle and software design method which is based on USB interface IC FT245BM, simultaneous and high speed 16 bit ADC IC ADS8320 with 16 channels, and 8 bit SCM AT89C51. This system can fully enhance the veracity of data measuring, and show its superiority in the precise measurement of the EEG parameters. This system has come into operation and produced good effect. Keywords: EEG, USB, Synchronous sampling 1. Introduction Electroencephalograph (EEG) is a sort of technology which magnifies and records the bioelectricity in human brain tissues and reflects the electronic activities of the brain. Because EEG reflects the “live” functional situations of the brain tissues, so since 1930s it appeared, it has been exerting important effects to diagnose nervous system illnesses. This technology mainly utilizes electroencephalograph to check and diagnose nervous system illnesses such as falling sickness, brain trauma and brain knub. The traditional EEG machine had big volume, was not easy to move and can not be applied in ambulance, field and other situations. With the development of electronic technology and computer technology, the synchronal collection and automatic analysis functions of several brain electronic conduction signals have gradually become the main development directions for the EEG machine with functions of checking, diagnosing and monitoring. At the same time, the medical instruments is transforming to the orientation for the community and family. Because of the popularization of family and hospital PC especial the notebook PC, adding the abroad usage of convenient USB interface, it is very necessary to establish computer EEG collection system based on USB interface. It can not only convenient for checking nervous system illnesses, but suit for family usage. When the patient feels headache, it can timely record the brain waves to find out relative illness and help to diagnose for the doctor. 2. Characters of brain wave signal Based on different frequency ranges, the brain wave signals can be divided into four sorts of wave. The first sort is the wave α which is in 8Hz~12Hz, 10μV~100μV, and indicates that people is in ease situation. The second sort is the wave β which is in 16Hz~30Hz, 10μV~50μV, and indicates that people is in working situation. The third sort is the wave δ which is in 0.5Hz~3Hz, 10μV~200μV, and indicates that people is in deep sleeping situation. The fourth sort is the wave θ which is in 4Hz~7Hz, 20μV~150μV, and indicates that people is in dreaming situation. In a word, at this time, the brain wave signal is very weak, and the pressure range is in 10μV~200μV, the frequency range is in 0.5Hz~30Hz (Zhang, 1998, p.1-11). Except that, the brain wave signal has the following characters. First, the characters of randomicity and equability are very strong. Second, the brain wave signal has character of nonlinearity. Third, the background of collected brave wave signal is very complex, including the interference of 50Hz AC signal, and contact noise of electrode and skin, common mode of electrode and terra and so on. Those characters are several places what we should especially notice when designing the brave EEG collection system. 3. Hardware system 3.1 Overall design The system structure is seen in Figure 1. The whole system is composed of six components including brain wave signal sampling, difference magnification, multiplexing selection, smoothing circuit, AD sampling controlled by SCM, and data transmission. The complete flow of this system is presented as follows. (1) Inspect brain wave signals through electrode sensor and input it into the protective circuit to limit the pressure. (2) Implement difference magnification to the brain wave signals. E-mail: tjudx@126.com

79

1 Software design of slave machine The program of SCM includes the following modules such as main program. For the low pass filter circuit. the more important is that it will organically combine various subprograms and manage and control these subprograms and offer the corresponding 80 . and under non-transformation situation. For the high pass filter. and when the sampling speed is 10kHz. so we would try to reduce the channels amounts of photoelectricity isolation when designing. FT245BM brings FIFO output cushion with 384 bytes and FIFO input cushion with 128 bytes and possesses the data transportation ability of 1M byte/s. we adopt passive filter which initiation frequency is 0. its sampling power waste is only 0.3 Smoothing circuit The smoothing circuit is composed of low pass filter circuit and high pass filter circuit. and then the transformed data enter into the P1 portal of SCM through photoelectricity isolation circuitry IL715. Ltd. and its sampling frequency can maximally achieve 100kHz. the module has no data. its work power supply is in the range of 2. and cascades are more. We adopt the medical amplifier general instrument amplifier chip INA128 of INA series made by American BB Company which has the advantages of low power. which can establish bases for the future portable medical equipments. at this time its power waste can reduce to 100μW. so we set up the cut-off frequency at about 40Hz.5 Hz. data sending and data incepting. its power waste is only 1.7V and the sampling speed is 100kHz. high precision and high restraining ratio of common mode. (4) Before SCM AT89C51 select one channel of brain wave signals to input through multiplexing selector. we always require the data collection system not only possesses the characters of high speed and precision. we consider that the transition band of the first order filter is too wide and that will influence the effect of smoothing. Therefore. Its USB agreement has been solidified in the chip convenient for using. ADS8320 has synchronic parallel SPI/SSI interface.25V. According to the character that the practical brain wave signal sampling has 16 channels. Its encapsulation adopts 8 MSOP small volume type. data can be read in the module. FIFO with 384 bytes is full and data can not be read in the module. ADS8320 is the gradual approach parallel 16 bit low power CMOS high speed A/D converter made by Burr-Brown Company which linearity degree is ±0. so AT89C51 only needs four data lines to control the input of 16 channels input of brain wave signals. these signals must pass smoothing circuit which includes high pass filter and low pass filter. and the concrete parameters include that (1) when the plus is bigger than 100. Software system 4. and SCM can read out data from the module. (2) the maximal input maladjustment pressure is 125μV and the maximal input maladjustment pressure excursion is 1μV/°C. (6) Under the control of SCM AT89C51. 3. The main hardware structure of the system is seen in Figure 2. (5) The brain wave signals through smoothing enter into ADS8320 to transform. but also has the characters of low pressure. 3. At the same time. When SCM checks TXT# is in low voltage. so we adopt two pieces of CD4051 which chooses 1 in 8 to implement multiplexing selection and decide the sequence of these 16 channels signals. so we take Butterworth filter as the low pass filter in the preprocessing circuit. Simultaneously the above characters also make ADS8320 very suit for portable battery power supply system. The main program module is a very pivotal part in the whole software design.7V~5. CMRR = 120 dB. it can be in close mode.4 Structure design of hardware Generally speaking. data are transmitted to PC or notebook PC through USB interface FT245BM passing P3 portal. we can implement cascade through same filters.05%. When SCM checks RXF is in low voltage. we choose FT245BM made by Britain Future Technology Device Intl. 3. the changes from band pass to band resistance are more rapid (that is the transition band is narrower). system initialization. accordingly the fourth order Butterworth filter completely accords with the requirement of the design. INA128 is a perfect bioelectricity amplifier. so the ports occupying the microprocessor are less. Because Butterworth filter is flat response filter and its phase characters are better than Chebyshev filter. To make the transition band become narrow. Anti-Chebyshev filter and ellipse function filter of same order. For USB interface chip. R1 = 330 KΩ and C1 = 1μF. Its differential input signal range is 500mV~Vcc (work power supply). and when TXT# is in high voltage. low temperature excursions.2 Design of difference bioelectricity amplifier The design of difference bioelectricity amplifier is the key part for exact sampling brain wave signals.3mW. the module has data already. when we choose A/D converter.8mW. and when RXF is in high voltage. and except that it completes the application functions such as SCM system initialization and designing system. small volume and low power.Modern Applied Science (3) Because the high speed photoelectricity isolation circuitry (IL715) is very expensive. because the frequency of the collected brain wave signals is low frequency which frequency is in about tens Hz. 4. and when the power supply is in 2.

Fusheng & Tang.1-11. The parallel initialization program module mainly completes the basic settings including the baud rate. to implement data comparison and make pre-diagnosing to assist the doctor’s diagnosing.34-35. and the operation to this dummy parallel ports is same to the operation to the USB interface facility. the operation system will request installing device. p. methods and affairs offered by MSCOMM. 1999. 17(1).34-35) and MSCOMM to complete the software design of the PC port based on VCP. Guangwen. but also suits for timely records of brain wave signals at home. Qingyu. we define the main communication agreements of the master machine and the slave machine. (1999). The Application of Virtual Instrument and Lab VIEW in Biomedical Signal Detecting and Processing. System Structure Diagram 81 . 5. Chinese Journal of Biomedical Engineering. The sending and receipting subprograms complete the sending and receipt of the data. p. and PCCOMM. setting communication agreement. FIDI Company offers two sorts of drivers including VCP and D2XX (DLL) for the USB interface facility based on FT245BM. Therefore. stopping collection order is to output decimal number 0 or hex number &00H to the parallel port. and the parallel communication ends and the program returns. This article adopts Labview 8.20 (Yang. and offers various operations to the parallel ports. The convenient agreement and powerful figure function of Labview 8. (1998). it can complete the read-write to the dummy parallel ports FT245BM. At present this system has been used and obtains good effects in the clinic. When choosing installing VCP driver. ZhangTong. which embodies more human cares to the patients. We choose the former sort here. Measurement & Control Technology. Different drivers require different PC software design methods. At present. the system turns to process the parallel communication subprogram. it not only suits for the portable usage through battery power supply. The system running begins form the main program which exerts the original flow. 4. and according to the present data base of brain wave signals. Automatic detection and classification of epileptic waves in EEG —a hierarchical multi-method integrated approach. Conclusions This article introduces a sort of high speed and low power waste brain wave signal collection system which convenient for the doctor’s diagnosis and prevention of the illness. starting collection order is to output decimal number 20 or hex number &14H to the parallel port.Modern Applied Science program portals for those subprograms. Chenghu & Lu. accordingly actualizes the function of the whole system. Yang. E E G Input Protect Circuit Difference Amplifier Circuit Multiple Selector Circuit Photoelectric Isolated Circuit A T 8 9 C 5 1 USB P C Filter Circuit A/D Sampling (ADS8320) Photoelectric Isolated Circuit Interface FT245BM Figure 1. so in the application program we can utilize the parallel communication control to predigest the design of the PC port software. because this system possesses the characters of small volume.2 Software design of master machine When USB facility inserts the PC. accordingly complete once the receipt and sending of the data. Second. First. p. scanning. According to the attributes. the operation system will simulate the USB interface facility based on FT245BM into parallel communication ports. 18(6). In addition. and the dynamic display. parity bit. the mature parallel communication controls include MSCOMM. because MSCOMM has plentiful attributes and affairs closely relative to parallel communication.20 can help us to actualize the data collection and storage of the brain wave signals. References Yang. replaying of the brain waves and other main function. It is easy to utilize MSCOMM to compile the programs aiming at the parallel port operation. low power waste and stable performance. opening parallel port and stopping for the parallel communication. and avoids the operations to the USB interface. Only when the parallel stopping request is produced. and actualizes the users’ engaged functions. SPCOMM.

6/WR 17 RD P3. 5/T1 16 WR P3. 0 AT89 C51 31 EA/VP 30 ALE/P 29 PSEN P1. 7/RD RXF TXE D7 D6 D5 D4 D3 D2 D1 D0 GND RESET 32 P0. Hardware Structure Diagram 82 . 0/RXD 11 P3. 2/INT0 13 P3. 6 P1. 4 36 P0.Modern Applied Science GND FB1 R1 GND C1 3V3OUT 6 XTAL1 18 Y1 C2 XTAL2 19 U1 VCC 16 VDD -VCC 7 VEE S2 11 S2 S1 10 S1 S0 CD4 9 S0 INH1 6 INH GND1 8 VSS COM U2 VCC 16 VDD -VCC 7 VEE S2 11 S2 S1 10 S1 CD4 9 S0 S0 INH2 6 INH GND1 8 VSS COM 3 3 VCCIO 13 SI/WU 11 AVCC 30 VCC 3 U5 1 2RXF RXF# 1 4TEX TEX# 1 6RD RD# 1 5WR WR D7 D6 D5 D4 D3 D2 D1 D0 1 8D7 1 9D6 2 0D5 2 1D4 2 2D3 2 3D2 2 4D1 2 5D0 1 0PWREN 4 VCC 10 P3. 7 33 P0. 3/INT1 14 P3. 6 P2. 3 P2. 3 37 P0. 4 P1. 0 8 7 6 5 4 3 2 1 2 IN1 2 IN2 2 IN3 2 OUT4 WDI STR VCC 1 GND1 2 2IN1 3 2IN2 4 2IN3 5 2OUT46 7 GND1 8 U7 VDD1 GND1 IN1 IN2 IL7 17 IN3 OUT4 NC GND1 GND 1 CS 2 SK 3 DI 4 DO EECS EESK 2 EEDATA 1 EESK 32 EECS GND 17 AGND 29 XTIN 27 XTOUT 28 PWREN# RESET# +5 16 VDD2 15GND1 GND2 14 OUT1 13CLK OUT2 12CS OUT3 11DOUT IN4 10 NC 9 GND1 GND2 GND R6 U8 R10 1 MR 8 WDO GND 3 GND 4 PFI STR +5 INH S1 I NH1 2 VCC VCC 7 RESET RESET ASM81 3L 6 WDI WDI 5 PFO Y2 C1 1 GND1 -VCC GND VCC C1 3 INH2 U9 CLK 7 DCLOCK 5 CS CS/SHDN DOUT 6 ADS DOUT GND1 4 GND TEST 31 R8 Q1 R9 +5 C14 C6 C7 C8 C1 5 CAP -5 C9 C10 C1 2 +5 R7 Figure 2. 1 P2. 4/T0 PWREN15 P3. 7 P2. 1 P1. 0 20 GND 9 RESET U6 40 28 27 26 25 241 IN1 231 IN2 221 IN3 211 IN4 VCC 1 GND1 2 1IN1 3 1IN2 4 1IN3 5 1IN4 6 7 GND1 8 VDD1 GND1 IN1 IN2 IL7 15 IN3 IN4 NC GND1 +5 16 VDD2 15GND1 GND2 14INH OUT1 13S2 OUT2 12S1 OUT3 11S0 OUT4 10 NC 9 GND1 GND2 26 FB2 VCC C4 C5 VCC C3 U3 1 VCC 2 GND 3 D4 D+ USB VCC U4 5 GND 7 DC AT93C46 6 NC 8 VCC R5 FT2 45BM R3 R2 R4 EESK EECS 9 GND 8 UDBDM 7 USBDP 5 RSTOUT# VCC P2. 1 39 P0. 5 35 P0. 2 P1. 5 P2. 6 34 P0. 3 P1. 4 P2. 2 P2. 1/TXD 12 P3. 2 38 P0. 5 P1. 7 P1.