Contributions:MicroLeadsADC
Introduction
MicroLeadsADC is a source module that allows for utilization of the MicroLeads StimZ recording and stimulation device within BCI2000.
Versioning
Authors
- Dhruva Mehta (mehta@neurotechcenter.org)
Version History
- 2/10/2023 Initial Creation and Setup
Source Code Revisions
- Initial development:
- Tested under:
- Known to compile under:
- Broken since: --
Known Issues
Using the MicroLeads ADC
To use the MicroLeads ADC, you will need to have been provided with the basic hardware from MicroLeads. Below we will go over the mandatory and optional hardware/software parts necessary to ensure a smooth use of the MicroLeads ADC.
Setting up the Hardware
Included Hardware
The following is a list of the hardware that should have been provided to you:
- Wireless Implant
- This is the implantable device that can record and stimulate wirelessly.
- Powerpad with power cable
- This is the device that allows for wireless charging of the implantable device.
- Basestation with power cable
- This is the device that communicates with the implant and the powerpad by sending commands, receiving information and data, and then relaying it to the router.
- Wireless Router with power cable
- The router is require for creating an ethernet sub-network for base station ethernet communication
- Two Ethernet cables
- Required to connect the basestation to the router and the router to the computer.
- Ethernet to USB adapter
- Optional adapter if the computer you are using does not have an ethernet port. Will be needed for verification with the MicroLeads provided laptop.
- Laptop with MicroLeads Interface Software
- This laptop should have the interface executable to use for initial device verification. It should also have the ***stimZ_config.ini*** that has the device information and properties.
Below are figures detailing what each device looks like with labels.
Hardware Setup
-
Figure ?: Hardware Setup Overview
Considering how many cables and devices there are, it is helpful to have a step-by-step procedure to ensure that everything is set up smoothly.
Laptop
The first thing to set up is the laptop. Ensure that the laptop charger is plugged into an outlet and that the charger is plugged into the laptop.
Router
The next step is to set up the router.
First, plug the power adapter for the router into an outlet and then plug the power adapter into the router. Ensure that the router turns on.
Next, plug the ethernet to USB adapter into an open USB port on the laptop.
Finally, we will use one of the ethernet cables to connect the router and the laptop. Plug one end of the cable into the open port on the ethernet to USB adapter. Plug the other end of the cable into one of the 4 available black ports on the router. Do NOT plug it into the blue port.
Currently, our set up should look like this:
-
Figure ?: Hardware Setup Overview
Basestation
Next we will set up the basestation.
First, ensure that the antenna is securely attached to the basestation. Use the SHORTER antenna.
Next, plug the power adapter into the outlet and then into the micro-usb port of the basestation.
Finally, we will use the other ethernet cable to connect the router to the basestation. Plug one end of the cable into the open ethernet port on the basestation. Then, similarly to the previous step, plug the other end of the cable into one of the 3 remaining available black ports on the router. Once again, do NOT plug it into the blue port.
Powerpad
Next we will set up the powerpad.
First, screw the power adapter onto the powerpad, ensuring that it is tightly attached.
Next, plug the power adapter into a wall outlet.
Test to see if the powerpad turns on by pressing the rubber power switch located on one of the short sides of the pad. The switch should light up blue when it is on. A square should also light up green, located to the left of the switch and the right of the location to screw the power adapter on.
Finally, attach the LONGER antenna to the powerpad by screwing it on.
With this, your initial setup should be complete! You should keep the powerpad and implant decently close to the basestation to ensure proper communication, but they don't need to be right next to each other.
System Setup restrictions
Verifying with MicroLeads Software
Charging the Device
Verifying Device Properties
How to set up with BCI2000
Creating a Batch File
Using MicroLeads ADC
User Settings
Understanding how it works
Communication Protocol
Packet Structures
Parameters
SourceCh
The total number of digitized and stored channels. Because of device limitations, this is set to 4 channels explicitly.
SampleBlockSize
Samples per channel per digitized block. Together with the sampling rate, this parameter determines how often per second data are collected, processed, and feedback is updated. For example, at 1000 Hz sampling and a SampleBlockSize of 20, the system (e.g., source signal display, signal processing, and stimulus presentation) will be updated 50 times per second.
SamplingRate
The sample rate of the system. This parameter cannot be edited, and will default to the sampling rate available from the implant which is 21500 Hz. In case you are experiencing problems by higher sampling rates (e.g., data loss, jerky display, etc.), increase the SampleBlockSize so that you are updating the system less frequently (usually, updating the system 20-30 times per second is sufficient for most applications).
SourceChOffset
Offset for each channel.
SourceChGain
Gain for each channel.
ChannelNames
Names of each channel.
ReferenceCh
This list defines what channels will be used as reference. This list is uploaded to the device and set in hardware, effecting the raw bio-signal data that is recorded by BCI2000. If you do not want to effect the raw bio-signal data that is recorded, you can use the spatial filter. If this parameter is set to auto, no reference channels are used.
Device Parameters
These parameters can be found in the "Device Settings" tab of the BCI2000 config window. These settings are provided to you from MicroLeads and are set for each device. If you were also provided a laptop from MicroLeads the settings may be found by navigating to the GUI configuration file, located at <user>/AppData/Roaming/RHD2000interface/config/stimZ_config.ini
Implant StimZ address
This parameter sets sets the StimZ address of the implant for use with BCI2000. This parameter is necessary to ensure that commands sent through BCI2000 are actually sent.
The possible values for this parameter are 0-13, and it will not be the same as the Powerpad StimZ address.
Powerpad StimZ address
This parameter sets sets the StimZ address of the powerpad for use with BCI2000. This parameter is necessary to ensure that commands sent through BCI2000 are actually sent.
The possible values for this parameter are 0-13, and it will not be the same as the Implant StimZ address.
Implant Radio Frequency Channel
This parameter sets sets the radio frequency channel of the implant for use with BCI2000. This parameter is necessary to ensure that commands sent through BCI2000 are actually sent.
The possible values for this parameter are 10, 20, 30, ... 80, and it will not be the same as the Powerpad Radio Frequency Channel.
Powerpad Radio Frequency Channel
This parameter sets sets the radio frequency channel of the powerpad for use with BCI2000. This parameter is necessary to ensure that commands sent through BCI2000 are actually sent.
The possible values for this parameter are 10, 20, 30, ... 80, and it will not be the same as the Implant Radio Frequency Channel.
Stimulation Parameters
These parameters can be found in the "Stimulation" tab of the BCI2000 config window.
Enable STIM0
This parameter enables/disables stimulation for the STIM0 channel.
Enable STIM1
This parameter enables/disables stimulation for the STIM1 channel.
Enable Recording
This parameter enables/disables streaming of neural data.
Supply Voltage
This parameter sets the supply voltage from a range of 4V to 9V. When the user is recording only, the voltage must be 4V. When the user is stimulating at all, the voltage must be 9V.
Stimulation Pulse Settings
This group of parameters define the shape of the charge balanced stimulation pulses, as described in Fig 1. Limitations will be detailed for each parameter. [[File: |600px|thumb|center|upright=2.5|Figure 1. Pulse definition]]
Phase1 Duration
This parameter sets the length of the Phase 1 Duration in counts of 11.6 microseconds. To obtain the proper value, divide your duration by 11.6 microseconds.
Interphase Duration
This parameter sets the length of the Interphase Duration in counts of 11.6 microseconds. To obtain the proper value, divide your duration by 11.6 microseconds.
Phase2 Duration
This parameter sets the length of the Phase 2 Duration in counts of 11.6 microseconds. To obtain the proper value, divide your duration by 11.6 microseconds.
Phase1 STIM0 Amplitude counts
This parameter sets the Phase 1 amplitude for the STIM0 channel in counts of 10 microAmps. To obtain the proper value, divide your amplitude by 10 microAmps.
Phase1 STIM1 Amplitude counts
This parameter sets the Phase 1 amplitude for the STIM1 channel in counts of 10 microAmps. To obtain the proper value, divide your amplitude by 10 microAmps.
Phase2 STIM0 Amplitude count
This parameter sets the Phase 2 amplitude for the STIM0 channel in counts of 10 microAmps. To obtain the proper value, divide your amplitude by 10 microAmps.
Phase2 STIM1 Amplitude count
This parameter sets the Phase 2 amplitude for the STIM1 channel in counts of 10 microAmps. To obtain the proper value, divide your amplitude by 10 microAmps.
Charge Recovery Counts
This parameter sets the length of the Charge Recovery Duration in counts of 11.6 microseconds. To obtain the proper value, divide your duration by 11.6 microseconds.
Stim Period Counts
This parameter sets the length of the Stim Period Duation in counts of 11.6 microseconds. To obtain the proper value, divide your duration by 11.6 microseconds.
ADC Gain
This parameter sets the ADC Gain. When recording only, set the parameter to 0. When stimulating, set the parameter to 1.
Exfil_Iface
This parameter sets the exfil settings. When recording only, set the parameter to 2. When stimulating, set the parameter to 0.
