Skip to content
OG 2019 - Project 07: PlasticBrain: real-time brain activity on a 3D printed brain
C++ Python C
Branch: master
Clone or download
Pull request Compare This branch is 1 commit behind brainhack-ch:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Inverse Solution

Plastic Brain

3D real-time representation system of the brain activity.

Project created by Manik Bhattacharjee and Pierre Deman - see

Developed during the HUG Hackathon 2018 - see and

This repository is from the 2019 Brainhack Geneva hackathon and yielded the first functional prototype.

Project 07: PlasticBrain: real-time brain activity on a 3D printed brain

Work flow

  1. Arduino + Neopixel RGB LED strips (5V 4A power supply, LED strip signal from arduino pin 6, single LED in pin1/ground to display signal reception, power supply and USB grounds must be connected, capacitor connected between + and - of power supply to regulated power fluctuations due to LEDs lighting variations)
  2. Hardware : 3D printed brain (cortical surface extracted with Brainvisa - )
  3. EEG Acquisition with LabStreamingLayer
  4. EEG Filtering using MNE, PYCNBI and SCIPY
  5. Inverse Problem (Sources Localization - matrix generated with Cartool)
  6. Sources to LED Matrix scripts/sources2leds.csv (matrix generated by scripts/ using manually entered closest source in cartool for each LED data/leds.csv)
  7. Communication with the hardware (serial USB connexion to Arduino).


  • Clone this repository:
git clone
  • Install the packages and dependencies...
pip install -r requirements.txt
  • Compile and load in your Arduino (with the arduino IDE) the file scripts/signal2ligth/signal2ligth.ino
  • Get an EEG system than can send its data in realtime using LSL (Lab Streaming Layer)


  • Connect the arduino to your USB port.
  • Start the EEG data stream in your local network.
  • Run the main code:
python BrainHackScripts/


This project is licensed under the MIT License - see the file for details


See also the list of contributors who participated in this project.

You can’t perform that action at this time.