Implantable Stimulator System

© 2018-2019, Kevan Hashemi Open Source Instruments Inc.

Contents

Description
Acknowledgements
Electronics
Set-Up
Software
Closed-Loop Response

Description

[07-DEC-19] Our implantable stimulators each contain a micropower crystal radio that is always ready to receive a stimulus command. A single radio-frequency stimulus command at any time will cause the stimulator to produce voltage pulses. When these pulses are connected to an implantable lamp, they produce pulses of light. The default stimulation pattern is a sequence of n pulses of length τ milliseconds and period T milliseconds. The values of n, τ and T are part of the stimulus command, and can take values between 0-65535. When τ = T, the lamp is on continuously for nT milliseconds. When n = 0, the pulses continue until the stimulator receives a stop command or runs down its battery. A typical stimulus for optogenetic experiments is 10-ms pulses with period 100 ms for thirty seconds.


Figure: Implantable Stimulator-Transponder (A3036A). Volume 0.9 ml, battery 19 mA-hr. The 45-mm stimulus leads are L+ (red) and L− (blue). The pins at the end of the leads mate with sockets on an implantable lamp.

In addition to the crystal radio, our implantable stimulators are equipped with a message transmitter compatible with our Subcutaneous Transmitter System (SCT). In an Implantable Stimulator-Transponder (IST), the message transmitter provides command acknowledgements, battery voltage measurement, and a synchronizing signal. In an Implantable Sensor with Lamp (ISL), the data transmitter provides command acknowledgements, battery measurement, and transmission of a biometric signal measured by the ISL itself.


Figure: Implantable Sensor with Lamp (A3030E). Volume 4.5 ml, battery 160 mA-hr. With ground-shielded stimulus leads for delivering power to a Fiber-Coupled LED (A3024HF). The five leads are L+ (orange) and L− (purple) for lamp power, GND (green) to gather stray lamp current before it can spread through the animal's body, X (red) and C (blue) for recoring EEG or any other biopotential.

The implantable stimulators use the same data acquisition hardware and software as our Subcutaneous Transmitter System (SCT), but with the addition of a command transmitter like the 910-MHz Command Transmitter (A2029C). Command acknowledgements and battery voltage measurements are transmitted by ISTs and ISLs as auxilliary messages, while the synchronizing and biometric signals are transmitted as data messages. Thus SCTs, ISTs, and ISLs will all operate within the same faraday enclosures and share the same data receivers.


Figure: Implantable Lamp with Light Guide (A3036IL-A8). The fiber is 450 μm in diameter and 8 mm long. The stainless steel tube on the back side is for mounting during implantation. The thin section of tube is easy to cut after cement has cured.

Our implantable stimulators are equipped with lithium-polymer batteries. These batteries are the only small batteries with low enough source resistance to deliver the tens of milliamps required by implantable lamps. Between implants, we can recharge the LiPo battery through the stimulator's L+ and L− leads. We cannot charge the battery while the stimulator is implanted. For instructions on how to remove an implant, recover its electrodes, and prepare it for re-implantation, see Explantation. The stimulators need special recharging circuits. The resistance of the lamp leads and the voltage drop of the internal blocking diodes makes charging with conventional LiPo chargers impossible. You are welcome to send your exhausted stimulators back to us for testing, refurbishing, and recharging, using our recharge service. Or you may recharge the devices yourself with the correct version of our Battery Charger.


Figure: 910-MHz Command Transmitter (A3029C) in Enclosure. The LWDAQ branch cable and 24-V boost power cable enter on the left. Output power on the BNC socket of the enclosure is close to 1 W. A Loop Antenna (A3015C) provides omnidirectional transmission for implanted 910-MHz crystal radio receivers. There are four indicator lamps, LWDAQ Power (green), Boost Power (blue), Activity (amber), and Transmit (white).

