Significant progresses have been made during the past decade in developing engineered devices aimed at establishing a bidirectional interaction with the central or peripheral nervous system. The basic idea underlying devices designed for brain-machine interfaces (BMI) is to create artificial sensory or motor channels between the nervous system and the external world. By exchanging information, this can be used to control actuators as a robotic limb, a wheelchair or to drive the movement of a cursor on a computer screen. The main goal of these systems is to restore/recover functionalities in people with sensory or motor disabilities due to neurodegenerative diseases, strokes or spinal cord injury. These engineered devices have also been used as an experimental tool to explore the mechanisms involved in neural processes as memory, motor control, sensory information processing and synaptic plasticity1,2,3,4. Motor BMIs are based on the idea of decoding the neural activity recorded directly from the motor areas of the cortex to control the movement of external artificial devices. Sensory BMIs have been developed to create artificial sensory channels by translating natural signals collected from the environment (e.g. sound, light, pressure) into proper artificial signals (e.g. intracortical micro stimulation patterns) to be fed directly into the brain. In this framework, cortical control of the movement of a prosthetic arm or of a cursor on a computer screen has been successfully demonstrated in studies performed on non-human primates and, in some cases, even on people suffering from high-level spinal cord injury5.

Regarding the possibility of directly stimulating the brain, deep brain stimulation (DBS) is a well-established procedure in the treatment of tremor associated with the Parkinson disease and multiple sclerosis6,7 while intra-cortical micro-stimulation (ICMS) is currently used in neuroprostheses to restore lost sensory functions in blind and hearing-impaired patients8,9.

Mono-directional BMIs based on either neural recordings or stimulation continue to show great potential in improving the quality of life in patients suffering from a variety of neurological disorders, although a new generation of bi-directional systems aimed at combining neural signal recording and real-time processing with electrical stimulation for closed-loop applications is emerging10,11,12,13. This is due to the evidence that a real-time feedback signal can improve the performances of a motor BMI in two ways: by allowing an online correction of errors and by activating a learning process in the areas involved in the loop14.

Most of the existing motor BMIs rely only on visual feedback to control the movements of external devices15,16. However, the intrinsic delay of the visual system does not comply with the tight timing constraints typically required to control complex external systems. For this reason, researchers are exploring the possibility of providing information about the state of the controlled device through direct activation of the sensory area of the cortex by means of patterns of electrical microstimulation. This would in principle permit faster corrections of the movement errors and to better handle the external perturbations that might occur during the movement.

With the final goal of using these devices for human beings, emerging evidence indicates the need for developing portable, low power, miniaturized and wireless engineered devices13,17,18,19,20,21,22,23,24,25,26. These features represent a new challenge for the next generation of closed-loop BMIs. To test and explore the capabilities of these devices, the animals typically employed by scientists involved in BMI research are either non-human primates27 due to the similarity with the human brain, or rodents, which allow the possibility of using a large number of different experimental models. As a first step towards future developments, we decided to focus our work on developing a device suitable for behaving rats chronically implanted with 16 channels multi-electrodes.

Two distinct approaches are commonly followed by researchers that need to develop a device with the aforementioned features: the former is based on the realization of custom integrated circuits (IC) and the latter on the use of commercial-off-the-shelf (COTS) electronics. Many interesting papers describing ICs with recording and stimulating capabilities have been proposed28,29,30,31,32,33,34. Integration typically allows better performances in terms of noise, compactness and power consumption, but at the expense of low flexibility and adaptability, long design time and large prototyping costs. As a result, such devices are definitely more suitable for long-term implants rather than for systems designed for short-term experiments, especially those preformed on animals, where low costs and short implementation time are preferable. In the latter case, COTS-based systems also allow to easily modify the electronic design which is a great advantage in the first stages of research. COTS-based systems with recording and stimulating capabilities have indeed been proposed in the past but none of them, to our best knowledge, seems to be suitable for long-term neurophysiological or neuroengineering experiments with freely behaving small laboratory animals. Among the reasons of their failure there is the fact that they provide just a single channel for recording and stimulation35,36, they are wired systems unsuitable for long-lasting behavioral experiments24, or designed only for primates37. In the system described by Ye and colleagues38, only wireless transmission of raw data recorded from two distinct sites is available and data processing must necessarily be performed remotely. As a result, this system cannot be used in closed-loop experiments employing for example real-time spike timing dependent plasticity (STDP)39,40.

