Wednesday, June 22, 2016
Monday, February 8, 2016
Part 2 of Building an Open-source Electrophysiology Rig: Triggers and Signal Flow
Our rig is going to be customized for synchronization of audio stimuli and neural recordings; stimulus design, presentation, and analysis will all be performed in MATLAB. The general design, however, can be modified for visual stimuli and implementation in Python.
In addition to the Intan Components listed in Part 1, we also purchased a Roland Quad Capture external sound card ($250) and used a speaker and big ole sound amplifier that were laying around. The photo below shows the basic set-up that I'm using to prototype the system.
What you need to keep in mind when designing your system is that every digital-to-analog (DAC) and analog-to-digital conversion (ADC) has its own independent jitter and delay. Your goal is to minimize the number of independent conversions so that you can best time-lock the neural signals (i.e. spikes) that you record with the stimulus that was presented.
Borrowing from the principle of TTLs, triggers can be used to temporally align your audio stimulus with the recorded neural activity. When you design your stimulus (in MATLAB or some other software), you also design a separate channel with the same time discretization; this second channel will contain square steps that can either be spaced at regular time intervals or indicate the onset and offset of short stimulus trials.
![]() |
15 seconds of a stimulus (blue) and corresponding triggers (black). While plotted on the same axes, these signals are saved on two different channels. |
![]() |
End of Trial Trigger |
![]() |
Onset of Trial Trigger |
These triggers, along with a copy of the stimulus, will be recorded by the Intan board through the ADC port. This allows for a more accurate alignment of your recorded neural activity with the stimulus. It's important to ensure that your different triggers are distinct from each other, so that you can distinguish between them in your analysis script. I made mine distinct in both the duration of the pulses and the number of repetitions.
If you are using the free Intan GUI software, you can trigger the onset of your recordings via a digital or analog input. I designed my stimuli to have a distinct recording onset trigger 1.5 seconds before the first trial. Below is a screenshot of the Intan GUI and the pop-up window where you tell the software what input to trigger off of. You can save your entire configuration for the Intan software so that you don't have to change these settings each experiment.
In part 3, I'm going to go over my stimulus design, presentation, and analysis code, and talk about interfacing MATLAB's dsp toolbox with your sound card.
Wednesday, December 9, 2015
Building an Open Source electrophysiology rig: Intan-gible no more, Part 1
A traditional electrophysiology rig for neural recordings, complete with proprietary software and A/D/D/A components for recording and stimulus presentation, will run you about 35-100 thousand dollars. The real kicker is that upgrading proprietary systems to include more channels costs 10's of thousands.
![]() |
Traditional ephys rig of the 2000's |
Perhaps it's the Open Source mentality of Gen X's and Y's, because Scientists don't like "black boxes," or simply that Academics are strapped for cash, but the Intan board is quickly becoming the favored alternative.
A full set-up, including the main interface and amplifier boards, costs about 4-6K depending on how many recording channels you need; it covers 16 to 128. It also comes with free software, which saves files in formats that can be easily opened in MATLAB or Python. They provide a limited-time free license for a custom software for MATLAB and LabView Library, if you're so inclined. A more popular alternative to using their licensed software, is to use Open-ephys
For data acquisition, the board and free software really raises the standard of what it means to be "plug-n-play."

![]() |
Intan board |
For data acquisition, the board and free software really raises the standard of what it means to be "plug-n-play."


With an electrode (we use Neuronexus standard 16-channel shanks), amplifier, and adapter boards, you can be collecting data within a day.
Of course, simply collecting data is never enough. Like many other scientists studying sensory or motor systems, you need to synchronize your recordings with one or many stimuli. That is where the fun begins. In Part 2, I will update ya'll on my procedure for generating auditory stimuli to present as trial blocks and synchronizing those stimuli with neural recordings.
Friday, November 6, 2015
El Capitan, give me back my ship
I was so excited to get a new mac at work, and even more-so when I realized that Apple's Time Machine successfully imported all of my old files and applications (including the ever-so-rare subscription-free version of Illustrator and Photoshop). There is, of course, no story without a struggle. I found out that I couldn't use git!
Luckily, this guy provided excellent instructions on how to fix the problem. My only addition is a note for anyone who has never accessed the terminal from recovery mode: after you reboot and hold [command + R], you have to select your language, and then click on "utilities" from the upper LEFT portion of your screen. Terminal is listed there.
Luckily, this guy provided excellent instructions on how to fix the problem. My only addition is a note for anyone who has never accessed the terminal from recovery mode: after you reboot and hold [command + R], you have to select your language, and then click on "utilities" from the upper LEFT portion of your screen. Terminal is listed there.
Subscribe to:
Posts (Atom)