In its standby state, transmitting no data and generating no stimuli, the A3030E ISL consumes 7.7 μA from its battery. When transmitting only, it consumes 105 μA. When delivering full power delivered to an implantable lamp, the A3030E consumes 55 mA from its battery and delivers 30 mA to its LED. When driven with 30 mA, the A3024HF-B 10 mW of blue light to the tip of its optical fiber light guide. At the same current, the A3024HF-G delivers 5 mW of green light to its fiber tip. The A3030E is equipped with a 190-mAhr battery, so it can drive the lamp like this for three hours continuously. In trials at ION, we were able to provoke optogenetic circling response response in rats with 2-ms, 10-mW pulses of blue light at 10 Hz, or 5-ms, 5-mW pulses of green light at 10 Hz. (Videos available upon request.) With 2-ms pulses every 100 ms, average current consumption from the ISL battery is around 1.1 mA. The A3030E can sustain the stimulus for 150 hours. Suppose we monitor EEG continuously, consuming 0.1 mA, and deliver 2-ms pulses at 10 Hz for four hours each day. The ISL will keep going for around 40 days. After that, we can explant it, clean it, recharge it, and use it again. We expect each ISL to endure several implants before its leads and encapsulation begin to show signs of wear.

The implantable stimulator system is designed to operate within one of our SCT faraday enclosures. The faraday enclosure keeps local interference from compromising reception of SCT, IST, and ISL messages, and it stops the powerful command transmission signal from interfering with local communication equipment outside the enclosure. The power of the command transmission spreads throughout the faraday enclosure, reflects off the walls, and is absorbed by the resistive foam in the faraday enclosure's ceiling.

We use the same antennas for command transmission and message reception. In a typical application, we place the transmit antenna in the middle of the faraday enclosure and two receive antennas nearer the walls. Command reception is 95% reliable in such a system, while message reception is 99% reliable. In the long run, we will increase reception to 100% by using two command transmit antennas. For now, however, the chance of a command being lost is 5%. When a command is lost, the implanted ISL will not transmit an acknowledgment, so the ISL system will be able to re-transmit the command or at the very least record that the command was lost.

Closed-loop optogenetic response to EEG events is performed by transmission of EEG from an SCT or ISL, reception by the data receiver, analysis by the Event Classifier on the data acquisition computer, and execution of an event handler that issues stimulus commands for an IST or ISL in response to EEG events. We describe this process in more detail below. By analysing the EEG in one-second intervals, this system is able to provide closed-loop control of the stimulator with an average delay of one second. The system is not capable of responding within 100 ms to a solitary ictal spike, but it can respond to seizures. In most epilepsy models, it takes four or five seconds to be certain that a seizure is beginning.

Acknowledgements

[08-DEC-19] Open Source Instruments developed the ISL in collaboration with the Institute of Neurology (ION), University College London (UCL). For a history of the development, and details of its performance and efficiency, see ISL Development. Our collaborators at ION performed all in-vivo testing of the device and provided almost all the funds required for the development of the device itself. We are currently developing a mouse-sized implantable sensor with lamp (MS-ISL) in collaboration with Cornell University, with funding provided by the NIH. We developed a prototype Implantable Stimulator (IST) in collaboration with the UCL.

Electronics

The implantable stimulator system consists of the following components, as well as cables to connect them.

Assembly Number
and Manual Link
Assembly NameStatus
A3036AImplantable Stimulator-TransponderActive
A3036ILImplantable LampActive
A3030EImplantable Sensor with Lamp (Body)Obsolete
A3024HFCISL Fiber-Coupled LED (Lamp)Obsolete
A3015CLoop AntennaActive
FE3AFaraday EnclosureActive
A3029C910 MHz Command TransmitterActive
A3027EData ReceiverActive
A2071ELWDAQ DriverActive
Table: ISL System Components.

The system uses four types of cable. Radio frequency signals are carried to and from antennas by RG-58C/U 50-Ω coaxial cables with BNC plugs on either end. By default, we will supply 80-cm cables for use within faraday enclosures and 2.4-m cables for use outside the enclosure. But there is no problem increasing the length of these cables to 10 m. Shielded CAT-5 cables are used in two ways. One such cable connects the LWDAQ Driver to the internet. Two other such cables connect the driver to the data receiver and command transmitter. If we use standard, stranded-wire, shielded, CAT-5 jumper cables, these cables can be up to 10 m long. We use standard DC (direct current) power cables with 5.5-mm center-positive power plugs to deliver 24-V power to the driver and command transmitter. The 24-V power adaptors connect to AC wall power, 90-250 V, 40-70 Hz, with a standard computer power chord.

Set-Up

The figure below shows how the ISL system components are connected together. The ISL system is an SCT system with the command transmitter and its transmit antenna added on. Follow the SCT set-up instructions to set up the recording system for ISL and SCT messages, then add the command transmitter as shown below.


Figure: ISL and SCT Connections for Optogenetic Experiments.