We decided to combine two different approaches to design the recording and stimulating parts of the device. We designed and realized a custom IC able to record the neural activity continuously and simultaneously from eight different electrodes of the array. This choice allows to have an energy efficient, high signal-to-noise ratio and small area recording device to be placed close to the recording electrodes which helps to avoid electromagnetic interference, parasitic capacitances and crosstalk between adjacent electrodes.

The stimulator was developed by using COTS electronics assembled on two custom-made printed circuits boards connected to a commercially available microcontroller-based board. This commercial board was used to condition, process and wirelessly transmit the recorded signals and, at the same time, design and deliver the stimulation patterns through the selected channels.

The choice of integrating COTS-based electronic elements with an IC device resulted in a low-power, low-noise and small-area recording system coupled to a programmable intracortical micro-stimulator that operates in a closed-loop mode. The programmable microcontroller that permits the users to modify the way the loop is closed and the wireless data transmission makes the flexibility the most important characteristic of the presented system.


System architecture

A particular experimental configuration of the wireless recording and stimulating device, with a rat wearing the portable system placed inside a behavioral box is represented in Figure 1. The system architecture consists of the Remote Unit (RU), the Home Unit (HU) and the control software running on a personal computer (PC). The Home Units is connected to the PC via USB. Moreover it communicates with an external device, in this case with the Box Controller of the Behavioral Box, via a series of transistor-transistor logic signals (i.e. TTL signals). Finally, a wireless link allows to establish a real-time bidirectional communication between the RU and the HU. A detailed description of the basic building blocks of the device is given hereafter.

Figure 1
figure 1

System architecture of the proposed system consisting of a Home Unit, a Remote Unit (i.e. Headstage and Backpack) and a Behavioral box.

Two different closed loops allow experiments aiming at establishing a bidirectional artificial link with the rat's brain. This figure was prepared with the help of Laura Taverna by using Maya Graph Editor Software.

The Remote Unit

The RU is used to record the neural signals, to deliver patterns of intra-cortical micro-stimulations (ICMS), to process data and to establish a bidirectional wireless communication with the HU (Figure 2). It consists of a compact headstage (size 2 cm × 2 cm × 0.5 cm; weight 7 g) and a backpack that is small and light enough to be carried by the rat during the experiment (size 6 cm × 4 cm × 3 cm; weight 40 g batteries included).

Figure 2
figure 2

(a) System architecture of the Remote Unit, consisting of a backpack and a headstage; (b) circuit schematic of the Howland current source; (c) circuit schematic of the band-pass filter and d) circuit schematic of the integrated low noise amplifier. This figure was prepared with the help of Laura Taverna.

The headstage, designed to be compatible with the ZIF-Clip® based micro-wire arrays provided by Tucker-Davis Technologies (TDT Inc., Alachua, USA), is used for neural signal amplification and electrical micro-stimulation. Eight of the sixteen available electrodes are used to stimulate the brain and are directly connected to the stimulating unit on the backpack. The remaining eight electrodes are used to record the neural activity and are mapped to a low-noise, low-power custom-made Application Specific Integrated Circuit (ASIC). We designed and developed a specific ASIC circuit by using part of the design of a more complex device that we had already developed41,42. The ASIC integrates eight low noise amplifiers with a band-pass frequency between 1 Hz and 10 kHz, a mid-band gain of 60 dB and a measured input referred noise below 3 µVrms in the same frequency band (the circuit schematic is shown in Figure 2.d).

An eZ430-RF2500 wireless development board provided by Texas Instruments (TI, Dallas - TX, USA) is used for analog-to-digital conversion (ADC) of the recorded neural signals, neural data processing for closed-loop operations and wireless communication with the HU counterpart. It is placed inside the backpack together with two custom made printed circuit boards (PCB) that are used for signal conditioning of neural data, generation of programmable biphasic current stimuli, selection of the stimulating electrodes and power management with USB battery charger (see Figure 2.a). The amplified analog neural traces from the headstage are further processed by a bank of eight identical filters, each being implemented as a low-pass second order active filter with a cut-off frequency of 5 kHz by means of the Sallen-Key (SK) circuit topology43,44 represented in Figure 2.c. Low frequency components (up to 300 Hz) are removed from the recorded signals through the first order high-pass filter implemented by Chp and Rhp, while a further gain of about 20 dB improves the ADC input dynamic range. The resulting 8 analog traces are fed into the eZ430-RF2500 board for time-division multiplexing and 8-bit A/D conversion with the sampling rate set according to the selected working mode (see section Working modes for details). The produced stream of digitized data can either be wirelessly transmitted toward the HU or locally processed by the microcontroller embedded in the eZ430-RF2500 board to implement real-time closed-loop experiments.

