Implantable Sensor with Lamp System

© 2018, Kevan Hashemi Open Source Instruments Inc.


Closed-Loop Response
Future Work


[22-MAY-18] The Implantable Sensor with Lamp (ISL) is a battery-powered sensor and optical stimulator designed for implanting beneath the skin of small laboratory animals. In a typical application, the ISL will transmit EEG continuously and flash a green or blue fiber-coupled LED when we detect certain events in the EEG signal. For example, we might flash the light when the animal experiences an epileptic seizure. The existing A3030 device amplifies and transmits one biopotential and provides up to 100 mA at 5 V to power a fiber-coupled LED (FCL) mounted on the skull of the animal. The FCL head fixture can come with a guide cannula to permit injection near the stimulus site. It can be equipped with blue or green LEDs.

Figure: Implantable Sensor with Lamp (A3030E). Shown here 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.

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 many details of 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. They are currently using a set of ten A3030Es in their own optogenetic studies in rats.

Figure: Fiber-Coupled LED (A3024HFD-B). Shown here with guide cannula used for holding the fixture during implantation. Sockets connet to the pins on the end of the ISL's stimulus leads. The fiber is 450 μm in diameter.

The A3030E shown above has volume 4.5 ml, which we can implant in an adult rat, but far too large to implant in a mouse. The A3024HFD-B optical fiber is 450 μm in diameter. For implantation in mice we would prefer 200 μm diameter. We hope to develop a mouse-sized version of the ISL and FCL head fixture in the coming year.

The ISL system is almost identical to our Subcutaneous Transmitter (SCT) System, but with the addition of command transmitters such as the 910-MHz Command Transmitter (A2029C). Indeed, SCTs and ISLs will operate within the same faraday enclosures and share the same data receivers. We refer you to the SCT introduction for a description of the system without the command transmitters.

The A3030E ISL is equipped with a 160 mA-hr lithium-polymer (LiPo) battery. Between implants, we can recharge this battery through the ISL's lamp leads. We connect the positive terminal of the recharger to the L− lead and a negative terminal to the L+ lead. We need a special recharging circuit because the resistance of the lamp leads, and the voltage drop of the two charging diodes, makes charging with conventional LiPo chargers impossible. Send your ISLs back to us for recharging, testing and repair, or attempt to recharge them yourself using our instructions. For more about the performance of the lithium-ion batteries we use wit the ISL, see Discharge Rate and Capacity.

Figure: 910-MHz Command Transmitter (A3029C) in Enclosure. The enclosure top is machined out of one piece of cast aluminum for better heat conduction and grounding. We see the LWDAQ branch cable and 24-V boost power cable entering on the left. Output power on the BNC socket of the enclosure is 1 W. A Loop Antenna (A3015C) provides omnidirectional transmission for implanted 910-MHz crystal radio receivers. There are four indicator lamps, from top to bottom: LWDAQ Power (green), Boost Power (blue), Activity (amber), and Transmit (white). For the 146-MHz Command Transmitter (A3029A), see here.

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 the FCL, the ISL consumes 55 mA from its battery. At full power, the A3024HF-B blue-light FCL delivers 10 mW of optical power at its fiber tip. The A3024HF-G delivers 5 mW of green light to the fiber tip. The ISL can power the lamp like this for three hours continuously before exhausting its battery. 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 ISL system is designed to operate within one of our SCT faraday enclosures. The faraday enclosure keeps local interference from compromising reception of SCT and ISL messages, and it stops the powerful ISL command transmission signal from interfering with local communication equipment outside the enclosure. The power of the command transmission spread 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 the existing ISL system through transmission of EEG from the ISL, reception by the data receiver, analysis by the Event Classifier on the data acquisition computer, and execution of an event handler that issues ISL stimulus commands in response to EEG events. We describe this process in more detail below. By analysing the EEG in one-second intervals, the ISL system is able to provide closed-loop control of the ISL with an average delay of one second. The ISL 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.


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

Assembly Number
and Manual Link
Assembly NameStatus
A3030EImplantable Sensor with LampActive
A3024HFCFiber-Coupled LED Head FixtureActive
A3015CLoop AntennaActive
FExxFaraday Enclosures (Various Sizes)Active
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.


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.


Download the latest version of the LWDAQ software from 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/More menu. It uses the Command Transmitter (A3029C) to send commands to ISLs, instructing them to flash their light, report their battery voltage, begin transmission of their biopotential, and acknowledge receipt of message. Provided that we are downloading data continuously with the Recorder Instrument, the ISL Controller will extract acknowledgements and battery voltage reports from the list of meta-data messages kept by the Recorder. The ISL Controller can monitor battery voltages automatically and disable lamp stimulus when the battery is near exhaustion.

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.

The ISL Controller allows us to select individual ISL devices as targets for command transmission. In the current version of the tool, which works with the A3030A/B/C/D/E versions of the ISL device, we can select ISLs with identifying numbers (ID) 1-14. When we turn on data transmission in one of these ISLs, it transmits its biopotential signal, which is usually EEG, on the SCT channel number equal to the ISL's ID number. We turn on and off data transmission with the Xon and Xoff buttons.

The row of state indicators along the top of the ISL Controller window tell us if ISLs 1-14 are transmitting data and generating a stimulus. When transmitting data, the ID number turns red. When generating a stimulus the background of the indicator 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.

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 set the ID of the ISL with the device ID menu button. We can transmit a command to all ISL 1-14 with the "All" option in this same menu button.

We initiate a stimulus in the ISL with the Stimulate button, and we can stop the stimulus at any time with Stop>. A stimulus is a sequence of pulses. We specify the pulse length in milliseconds and the period of the pulses with the interval length, also in milliseconds. Both can have any value from 0 to 65535. A 10-ms pulses at 10 Hz would be given by 10 ms and 100 ms. The pulses can be regular or random, according to Randomize (Yes/No). When the pulses are randomized, the pulse length is always the same, and the average time between pulses is as given 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.

By default, the pulse brightness is 100%. The ISL delivers its maximum current to the LED in the head fixture. But 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.

The stimulus length is the number of pulses the stimulus should contain. It 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.

The ISL transmits acknowledgements of each command it receives. Thse acknowledgments are SCT meta-data messages on channel number fifteen. If we are downloading messages continuously from a data receiver with the Recorder Instrument or Neuroarchiver Tool, the ISL Controller will extract acknowledgements from the 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 metadata 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 enable battery monitoring in the ISL Controller, it requests battery voltages regularly and monitors the battery voltages automatically.

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)
        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.

Future Work

[23-MAY-18] In the long run, we will equip the ISL itself with the computational power necessary to detect events by itself, so that no EEG transmission is required to close the response loop. Without the current consumption of transmission, the ISL will then be able to operate implanted and watching for seizures for many months or even years, depending upon how often it is called upon to generate an optical stimulus. The A3030E is too large to implant in mice, but mice offer more opportunities for optogenetic research than do rats. We plan to design and manufacture a much smaller version of the ISL for use in mice, as we describe in Technical Proposal for a Mouse-Sized ISL. We are applying for grants and looking for collaborators to make the closed-loop and minituarization advances possible.