Referring to the diagram, we have the following components.

  1. The Neuroarchiver and ISL Controller Tools run on the data acquisition computer.
  2. A local or global internet provides communication with the computer.
  3. The LWDAQ Driver provides power and communication with the data receiver and command transmitter.
  4. The driver and command transmitter both receive power from identical 24-V adaptors.
  5. The driver and command transmitter both receive power from identical 24-V adaptors.
  6. Shielded CAT-5 cables provide LWDAQ power and communication connections.
  7. The Octal Data Receiver picks up signals transmitted from the implanted ISLs.
  8. The Command Transmitter transmits radio-frequency commands to the implanted ISLs.
  9. The animals are housed in a faraday enclosure.
  10. The command transmit antenna is a loop antenna just like the receive antennas.
  11. The receive antennas are connected to coaxial cables.
  12. Dozens of animals may live together in the same faraday enclosure and be part of the same ISL system, each with their own implanted device, or with an implanted SCT that performs only EEG transmission.
  13. Feedthrough connectors allow use to bring cables into the faraday enclosure without allowing ambient noise and interference to enter.
  14. Coaxial cable carries radio frequency signals.
  15. BNC plugs and sockets.
  16. RJ-45 plugs and sockets.

The ISL system is compatible with the SCT system, in that we can implant ISLs and SCT in animals that live in the same enclosure, and receive signals from both. Only the ISLs will be able to respond to commands.

The Command Transmitter (A3029) plugs into a Long-Wire Data Acquisition (LWDAQ) system and also receives its own 24-V power input to boost its command transmission power. It acts as a LWDAQ device and transmits commands to implanted ISLs through a Loop Antenna (A3015C), the same type of antenna used to pick up data transmissions from implanted SCTs and ISLs.

The Data Receiver (A3027) plugs into the Long-Wire Data Acquisition (LWDAQ) Driver with Ethernet Interface (A2071). The (LWDAQ) system is a data acquisition system developed for high energy physics experiments and adapted here for neuroscience biopotential recording. The data receiver acts as a LWDAQ device. The LWDAQ Driver (A2037E) connects to the global Internet, your Local Area Network, or directly to your computer via an RJ-45 Ethernet socket. You communicate with the A2037E, and therefore the Data Receiver, via TCPIP. On the computer you use for data acquisition, you run the LWDAQ software, which you can download from here. In particular, you use the Recorder Instrument, the Neuroarchiver, and the ISL Controller Tool.

Software

Download the latest version of the LWDAQ software here. To help you with installation and use of the LWDAQ software, consult the User Manual. You will use the Recorder Instrument, Neuroarchiver Tool, and ISL Controller Tool. The Recorder Instrument is a set of routines that run inside the LWDAQ program. You can use the routines by opening the Recorder Instrument window from the Instrument menu. You can call the routines from the LWDAQ's console. The Recorder Instrument software downloads blocks of binary data from the Data Receiver hardware and divides them into blocks of fixed time-duration. It displays transmitter signals as it receives them, each transmitter trace in a different color, and prints a summary of the received signals to the screen. The Neuroarchiver Tool is available in the LWDAQ Tools menu. It uses the Recorder Instrument to download signals from the Data Receiver. The Neuroarchiver downloads, filters, displays, and stores to disk selected signals from the Data Receiver hardware, and does so using the Recorder Instrument as an intermediary. The Neuroarchiver calculate and display the Fourier Transform of the incoming signals. It stores data and transforms to disk.

The ISL Controller Tool is available in the LWDAQ Tools menu. The tool sends instructions to a Command Transmitter (A3029C), and the Command Transmitter sends the commands to nearby ISLs. In order to send commands to an ISL, we must direct the ISL Controller to the LWDAQ Driver that provides power and issues commands to the Command Transmitter. We provide the IP address of the driver and the driver socket to which the command receiver cable is connected. We select the ISL with the device_id menu button. We select all ISLs with the all option in the same menu button.


Figure: ISL Controller Tool. In addition to providing buttons to control ISLs, the program will monitor battery voltage automatically by issuing its own battery check commands. When battery voltage drops too low, the program turns off the ISL to avoid battery damage.

We turn on and off ISL data transmission with Xon and Xoff. The ISL transmits its biopotential signal on a channel number equal to its device ID. We initiate a stimulus with the Stimulate button. The row of state indicators along the top of the window tell which ISLs have been instructed to transmit data and generate stimuli. When transmitting data, the ID number turns red. When generating a stimulus, the background turns green. The ISL Controller knows how long a stimulus should last, and keeps track of time so as to change the color back from green to gray when the stimulus ends.