The stimulation unit in the backpack is designed to deliver through the selected electrodes current stimuli designed by the user45. A digital-to-analog converter (DAC) controlled by the eZ430-RF2500 allows to define voltage waveforms of whichever shape and duration, while a Howland current source (HCS) (Figure 2.b) is used as voltage to current converter to deliver the desired stimuli46. Amplitude and time resolution of the stimuli are defined by the DAC resolution (10-bits) and by its output voltage settling time (8 µs with a capacitive load up to 500pF), respectively. In the presented version of our system, we decided to program the microcontroller such that the stimulating unit can deliver only biphasic current pulses. These are designed as NT trains of NP identical biphasic current pulses whose repetition is set by the intra-train frequency fstim and inter-train frequency ftrain (defined as 1/Tstim and 1/Ttrain, respectively). Each current pulse is described by two pairs of parameters, namely (Tp; Ip) and (Tn; In), defining the duration and the amplitude of positive and negative pulses, respectively. An analog switch controlled by the ez430-RF2500 board finally permits to select one out of the eight available electrodes for stimulation.

Power supply for the whole system is provided by two low-voltage and one high-voltage power lines that are derived by a small 3.7 V, 700 mAh lithium battery, permitting continuous operations for about 3 hours.

The two low-voltage power lines (both set to ±1.5 V) are used to separately power the analog (i.e. headstage and filter bank) and the digital circuits (i.e. ez430-RF2500 board and DAC controlling the HCS) in order to reduce the amount of noise injected on the recorded signals.

The high-voltage power line (set to ±9 V) supplies energy to the stimulating unit (i.e. HCS module and the programmable analog switch that is used for selection of the stimulation channel). In this way, the device is capable of delivering current stimuli with amplitudes as large as 300 µA through the microelectrodes arrays provided by TDT with an electrical impedance of about 60 kΩ.

Significant energy saving is accomplished by turning the stimulation unit and the wireless communication on only when needed (see section Wireless Communication Protocol).

The Home Unit

The Home Unit consists of a second eZ430-RF2500 wireless development board that is used for both real-time wireless bi-directional communication with the RU counterpart and data transfer with the PC via a USB to TTL Serial Converter Cable (TTL-232R-3V3, FTDI™).

Data coming from the wireless link are transferred to the PC via USB in real-time to be displayed and stored on the hard disk. Similarly, command packets produced by the control software are read via USB by the HU before being wirelessly transmitted to the RU. Nine “developmental” ports of the eZ430-RF2500 board are used as digital I/O to connect external devices to the HU. In the experimental configuration represented in Figure 1, we programmed the system such to use the first port as “enable signal” (REN) and the remaining eight ports (DIN[1:8]) as state variables. When REN is asserted, the HU evaluates the current value of the state variables and accordingly produces a command packet to be wirelessly sent to the RU without any intervention of the user.

Control Software

Our system was designed to perform a number of basic operations. Among these, as described in section Working modes, there are single- and multi-channel neural data recording and stimulation. To provide the user with an easy and intuitive tool for setting the parameters required for each working mode, we designed a Graphical User Interface (GUI) developed in LabVIEW® that can also be installed as a stand-alone program. Other than setting the parameters, the GUI was also designed to monitor the system online. For example, when the system is operating in any available recording mode, the data stream (e.g. raw signals or spike trains) collected from the HU is plotted in real time on the PC monitor using a time window that the user can set and change at any time during acquisition. In the stimulation mode, the GUI provides a dynamic preview of the pulses to help the user to design the desired stimulation patterns. Finally, the GUI also permits to save the recorded data as well as the parameters of the designed stimuli into a file together with a text header to be reloaded for a new experimental session.

Experimental setup

We validated our device by using it with chronically implanted behaving rats during an experiment aimed to explore how patterns of intracortical micro stimulation can be used to provide an artificial feedback in a bidirectional BMI47. A commercially-available skinner box (Med Associate, VT, USA) provided with an operating chamber and a dedicated controller was used to accomplish our task. The chamber was equipped with two levers (i.e. right and left lever) and a feeder provided with an Infra-Red (IR) sensor for rat nose poking detection. The controller was able to monitor the events occurring inside the operating chamber such as any lever press or nose poking in the feeder. As shown in Figure 1 we connected five output ports of the controller named POKE, STIM and ADDR[1:3] to the digital input of the Home Unit.

