Skip to content
hyperSynch is a simple & cheap solution to synchronizing multiple EEG systems with each other AND video and audio while recording these data
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
hM_blackBox
README.md
_config.yml

README.md

Why?

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 Basics

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. diagram

Required knowledge/skills

  • Basic handling of a soldering iron and drill
  • Basic Arduino programming skills

Required Tools

  • Drill
  • Cutter
  • Sand paper
  • Screwdriver
  • Soldering iron

The Materials

Building the box

  1. Upload the code into the Arduino Uno (if in doubt, go through this tutorial)
  2. 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 1
  3. Usign the drill, pierce the project box so that the connectors can go through 2
  4. 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 4
  5. Drill the Arduino in place using a screw 8
  6. Place the terminal strip on the opposite side of the Project Box with respect to the Arduino, and drill it in place 9
  7. Using sandpaper, sand down any rough edges around the holes you just made
  8. 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 5
    • ~20cm of wire to both the active and ground (outside one) sleeves of the 6.35mm Jack 6
    • ~20cm of wire to both the active and ground (outside one) sleeves of the BNC socket 7
  9. 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. 3
  10. Connect...
    • 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 10
  11. Once everything is in place, close the box and use the screws to close it shut 11

The Setup

  1. 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)
  2. Here are some of the images for the setup I use for my own research. 14 15

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

Using an oscilloscope, we tested the delays between the TTL pulses (i.e., between the any of the output signals of the Black Box). The delay between pulses is about 5μs, which is negligible 13

Contact info

Questions, comments or feedback? Feel free to email me to orozcoph@mcmaster.ca

You can’t perform that action at this time.