The Neurorighter System The “closed-loop” of the hybrid (neural-artificial) system takes the following path: (1) neural signals from multiple extracellular electrodes are amplified and filtered by analog hardware; (2) signals are digitized and processed by software, e. g., to detect action potentials or LFPs; (3) electrical stimulation hardware is triggered by detected events; and (4) stimuli are delivered to the neural tissue by the same (or different) electrodes (Figure 1). To adapt RACS hardware for use by freely moving animals, head-mounted components had to be light and sturdy enough for temporary attachment to a rodent's head. Figure 1 NeuroRighter system. The bidirectional multi-microelectrode system consists of custom interface circuit boards, a computer with National Instruments PCI-6259 multifunction cards, and the NeuroRighter control software. Interface boards are modular and stackable, so adding channels is straightforward. For freely moving animals, the in vivo components also include a recording headstage and stimulator headstage, which connect to the animal's chronically implanted electrode array. The 16-wire MEA from Triangle Biosystems is shown, and the custom stimulator headstage is plugged between it and the Tucker-Davis Technologies recording headstage. The system also has connections for use with in vitro preparations, such as cortical cultures grown on MultiChannel Systems glass MEAs. The in vitro stimulation multiplexors plug in to the MultiChannel Systems MEA60 preamp, shown in a non-humidified incubator (Potter and DeMarse, 2001). Recording subsystem The readouts of the living neural system are the neural action potentials and LFPs recorded by extracellular microelectrode arrays (Figure 1). The recording components include a headstage/preamp for amplifying the microvolt-level electrode signals and isolating stimuli, interface circuitry for analog filtering, an analog-to-digital converter (ADC), and software for real-time signal processing and recording (Rolston et al., 2009c). The system is modular, recording from 8 to 64 channels simultaneously at up to 30 kHz per channel. Three technological advances helped make this system less expensive than commercial counterparts. First, high-gain headstages/preamps (100–1000×) reduce the need for second stage amplifiers (sometimes also called “preamps”). Second, modern multifunction ADC cards have high precision (for example, the PCI-6259 we use from National Instruments is 16-bit with a full-scale range as sensitive as 200 mV). This high precision and sensitivity relaxes preamp and second stage amplification requirements. Third, computers are now powerful enough to do most filtering, spike detection, etc. in real-time. The advantage of implementing these features in software, rather than hardware, is the ease at which they can be improved or rapidly reconfigured for different applications. For example, when we devised a new method of digital referencing for multi-electrode recordings based on subtracting the common median, we added this feature and used it immediately (Rolston et al., 2009b). Since these advances lead to fewer components, the cost for a 64-channel system was less than US$10,000, compared to US$40,000–100,000 for comparable but more highly polished commercial systems (Rolston et al., 2009c). Stimulation subsystem Multi-electrode electrical stimulation can serve several purposes: to deliver sensory input artificially, to modulate, or disrupt neural activity, and as a reinforcing or training signal. All of these were necessary for successful induction of goal-directed learning in vitro (Bakkum et al., 2008). The NeuroRighter stimulator is capable of stimulating with arbitrary waveforms from any electrode in a multi-electrode array (Figure 2). It improves on the RACS's 8-bit DAC by using the NI-6259’s 16-bit DAC, to produce very smooth stimulus waveforms with a wide dynamic range. Stimulus commands are generated in software, converted to analog signals by the NI-6259, buffered and monitored in custom analog circuitry, and directed to particular electrodes by a headstage-mounted multiplexor (Figure 1). The in vivo stimulator can be used in several different configurations: by itself (with no recording headstage), with recording systems from a variety of manufacturers, or with the complete NeuroRighter system. Further details of the stimulator can be found in Rolston et al. (2009a). Figure 2 Sample stimulation pulses. (A) Pulses can have arbitrary waveforms, such as biphasic pulses (A1), sine waves (A2), or even playing back previously recorded local field potentials (A3). The data from (A3) was obtained from an epileptic animal and shows several large-amplitude interictal spikes (de Curtis and Avanzini, 2001). How such low-voltage fields influence neuronal networks is an open question; for example, see McCormick and Contreras (2001), where ephaptic interactions are discussed, and Gluckman et al. (2001), where low-voltage fields are used to control epileptic activity. (B) Diagnostics allow monitoring of the voltage and current simultaneously, whether the pulse is current-controlled (B1) or voltage-controlled (B2). To generate the traces in (B1) and (B2), a 33-mm diameter tungsten microelectrode (Tucker-Davis Technologies, Inc.; Alachua, FL, USA) was stimulated in artificial cerebrospinal fluid (Rolston et al., 2009c) using a stainless steel wire as the counter (ground) electrode. When the stimulation waveform is generated by the DAC, it exists as a voltage-controlled signal. That is, the voltage is specified precisely as a function of time by the software (1 μs precision), but the stimulation current is allowed to vary freely (Figure 2B2). However, the signal can also be converted by the interface board to current-controlled stimulation, if the user wishes. With a current-controlled stimulus, the current is specified as a function of time, but the voltage delivered to the tissue is allowed to vary freely within a safe range, determined by adjustable voltage regulators and protection diodes (Figure 2B1). In either mode, both voltage and current can be simultaneously monitored for diagnostic purposes. Although current-controlled stimulation is more commonly used (Merrill et al., 2005), some studies, such as Wagenaar et al. (2004), have shown greater efficacy of voltage- over current-controlled pulses. Many commercially available stimulators are only voltage-controlled, or only current-controlled, but not both, and often produce only fixed biphasic or monophasic waveforms. Merrill et al. (2005) describe many cases where biphasic “square” pulses are more damaging than more complexly shaped stimulus waveforms. Thus, the flexibility of the NeuroRighter stimulator gives tangible benefits. Impedance capabilities Because the NeuroRighter stimulator monitors both the delivered voltage and current, and because it can deliver arbitrary waveforms, including sine waves that sweep across a wide frequency range (temporal resolution of 1 μs), the system can be used to monitor electrode impedance spectra. Impedance (Z, in Ohms) is the opposition to the flow of alternating current at a particular frequency. Measuring microelectrode impedance is important for three reasons – noise, stimulation, and the information that impedance spectroscopy provides about changes in biological tissue. The higher the impedance, the greater is the Johnson–Nyquist noise. Because electrode impedance is largely influenced by electrode surface area, impedance has become associated with tip diameter in neuroscience. It is important to note that impedance is not actually a function of the spatial extent of an electrode, but of its area. That is, it is possible to vary the surface area without varying the diameter, as our group has recently shown (Arcot Desai et al., 2010). Ultimately, the most sensitive, lowest noise microelectrode (for recording single cells) would have the smallest physical extent and an impedance of zero (Ross et al., 2004). Regarding stimulation, with lower electrode impedance, more current can be delivered at lower voltages to evoke a given response (thanks to Ohm's law). This results in smaller stimulation artifacts and potentially less tissue damage, depending on whether such reductions are achieved by increasing capacitance, as in Arcot Desai et al. (2010), or by increasing the current carried via Faradic reactions (Merrill et al., 2005; Cogan, 2008). With electrode impedance spectroscopy (EIS), NeuroRighter can help determine physical and biological reactions to implanted electrodes (Merrill and Tresco, 2005; Lempka et al., 2009). Stimuli can be normalized across an array with electrodes of varying impedance, or as electrode impedance changes over time. Closing the loop NeuroRighter's stimulation and recording subsystems are useful on their own, but allow fundamentally different types of experiments when used as an integrated closed-loop system, as described above and in (Arsiero et al., 2007). The greatest difficulty with combining stimulation and recording on the same multi-electrode array, however, is the problem of stimulation artifacts. The neural signals typically recorded from extracellular electrodes are on the scale of 10 μV, while extracellular stimuli are on the scale of volts – a 100,000-fold difference. When recording electronics that are designed to amplify μV signals are exposed to typical stimuli, the electronics of commercially available systems saturate, sometimes recording no neural signals for over a second. Even when the electronics are no longer saturated, large artifacts often prevent detection of action potentials. These can sometimes be removed with adaptive filters, such as SALPA (Wagenaar and Potter, 2002). The NeuroRighter system, with its 16-bit ADC, single stage of amplification and real-time SALPA implementation, is able to record action potentials within 1 ms after a stimulus on an adjacent electrode (Rolston et al., 2009c). This is important, since neural responses to stimuli can occur within 1 ms of stimulus offset (Olsson et al., 2005; Rolston et al., 2009c). Long artifacts would obscure these important stimulus-evoked responses. A closed-loop experiment There is great interest in using brain stimulation to alleviate seizure disorders. Some closed-loop studies using EEG recordings to trigger macro-electrode stimuli are underway in animals and humans (Morrell, 2006; Colpan et al., 2007). As a demonstration of NeuroRighter's closed-loop capabilities, we triggered stimulation in epileptic rats based on the detection of interictal spikes, large ∼100 ms LFPs exhibited in most presentations of epilepsy (de Curtis and Avanzini, 2001). Upon each detection, a stimulus pulse was delivered within 4–5 ms, illustrating the ability of the device to close the loop in physiological time scales. While brief pulses of electrical stimulation have been shown to suppress afterdischarges in humans (Lesser et al., 1999), it was not surprising that the small currents used in this experiment (±10 μA) were ineffective in altering the interictal spikes (Figure 3B). They did, however, evoke action potentials (Figure 3A,C). Future studies will test whether stimulation applied with more electrodes to different regions, or with different parameters (rate, pulse width, etc.), is able to effectively control or suppress interictal spikes in animal models. Further details of this experiment are presented in Rolston et al. (2009a). Figure 3 Closed-loop stimulation responses. (A) Biphasic current-controlled stimuli (cathodic, negative phase first; 400 μs per phase) were delivered to an electrode in CA1 of the hippocampus, and responses were recorded as seen here in CA3. Ten trials of every stimulus amplitude are overlaid in each panel. Stimulus duration is indicated by the red bar. The first action potentials appear at a certain stimulus threshold (≥6 μA, blue arrow), with the latency decreasing as current is increased (green arrowhead). Additional, less consistent action potentials are recruited at high stimulation intensities (purple asterisks). All traces were digitally filtered with the SALPA algorithm (Wagenaar and Potter, 2002). Stimuli were delivered at 1 Hz and in random order (to guard against neural adaptation). (B) The LFP of an electrode in CA3 was monitored for interictal spikes (IISs) and a single 10 μA biphasic current-controlled pulse was delivered to one microelectrode upon IIS detection (red X's in bottom panel). The displayed LFP trace (top panel) is from one electrode of an array implanted in CA1. The large amplitude is typical of LFPs during IISs and seizures. (C) A raster plot of action potentials recorded from all of the 16 electrodes during many IISs is shown, time-locked to the stimulus pulse. Action potentials are evoked by the stimulus at low latency following each pulse. The inset shows sample evoked AP waveforms recorded from one of the 16 electrodes during the experiment. This experiment is further characterized in Rolston et al. (2009a). Open-source hardware Open-source software has been common in neuroscience for decades. Free programming environments (Eclipse, EMACS, Visual Studio Express, ImageJ, etc.), closed-loop electrophysiology tools (e.g., RELACS, BioSig), and code repositories (SourceForge, Google Code) help make the software development and experimentation process more efficient and powerful. More recently, open-source hardware has become prevalent (e.g., the Open Prosthetics Google group; Thompson, 2008). Free, high-quality circuit design tools abound (e.g., ExpressPCB, PCB123, Eagle) and even circuit assembly can be automated at low cost (e.g., Screaming Circuits, Advanced Assembly). Having open-source circuitry with free software editors means the designs can be readily exchanged between researchers, and modifications quickly implemented, even by labs not skilled in electronics fabrication. Although the NeuroRighter system currently uses some commercial components (as described above), it relies heavily on the open-source model. Our code is distributed via Google Groups and Google Code under the GNU Public License1 and all hardware designs under the Creative Commons License2. It is our hope that other scientists can benefit by using our system, by enhancing it, or by borrowing pieces for their own improved systems.