The experiment was designed in such a way that each time the rat poked the nose in the feeder, the POKE line would be set to high and STIM would be randomly set to be either high or low, indicating two different stimulation patterns. The remaining three ports (ADDR[1:3]) were used to address the desired stimulation channel among the 8 available in the RU. When a change in the value of the POKE line was detected, the connected HU, according to the logic value of STIM and ADDR[1:3], triggered the RU wirelessly. Thanks to such input, one of the two previously defined stimulation patterns was delivered to the selected channel without user intervention. The reward was provided only if, within a certain amount of time from the nose poking, the rat pressed the lever associated to the logic value of STIM and hence to the delivered current stimulus. Otherwise, it had to wait some random inter-trial time before starting a new trial.

The two stimulation patterns used in this experiment were chosen taking into consideration the parameters used in previous works48,49,50 together with the spike integrator model presented by Fridman and colleagues51 that indicates how to build two stimulation patterns producing a perception different enough to be discriminated by the subjects. For our purposes, first we decided to set the values of the amplitude (i.e. 150 μA) and duration (i.e. 100 μs for each phase) of the biphasic stimuli forming the train and then to use the sole frequency of the stimuli within the stimulation train as a discriminatory parameter. It is known that the physiological spike rates of cortical neurons spans between 10 Hz and 80 Hz, thus we selected these boundary frequencies as characteristic of our stimuli with the aim of maximizing the difference between the perceptions evoked by the ICMS patterns. The duration of both the train pulses was set to 1 s. This value, the same adopted by Fridman during his experiment, combined with the previously introduced parameters, permits to obtain sufficiently different levels of perceived intensity.

Working modes

Five working modes are available for the users: single and multi-channel recording, calibration, remote and local closed-loop modes. These are described in detail below.

In single channel recording mode, one out of the 8 available amplified (80 dB gain) and band-pass filtered (300 Hz–5 kHz) neural traces are digitized at 8-bit and 15ksamples/s. The resulting stream of data is arranged in packets, each containing 52 samples, wirelessly transmitted in real time toward the HU.

In multichannel recording mode, only the spike occurrences and the related time stamps are transmitted, allowing a significant saving of transmission bandwidth. Specifically, the detection is performed on 4 out of the 8 available recording channels, each being sampled at 8-bit and 10.4ksamples/s. As better described in section Spike detection algorithm, a threshold-crossing detection algorithm, running on the microcontroller of the RU, allows to detect and discriminate between spikes and artifacts. Due to the limited transmission bandwidth, packets containing only the first 4 spikes or artifacts occurrences are sent to the HU every 2.5 ms.

Setting a proper threshold is mandatory for efficient online spike detection. For this reason, we designed the calibration working mode that allows the user to set the best threshold for each input channel according to the measured noise floor and the peak-to-peak signal. For this aim, the RU records the neural signal from a selected channel for a given amount of time, during which both raw data and online detected spikes are wirelessly transmitted to the PC (Figure 3.a). Once the recording time has expired, raw data (Figure 3.b, blue line) and detected spikes (Figure 3.b, red dots) are visualized on the same graph window. This allows the user to evaluate the accuracy of the current online threshold. Then, by means of the slider placed on the right side of the GUI in Figure 3.b, the user can adjust the threshold to a different value that will be used by the system to perform an offline spike detection on the same neural data. The result of this operation will be finally visualized on the same graph window (Figure 3.b, blue dots), allowing the user to find the best threshold to be used during the multichannel recording mode. We also verified that the online and offline spike detection algorithms provide well synchronized spike trains by using the procedure described by Quiroga and colleagues52.

Figure 3
figure 3

(a) Schematic representation of the steps required by the calibration procedure. Black arrows represent wired data transfers whereas dotted lines depict wireless communications. (b) A screenshot of the calibration mode GUI made by a control panel (left side) and a graph window (right side). The user can select the channel to be used for the calibration procedure, the threshold for the online spike detection and the time duration of the recording. The procedure starts by pressing the Calibrate button and, after the selected time, the graph window is updated. The blue trace represents the recorded raw data, the red dots the spikes detected by the online algorithm running on the RU, while blue dots are used to plot the spike occurrences resulting from the offline algorithm running on the PC. Every time the offline threshold is changed by the user through the slider placed on the right side of the graph window, the system updates the related detected spikes. Once a good threshold has been found, the user can save it on the RU to be used during the multichannel recording mode by pressing the button ACCEPT. The saved thresholds are represented in green in the control panel.