A stimulus is a sequence of pulses. We specify the pulse length with pulse_length in in milliseconds. We specify the period of the pulses with interval_length in milliseconds. The number of pulses is the stimulus length. The stimulus length can be any number from 0 to 65535. If zero, the stimulus continues indefinitely. We can stop an indefinite stimulus with the Stop command, or we can allow the stimulus to continue until the battery is nearly exhausted, at which point the ISL will shut down, re-start, and return to its standby state. Stimulus pulses can be regular or random, according to the value of randomize. When pulses are randomized, the pulse length is always the same, and the average time between pulses is approximately equal to the interval length. But the time between individual pulses varies.


Figure: Distribution of Pulses per Second for Random 10-ms Pulses with 100-ms Interval. Average pulse rate is 9.3 pulses/s.

Some stimulators support pulse brightness control. The A3030E ISL uses 1-MHz modulation to adjust the average pulse brightness. The A3036 does not provide brightness control. By default, pulse brightness is set to 100% in the ISL Controller. We can reduce the brightness of the pulse with the brightness menu button, from 0% to 100% in 20% steps. The reduction in brightness is done by modulating the lamp at 1 MHz. This switching can introduce noise into the EEG signal being recorded by the ISL, so we recommend that you check to make sure that such noise does not disturb you experiment. The power consumed by the lamp does, however, decrease linearly to zero as we decrease the brightness to zero.

If we check Enable Acknowledgement, the ISL Controller will add an acknowledgement request to every command it sends to the ISL, with the exception of the commands we specify manually in the Transmit entry box. After transmission, the ISL Controller looks in the Recorder Instrument's auxiliary message list for the requested acknowledgement. If it does not find the acknowledgement, it issues a warning. If it does find an acknowledgement, it reports this to the text window. Acknowledgment checking requires live data acquisition with the Recorder Instrument. The ISL Controller waits ack_timeout_ms before abandoning its wait for an acknowledgement.

Beneath the state indicators are battery voltage indicators. The Battery button sends a battery voltage instruction to the selected ISL. The ISL should respond with an battery voltage message. Provided we are downloading data continuously with the Recorder Instrument, the ISL Controller will extract battery voltage messages from the Recorder Instrument's auxilliary message list. When the ISL Controller obtains a battery voltage reading from an ISL, it reports the reading in these indicators. When the battery voltage drops too low, the ISL Controller will turn off the ISL by issuing Xoff and Stop commands. We can obtain battery measurements with the Battery command, or enable automatic battery measurement a few times per hours with the Enable Battery Check option. The automatic checking requires live data acquisition by the Recorder Instrument.

The acknowledgment and battery report messages are SCT auxiliary messages. If we are downloading messages continuously from a data receiver with the Recorder or Neuroarchiver, the ISL Controller will extract these messages from the incoming message stream and notify us if they are not received. When an acknowledgement is not received, either the command was not received by the ISL due to inadequate command power reaching its antenna, or the acknowledgement was transmitted but not received by the data receiver's antennas. With two or three antennas in the same enclosure as the ISL, the likelyhood of an acknowledgement being lost is less than 2%. The likelyhood of a command being lost is closer to 5%. In either case, re-transmitting the stimulus command is almost certain to ensure the stimulus starts.

We can obtain the battery voltage of individual ISLs with the Battery command. The response to this command is an SCT auxiliary data message on channel number fifteen, and the ISL Controller can obtain the message provided that we are recording continuously from our data receiver. The battery voltage is displayed in the row of battery indicators. When the battery voltage is above 3.6 V (or whatever you set for the blow parameter in the Configure panel) the indicator is green. When it drops below 3.6 V, the indicator turns orange. If below 3.2 V (or bempty) the indicator turns red and the ISL Controller shuts down the ISL with a Stop and Xoff command. When we check Enable Battery Monitoring, the ISL Controller requests battery voltages regularly and monitors the battery voltages automatically.

The Transmit entry box allows us to enter a sequence of command bytes by hand, for diagnostic and development work. When we press the Transmit button, these command bytes are transmitted one after another, with two checksum bytes added automatically. Thus the bytes that are printed in the text window after we press Transmit will be the same as those in the Transmit entry box, but with two checksum bytes at the end.

