Bidirectional brain-computer interface device and system supporting wireless dual-mode transmission and use method
By designing a two-way brain-computer interface device that supports wireless dual-mode communication, the existing system has large size, low number of channels, single communication mode and poor human-computer interaction, and a small portable, high number of channels and efficient, flexible and stable brain-computer interface system is achieved, which is suitable for diverse neuroscience research and clinical applications.
Patent Information
- Application Number
- CN202411695720.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-04-11
AI Technical Summary
The existing wireless brain-computer interface system has problems such as large size and weight, low number of channels, single communication mode and poor human-computer interaction, which limits its application in neuroscience research and clinical applications.
A two-way brain-computer interface device supporting wireless dual-mode communication is designed, adopting a highly integrated stacked hardware architecture, integrating Bluetooth and Wi-Fi communication modules, supporting sampling and stimulation of 16 channels, and real-time visualization and functional control are achieved through the upper computer.
It realizes a small portable, high channel number, dual-mode transmission and efficient, flexible and stable brain-computer interface system, which improves the portability and interactivity of the system, and is suitable for diversified neuroscience research and clinical applications.
Smart Images

Figure CN119806313A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of brain-computer interface technology, and in particular to a bidirectional brain-computer interface device, system and use method supporting wireless dual-mode transmission. Background Art
[0002] An ideal brain-computer interface (BCI) system should have the ability to record multi-channel neural signals while providing customizable stimulation pulses. Multi-channel neural recording can synchronously collect a large amount of neuronal activity information, thereby helping researchers to fully understand the operating mechanism of neural networks. Customizable stimulation pulses can regulate neural activity at high temporal and spatial resolution, achieving precise control and treatment of brain function.
[0003] Existing BCI systems are divided into two types: wired and wireless, based on the data transmission method. The advantage of wired transmission is its high bandwidth and stability, which can meet the high sampling rate and data accuracy required for high-frequency neural action potential recording. However, wired systems have practical limitations in research and clinical applications. The connection of physical cables complicates the operation and limits the freedom of movement of the subjects, which has a significant impact on research and clinical applications such as gait analysis, rehabilitation training, and neural monitoring in daily activities. In addition, wired transmission may introduce additional external interference through the cable, thereby affecting the signal quality.
[0004] In contrast, wireless transmission technologies (such as low-power Bluetooth and Wi-Fi) are gradually being applied to brain-computer interface systems to solve many problems of wired systems. Wireless transmission provides subjects with greater freedom, allowing them to engage in activities in a natural behavioral environment. At the same time, wireless systems can reduce interference and system complexity caused by hardware connections. However, current wireless systems usually rely on battery power, and how to achieve high-speed and high-precision data transmission while maintaining miniaturization and lightweight is still a major challenge facing today.
[0005] Currently, most wireless systems use Bluetooth for data transmission, which is very suitable for long-term portable applications due to its low power consumption. However, Bluetooth has limited data throughput and cannot support high-frequency neural signal recording, so it is mainly used for recording low-frequency local field potentials (LFP). Although LFP has important clinical value in the diagnosis of neurological diseases, Bluetooth-based BCI systems cannot effectively record high-frequency neural spikes, limiting their application in the study of rapid neural activity and complex neural circuits.
[0006] On the other hand, Wi-Fi has a significantly higher transmission bandwidth, which can meet the high sampling rates required for high-frequency spike recording, making it an ideal choice for high-resolution neural data recording. However, the high power consumption of Wi-Fi limits its application in scenarios that require long-term monitoring, and battery life becomes a major challenge.
[0007] Current wireless BCI systems often rely on a single transmission mode, such as Bluetooth or Wi-Fi, which limits the flexibility and adaptability of the system in different application scenarios. Therefore, how to design a multi-mode system that can combine the advantages of the two transmission technologies has become a key direction to meet the diverse research and clinical needs in the future.
[0008] In the existing field of wireless brain-computer interface technology, there are the following main technical problems:
[0009] 1. Large size and weight
[0010] Most of the current wireless brain-computer interface systems, although they can provide a certain degree of portability, are still large in size and weight, which limits their application in long-term use and daily activities. The lack of portability is mainly reflected in the following two aspects:
[0011] 1) Power supply issue: Wireless BCI systems generally rely on battery power. In order to ensure the working life of the system, large-capacity batteries are usually required, but this will directly increase the size and weight of the device. The design of wireless brain-computer interface needs to consider sufficient battery capacity to meet the general experimental recording time, while also considering the impact of battery size on the portability of the overall device.
[0012] 2) Complexity of hardware structure: Existing wireless BCI systems focus more on functional integration in structural design. The hardware system usually integrates multiple discrete sub-modules, including functional sensors, core processors, wireless communication modules, and power management units. These modules usually require a relatively large physical space, which further increases the size and weight, making the device overall bulky. In contrast, an ideal system should integrate small components as much as possible, reduce size and weight, and achieve a lighter design.
[0013] 2. Low number of channels
[0014] Multi-channel recording and stimulation capabilities are crucial for brain-computer interface (BCI) systems. However, most existing wireless BCI systems usually support a small number of channels, which to some extent limits the in-depth study of neuronal activity. The specific problems are manifested in the following aspects:
[0015] 1) Limitation of the number of channels: Wireless systems have strict requirements on the size and weight of the equipment, which to a certain extent restricts the expansion of the number of system channels. Current devices usually only support neural recording and stimulation of a few channels. However, for actual neuroscience research and clinical applications, it is very meaningful to be able to achieve multi-channel recording and control of stimulation current, which will play a greater role in understanding the function of neural networks and disease treatment. Existing technologies generally have less than 8 channels, and the most common ones are 1, 2, 4, and 8.
[0016] 2) Insufficient on-chip processing power: Due to the limitations of hardware resources and power consumption, the existing system has insufficient on-chip processing power and cannot process a large number of neural signals at the same time. This lack of processing power may cause partial data loss, significantly affecting the overall performance of the system and the accuracy of signal recording. Therefore, improving the system's on-chip processing power is an important direction for promoting the development of BCI technology.
[0017] 3. Single communication mode
[0018] Existing wireless brain-computer interface systems mostly use a single communication mode, such as Bluetooth or Wi-Fi, which limits their adaptability in different application scenarios. The problems of a single communication mode are mainly reflected in the following aspects:
[0019] 1) Limitations of Bluetooth transmission: Bluetooth, especially Bluetooth Low Energy (BLE), is widely used in portable brain-computer interface systems due to its low power consumption. However, Bluetooth has limited data throughput and cannot support high-bandwidth data transmission, which makes it perform poorly when recording high-frequency neural activity. Therefore, Bluetooth is mainly used to record low-frequency signals, such as LFP, which also leads to its limitations in some scenarios that require high-precision, high-frequency data.
[0020] 2) Challenges of Wi-Fi transmission: Compared with Bluetooth, Wi-Fi has higher bandwidth and data transmission rate, and can support the recording of high-frequency neural spikes (spike signals) and multi-channel, large-scale data transmission. However, the high power consumption of Wi-Fi makes it unsuitable for application scenarios that require long-term monitoring. Especially in some portable or long-term monitoring applications, the high energy consumption of Wi-Fi will significantly shorten the battery life of the device and affect the user experience.
[0021] 3) Lack of multi-mode system: Current wireless BCI systems only support single transmission modes of Bluetooth or Wi-Fi, and lack a multi-mode communication solution that combines the advantages of both. An ideal multi-mode system should be able to autonomously switch communication modes according to application scenarios: use Bluetooth transmission in low-power scenarios, and switch to Wi-Fi transmission when high bandwidth is required, ensuring that the system can achieve the best balance between performance and energy efficiency in different application scenarios.
[0022] 4. Poor human-computer interaction
[0023] In terms of human-computer interaction, the current wireless brain-computer interface system still has some shortcomings. The software function design of most systems is relatively simple and difficult to meet personalized needs. In addition, when dealing with complex multi-channel real-time signal filtering, the interface update and operation response may be significantly delayed due to computer resource scheduling issues. These factors combined make the current system perform poorly in human-computer interaction performance. Summary of the invention
[0024] The purpose of the present invention is to provide a bidirectional brain-computer interface device, system and method of use that support wireless dual-mode communication, so as to achieve small size, portability, dual-mode transmission, and high efficiency, flexibility and stability.
[0025] In order to achieve the above-mentioned purpose, the present invention provides a bidirectional brain-computer interface device supporting wireless dual-mode communication, which includes a main board, a sub-board and a battery stacked in sequence, the main board and the sub-board are directly welded and connected through a plurality of pin headers, and the battery is welded on two specific pads of the main board; the main board is configured to coordinate and dispatch various work tasks of the bidirectional brain-computer interface device, drive the collection and distribution of data streams and control the sub-board; the main board is integrated with a wireless communication module supporting Bluetooth communication mode and Wi-Fi communication mode, and the main board is provided with a corresponding onboard antenna; the sub-board is connected to the electrode female port of the front-end invasive electrode array through the electrode male port, and is configured to collect EEG signals and stimulate the implanted brain area.
[0026] The processor adopts an MCU chip of model ESP32C3, and is connected to a high-speed SPI controller, GPIO port, DMA buffer area, two independent general timers and an onboard antenna to support the dual-mode sampling characteristics of the bidirectional brain-computer interface device; the SPI controller adopts the SPI transmission protocol to realize communication between the processor and the daughter board, and the GPIO port is the input and output port of the processor; the timer is used to generate accurate clock pulses; the onboard antenna is used to realize Bluetooth communication mode and Wi-Fi communication mode.
[0027] The number of the DMA buffer areas is 2.
[0028] The main board is provided with a magnetically controlled switch connected to the battery, and the magnetically controlled switch is manually opened by a magnet.
[0029] The main board is also provided with a micro-USB port, and a charging module is provided between the battery and the micro-USB port; the battery is connected to the processor and the daughter board via a magnetically controlled switch and a bidirectional charge pump chip, and the battery is also connected to the daughter board via a magnetically controlled switch and an inverter power supply; the bidirectional charge pump chip adopts a bidirectional charge pump chip TPS63001, and the inverter power supply adopts an LTC1983 chip.
[0030] The daughter board adopts the RHS2116 chip, which supports sampling and stimulation of a maximum of 16 channels.
[0031] The bidirectional brain-computer interface device is configured to use a Bluetooth communication mode when collecting local field potentials of non-full channels, and to use a Wi-Fi communication mode when collecting local field potentials of full channels or collecting spike signals of two channels.
[0032] The size of the main board is 18×26.4 mm, the weight of the main board is 6.2 g, the size of the sub-board is 18×16.5 mm, and the battery adopts a 3.7V and 90mah rechargeable lithium battery.
[0033] On the other hand, the present invention provides a bidirectional brain-computer interface system supporting wireless dual-mode communication, including a bidirectional brain-computer interface device supporting wireless dual-mode communication as described above and a host computer connected to the bidirectional brain-computer interface device for communication therewith, the host computer being equipped with a Bluetooth module for supporting the Bluetooth communication mode and a router for supporting the Wi-Fi communication mode; the host computer is configured to select a work task, and the selection of the work task includes the selection of the communication mode and the functional control of sampling and stimulation and the real-time visualization of data.
[0034] On the other hand, the present invention provides a working method of a bidirectional brain-computer interface system supporting wireless dual-mode communication, comprising:
[0035] S0: Build a bidirectional brain-computer interface system supporting wireless dual-mode communication as described above;
[0036] S1: After the bidirectional brain-computer interface device is powered on, the Bluetooth communication mode and the WI-FI communication mode are initialized, and the pairing signal sent by the host computer is started to be monitored;
[0037] S2: The host computer selects the required communication mode to send a pairing signal corresponding to the communication mode to the bidirectional brain-computer interface device, so that the bidirectional brain-computer interface device completes the selection and pairing of the communication mode after recognizing the pairing signal;
[0038] S3: The host computer selects work tasks and configures function parameters through the GUI interface;
[0039] S4: The processor receives the configuration instructions from the host computer, configures the functional parameters of the hardware resources of the bidirectional brain-computer interface device according to the configuration instructions, and then takes over the hardware resources and executes the scheduling tasks.
[0040] The working tasks include sampling tasks, stimulation tasks, impedance testing tasks and mode selection tasks.
[0041] The bidirectional brain-computer interface device supporting wireless dual-mode communication of the present invention ensures good portability and practicality on the basis of small size and light weight, and has a large number of channels (supporting 16 channels), and supports low-power Bluetooth (BLE) and Wi-Fi wireless transmission, and flexibly realizes real-time sampling and precise electrical stimulation control of neuronal activity, while ensuring low power consumption and high data rate. In addition, the bidirectional brain-computer interface system is combined with a matching host computer, so that users can independently adjust sampling and stimulation parameters and realize real-time observation of neural signals, providing effective technical support for diversified neuroscience research and clinical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a structural block diagram of a bidirectional brain-computer interface system supporting wireless dual-mode transmission of the present invention.
[0043] Figure 2 It is an exploded view of a bidirectional brain-computer interface device supporting wireless dual-mode transmission according to the present invention.
[0044] Figure 3 and Figure 4 It is a schematic diagram of the overall structure of a bidirectional brain-computer interface device supporting wireless dual-mode transmission at different viewing angles of the present invention.
[0045] Figure 5 It is a waveform diagram of stimulation signals of two modes of biphasic stimulation adopted by a bidirectional brain-computer interface device supporting wireless dual-mode transmission of the present invention.
[0046] Figure 6 This is a waveform diagram of the generated step voltage value change that generates a smooth sine wave through the second-order low-pass filter inside the daughter board. The horizontal axis in the figure is time and the vertical axis is the voltage value.
[0047] Figure 7 It is a schematic diagram of the user interface of a host computer of a bidirectional brain-computer interface system supporting wireless dual-mode transmission of the present invention. DETAILED DESCRIPTION
[0048] The bidirectional brain-computer interface device and system supporting wireless dual-mode transmission of the present invention combines cutting-edge technologies in the fields of neuroscience, microelectronics, and computer science, aiming to significantly improve the portability and interactivity of the system through innovative design of software and hardware. This solution provides a novel, reliable, and efficient technical solution for neurological research and biomedical engineering, helping to promote in-depth exploration and application in related fields. For a bidirectional brain-computer interface system, bidirectional means that it can both record signals from brain neurons and generate current through the device to stimulate brain neurons.
[0049] like Figure 1 Shown is a structural block diagram of a bidirectional brain-computer interface system supporting wireless dual-mode communication according to an embodiment of the present invention. Figure 2 It is an exploded view of a bidirectional brain-computer interface device supporting wireless dual-mode transmission according to the present invention. Figure 3 and Figure 4 It is a schematic diagram of the overall structure of a bidirectional brain-computer interface device supporting wireless dual-mode transmission at different viewing angles of the present invention.
[0050] like Figure 1-Figure 4As shown, the bidirectional brain-computer interface system supporting wireless dual-mode communication of the present invention includes a bidirectional brain-computer interface device 100 and a host computer 200 communicatively connected thereto.
[0051] The bidirectional brain-computer interface device 100 is fixed to the head of the target to be tested.
[0052] The bidirectional brain-computer interface device 100 adopts a highly integrated stacked hardware architecture, including a main board 110, a sub-board 120, and a battery 130 for powering the main board 110 and the sub-board 120. The main board 110 and the sub-board 120 are directly welded to each other through a plurality of pin headers, and the battery is welded to two specific pads of the main board 110. Then, the main board 110, the sub-board and the battery 130 are directly wrapped together with insulating tape to achieve normal use.
[0053] In other embodiments, the main board 110, the sub-board 120 and the battery can also be arranged together in a storage shell, and the storage shell is obtained by 3D printing. The upper inner groove of the storage shell is used to place the battery, and the lower cavity is used to place the main and sub-boards.
[0054] The main board 110 is the core control unit of the bidirectional brain-computer interface device 100, which includes a processor 111, which is responsible for coordinating and scheduling various tasks of the bidirectional brain-computer interface device 100, driving the collection and distribution of data streams and controlling the sub-board 120. The sub-board 120 is a sampling and stimulation unit, which is connected to the electrode female port of the front-end invasive electrode array through the electrode male port, and is responsible for collecting EEG signals and stimulating the implanted brain area. The battery 130 is a rechargeable lithium battery, which is used to provide offline energy for the entire bidirectional brain-computer interface device 100.
[0055] The host computer 200 uses Qt software as a development framework, and selects work tasks through a GUI interface. The selection of work tasks includes the selection of communication modes, functional control of sampling and stimulation, and real-time visualization of data, to achieve personalized human-computer interaction.
[0056] like Figure 2 to Figure 4As shown, the size of the main board 110 is 18×26.4mm (excluding the onboard antenna), the length and width of the sub-board 120 are 18×16.5mm, and the battery 130 uses a nominal 3.7V 90mah rechargeable lithium battery (taisko501220). Both the main board 110 and the sub-board 120 are designed with a 4-layer PCB board, each with a separate layer of complete ground plane, and have good heat dissipation and anti-interference capabilities. The main board 110 is connected back to back to the sub-board 120 through 8 pin headers, and the battery 130 uses two positive and negative cables to respectively connect to the two reserved pads on the main board 110. The molded main board 110 has a gross weight of 6.2g (including 2g of battery), and the three-dimensional dimensions are 18×26.4×15mm, so the volume and weight of the bidirectional brain-computer interface device 100 can meet the daily experimental tests of mice and rats.
[0057] Sub-board 120 uses a RHS2116 chip, which is dedicated to physiological electrical signal sampling and supports sampling and stimulation of up to 16 channels. The internal circuit structure of the RHS2116 chip is as follows: Figure 1 As shown, it includes 16 channel electrodes 121 and a reference electrode 122, each channel electrode 121 is connected to an external electrode through an interface on a daughter board 120 and is connected to a stimulator 124, each channel electrode 121 and a reference electrode 122 are connected to two input ends of a front-end analog amplifier 123, and all front-end analog amplifiers 123 are connected to a multiplexer 127, which is connected to a digital controller 126 through a 16-bit high-speed and high-precision ADC 125. The multiplexer 127 is used to select a channel, poll 16 channels, and then send them to the ADC in sequence for analog-to-digital conversion. As a result, the external microvolt-level small physiological signal is amplified with high fidelity through the front-end analog amplifier 123 and quantized by the 16-bit high-speed and high-precision ADC after passing through the multiplexer 127, and then taken by the digital controller 126 in a timely manner according to external instructions.
[0058] The stimulator 124 is used to output the stimulation current to the channel electrode 121, and includes an internal register, a stimulation power supply, and a multi-stage current mirror circuit connected in sequence. Therefore, after the stimulation current is configured by the stimulation power supply through the internal register, the voltage source is converted through the multi-stage current mirror circuit (increasing the output resistance) to form a constant current source to output a stable stimulation current, and the instruction frame can be customized to program the pulse width and amplitude of the stimulation waveform, supporting a maximum stimulation current of 2.55mA (supporting multi-channel concurrency), and its 2.4uV low input noise floor and high-speed and high-precision ADC play an important role in the accurate and efficient sampling of this system.
[0059] The mainboard 110 is provided with a wireless communication module supporting Bluetooth communication mode and Wi-Fi communication mode and a corresponding onboard antenna 117, and the host computer 200 is equipped with a Bluetooth module 210 for supporting Bluetooth communication mode and a router 220 for supporting Wi-Fi communication mode. Therefore, the bidirectional brain-computer interface system supporting wireless dual-mode communication of the present invention can realize low-power Bluetooth (BLE) and Wi-Fi dual-mode communication, realize low-power Bluetooth communication mode and Wi-Fi communication mode that can be switched between each other, and expand the application scenarios of the bidirectional brain-computer interface device 100.
[0060] Among them, in the Bluetooth communication mode, the Bluetooth module on the mainboard 110 is used to realize point-to-point communication with the mobile phone APP or the host computer 200 on the computer side, which is convenient and flexible to be used in low-power scenarios that do not pursue high sampling rates, such as the local field potential (LFP) of EEG signals. Not pursuing the sampling rate specifically refers to a single-channel sampling rate greater than 600 times. In this embodiment, the Bluetooth mode is mainly suitable for collecting brain LFP signals (low-frequency field potentials), and its signal frequency is lower than 300Hz, and the amplitude is <±5mV; the maximum sampling rate in the Bluetooth mode is currently set to 900 times / s per channel. The so-called low power consumption means that compared with Wi-Fi, the working time of the Bluetooth of this device is significantly longer than that of Wi-Fi. In this embodiment, the actual power consumption of Bluetooth is 390mW, and the Bluetooth battery life is nearly 1 hour.
[0061] The Wi-Fi communication mode is configured as a workstation mode. A router 220 outside the bidirectional brain-computer interface device 100 is used to build a local area network. The router 220 is used as a transmission medium. The bidirectional brain-computer interface device 100 is used as a server, and the host computer 200 is used as a client to communicate within the network. The onboard antenna is used to receive signals (such as Figure 2 ), the received signal will be demodulated and restored by the signal processing module on the MCU, which will be completed in the wireless communication module of the processor. The Wi-Fi communication mode is based on the 802.11b / g / n standard and can be applied to scenarios that pursue high sampling rates to capture the local field potential (LFP) of all channels, or the spike signals of individual channels (currently supporting optional dual channels). High sampling rate means that a single channel is >6000 times. Of course, the higher the sampling rate, the higher the signal time resolution. In this embodiment, the bidirectional brain-computer interface device 100 can currently support the free selection of 2 channels for 28,400 sampling of a single channel. The actual power consumption of Wi-Fi is 600mW, and the Wi-Fi battery life is more than 30 minutes (ordinary experimental requirements are generally 10-20 minutes).
[0062] That is to say, the bidirectional brain-computer interface device is configured to use the Bluetooth communication mode when collecting local field potentials of non-full channels, and to use the Wi-Fi communication mode when collecting local field potentials of full channels or collecting spike signals of one or two channels.
[0063] In this embodiment, a wireless communication module supporting Bluetooth communication mode and Wi-Fi communication mode is integrated on the processor 111 of the mainboard 110. Specifically, the processor 111 uses a highly integrated MCU chip of model ESP32C3 from Espressif Systems (China), which is a low-power, highly integrated system-on-chip (SoC). The CPU of the MCU chip is based on the RISC-V reduced instruction set and integrates a variety of peripherals as well as 2.4GHz Wi-Fi and low-power Bluetooth ( The SPI controller uses the SPI transmission protocol to realize the communication between the processor 111 and the daughter board 120. The GPIO port 118 is the input and output port of the processor 111. The data from the daughter board 120 enters the processor 111 through the GPIO port 118, which is equivalent to the physical connection entrance of the processor 111. The timer is used to generate precise clock pulses to control certain timing functions, such as the time of the stimulation signal. The Bluetooth module in the onboard antenna provides the hardware basis (modulation signal, demodulation signal, etc.) for completing Bluetooth communication, and the Wi-Fi module in the onboard antenna is the same. Therefore, the SPI controller transfers the data in the memory (such as RAM memory) of the processor 111 to the daughter board 120; at the same time, the data received from the daughter board 120 can also be transferred to the DMA buffer (direct memory access buffer) of the processor 111, and then sent to the host computer 200 through the onboard antenna. The GPIO port 118 is a physical port for realizing the above process, which is responsible for input and output.
[0064] See also Figure 1 The bidirectional brain-computer interface device 100 supporting wireless dual-mode transmission of the present invention is different from the traditional brain-computer interface device. Considering the large size of the physical switch and the frequent switching on and off of the subject's head, which may affect the convenience of the experiment to a certain extent, the main board 110 is provided with a magnetically controlled switch 112 connected to the battery 130 to replace the commonly used physical switch. The magnetically controlled switch 112 is manually opened by a magnet, and is opened when the n-pole of the magnet approaches the magnetically controlled switch 112, and is closed when the s-pole of the magnet approaches the magnetically controlled switch 112.
[0065] The magnetically controlled switch 112 is formed by coupling a bipolar Hall effect switch with a PMOS tube that supports large current flow, and is implemented through a local circuit composed of two devices, TMR3102 and NX2301P. In actual switch testing, the fast response of 30ms and the response life of more than tens of thousands of times improve the reliability of the system power switch.
[0066] In this embodiment, the mainboard 110 is also provided with a micro-USB port 113, which can be used to charge the battery 130 and perform subsequent firmware upgrades by connecting an external DC power supply 300 through the micro-USB port 113; in other embodiments, a cable can also be used to connect an external DC power supply 300 to directly power the bidirectional brain-computer interface device 100 and charge the battery 130 at the same time. Once the external DC is cut off, the system board automatically switches to being powered by the battery 130, and the power switching process is seamless and stable, and will not affect the normal operation of the system.
[0067] A charging module 114 is provided between the battery 130 and the micro-USB port 113. In this embodiment, the charging module 114 uses a TP4056 charging management chip, which has multiple charging and throttling modes for various battery working conditions, which can fully and effectively utilize the limited number of cycles of the battery, thereby extending the battery life. In addition, the mainboard 110 is also provided with a power-on indicator light (a red light is on when the system power supply is normal) and a charging indicator light (mainly controlled by the charging module 114, a red light is on when charging is in progress, and a blue light is on when fully charged), so as to provide timely feedback on the current system status.
[0068] The battery 130 is connected to the processor 111 and the daughter board 120 through the magnetically controlled switch 112 and the bidirectional charge pump chip 115. In this embodiment, in order to provide the MCU and RHS2116 with a high-quality power supply with low ripple and take into account the miniaturization of components and the high current output, the bidirectional charge pump chip 115 adopts a bidirectional charge pump chip (TPS63001) of TI, which supports a stable output of 3.3V working voltage. When the battery power is sufficient, it is similar to a traditional LDO (low-dropout linear regulator) and supports a maximum output current of 1200mA. As is known to all, lithium batteries are prone to unstable power supply when the power is low, which will cause the instability or even interruption of the real-time data flow of the system, greatly reducing the effective working time of the system. The bidirectional charge pump chip (TPS63001) can automatically switch to boost mode when the battery voltage is low, and can still output a maximum current of 800mA. In both cases, it is sufficient to cope with the high-load scenario when the system works uninterruptedly in Bluetooth / WI-FI communication mode.
[0069] The battery 130 is also connected to the daughter board 120 through the magnetically controlled switch 112 and the inverter power supply 116. The inverter power supply 116 uses the LTC1983 chip to provide a negative voltage for use as a stimulation voltage source, and the maximum supported output is up to 100mA, which is also sufficient to cover the use requirements of the daughter board 120 (ie, the RHS chip) to achieve sampling and stimulation functions.
[0070] Experiments have shown that after more than 200 charge and discharge record tests, the battery's fully charged voltage can still reach 4.0V. Therefore, the bidirectional brain-computer interface device 100 of the present invention uses a lithium battery 130 and a USB dual-rail power supply system, which enhances the anti-interference ability and service life of the bidirectional brain-computer interface device.
[0071] Specifically, the working method of the bidirectional brain-computer interface system supporting wireless dual-mode communication of the present invention is as follows:
[0072] Step S0: Building the bidirectional brain-computer interface system supporting wireless dual-mode communication as described above;
[0073] Step S1: After the bidirectional brain-computer interface device 100 is powered on, the Bluetooth communication mode and the WI-FI communication mode are initialized, and the pairing signal sent by the host computer is started to be monitored;
[0074] Among them, powering on the bidirectional brain-computer interface device 100 means that the magnetically controlled switch is turned on.
[0075] After the bidirectional brain-computer interface device 100 is powered on, it also includes: resetting the processor 111 (i.e., the ESP32C3MINI chip) to perform hardware initialization and verification processes for the bidirectional brain-computer interface device 100 to start normal operation. Thereafter, the first and second level boot programs load the custom program in the Flash storage area into the core code segment. According to the actual development orientation, the relevant peripheral registers are reasonably configured to achieve the target function.
[0076] During hardware initialization, the GPIO port 118 is allocated to match the IO port settings on the PCB board. For example, in this embodiment, the 4 lines of the SPI controller are respectively configured to the 4 designated ports on the GPIO port 118 and are correspondingly connected to four of the pin header ports of the main board 110 and the daughter board 120, so that the GPIO port 118 can output the control signal generated by the processor 111 and receive the signal from the daughter board 120. The other 4 pin header ports on the main board 110 and the daughter board 120 are connected to different power rails and analog and digital grounds, and each pin header port is only connected to one signal.
[0077] When performing hardware initialization, two DMA buffers of equal size are configured for the processor 111 to form a double buffer structure, which is used to balance the data flow rate of high-speed sampling and the transmission frequency of the RF module, so as to improve the response speed of the system and the real-time bandwidth of the data flow. Specifically, when the daughter board 120 starts sampling, once the SPI controller receives the measured data, it will write data into the DMA buffer, which represents the numerical value of the signal amplitude, and its format is a 32-bit data frame. When one of the DMA buffers is full, it will automatically switch to another DMA buffer, and the onboard antenna will read the data from the full DMA buffer and package it into a large data block to send out.
[0078] Thus, data comes from the daughter board 120, then passes through the SPI controller (spi protocol) on the processor 111, is received by the SPI controller and then placed in the specified DMA buffer area, and then sent to the RAM memory of the processor 111, and then finally sent to the host computer 200 through the onboard antenna for subsequent processing (such as filtering, visualization, etc.).
[0079] In step S1 , the specific process of initializing Wi-Fi is encapsulated into a function so as to be called and executed by the processor 111 of the mainboard 110 .
[0080] The specific process of initializing the Wi-Fi communication mode is as follows: NVS initialization, TCP / IP core initialization (to ensure data reliability, TCP transmission protocol is adopted), Wi-Fi driver initialization, Wi-Fi mode and parameters configuration and Wi-Fi startup.
[0081] The specific process of initializing the Bluetooth communication mode is similar to the specific process of initializing the Wi-Fi communication mode. The specific process of initializing the Bluetooth communication mode is as follows: the Bluetooth controller is initialized, the host stack is initialized and the BLE protocol stack (Bluetooth stack) is started, GAP and GATT services and the callback functions associated with them are registered to handle corresponding events, broadcast parameters are configured, broadcast data (device name, UUID), etc. are set, and finally broadcast is started to wait for pairing connection.
[0082] Step S2: The host computer 200 selects the required communication mode to send a pairing signal corresponding to the communication mode to the bidirectional brain-computer interface device 100, so that the bidirectional brain-computer interface device 100 completes the selection and pairing of the communication mode after recognizing the pairing signal;
[0083] Since step S1 has completed the initialization of Wi-Fi and Bluetooth, the device starts to listen for connection requests from the outside. The host computer determines the required communication mode through autonomous communication mode selection, and sends a pairing signal corresponding to the communication mode to the device. The bidirectional brain-computer interface device 100 will actively identify and respond to the pairing signal to achieve the corresponding communication mode, and suspend another communication mode to release related resources.
[0084] That is to say, after the MCU is powered on, both Bluetooth and WI-FI will be initialized, and both modes will enter the listening state. This is done automatically by default and does not need to be set again. If the host computer then tries to interact in Bluetooth communication mode, the processor 111 will automatically trigger the Bluetooth communication mode, stop the WI-FI communication mode, and recycle the relevant hardware resources; conversely, if the host computer uses the WI-FI communication mode to interact, the processor 111 will automatically trigger the WI-FI communication mode and stop the Bluetooth communication mode.
[0085] Step S3: The host computer 200 selects the work task (communication mode selection, sampling, stimulation) and configures the function parameters (sampling rate, etc.) through the GUI interface;
[0086] Step S4: the processor 111 receives the configuration instruction from the host computer, configures the functional parameters of the hardware resources of the bidirectional brain-computer interface device 100 (timer, SPI controller, etc.) according to the configuration instruction, and then the processor 111 takes over the hardware resources and executes the scheduling task;
[0087] Due to the real-time and complexity of system interaction, the present invention installs a lightweight real-time operating system FreeRTOS on the processor 111 of the mainboard 110. Therefore, after the processor 111 configures the relevant hardware according to the configuration instructions, the subsequent resource scheduling and logic implementation are taken over by the real-time operating system FreeRTOS to achieve reasonable planning and scheduling of the entire workflow.
[0088] In this embodiment, the work tasks of the processor 111 are divided into four core tasks, including a sampling task, a stimulation task, an impedance test task, and a mode selection task. The sampling task is responsible for the logical implementation of sampling; the stim task is used to implement stimulation; the impedance test task is used to complete the electrode impedance test; the mode selection task is used to select and schedule the communication mode, thereby realizing the wireless radio frequency function and sending the sampled data. In other embodiments, the work tasks of the processor 111 can be increased or decreased according to demand.
[0089] Sample task:
[0090] In the actual sampling task, the SPI controller inside the processor 111 continuously executes and saves CPU overhead through the DMA buffer mechanism to realize data transfer from the peripheral to the RAM memory of the processor 111. In the present invention, a mechanism of alternating between two DMA buffers is set, and by testing multiple parameters related to sampling in the hardware system, such as the clock frequency of the SPI controller, the transaction queue length, the DMA buffer size, the SPI control mode, etc., a balance point that can adapt to the MCU processor speed and most communication states (i.e., the optimal values of these parameters) is found to improve the possible delay of wireless transmission and the blocking of the system.
[0091] It should be noted that the present invention establishes an error monitoring mechanism for the DMA buffer area to prevent the limited DMA buffer area from being erroneously overwritten during the execution of the sampling task. Once this error occurs due to the mismatch of data flow rate, the system error handling mechanism is immediately entered, which is event-driven and processed in the relevant callback function.
[0092] It is foreseeable that severe blocking events may also occur under certain communication conditions, but this rarely happens. If this happens, the error supervision mechanism here will take over and temporarily stop sampling until the bidirectional brain-computer interface device 100 returns to normal (this is usually a short 1-2 milliseconds).
[0093] Stim task:
[0094] In this embodiment, the bidirectional brain-computer interface device 100 supports two modes of biphasic stimulation. The polarity of the biphasic stimulation can be distinguished from the initial pulse polarity (positive polarity first or negative polarity first), and the waveform shape can be arbitrarily programmed. Figure 5 Stimulation signals for the two modes of biphasic stimulation are shown.
[0095] Before the host computer 200 starts stimulation, the functional parameters of the stimulation task (stim task) should be configured, such as three levels of pulse width (1, 2, 5ms), pulse amplitude (510uA, 1.275mA, 2.55mA). Currently, only these three amplitudes are supported. The polarity of biphasic stimulation can be distinguished from the initial pulse polarity (positive polarity first or negative polarity first), and the waveform shape can be arbitrarily programmed and controlled. Every time the stimulation button is clicked at the host computer 200, a stimulation signal will be triggered through remote control. The device will form a waveform with a specific pulse width, amplitude, and initial polarity according to the configured parameters, and perform 10 consecutive pulses to complete a stimulation task. This can also be manually triggered repeatedly according to needs during actual use to achieve the purpose of continuous stimulation.
[0096] Specifically, the stimulation-related digital registers of the stimulator 124 of the daughter board 120 are first configured in compliance using a 32-bit SPI controller, and the global step size and bias voltage of the 8-bit DAC current source inside the stimulator 124 are configured. Different global step sizes will change the upper limit of the stimulation current and the fine-tuning spacing of each electrode channel. The amplitude of the channel is uniformly configured to the maximum value under the current step size, and wait for the stimulation start instruction. Therefore, in step S4, the main board 110 decodes the 1-byte configuration instruction sent from the host computer and generates corresponding functional parameters (the generated functional parameters include sampling rate, stimulation mode, pulse width, pulse amplitude, each parameter occupies 2 bits, a total of 8 bits in length, that is, one byte), and accordingly configures the hardware resources of the bidirectional brain-computer interface device 100 such as the processor 111 and its peripherals (such as the clock frequency of the timer, the automatic reload threshold); then, the processor 111 takes over the hardware resources, and at this time the threshold of the timer triggers the interrupt callback function to set the event flag to the operating system of the processor 111 to activate the stimulation task (stim task) to periodically refresh the register of the sub-board 120 to complete 10 complete pulse cycles.
[0097] Among them, the pulse width in the decoded parameters is controlled by a timer. Automatic reload threshold / clock frequency = pulse period / 4 = required pulse time length. When the pulse width of the stimulus is determined, the pulse time length will also be determined, and then the timer will be used to generate this pulse time length. Once the pulse time length is reached, the interrupt callback function will be used to trigger the stimulus task (stim task). From the start of the stimulus task (stim task), one pulse period will be completed every 6 register refreshes.
[0098] Impedance test task (reserved task):
[0099] The impedance test task is responsible for scheduling and controlling the entire process of the impedance test. In order to test the impedance of each channel of the channel electrode 121 connected to the bidirectional brain-computer interface device supporting wireless dual-mode transmission of the present invention, the present invention uses the 1.225V reference voltage source inside the daughter board 120 (i.e., the RHS chip) to generate a test current of a specific frequency and amplitude to apply excitation to the electrode.
[0100] Specifically, when 1 kHz is selected as the frequency of the test current, the bidirectional brain-computer interface device supporting wireless dual-mode transmission of the present invention designs the test voltage v(t) as:
[0101] v(t)=0.6125×sin(2π×1000×t)+0.6125,
[0102] Among them, t is the time.
[0103] First, the processor 111 of the control main board 110 sends a configuration instruction to the daughter board 120 (through the timer of the processor 111 for timing constraints), and the output DAC of the reference voltage (i.e., the step voltage value) is periodically set to 20 values of 128, 170, 207, 235, 252, 256, 245, 222, 189, 149, 107, 67, 34, 11, 0, 4, 21, 49, 86, and 128. At this time, the step voltage value change that has been generated is passed through the second-order low-pass filter inside the daughter board 120 to generate a smooth sine wave (such as Figure 6 As shown), it is used as the test voltage and then passes through a variable capacitor Cs to generate a test current i(t) that satisfies the following formula:
[0104] i(t)=2π×1000×Cs×0.6125×cos(2π×1000×t),
[0105] Wherein, Cs is the capacitance of the variable capacitor and t is the time.
[0106] At the same time, the present invention selects a sampling frequency of 20kHz to perform synchronous voltage sampling on a certain electrode channel 121 that is currently performing impedance testing, and the values of the 20 points collected for each sine wave are called Zcheck_DAC[1]~Zcheck_DAC
[20] . In this way, each channel will record 100×20=2000 data samples in 100 cycles under a specific Cs capacitance value (10pF). At this time, the periodic response of the amplifier on a certain electrode channel to 100 1000Hz Zcheck current injections is obtained.
[0107] The specific execution flow of the processor 111 on the daughter board 120 is as follows (this is a one-time execution flow of a specific Cs capacitor under a single channel): First, set the internal register 2 of the daughter board 120 to Zcheck en=1, Zcheck DAC power=1, Zcheck load=0 (bit fields of register 2), and keep these bits unchanged until all impedance tests are fully completed; set register 2 to Zcheck select=channel 0 and Zcheck_scale=00; Loop 100 times { Loop 20 times, n = 1 to 20 { Set register 3 to Zcheck_DAC[i] Sample the voltage value of the amplifier channel once} } Next, the above cycle is repeated for all 16 channel electrodes 121 , and then the variable capacitance value Cs is changed to other two capacitance values (1 pF, 0.1 pF) by configuring the Zcheck_scale bit of register 2 and the above cycle is repeated again.
[0108] So far, the impedance test of all 16 channel electrodes 121 has been completed. The data collected during the test will be cached in the RAM memory of the processor 111, and the onboard wireless radio frequency module (such as Wi-Fi or Bluetooth) will send a data packet to the host computer 200 in a timely manner (to prevent data coverage and loss) during the test. After receiving all the test data, the host computer 200 groups and calculates the above data with different values of the variable capacitance value Cs, uses Fourier transform to isolate and extract the required 1kHz frequency signal, and performs mathematical operations on it to find its amplitude and impedance angle to convert it into impedance. It is worth noting that since the three values of the variable capacitance value Cs correspond to three different test current sizes, the host computer 200 will check the sampling voltage of the same channel in the order of the variable capacitance value Cs from large to small. If voltage saturation occurs, it is replaced with a slightly smaller capacitor for calculation, and the final valid result is displayed on the user interface of the host computer 200.
[0109] Selected mode task:
[0110] In this embodiment, the switching between the low-power Bluetooth communication mode and the Wi-Fi communication mode is specifically implemented by the instruction of the scheduling task issued by the host computer 200.
[0111] For example, when the instruction selects Bluetooth sampling, FreeRTOS will schedule the sampling task and the mode selection task as the current main task, and coordinate the execution logic between the two to complete the corresponding sampling requirements. The mode selection task will select the Bluetooth BLE 5.0 / TCP protocol for wireless transmission. The Wi-Fi execution logic is the same as above, but the TCP protocol will be selected for wireless transmission.
[0112] The host computer 200 uses Qt software as a development framework, supports the GUI interface to realize the selection of communication mode, control of sampling stimulation and other functions, and real-time visualization of data, so as to realize personalized human-computer interaction. The software part of the host computer 200 includes three modules: communication module, data processing module and user interface module.
[0113] Communication module: responsible for wireless connection with the bidirectional brain-computer interface device 100, supporting bidirectional data transmission. The network and Bluetooth module library provided by Qt software is used, and the BLE 5.0 / TCP communication protocol is used between the host computer and the hardware end. The asynchronous communication method is used to improve data transmission efficiency and ensure real-time response.
[0114] Data processing module: receives and processes EEG signals from the bidirectional brain-computer interface device 100 in real time. A multi-threaded processing mechanism is implemented to ensure the smoothness of data processing and user interface interaction, and to prevent interface freezes caused by data processing blockage.
[0115] The data processing module is set to group the received EEG signal data into 16 channels and map them into different channel arrays; in addition, the data processing module also introduces the OpenCL parallel computing architecture, which can filter the signal in real time. Specifically, the received EEG signal is mapped to the GPU or multi-core CPU for parallel computing through the calculation on the OpenCL accelerated processor. OpenCL can efficiently perform parallel signal processing tasks, such as the implementation of the Butterworth filter. The filter is designed as a bandpass filter, which can remove uninteresting noise and useless frequency band signals.
[0116] The data of each signal channel is processed in blocks and passed to the OpenCL kernel in real time for filtering calculations, using the parallel characteristics of OpenCL to accelerate data processing. The processed signal is then passed back to the main thread through the data buffer and displayed graphically on the user interface. Through this architecture, the filtered data can be updated to the user interface in real time. Combined with the QCustomPlot graphics library, the signal data is displayed in a dynamic graphical way, allowing users to intuitively monitor the fluctuations and trends of EEG signals, ensuring the validity of the data and the real-time nature of the analysis.
[0117] like Figure 7 As shown, the user interface provided by the user interface module mainly includes a data visualization area, a control panel and a function tab.
[0118] Data visualization area (i.e. graphical display): displays the EEG signal waveform in real time. Users can customize the display effect through the waveform control toolbar.
[0119] Control panel (i.e. mode option control bar): users can easily select communication mode and set sampling rate, and all settings will take effect in real time. It can also display the current system communication mode, connection status, sampling time and other information.
[0120] Function tab: Users can easily select the specific functions currently needed, such as filtering, impedance testing, and stimulation, and support personalized configuration of the hardware resources of the bidirectional brain-computer interface device 100 according to needs, such as filtering order, cutoff frequency, stimulation waveform, pulse width and other parameters. The filtering function refers to the high-pass and low-pass filtering of the real-time collected EEG signal data through two filters, Butterworth or Bessel filtering, and then the results of the filtering calculation are displayed in real time in the interface window, so as to more intuitively monitor and capture key signals (spike signals). Users can select the filter order and cutoff frequency through the interface.
[0121] Portability: The present invention optimizes the software and hardware design to achieve a small size and light weight of the device. Its actual weight is only 6.2g and it is suitable for a wide range of experimental scenarios.
[0122] Optimize software and hardware design, including:
[0123] 1. Simplify circuit design, optimize user experience, and select high-performance small-size components ( Figure 1 The selection of core components and circuit connection methods can be regarded as optimized design) (such as bidirectional charge pump tps63001, inverter LTC1983, magnetic control switch design, highly integrated processor 111, high-performance charging module TP4056, etc.).
[0124] 2. Compact component layout. Factors such as heat dissipation and signal stability are also considered in the design of the main board and sub-board. For example, heat dissipation holes are added, power and signal lines are decoupled, and large-area grounding is used to reduce external signal interference.
[0125] 3. Software optimization is reflected in the firmware program running on the processor 111, which integrates multiple functions including dual-mode transmission communication into the same processor 111, and implements and schedules complex logic through the FreeRTOS system. In terms of data buffering, the DMA double buffer structure is used to achieve high-speed data throughput, while saving the overhead of the processor 111 and improving the performance and stability of the system;
[0126] 4. In addition, by introducing the OpenCL parallel computing architecture, the host computer can fully and efficiently utilize the computer's multi-core CPU, GPU and other hardware resources to realize real-time filtering operations on large amounts of data (such as high-order Butterworth and Bessel filters). In addition, the high cohesion, low coupling and multi-threaded architecture of the host computer avoids software interface delays and enhances runtime stability.
[0127] Support multi-channel sampling and stimulation: The system has multi-channel neural signal acquisition and stimulation functions. The Wi-Fi communication mode can achieve high-precision sampling and real-time monitoring of LFP and spike signals; the low-power Bluetooth mode mainly focuses on efficient monitoring of LFP signals. In addition, through the parameter configuration of the host computer software, the system can achieve concurrent stimulation of multiple channels.
[0128] In the present invention, since the daughter board 120 uses the RHS2116 chip to realize multi-channel, there are 16 electrode interfaces 1201 on the RHS2116 chip. In this embodiment, these electrode interfaces 1201 are electrode male interfaces, and these channels can be led out to the electrode interfaces 1201 on the daughter board 120, and then connected to the actual array electrodes. Existing similar devices use discrete components to build sampling or stimulation circuits. This method usually takes up a lot of volume (because a lot of devices need to be added), so there are only a few channels, and it does not have a stimulation function. It is well known that chip integration is obviously better than ordinary discrete component integration in terms of power consumption, miniaturization, and signal acquisition quality.
[0129] Support dual-mode wireless transmission: The bidirectional brain-computer interface device 100 integrates BLE and Wi-Fi dual-mode communication functions, and can independently select the appropriate communication mode according to actual needs. The BLE mode focuses more on low-power applications and is suitable for long-term signal monitoring; the Wi-Fi mode can achieve efficient transmission of large amounts of data (such as high-frequency sampling) to meet more application needs.
[0130] Humanized real-time interactive software: The bidirectional brain-computer interface system that supports wireless dual-mode communication realizes real-time visualization function through the host computer. It can process the collected EEG signals in real time and update the display. Combined with the visual operation interface, it improves the user's operating experience and interactivity.
[0131] In summary, the bidirectional brain-computer interface device of the present invention supports wireless dual-mode communication, ensures good portability and practicality on the basis of small size and light weight, and has a large number of channels (supporting 16 channels), and supports low-power Bluetooth (BLE) and Wi-Fi wireless transmission, and flexibly realizes real-time sampling and precise electrical stimulation control of neuronal activity, while ensuring low power consumption and high data rate. In addition, the bidirectional brain-computer interface system is combined with a matching host computer, so that users can independently adjust sampling and stimulation parameters and realize real-time observation of neural signals, providing effective technical support for diversified neuroscience research and clinical applications.
[0132] The bidirectional brain-computer interface device and system supporting wireless dual-mode communication of the present invention integrates many characteristics such as small portability, dual-mode transmission, and real-time interaction. It also has the advantages of high efficiency, flexibility, and stability. It can realize two-way interaction of neuronal activities and has broad application prospects, especially in the fields of neuroscience research, brain-computer interface technology, and clinical treatment. It is believed that it will be able to further effectively promote the development and application of related technologies in the future.
[0133] The above specific embodiments further illustrate the purpose, technical solutions and equipment of the present invention. It should be understood that the above description is only a specific embodiment and is not limited to the present invention. Any modification, equivalent replacement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A bidirectional brain-computer interface device supporting wireless dual-mode communication, characterized in that: It includes a main board, a sub-board and a battery stacked in sequence, the main board and the sub-board are directly welded and connected through a plurality of pin headers, and the battery is welded on two specific pads of the main board; The main board is configured to coordinate and dispatch various work tasks of the bidirectional brain-computer interface device, drive the collection and distribution of data streams and control the sub-boards; the main board includes a processor and is integrated with a wireless communication module that supports Bluetooth communication mode and Wi-Fi communication mode, and a corresponding onboard antenna is provided on the main board; The sub-board is connected to the electrode female port of the front-end invasive electrode array through the electrode male port, and is configured to collect EEG signals and apply stimulation to the implanted brain area.
2. The bidirectional brain-computer interface device supporting wireless dual-mode communication according to claim 1, characterized in that: The processor adopts an MCU chip of model ESP32C3, and is connected to a high-speed SPI controller, GPIO port, DMA buffer area, two independent general timers and an onboard antenna to support the dual-mode sampling characteristics of the bidirectional brain-computer interface device; the SPI controller adopts the SPI transmission protocol to realize communication between the processor and the daughter board, and the GPIO port is the input and output port of the processor; the timer is used to generate accurate clock pulses; the onboard antenna is used to realize Bluetooth communication mode and Wi-Fi communication mode.
3. The bidirectional brain-computer interface device supporting wireless dual-mode communication according to claim 2, characterized in that: The number of the DMA buffer areas is 2.
4. The bidirectional brain-computer interface device supporting wireless dual-mode communication according to claim 1, characterized in that: The main board is provided with a magnetically controlled switch connected to the battery, and the magnetically controlled switch is manually opened by a magnet.
5. The bidirectional brain-computer interface device supporting wireless dual-mode communication according to claim 4, characterized in that: The main board is also provided with a micro USB port, and a charging module is provided between the battery and the micro USB port; the battery is connected to the processor and the daughter board through a magnetically controlled switch and a bidirectional charge pump chip, and the battery is also connected to the daughter board through a magnetically controlled switch and an inverter power supply; the bidirectional charge pump chip adopts a bidirectional charge pump chip TPS63001, and the inverter power supply adopts an LTC1983 chip.
6. The bidirectional brain-computer interface device supporting wireless dual-mode communication according to claim 1, characterized in that: The daughter board adopts the RHS2116 chip, which supports sampling and stimulation of a maximum of 16 channels.
7. The bidirectional brain-computer interface device supporting wireless dual-mode communication according to claim 5, characterized in that: The bidirectional brain-computer interface device is configured to use a Bluetooth communication mode when collecting local field potentials of non-full channels, and to use a Wi-Fi communication mode when collecting local field potentials of full channels or collecting spike signals of one or two channels.
8. The bidirectional brain-computer interface device supporting wireless dual-mode communication according to claim 1, characterized in that: The size of the main board is 18×26.4 mm, the weight of the main board is 6.2 g, the size of the sub-board is 18×16.5 mm, and the battery adopts a 3.7V and 90mah rechargeable lithium battery.
9. A bidirectional brain-computer interface system supporting wireless dual-mode communication, characterized in that: It comprises a bidirectional brain-computer interface device supporting wireless dual-mode communication according to one of claims 1-7 and a host computer connected to the communication therewith, the host computer being equipped with a Bluetooth module for supporting the Bluetooth communication mode and a router for supporting the Wi-Fi communication mode; the host computer is configured to select a work task, the selection of the work task including the selection of the communication mode and the functional control of sampling and stimulation and the real-time visualization of data.
10. A working method of a bidirectional brain-computer interface system supporting wireless dual-mode communication, characterized in that: include: Step S0: constructing a bidirectional brain-computer interface system supporting wireless dual-mode communication according to claim 8; Step S1: After the bidirectional brain-computer interface device is powered on, the Bluetooth communication mode and the WI-FI communication mode are initialized, and the pairing signal sent by the host computer is started to be monitored; Step S2: the host computer selects the required communication mode to send a pairing signal corresponding to the communication mode to the bidirectional brain-computer interface device, so that the bidirectional brain-computer interface device completes the selection and pairing of the communication mode after recognizing the pairing signal; Step S3: The host computer selects the work task and configures the function parameters through the GUI interface; Step S4: The processor receives the configuration instructions from the host computer, configures the functional parameters of the hardware resources of the bidirectional brain-computer interface device according to the configuration instructions, and then takes over the hardware resources and executes the scheduling task.
11. The working method of the bidirectional brain-computer interface system supporting wireless dual-mode communication according to claim 9, characterized in that: The working tasks include sampling tasks, stimulation tasks, impedance testing tasks and mode selection tasks.