EEG (Electroencephalogram) is a weak, low-frequency physiological signal. It is a spontaneous potential activity generated by brain nerve activity and contains a wealth of brain activity information. By recording EEG signals, data analysis and basis can be provided for the diagnosis of brain diseases. Epilepsy is caused by abnormal brain discharges. It is a chronic disease and syndrome characterized by sudden and transient central nervous system dysfunction caused by excessive discharges of brain neurons [1]. At present, epileptic discharges found through EEG examinations are still the main objective basis for the diagnosis of epilepsy and the localization of epileptic foci.
Due to the limitation of conditions, it is difficult to collect samples of human epilepsy EEG data, and the data is easily disturbed by the external environment and the patient's movement. At present, the idea of some portable EEG acquisition instruments is mostly to collect EEG signals through pre-amplification, transmit them to the PC through a wireless module , and process and store them in the PC. The PC end mostly uses a desktop computer running under the Windows system. This system has good data processing capabilities, stable performance, and can record for a long time. However, the entire system generally requires an external power supply , is relatively large in size, and is generally placed in professional institutions and hospitals for use. It is not truly portable. Compared with some poor mountainous areas with insufficient medical resources, this kind of medical equipment that is difficult to carry and move leads to the inability to meet the basic medical needs of these areas.
Therefore, how to make the EEG acquisition instrument more flexible and convenient in use has begun to receive widespread attention. Designing an EEG signal acquisition instrument with small size, low power consumption and truly portable use has important practical significance and application value.
1 Overall structure of the portable wireless EEG acquisition system
This paper proposes a wireless EEG signal acquisition system based on STC12C5A60S2 single-chip microcomputer, wireless chip nRF24L01, and true color LCD display TFT6448BS-5.7. The STC12C5A60S2 single-chip microcomputer at the sending end is responsible for data acquisition and preprocessing, the nRF24L01 module is responsible for data transmission, and the STC12C5A60S2 single-chip microcomputer at the receiving end displays the received data in waveform through the LCD display TFT6448BS-5.7. The specific system composition is shown in Figure 1. According to the application characteristics of the portable EEG acquisition system, its volume and weight are required to be reduced as much as possible to achieve true portability.
Figure 1 System functional block diagram
1.1 Front-end acquisition of EEG signals
Since the main frequency range of human EEG signals is 0.05~100Hz and the amplitude is about 10~200μV, the signal is very weak.
Usually mixed with other bioelectric signals, coupled with 50Hz power frequency interference, the measurement conditions of EEG signals are very complicated. Traditional acquisition front-ends usually use analog anti-aliasing filters, multi-stage amplifier circuits and wave circuits to improve the signal-to-noise ratio of the signal, which will lead to disadvantages such as large system size, inconvenient operation and high power consumption. In order to accurately monitor clinically significant EEG signals, this paper adopts the method in the reference, and its front-end acquisition module uses TI's ADC1299 chip.
1.2 MCU control module
The single-chip microcomputer control module of this system includes the single-chip microcomputer of the transmitting end and the single-chip microcomputer of the receiving end. The single-chip microcomputer of the transmitting end must have an integrated A/D converter on the chip, and the single-chip microcomputer of the receiving end must be connected to an external LCD. Therefore, the powerful STC12C5A60S2 single-chip microcomputer is selected. This single-chip microcomputer is a new generation of 8051 single-chip microcomputer of Macrocrystalline Technology. The STC12C5A60S2 series single-chip microcomputer using Macrocrystalline's latest sixth-generation encryption technology cannot be decrypted and has strong anti-interference ability. It has an internal integrated 8-channel 10-bit A/D converter. The A/D conversion function is used in this system, so that the system does not need an external A/D conversion chip. At the same time, the single-chip microcomputer is fast and has high precision.
The ADC of STC12C5A60S2 is a successive approximation ADC. After power-on, the EEG signal is collected through 8-conductor electrodes and then controlled by an electronic switch to enter the microcontroller at the sending end, ensuring that only one signal enters at a time. The ADC input channel is multiplexed with the P1 port. After power-on reset, the P1 port is a weak pull-up I/O port. The port not used as an ADC can continue to be used as an I/O port. The microcontroller converts the analog signal into a digital signal through the ADC, and at the same time controls the wireless module to send the digital EEG signal to the wireless module at the receiving end, and the signal enters the microcontroller at the receiving end to realize real-time display and storage.
1.3 Wireless Module
This system uses the 2.4GHz wireless single-chip transceiver chip nRF24L01, which uses FSK modulation to achieve point-to-point or 1-to-6 wireless communication. The wireless communication speed can reach 2Mb/s. It is small in size, low in power consumption, has few peripherals, and high speed, making it very suitable for wireless transmission application systems. nRF24L01 can be connected to the microprocessor via the SPI interface, and the settings and data transmission and reception are completed through this interface. The STC12C5A60S2 microcontroller integrates an SPI controller, which can be easily set through software. Data will only be output when the local address is received, and programming is very convenient. The connection diagram of nRF24L01 and the microcontroller is shown in Figure 2.
Figure 2 Connection diagram of STC12C5A60S2 and nRF24L01
1.4 Display
The display part uses a true color LCD display TFT6448BS-5.7 with a viewing diagonal of 5.7 inches and a resolution of 640×480. The operating voltage of this display is 3.3/5V and supports 256 colors. Since it is specially designed for microcontroller users, a simple high-speed 8-bit bus is provided to connect with the microcontroller. This display has low power consumption and a thin and light design that can also meet the requirements of portability. The program design of this system includes microcontroller programs and LCD display driver programs. The sending end performs A/D conversion and wireless transmission through the microcontroller, and the receiving end receives data through nRF24L01 by the microcontroller and sends it to the LCD display for display.
After receiving the EEG data, the receiving microcontroller transmits it to the LCD for display. Each point on the display screen maps to a byte in the display memory , and the X and Y coordinates on the display screen correspond to the address of the display memory. Therefore, you only need to enter the X and Y coordinates to directly read and write the corresponding point data without calculating the address of the pixel in the display memory. After writing the data, the X coordinate automatically increases by 1, and the line is automatically wrapped after a line is filled. The Y coordinate can also be automatically increased by 1. The connection between the microcontroller and the LCD display is shown in Figure 3.
Figure 3 MCU and TFT LCD connection diagram
2 System Software Design
This system consists of a transmitter and receiver consisting of an STC12C5A60S2 single-chip microcomputer and an nRF24L01 wireless transceiver chip. The transmitter performs A/D conversion and wireless transmission through the single-chip microcomputer, and the receiver receives data through the nRF24L01 and sends it to the STC12C5A60S2 single-chip microcomputer for display and analysis. All configuration work of the wireless module nRF24L01 is completed through SPI, with a total of 30B configuration words. Generally, the Enhanced Shock BurstTM transceiver mode is adopted. In this working mode, the system programming will be simpler and the stability will be higher. The configuration word of Enhanced Shock BurstTM enables nRF24L01 to process the RF protocol. After the configuration is completed, during the operation of nRF24L01, only the content in the lowest byte can be changed to switch between the receiving mode and the transmitting mode. The data flow is shown in Figure 4.
Figure 4 MCU program flow chart
3 Conclusion
This paper designs a small, lightweight, low-power EEG signal acquisition and wireless transmission system based on a single-chip microcomputer. The STC12C5A60S2 single-chip microcomputer is selected as the main controller, and its two SPI modules are used to control nRF24L01 and TFT6448BS-5.7 respectively to realize WiFi wireless transmission and waveform display of EEG signals. This system does not require a PC, and both control and display are completed by a single-chip microcomputer. Due to its easy portability and high integration, it can provide a feasible solution for the diagnosis of EEG diseases in poor mountainous areas with insufficient medical resources.
Previous article:Smart home control system based on mobile phone remote control and Internet of Things technology
Next article:Mixed programming of C and assembly and the method of using C++ to reference C function library
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- Is the 50HZ electromagnetic wave a single independent quantum like the photon of visible light? After all, the size is too large?
- FAQ_ How to implement RX-TX switching control
- Thank you for being there + bow deeply
- How to view the complex technical documentation of TI DSP
- Please help analyze this circuit.
- kicad-eda_6-layer-pcb_A64-OlinuXino_Rev_D
- The wheel speed pulse signal of the car is too narrow, and the sampling frequency of the equipment is too low to collect it. Is there any way to extend the pulse width?
- Battery Test Equipment --- Signal Chain
- iTOP-4418 development board TF card burning-boot uboot
- LSM6DSL cannot generate interrupts, WAKE_UP_SRC is always 0; changing CTRL1_XL doubles the Z-axis reading