When the Verbose flag is set, each time we stimulate the ISL, the tool prints the sequence of bytes it transmitted to the ISL, including a two-byte checksum that must be appended to every transmission if it is to be accepted by an ISL. When we press the Print button, the tool prints a TCL script that will perform the stimulus defined in the entry boxes. We can cut and paste this script into another program so we can invoke the same stimulus from another process. We might, for example, use the stimulus code in an Event Handler that responds to a seizure during EEG recording. The printed script calls ISL_Controller_transmit, which means the ISL Controller tool must be open and running when the handler is executed.

Closed-Loop Response

The primary purpose of the ISL is to allow us to detect particular events in a biopotential signal and respond to them with optical stimuli. This detection and stimulation process is what we call closed-loop response. The logic chip on board the ISL has sufficient programmable logic and memory to provide internal closed-loop response, in which the ISL itself detects events and responds to them with optical stimuli. For now, the ISL supports only external closed-loop response.

We implement external closed-loop response by transmitting a biopotential signal from the ISL, recording the signal with the Neuroarchiver, detecting events as they occur with the Event Classifier, and instructing the Command Transmitter to send a command to the ISL when a particular sequence of events is detected. The ISL generates the stimulus in response to the command.

The Neuroarchiver divides the incoming signal in to intervals of fixed length. It processes each interval as it becomes available. Let us assume the intervals are one second long, this being a suitable length for seizure detection. And let us refer to the signal as EEG, even though we could equally well apply event detection to EKG, EMG, or any other biopotential signal. When a new one-second interval of EEG arrives from the ISL, the Event Classifier compares the new interval to a list of intervals that we have previously classified with our own eyes, a list we call our event library. The Event Classifier finds the member of our event library that is most similar to the new interval. Provided this previously-classified event and the new interval are similar enough, and provided the new interval meets a minimum power requirement, we assume the new interval to be of the same type as the previously-classified event. The classification of the new interval might be "Ictal", "Spike", or "Baseline". If the new interval is unlike any in the event library, it will be "Unknown". If it does not meet the minimum power threshold, it will be "Normal".

Having classified the new interval, the Event Classifier calls an event handler. The event handler uses the classification of the new interval, and the history of classification of the same signal, to deterine what action to take. The event handler could, for example, look for three consecutive ictal intervals, and then initiate a 100-s stimulus consisting of 5-ms pulses at 10 Hz.

Here is a simple example of an event handler that causes a 10-s stimulus of 5-ms pulses transmitted at 10 Hz. The script uses the id variable available to all handler scripts to send the stimulus to the ISL with channel number id. We can include these lines of code in our event classification processor (append them to the end of ECP19V2.tcl, for example), and so define the event handler for the Event Classifier.

set info(handler_script) {
    if {$type == "Ictal"} {
        global ISL_Controller_config
        set ISL_Controller_config(ip_addr) 10.0.0.37
        set ISL_Controller_config(driver_socket) 8
        ISL_Controller_transmit "11 $id 4 0 5 164 6 0 7 100 8 0 9 100 10 0 3 5 1"
    }
}

To run the above sript, we must have the ISL Controller tool open, or we must have opened it and closed it so as to define the ISL_Controller_transmit procedure. They list of integers in the last line is the string of instructions we send to the ISL to get it to generate the stimulus. The inclusion of the id in the instructions ensures that only the ISL with the matching channel number will respond to the command, even though all ISLs within range will receive and interpret the command. In principle, we can learn all we need to know about the ISL instructions by studying its firmware source code, P3030E03 for example. But the ISL Controller prints out the required Tcl commands for us automatically when we press the Print button.


Figure: The ISL Controller Print Function. The printed Tcl commands cause a stimulus matching the parameters selected in the entry boxes and menu buttons.

The only change we make to this printed script is to replace "11 7", which selects ISL No7, with "11 $id", which replaces ISL No id.

If we are to implement internal closed-loop response in the ISL, we must use efficient metrics to represent the features of each interval. Use of the Fourier transform would be too computationally intensive for use inside the ISL. Our ictal event detectors, such as ECP19, are designed to be computationally efficient. They do not use the Fourier transform. Instead, they rely upon non-linear, efficient metrics. The firmware and software required to give the ISL on-board event detection will take roughly five hundred engineering hours to bring to maturity. One day we hope to find the time to implement a microprocessor in the ISL and so provide autonomous, event-driven stimulus, in a single, fully-implantable, long-lived device.