Getting started with SpikeGadgets Main Control Unit (MCU) and Trodes

In this guide we will go over the basic information needed to take your first recording using the SpikeGadgets Main Control Unit (MCU) and Trodes. Throughout this guide you will find links to the broader Trodes Wiki, where you will find additional information about the topics covered herein, as well as information about the many other features Trodes has to offer!

Installing Trodes:

Windows:

  1. Download and install FTDI D2XX Driver.

  2. Download the most recent release of the Trodes software suite here.

  3. Uncompress the downloaded folder and copy it to the desired location on your machine.

  4. Open the Trodes application.

MacOS:

  1. Download and install FTDI D2XX Driver. It is recommended to run the D2xxHelper program to prevent MacOS from claiming the device as a serial port.

  2. Download the most recent release of the Trodes software suite here.

  3. Uncompress the downloaded folder and copy it to the desired location on your machine.

  4. Open the Trodes application.

    NOTE: When opening Trodes you will see a message saying that Trodes is not registered and can’t be opened. When this occurs, select the option to open the program anyway. If this option is not available, close the window and open Trodes again. You should now see the option to Open the program anyway. When prompted, allow Trodes access to the application directory.

    You may need to do this individually for each of the Trodes apps: cameraModule, DataLogger, stateScript, stateScriptEditor & trodesexport.

Linux: (Ubuntu 20.04)

Ubuntu 20.04 is recommended for running Trodes. If you are running another version of Linux you may need to install missing libraries using sudo apt-get commands.

  1. Download and install FTDI D2XX Driver, following the instructions found in the first section of the D2xx for Linux README. In order to connect to your Main Control Unit (MCU) via USB, you will also need to run the following command as a single line before plugging your MCU in for the first time:

sudo wget https://bitbucket.org/mkarlsso/trodes/downloads/spikegadgets.rules -O /etc/udev/rules.d/spikegadgets.rules

This will tell your OS how to handle the SpikeGadgets hardware when it is plugged in.

  1. Download the most recent release of the Trodes software suite here.

  2. Uncompress the downloaded folder and copy it to the desired location on your machine.

  3. Open the Trodes application.

If connecting to your MCU via ethernet is preferable, setup instructions can be found here.

Creating your first Workspace in Trodes:

In this section we will go over how to create your first workspace in Trodes using the Workspace Editor. Workspaces are where you will set up and store the hardware and software configurations for your experiment. Trodes makes it easy to save your workspace setting for subsequent experiments, or sharing with other users.

The Workspace Editor is a very powerful and flexible tool for setting up your experiments and contains configuration options for many different types of experiments.

First we will go over how to set up a very basic tethered recording experiment using the Workspace Editor, then we will cover how to playback a recording using a previously recorded sample dataset.

This guide will just be scratching the surface, so feel free to explore the Trodes Wiki for more details. Each link headings below will take you to the relevant subsection of the wiki, where you will find more information about specific topics and functions!

Setting up your Workspace:

  1. Open Trodes and select “Create/Edit Workspace.”

  2. Select “From Scratch” to open a new Workspace in the Workspace Editor.

General Settings tab:

  1. Under “General” click the empty field next to “Set File Path.” This will open the file explorer, allowing you to set the default save directory. “Set File Prefix” allows you to enter a default prefix that will be added to your recording file(s).

  2. Next, under “Hardware Configuration,” select the number of channels your headstage has from the dropdown menu under “Headstage: Default.” If you are using Neuropixel probes, you can select the number of probes under “Headstage: Neuropixel.”

    NOTE: For Untethered recordings, the channel number must be set to 0 and the sampling rate should be set to 20KHz.

Channel Map tab:

  1. The Channel Map tab is where you will assign individual electrode channels to groups called nTrodes. Each channel also includes additional fields, where additional information such as stimulation capability, channel location, sorting and display order can be specified.

    This information can be entered directly for each channel in Trodes, but for most recording configurations we recommend using a 3rd party spreadsheet application such as MS Excel to help create your map.

    Once you have created the channel map spreadsheet it can be imported using the “Import channel map” button. For more information about this see the Channel Map section of the wiki. If custom channel mapping is not required select “autopopulate.”

  2. Once you have either selected “autopopulate,” or imported your channel map, Save and Open your workspace.

Using your first Workspace:

Connecting your MCU & headstage for tethered recording: If you have not done so already, connect your MCU to your computer using your preferred method (either USB or ethernet), and power on the MCU. If you have not connected your headstage yet you will notice the right-most status LED flashing orange. This LED will change to solid green once your headstage has been connected.

You will want to plug your headstage into the MCU using the HDMI tether regardless of if you plan to take a tethered or untethered recording.

