One of the biggest challenges when doing EEG hyperscanning (or doing neural data acquisition on two or more people at the same time) is to synchronize multiple systems. hyperSynch aims to present a simple and cheap solution to synchronizing multiple EEG systems with each other AND both video and audio. The idea can be extended to multiple EEG systems, but this tutorial will show how to synchronize two systems + and Audio & Video recording
The arduino receives an input signal from a push button through pin 4, which changes its status from high to low (pull-up resistor; you can read more about it here). Then it sends out 3 TTL pulses (50ms each with 500ms between them) from pin 6 to a TRS socket (where you can connect a splitter to send the information to both an audio interface + a camera) AND from pins 7, 8 to two parallel ports (where you can connect multiple EEG amplifier systems). Here you can see a basic schematic of the connections and the signal flow.
- Basic handling of a soldering iron and drill
- Basic Arduino programming skills
- Sand paper
- Soldering iron
- x1 6.35mm Jack
- x1 BNC Female
- x2 DB25 Female (Parallel port)
- x1 Arduino uno
- x1 AB USB Cable
- x1 Project Box
- x1 Hand Push Button Switch (know that we are using an "Oqus Trigger Switch". It is called "Wired trigger" here: https://www.qualisys.com/accessories/other-accessories/)
- x1 Sharpie Metallic Permanent Marker
- x1 Terminal Strip
- x1 6.35mm Male to 2x 6.35mm Female Y Splitter
- Any kind of wire
Building the box
- Upload the code into the Arduino Uno (if in doubt, go through this tutorial)
- Using the Sharpie, trace the lower shape of the TRS jack, BNC socket, and DB-25 female on the upper part of the project box
- Usign the drill, pierce the project box so that the connectors can go through
- Using the drill and the cutter, cutout enough of one of the short ends of the project box so that the usb part of the Arduino peeks out of the project box
- Drill the Arduino in place using a screw
- Place the terminal strip on the opposite side of the Project Box with respect to the Arduino, and drill it in place
- Using sandpaper, sand down any rough edges around the holes you just made
- Using the soldering iron, solder...
- ~20cm of wire to both Pin 2 and Pin 25 (image is seen from the front) of each of the DB25 female connectors
- ~20cm of wire to both the active and ground (outside one) sleeves of the 6.35mm Jack
- ~20cm of wire to both the active and ground (outside one) sleeves of the BNC socket
- Once all the connectors have the wires soldered to them, place them through the holes you drilled on the project box. Drill holes to put in the screws for the DB25 female connector and screw both the BNC socket and the TRS jack in place.
- Pin 2 of both DB25 to the Arduino's Digital Pin 6 and 7 (Active)
- Pin 25 of both DB25 to the terminal strip (Ground)
- Active sleeve of the TRS jack to Pin 8
- The ground of the TRS jack to the terminal strip
- The active sleeve of the BNC socket to Pin 4
- The ground of the BNC socket to the terminal strip
- The terminal strip to either of the Arduino's GNDs
- Once everything is in place, close the box and use the screws to close it shut
- Once you're done with the project box, you will need to connect...
- Each EEG systems to one of the parallel ports (DB-25)
- A button to the BNC input (if the button you found does not have a BNC connector, you can easily find adapters)
- A TRS cable to a splitter. From this splitter, connect a TRS Plug 3.65mm to the audio interface you are using and the other end to the audio input of the camera you are using (you will probably need a TRS to XLR adaptor; it will depend on the input of your camera)
- Here are some of the images for the setup I use for my own research.
Synching the data
The pulses in the EEG data will be saved up as event triggers. You can use this to synchronize the EEG signals from both participants using toolboxes such as EEGLAB (MATLAB) or MNE (Python). To synchronize the audio with the video, you can do such using any video editor. For us, we are interested in looking at the activity while musicians play together, so we quantify the time between the last TTL pulse and when the pianists start playing together and then correct for that in the EEG signal.
Testing for delays
Questions, comments or feedback? Feel free to email me to firstname.lastname@example.org