With the goal of providing a device able to operate in a real-time closed-loop mode, we also designed two stimulation modes, called remote closed-loop mode and local closed-loop mode, each consisting of a configuration phase and an active phase. The configuration phase is used to store up to 10 stimulation patterns and, for each of these, the target electrode inside the local memory of the remote microcontroller. During the active phase, the designed stimuli are delivered to the desired brain location on the basis of external triggers without user intervention. In the remote closed-loop mode current stimuli are provided according to the state of the animal inside the operating chamber, as previously described in section Experimental setup. The local closed-loop mode, similarly, allows to deliver predefined ICMS patterns on the basis of the actual neural activity recorded from 4 out of the 8 available recording electrodes. To give an example, we programmed the system in such a way that for each of the four recording channels the user needs to define a target stimulation electrode, the desired stimuli and a threshold value for the Mean Firing Rate (MFR). The latter is defined as the mean number of spikes detected within a predefined time window. During the active phase the microcontroller computes the MFR for each of the four recording channels: each time any of them reaches the predefined threshold, the desired stimulation pattern is delivered to the selected brain site without any user intervention.

Bench tests

We performed several bench tests to validate the system before using it on anaesthetized and awake rats in the laboratory. Each of the available working modes was extensively tested considering the whole signal chain (from the headstage to the PC) and the results were gathered to evaluate the overall system performances.

Local closed-loop test

A microwire array was connected to our headstage and the tip of the electrodes was immersed in a 0.9% saline solution. Figure 4.a shows the experimental setup used for the local closed-loop mode, in which two different electrodes were used for stimulation (red electrode) and recording (green electrode), respectively. During this test, an arbitrary waveform generator was used to inject artificial spikes featuring 1-Hz frequency and 100-µV amplitude into the saline solution, while the backpack was programmed to deliver a single biphasic current stimulus each time a spike was detected on the recording electrode. A two channels, 2 Gsa/s, 8 bit oscilloscope with impedance of about 1 MΩ was used for simultaneous measurement of the voltage drop across the stimulation electrode (V1) and, similarly, the output of the integrated low-noise amplifier reporting the amplified signal detected by the recording electrode (V2). Figure 4.b shows that the detection-to-stimulation latency in local closed-loop mode is of about 3 ms. Notice the large artifact measured at the output of the low noise amplifier during the stimulation.

Figure 4
figure 4

(a) Experimental setup for the measuring the detection-to-stimulation latency in the local closed-loop mode. Two micro-wire electrodes were immersed in a saline solution where we injected an artificial signal with a programmable firing rate. The system was set to work in local closed-loop mode and programmed to deliver a single biphasic pulse through the stimulating electrode (red) every time a spike was detected on the recording electrode (green). A two-channel oscilloscope was used to measure the voltage drop across the stimulating electrode (V1) and the output of the front-end neural amplifier that was used to amplify the signal captured by the recording electrode (V2). Detection-to-stimulation latency in local (b) and remote (c) closed mode. In the local case, the trigger event is given by the detection of a spike on the recorded trace (green trace), while in the remote one, the trigger is a TTL pulse (black trace) that is generated by the behavioral box as a consequence of a rat nose poke. d) Voltage drop measured across a microwire electrode immersed in a saline solution after injecting biphasic current pulses having different intensities.

Remote closed-loop test

To evaluate the detection-to-stimulation latency in remote closed-loop mode, channel V2 of the oscilloscope was still used to measure the voltage drop across the stimulation electrode. On the contrary, channel V1 was used to monitor the POKE port from the behavioral box controller, which is used to trigger a new stimulation each time the rat pokes the nose in the feeder, as described in section Experimental setup. For this specific experiment, we programmed the RU to remain always in active mode instead of periodically waking up from sleep mode (see section Wireless Communication Protocol for details) and we measured a latency of about 2.6 ms (see Figure 4.c).

Stimulus current test

