In the project instructions, I’ve briefly talked about the BYB SpikeRecorder app that I’ve been using on an iPad to add to my grasshopper vision project the flavor of a low-cost-and-DIY-albeit-of-great-quality tool. Here, I’ll talk about it in a bit more details to give the spotlight to one of the main components of my project.
Firstly, the purpose of the original SpikeRecorder version that BYB has published is to record data directly to your PC (or tablets & smartphones) while you can observe the recording in real time. There’s also the functionality of saving the recording to be played back anytime. And if you’re familiar with the classic model of an action potential (aka spikes!), the SpikeRecorder also allows a threshold view, where you can set your threshold and get a snapshot of your spikes.
This is a classic “spike” event when the electrochemical properties of a neuron is at work. These spikes are essentially changes in voltage due to the chemical and electrical difference inside and outside of a neuron’s membrane. Movements of sodium and potassium across the membrane via channels and the way their charges get distributed — these are the main components of a spike.
Art by Backyard Brains
If you’re interested in checking out this app and perhaps get some spikes, the app is available for android and ios. And of course, the code is on github for the open source spirit!
One of my mentors, Stanislav Mircic, is the computer science god of BYB. He graciously added the “Grasshopper experiment” functionality to the app. The app now can provide both the visual stimuli (simulated balls thrown at grasshopper’s eye) and recording/analysis of the DCMD neuron activity.
Sorting a bunch of spikes at once:
Zooming into one DCMD spike!
By Dieu My Nguyen
As I experiment on more and more little grasshoppers, I realize the importance of organization skills. Specifically, I’m talking about how messy my housekeeping of the recordings and analyses have been. In an earlier post, I wrote that my naming system for each grasshopper is in the following format: [day][month][letter indicating order in the day]. While a name of 2408A isn’t terrible, what my mentor Greg Gage came up with in a minute is significantly better. (And sitting down with him to discuss my preliminary results also jumpstarted the task of organizing folders and files and sharing in Dropbox.)
So, now each grasshopper has the following name format: G[number]-[month][day][year]-[test number]. So, G08-070816-01 denotes that the folder containing recordings belonging to the 8th grasshopper I’ve tested on, on the 8th of July in 2016, for the first test. A second or third test could follow, and new folders are made to keep the data for those tests. So my database is now much more organized:
While this log is not about building or experimenting or data, it’s about a skill that anyone, especially scientists, should have. I can imagine all sorts of problems if all my recorded m4a files stayed in the chaos from before: wrong data analyzed, data from different grasshoppers get mixed up, etc. Good thing I sorted this out before entering the point of no return.
By Dieu My Nguyen
By Patrick Glover
A longstanding debate in philosophy focuses on the existence of free will. Do humans have some inherent moral agency, or are our brains just biological machines, subject to the same physical determinism as any other animal? Modern neuroscience can provide some insight to these questions, such as Benjamin Libet’s famous 1986 experiments that correlate the EEG readiness potential (RP) with a subconscious decision to perform a voluntary action. In summary, before a subject performs a simple voluntary action (e.g. “Flex your wrist whenever you feel like it”), the secondary motor area generates a characteristic EEG potential over 300 milliseconds before the subject becomes aware that they are going to perform the action. If the brain had already been preparing to perform the action for nearly half a second before the individual consciously “decides” to perform the action, did the individual actually… decide? Since the paper was published, dozens of philosophers and scientists have attacked the paper’s methods, arguing that the claims made by Libet are overstretched and that the RP carries very little weight in the free will discussion. In the true spirit of open science, anyone should be able to recreate this experiment, both improving the quality of this debate with additional data, as well as furthering the general public’s understanding of neuroscience.
My project aims to allow the DIY community to participate in the discussion by recreating Libet’s experiment using just an Arduino and a simple open source shield.
Paper upon which this project is based: Neurophysiology of Consciousness 1993 Libet.pdf
Below are the complete instructions for this experiment, if you want to see the whole process (every step and attempt to achieve this project) you can check out the following logs:
For this Experiment you will need.
- 1 × Arduino Uno
- 1 × Backyard Brains EMG Spikershield
- 1 × Backyard Brains Heart/Brain Shield
- 1 × Headband
- 2 × Snap fastener studs
- 4 × EKG adhesive electrodes
- 1 × Conductive electrode gel
- 1 × MATLAB
Assembly of the recording device is quite simple. The EMG and EEG signals each come from their respective Arduino shields, both sold by Backyard Brains fully assembled. If you’re interested in building everything from scratch, the schematics are online here and here.
- Insert the Heart/Brain shield directly down onto the Arduino so that all the male pins fit into the board’s female ports. We want the EEG signal being sent out on channel 1, so short the two pins on analog 1 on the Heart/Brain shield
- Our goal is to stack all three boards, but the signal output jacks on the Heart/Brain shield block the EMG shield from fitting effectively. To fix this, we simply add pin header extenders to all the EMG shield’s pins. The boards should stack without any issues. We want EMG signal on channel 2, so short both pins on analog 2 on the EMG shield.
- Once the shield stack is assembled, load the spike recorder code onto the Arduino, found here. Also, download the free Backyard Brains Spike Recorder software.
Here is the final product
The next step is to make a bidirectional, one channel EEG headband. To do this, take an elastic headband and insert two snap fasteners roughly 4 cm away from each other on the midline of the band. Any type of headband should work, but avoid any with metallic paints or patterns.
On your subject, secure the headband vertically on the front of their head so that the flat faces of the two metal studs are on C3 and Cz.
Apply a dab of electrode gel underneath each lead to help conduct signal. This is especially important for subjects with longer hair. Place a single electrode on the left mastoid process. This will be our reference electrode.
Place one electrode on the back of your subject’s right hand, and two on the inside of their forearm, spaced around 15 cm apart, right over the ulnar nerve.
Plug in an orange muscle electrode cable to each of the shields, and attach alligator clips to your subject. On the EMG board, connect the black clip to the back of the hand, and red clips to the ulnar nerve electrode. On the EEG board, connect the black clip to the mastoid electrode and the red clips to the electrodes on the headband. Polarity is not important.
Connect your Arduino to the computer over USB, and open the Spike Recorder app. In settings, connect to the USB modem by selecting it in the drop down menu and clicking the plug icon. Once connected, go back to settings and select two channels. You can also adjust band pass filter settings as needed. You are almost ready to begin recording data.
Verify that your signals are EEG and EMG. To do this, have your subject relax their arms on a table, and have them flick their wrist several times. You should see one channel showing significant spiking any time the subject does this. In this particular recording, EEG signals are harder to verify. The presence of alpha waves is greatly diminished over this region of the scalp. One way to verify the signal is valid is to have your subject quickly direct their eyes up and then return to the center. The head should not move – only eyes. Have them look down, center, left, center, right, center. The EEG should register electroocular artifacts. If your resting signal looks similar to below, you may proceed with the test.
Have your subject sit upright and look straight ahead, arms resting on the table. Click the record button on Spike Recorder. Instruct them to briefly and deliberately flick their right wrist any time they feel like doing so. Flicks should be at least four seconds apart. They should not fall into a mindless rhythm — each flick should be intentional. Record as many trials as you see fit, although I’ve noticed I only get a decent response when I’m looking at at least 100 flicks. Click the record button to finish your recording. The software will tell you where it saved the file.
Find the .wav file (It’s in /User/Music/Spike Recorder on Mac) and copy it into your MATLAB project folder. In the runRP MATLAB script, change the file name on line 1 to the name of the file you would like to analyze. In the command window, type runRP. The script will return several figures. All MATLAB code can be found herehttps://github.com/patrick-glover/EEG-Code
By Patrick Glover