Getting Started - Backyard Brains

Getting Started
You can connect you SpikerBox using either the blue laptop cable, or the green smartphone cable. But what cable should I use with my laptop?
It depends on your laptop. Most PC laptops have a separate headphone and line­in jack. You want to plug into the line­in (microphone) jack. You can use the blue laptop cable. When using the blue cable, you should be able to record 2 channels independently on your 2­Channel SpikerBoxes. If you have a Mac Laptop with two audio ports (like some MacBook Pro's and older iBooks and MacBooks), you want to plug the blue audio cable into the line­in port (has a weird symbol). If you have a MacBook, MacBook Pro, or any computer with only 1 headphone port, then you need to use our Green Smartphone Cable. A regular audio cable will not work. These laptops only have one audio jack and it is a combined mic/headphone jack. Configure Inputs
To set things up, you can use config screen (gear in upper left corner) to select the channels displayed as well as change the color of the waveform or add/remove channel from real­time view. All the audio inputs through which you can acquire and record the signal will be listed out in the config screen. The items displayed is based on your computer’s audio configuration. Typically, you will see two audio inputs that represent stereo jack through which you had connected your SpikerBox to your computer. By using color drop­down chooser, you can change the color of the channel’s waveform or turn off the channel by selecting black color. Also, on this screen you can mute sound on your computer’s speaker during recording by clicking the selection box on the top of the config screen.
Real-time view
By default, Spike Recorder will be in the real time view upon startup and will display the waveform of the signal recorded through your SpikerBox. By scrolling up and down, you can change the time scale of your signal presented at the right­hand bottom side of the window. We added great memory depth to Spike Recorder so that you can observe any aspect of the signal you want ­ from events as short as 0.1ms to long trends of up to dozens of seconds. Sometimes, especially when recording a multichannel signal, it will be useful to change the vertical position of the signal axis. For this purpose, you can use the handle on the left­hand side of the axis. With a single click on the handle you can grab and move your axis vertically. You will find zoom buttons next to the axis handle . With “+” and “­” buttons you can change the vertical scale of the signal and, by doing this, zoom in the details of the waveform. As we have mentioned earlier, Spike Recorder has great memory depth. Therefore, if you think you have missed an interesting event, you can press the “Pause” button at any time at the bottom of the screen and scroll the signal waveform back in time. After you have found the event of interest, you can playback signal again by clicking on the play button. To return back to real­time signal acquiring use the “Forward” button next to the “Play”/”Pause” button. Recording
When you have set up your experiment and you are ready to record, simply click on the “Record” button (a round button with a red dot in the center) and Spike Recorder will automatically start saving signals to an audio file. During the recording, you can mark events in your experiment by pressing keys from 0 to 9 on your keyboard. The event markers and their precise timings will be automatically saved to a separate text file in the same directory where your signal recordings had been saved. Spike Recorder will name events file with the same name as the signal recording file, except for the fact that the events file will have an additional “­events” suffix. By using that name, coding Spike Recorder will be able to automatically load and present event markers on the waveform the next time you playback your experiment’s recording. When you click for the second time on the “Recording” button, Spike Recorder will stop the recording signal and present you with a popup with the full path of the recorded file on your computer. Thresholding
If you want to average neuron spikes or take a snapshot of a single spike, you can use threshold view. By clicking on the “Threshold” button, Spike Recorder will enter the threshold mode that will catch the snapshot of the signal every time the waveform crosses the threshold level. There will be an additional slider on the top of the screen in the threshold mode. With this slider you can adjust the number of consecutive spikes that will be used for the calculation of the average spike. For example, if you select to average 25 consecutive spikes, Spike Recorder will always use the 25 most recently captured spikes for the calculation of the average spike. In extreme cases, when you set slider to the value of one, Spike Recorder will present only a raw signal of the most recent spike. By using the handle on the right­hand side of the screen, you can adjust a threshold level that suits your needs in an experiment. Spike Analysis
Once you have recorded and saved an experiment, you can open it for analysis. To open the experiment recording, click on the “Browse” button on the right­hand top side of the window. After the file browser has appeared, you can locate the audio file with the recorded signal and open it (audio files will have .wav file type extension). Spike Recorder will automatically load the other files created during the recording or the analysis of the signal (timestamps of events and sorted spike trains). When you open a saved experiment, Spike Recorder will show one additional button that you can use to enter Spike Analysis view. The Spike Analysis view will initially detect all the potential neuron spikes in the signal and mark them with a white dot. Detection algorithm is very sensitive and it will typically detect a lot of spike candidates that can represent a spike of the neuron we are interested in or the spikes of a distant neuron or even noise glitches. Therefore, in order to filter the spike set, you will need to adjust a valid voltage interval using two handles on the right­hand side of the window. During the filtering, you can use the scrollbar at the bottom to check if the filtering interval is compliant with the rest of the signal. When you are satisfied with the filtering results, you can click on the save button at the bottom of the screen and close the Spike Analysis view. After the spike sorting analysis, when you return to the normal mode, every selected spike will be marked with a spike marker on the top of the waveform. Signal measurement
During the playback of the recorder signal, you can pause it at any time and inspect an interesting part of the signal in more details. You can hold the right­click button (Control + click on Mac OSX) and drag the mouse cursor to select the interval of the signal. Spike Recorder will show you the time length of the interval in milliseconds and calculate RMS (Root mean square) of the selected portion of the signal. Connecting Your SpikerShield
In order to connect your SpikerShield to Spike Recorder, you will need to follow these few easy steps. First step is to mate EMG SpikerShield on the top of the Arduino Uno board ​
aligning all the pins on the shield to the female headers on the Arduino. In second step, you will need to connect Arduino to your computer and upload our “MultichannelSpikerShield.ino”​
sketch to it. To accomplish this, you will need a USB cable provided with Arduino board and Arduino IDE software that you can download from the website. You can find a detailed explanation on how to install the Arduino software and upload sketch to the Arduino board on the website. After you have uploaded our ​
sketch to your Arduino board, your hardware setup is ready to record signals. You can now close Arduino software and open Spike Recorder. Note: ​
It is important to understand that Spike Recorder and Arduino Software are using the same serial port and USB cable to communicate with Arduino board. Because of this, you cannot connect to Arduino board from Spike Recorder and Arduino Software at the same time. Therefore, the safest thing to do is to simply close Arduino Software when you start using Spike Recorder. Third step is to connect Spike Recorder to Arduino board. In order to do this, you should open Config screen in Spike Recorder ​
(gear in the upper left corner) and search for “Select Port” section. You will find all serial device ports on your computer listed out in the drop down list . Select the same one you have used to upload our sketch in Arduino Software and click on the “Connect” button. After this, Spike Recorder will present you with the real­time view and automatically start recording signal from SpikerShield. Initially, Spike Recorder will record only one signal input from SpikerShield at the sampling rate of 10 kilo­samples per second (10 000 samples per second). To record multiple channels from SpikerShield, open Config screen again and you will find an additional “Number of channels” section below serial ports drop­down list. If you change the number of channels using this drop­down list, Spike Recorder will instantly start recording multiple channels from SpikerShield and it will accommodate the sampling rate of each channel so that it cumulatively does not breach the sampling limit of 10 kilo­samples per second. Therefore, if you select to use just one channel, the sampling rate of that channel will be 10 kilo­samples per second. But, if you select two channels, the sampling rate of both channels will be set to 5 kilo­samples per seconds (tree channels will have the sampling rate of 3.3 ksamples/s, 4 channels 2.5 ksamples/s and so on). 
Download PDF