To verify the performance of our stimulation unit, we injected trains of biphasic current pulses featuring different amplitude values to the electrode immersed in a saline solution measuring the resulting voltage drop. The Results for different current intensities are shown in Figure 4.d, confirming that our system is capable to convey biphasic current pulses with amplitudes up to 300 µA without saturating. The voltage drop measured across the electrode, in fact, is always well below the ±9 V high voltage power lines serving the stimulating unit.

The maximum amplitude of the biphasic current stimuli was defined on the basis of previous experiments works47,48,49,51,53,54,55,56,57 where this value ranged between 4 μA and 300 μA depending on the behavioral tasks and the stimulation sites. We decided to cover the same current span, with a resolution of almost 1 μA, making our system a versatile tool suitable for different experimental paradigms.

Recording and Spike detection test

For each of the eight available input channels we first measured that the input referred noise was below 2 µVrms in the 300 Hz–5 kHz band. Then, we evaluated the spike detection capabilities by injecting an artificial signal with programmable firing rate in each input channel. Our tests showed that the system successfully detects and transmits spikes of input signals with mean firing rates below 400 spikes/s per channel. Figure 5.a shows that the detection rate falls down by increasing the mean firing rate of the input signal. This result is confirmed by Figure 5.b, which reports the results of the tests performed on the system by using a previously recorded neural trace as input signal. As long as the input firing rate remains below 400 spikes/s, i.e. the mean time between two consecutive spikes is larger than 2.5 ms, spikes are correctly detected and transmitted (green dots). Conversely, when this limit is exceeded, spikes may be missed (red dots).

Figure 5
figure 5

Spike detection capabilities were tested through bench tests.

(a) An artificial signal with a programmable firing rate was used to demonstrate that the system correctly detects spikes as long as the input firing rate remains below 400spikes/s. (b) The calibration mode allows recording of both the raw trace and the spike detected according to a previously defined threshold (dashed horizontal line). Spike missing occurs when consecutive spikes are closer than 2.5 ms. (c) The signal used for testing the system in calibration mode was also used to test the system performance in multichannel spike detection mode. The signal was simultaneously applied to four input channels, each set with a different threshold. Spikes are correctly detected and transmitted until the firing rate across the four monitored channels remains below four spikes per packet, each packet being transmitted every 2.5 ms.

Multichannel Recording mode

To evaluate the performances of the system working in multichannel recording mode, we simultaneously injected the same signal in four input channels setting a different spike detection threshold for each channel. The results are shown in Figure 5.c, where the input neural trace, previously acquired by the system, is plotted together with the received spike occurrences. It's worth pointing out that the three consecutive spikes inside the red window are correctly detected by channel three although two of them are closer than 2.5 ms. As discussed in section Wireless Communication Protocol, our communication protocol insures that, in multichannel recording mode, input channels with larger firing rates are correctly handled if the total number of detected spikes to be transmitted remains below 4 occurrences per packet no matter what the inter spike interval is.

In-vivo test results

Results obtained through in-vivo measurements from anesthetized rats with the system working in local closed-loop mode are presented in Figure 6. We chose this specific working mode to significantly summarize all the features available for the proposed system. However, in this test we slightly modified the original procedure for a following offline verification of the obtained results. Specifically, we programmed the system so that only one channel rather than four of them would be monitored while both raw data and spike occurrences were sent to the HU in real-time (as described in the calibration working mode). As soon as the neural activity on the monitored channel reached the threshold of 4 spikes within a 75 ms time window, the microcontroller on the backpack was programmed to autonomously deliver two trains of current stimuli, each consisting of five biphasic current pulses. Notice how the slow recovery from the stimulation phase is correctly marked as artifact.

Figure 6
figure 6

In-vivo test results of the local closed-loop mode from anesthetized rat.

The figure shows from the top to the bottom the mean firing rate threshold (dotted line), the instantaneous mean firing rate (green line) computed offline, the “monitored” recorded signal (blue trace) and the online detected spikes/artifact (green/red dots). The designed pattern of ICMS was correctly delivered during the stimulation period as soon as the instantaneous mean firing rate exceeded the MFR threshold value. The insets show a zoomed view of the recorded signal before and after the stimulation period: the inset on the left displays the detected spikes that triggered the stimulation, the right inset shows how the online algorithm correctly recognized the artifact following the stimulation. The neural activity recorded from a single channel (blue trace) was processed by the online spike detection algorithm. Both the raw data and the detected spikes (green dots) were wirelessly sent to the home unit. In this particular test we verified the correct timing of the stimulation (blanking period) by calculating offline the instantaneous mean firing rate (green line) and by using the same MFR threshold (dotted line) that was used online.