Now that your MCU and headstage are plugged in, you can link your MCU to Trodes by selecting your preferred connection method under the connection dropdown menu in your workspace:

Connection > Source > SpikeGadgets >

For tethered recordings, no additional steps are needed for connecting your headstage and you can feel free to skip the following section detailing untethered connections.

Connecting your MCU & headstage for Untethered recording: When setting up an untethered recording, the MCU and headstage must first be set to the same Radio Frequency (RF) channel. This ensures that the MCU can sync with the headstage. To do this, first connect the headstage to the MCU via HDMI.

Reminder: For untethered recordings the channel count must be set to zero.

Once the headstage has been connected via HDMI, the RF channel and sampling rates can be assigned under the following Settings dropdown menu:

  • MCU: Settings > MCU Settings…

  • Headstage: Settings > Headstage > Headstage Settings

Once you have confirmed that the MCU and headstage sampling rate and RF channel settings match, a few additional steps are needed to finish setting up your first untethered recording:

  1. Unplug the headstage from HDMI.

  2. Plug the RF transceiver into the Aux 1 port on the front of the MCU.

  3. Connect the headstage battery (if your headstage does not use an integrated battery).

  4. Insert the SD card into the headstage. Importantly, the SD card must be configured for the correct number of channels using the DataLogger GUI.

For additional information about SD card configuration and setting up untethered recordings, please see the getting started with untethered recording and Data Logger GUI sections of the wiki.

Taking your first recording:

  1. Begin streaming by selecting “Stream from source” under the Connection dropdown menu. The workspace will now begin streaming data from the headstage. You will only see neural data streaming when taking a tethered recording. If you would also like to record video data, you can do this by clicking the “Video” button at the top of the workspace, which will open the video module.

  2. Now, create a new recording by selecting “New recording…” under the File dropdown menu. You will be prompted to set the filename and save directory for your new recording.

  3. With the save directory set, you will see the record and pause buttons in the upper left corner of your workspace. Pressing the record button will initiate your first recording. Importantly, untethered recordings cannot be paused, but tethered recordings can be paused and restarted at any time.

  4. When you are ready to end your recording, press the pause button. This will pause the recording, but will not pause the data stream. To end the recording, disconnect the data stream by selecting the “disconnect” option under Connection dropdown menu.

Viewing your data:

Now that you have taken your first recording, you can view the data you recorded inside Trodes. If you have not yet taken a recording, you can also download a sample dataset here.

To open your data file either select “Open Playback File” from the main menu on the landing page of Trodes, and click “Browse” to find your data file (.rec file), or select “Playback last recording” from the File dropdown menu in your workspace. From here you can playback your data by clicking the Play button in the upper left corner, which will playback your data in the same view it was acquired in.

Video files captured while recording can also be viewed by clicking the Video button. If you would like to view a video file independent of your recording data, you can also do this by opening the Video module application directly from the Trodes folder.

Exporting your data:

Data export is also done using the “Open Playback File” option in Trodes. Once you have opened the desired video file in playback mode, you can use the following steps to export your data in the desired format. For more detailed information about data export, see Exporting Data and Export Utility Functions.

  1. Select “Extract…” under the File dropdown menu.

  2. A window will open allowing you to select how you would like to export the data. More than one option can be selected.

  3. The checkbox options allow you to export your data in the following ways:

  • Spikes: exports spike waveform snippets

  • Lfp: exports low-bandpass filtered local field potential (LFP) data

  • Spikeband: exports bandpass filtered continuous data containing spikes

  • Raw: exports broadband unfiltered continuous data

  • Stim: exports current trace data for each channel when using stimulation-capable headstages and SHCU

  • Dio: exports digital input and output data

  • Analogio: exports analog input and output data

  • Mountainsort: exports broadband raw data whitened and referenced for import into Mountainsort

  • Kilosort: exports bandpass filtered spikeband data, segmented into user-defined sorting groups for import into Kilosort

  1. Once you have selected your desired export formats, hit “Start” to begin data export.

    NOTE: The command line can be used for more advanced export options, such as exporting data for further analysis with Offline Sorter. More information about this and other command line export functions can be found under Export Utility Functions.

Importing your data for further analysis with Matlab, or Python:

Once you have exported your data, if you’d like to import your data into Matlab or Python, you can find utility scripts for doing this packaged with Trodes. You can find these scripts in the following locations:

Matlab: Trodes folder > Resources > TrodesToMatlab

Python: Trodes folder > Resources > PythonToMatlab

For more information about these scripts as well as additional information about Trodes data structures, please see Exporting Data and Export Utility Functions.