We also tested the system with chronically implanted behaving rats trained on a “discrimination task” (Figure 7.a–b) to distinguish between two different ICMS patterns delivered to one single electrode, as previously described (see section Experimental setup). We obtained more than 90% of discrimination reliability with a mean reaction time lower than 2 seconds from the stimulus onset. The same experiment was conducted using a commercial stimulator system (like STG-2008 Multichannel System) and comparable results were obtained (Figure 7.b–c).

Figure 7
figure 7

(a) Time course of a typical trial performed by the rat during the discrimination task experiment. (b) The histogram of the lever presses (time bin = 0.5 s) before and after the stimulus onset shows a peak of the distribution of the presses immediately after the intracortical stimulation. (c) Results of the comparison of the reaction times collected from a trained subject between two experimental sessions by using a commercial stimulating system (i.e. wired) and our wireless system (i.e. wireless).


Extracellular neural signals are typically recorded by means of fine tip metal micro-electrodes and exhibit amplitudes varying from tens to hundreds of microvolts with most of the energy in the 1 Hz–10 kHz band. Although these electrodes show good mechanical stiffness for puncturing through the brain tissue and high spatial selectiveness, they introduce a relatively large background noise with a significant thermal component related to the microelectrode electrical impedance58,59. Even if new techniques have been explored to reduce the impedance of the electrodes and to improve the signal to noise ratio (SNR) of the recorded signals particularly in the multi-unit band60, low-noise amplifiers are still needed for good neural recordings. A further improvement of the resultant SNR may be achieved by placing the front-end amplifiers as close as possible to the recording site. For this reason, multichannel recording systems designed for small laboratory animals require light and compact headstages. Furthermore, wireless portable solutions are mandatory for experiments with freely behaving animals. However, one of the major concerns concerning wireless portable multichannel recording systems remains how to utilize the limited available resources in terms of bandwidth and power consumption to transmit useful information of the recorded signals. Transmitting the spike occurrences rather than the entire raw signal significantly reduces the required transmission bandwidth but, on the other hand, spike detection has to be performed with limited computational resources and relatively simple algorithms in order to save area and power. A system designed to be used as a bidirectional BMI should also provide a mean to generate and deliver programmable current stimuli to a selected brain location as response to either the presence of specific features on the recorded neural activity or to the behavior of the subject within the experimental setup.

Here we present a wireless portable system with recording and stimulating capabilities that was designed for behavioral experiments with small laboratory animals chronically implanted with microwire arrays. The recoding front-end exploits an integrated circuit with 8 low-noise and low-power neural amplifiers that is mounted on a compact and light headstage. Cable connections are avoided thanks to the wireless link between the Remote Unit and the Home Unit, while a microcontroller embedded on the remote eZ430-RF2500 development board allows implementation of data processing algorithms that can be exploited to extract specific features from the recorded data. As a proof of concept, we implemented a spike detection algorithm that permits to discriminate spikes from stimulation artifacts. Detected spikes can be wirelessly transmitted to the HU or used in a closed-loop operation to trigger electrical stimulation on the basis of the instantaneous neural activity.

Two distinct closed loops can be identified in our system, as shown in Figure 1, each aiming at creating an artificial link with the rat's brain by means of programmable patterns of current stimuli. In the first loop (represented by red arrows), neural data are locally processed by the microcontroller inside the backpack, while the second loop involves wireless communication between the HU and the RU. In the latter loop, represented by green arrows, current stimuli are generated either as a response to the behavior of the subject inside the behavioral box, or as a result of neural data processing through algorithms running on the PC. This clearly results in a different time delay required to close the loop, i.e. the time needed to convey a certain stimulus for the given input data, but it also makes the whole system extremely powerful and flexible. In particular, the local loop allows a faster response. However, because of the limited computational resources of the local microcontroller in this preliminary version of the system, it requires the use of very simple data processing algorithms, whose output can trigger one among a limited set of previously defined stimuli.

This feature could be useful to explore how the functional connectivity of the neurons inserted in a closed-loop BMI system can be modulated by using microstimulation experimental paradigms based on the spike time dependent plasticity rule61.

In contrast, the remote loop gives the opportunity to run more complex neural decoding algorithms on the personal computer. In fact, such algorithms demand high computational resources to map neural data onto distinct stimulation patterns62,63 or to generate motor control signals for external devices. Finally, the remote loop also permits to monitor the behavior of the animal within the experimental setup. Signals coming from different sensors of the behavioral box are collected and used in real-time to deliver pre-programmed patterns of stimulation by using up to eight different electrodes. Specifically, in the presented set-up, the collected signals are used to recognize the actual state of the experiment, which is transmitted to the HU by the box controller. For each state of the experiment, the user can define a precise stimulation pattern that may be wirelessly triggered without user interaction as soon as the related event occurs.



The system was tested on anesthetized and behaving rodents in compliance with the Italian law governing the care and use of experimental animals (DL116/92), with the approval of the local Ethics Committee and the Italian Ministry of Health and in accordance with relevant guidelines and regulations. Experiments were carried out in chronic sessions on Long-Evans male rats, weighting 300–400 g anaesthetized with a mixture of Zoletil (30 mg/Kg) and Xylazine (5 mg/Kg) delivered intraperitoneally. The animals were placed in a stereotaxic instrument and a small craniotomy (2 mm × 2 mm) was made in the parietal bone. The primary somatosensory cortex was exposed and dura mater was left intact. A 16 channel microwire array (produced by Tucker-Davis Technologies) was used as interface. Each wire is made of Polyimide-insulated tungsten and its diameter is 50 μm. Electrodes are arranged in 2 columns of 8 wires each. The inter-electrodes and inter-column spacing are 250 μm and 375 μm, respectively, guaranteeing a very dense spatial resolution.

The electrodes were lowered perpendicular to the cortical surface to a depth of about 700–800 μm in layer IV using a custom TDT holder. Thereafter, a silicon paste was placed directly on the dura mater until the hole performed during craniotomy was perfectly sealed. Finally, dental cement was put on the skull to completely secure the implant.

Wireless Communication Protocol

Each of the working modes provided by our system can be wirelessly reprogrammed and/or launched at any time by the user by means of a LabVIEW graphical user interface. Current stimuli may also be wirelessly triggered by the behavior of subjects inside the Behavioral Box according to the protocol described in section Experimental Setup. In the first case, a payload with the overall packed length and a precise set of parameters describing the selected procedure is created by LabView and sent to the home eZ430-RF2500 board via USB before its wireless transmission toward the RU. In the latter case, conversely, wireless transmission occurs automatically without user intervention upon detection of a specific event, with the payload containing the requested pattern of stimulation and the target channel. On the other way, according to the selected working mode, the RU transmits samples of neural data or the occurrences of detected spikes to the HU. In any case, the transmitted packet is automatically provided with a 4-byte preamble, a 4-byte synchronization (sync) word and a 2-byte Cyclic Redundancy Check (CRC) for automatic transmission error detection.

A significant saving of power is accomplished by periodically waking up the remote eZ430-RF2500 board from sleep mode for a limited amount of time (10 ms every 300 ms). For this reason, as depicted in Figure 8, the same packet is continuously transmitted for 300 ms on the HU side. Once the RU detects a transmission, it moves to receive mode to download the incoming packet. The OPERATION and the COMMAND fields of the download payload are used by the RU to decide how to use subsequent data. Specifically, the OPERATION field describes the requested working mode, while the COMMAND one may be either STORE or RUN. With a STORE command, the received data are stored in the local memory as parameters describing the selected procedure, while a RUN command launches a previously stored procedure.

Figure 8
figure 8

Remote Unit communication protocol.

Power saving is achieved by periodically waking up the RU from SLEEP mode to check the presence of incoming packets from the HU. Two header fields are used on the RU side to decode whether incoming data have to be stored in the local memory or if a specific procedure has to be launched.

Spike Detection algorithm

Several different approaches for automatic spike detection have been proposed in the past64. In this work we used a threshold crossing detection method. False detections originated from artifacts are prevented by exploiting the different output response produced by the front end neural amplifier when it is presented with artifacts or neural inputs. More specifically, because of its 1 Hz high-pass cut-off frequency, the front end neural preamplifiers recover from saturation due to an artifact in a typically longer time with respect to action potentials recorded from cortical neurons, whose duration is approximately 1 ms. As a consequence, only signals crossing back the same threshold within a given time are considered as spikes, otherwise they are marked as artifacts. As discussed in section Bench tests, our system can successfully detect up to 400 spikes per second, well above the maximum firing rate of biological neurons that lies in the range from <1 to 150 spikes per second65.