Control Reality With Your Mind: the Ultimate Open-Source Cerelog ESP32 Brain-Computer Interface

by Cerelog99 in Circuits > Electronics

32 Views, 1 Favorites, 0 Comments

Control Reality With Your Mind: the Ultimate Open-Source Cerelog ESP32 Brain-Computer Interface

product_EEG (1).png
IMG_3756.jpg
demo_set-2.jpg

The "Multitool" for Neuroscience


Have you ever wanted to control a robot with your thoughts? Or visualize your brain’s reaction to meditation in real-time?

For years, makers interested in Brain-Computer Interfaces (BCI) faced a frustrating choice: buy "toy" headsets with noisy, unusable data, or spend thousands on medical-grade equipment. We believed there had to be a better way. We wanted a device that you could take out of the box, plug in, and start streaming research-grade EEG data immediately.

Meet the Cerelog ESP-EEG. Its open source Software, Firmware and Schematic can be found on GitHub

It is a high-precision, 8-channel biosensing board built around the powerful ESP32-S3 and the industry-standard ADS1299 ADC. We designed it to be the "multitool" for neuroscience—offering 24-bit resolution, active noise cancellation, and full compatibility with Python, BrainFlow, and even a modified version of the OpenBCI GUI.

In this Instructable, I will show you how to set up the hardware, how to visualize your brainwaves without writing a single line of code using our custom GUI fork, and how to start developing your own mind-controlled applications.

Supplies

Cerelog ESP-EEG: 8-Channel Brain Computer Interface Circuit Board (BrainFlow Compatable)

To turn your brainwaves into digital data, you need the right gear. Here is the complete setup:

The Core Hardware:

  1. 1x Cerelog ESP-EEG Board: (Available Here)

It Contains:

  1. The Brain: ESP32-WROOM-DA (Dual-core, WiFi/BT ready).
  2. The Sensor: Texas Instruments ADS1299 (The gold standard for EEG).

Required Accessories:

  1. USB-C Cable: Must be data-capable.
  2. EEG Electrodes: Gold cup electrodes or a compatible EEG Cap.
  3. Touch-Proof Adapters: To connect the electrodes to the board’s headers.
  4. Conductive Gel: Essential for reducing impedance (getting a signal through hair/skin).
  5. Laptop running on only battery power

Software (Free & Open Source):

  1. Cerelog OpenBCI GUI (Fork): For instant visualization.
  2. BrainFlow (Fork): For custom Python/C++ development.
  3. VS Code: For editing scripts.

The "Secret Sauce" (Solving the Noise Problem)

walloutlet.png

[Image Suggestion: Close up of the ADS1299 chip and the Analog front-end circuitry on the PCB.]

The Problem: 60Hz Hum

The biggest enemy of DIY neuroscience is electrical noise. The human body acts like a giant antenna, picking up 50Hz/60Hz hum from wall outlets and lights. Most DIY boards use "passive grounding," which often results in a signal that looks like a jagged mess.

Our Solution: Closed-Loop Active Bias

The Cerelog ESP-EEG is different. We implemented a True Closed-Loop Active Bias (Drive Right Leg).

Instead of just connecting you to the ground, the board measures the common-mode noise on your body, inverts the signal, and actively drives it back into your body through the Bias pin.

The Result: A significantly lower noise floor and fewer artifacts. This allows you to capture signals as small as 10µV—perfect for detecting Alpha waves or training Machine Learning models.

⚠️ CRITICAL SAFETY WARNING

⚡ NON-ISOLATED DEVICE: BATTERY OPERATION REQUIRED ⚡

This is the most important step. This device does not feature isolation circuitry. To ensure user safety:

  1. ALWAYS use this device with a laptop running on BATTERY POWER.
  2. NEVER connect this device to a computer that is plugged into a wall outlet (Mains Power).
  3. NEVER use this device on a desktop computer.

Why?

Mains power introduces massive electrical noise that will ruin your data. More importantly, in the event of a power surge, a non-isolated device connected to your head creates a safety hazard. Stay unplugged!

Hardware Setup & Headset

demo_set.jpg

You need to get the electrodes onto your scalp. You have two main options:

Option A: The DIY Route (3D Printed)

If you have a 3D printer, you can print an Ultracortex style headset (files here). We provide specific adapter plate files to mount the Cerelog board directly to the frame.

Option B: Standard EEG Cap

For the most reliable research data, use a standard EEG cap with our touch-proof adapters.

Electrode Placement:

  1. Signal Pins (1-8): Place these over the Occipital lobe (back of the head) to easily detect visual cortex activity (Alpha waves).
  2. SRB1 (Reference): Connect this to a neutral point, like an earlobe. Ear clips recommended
  3. BIAS Pin (The Noise Killer): Ear clips recommended Connect this to the mastoid (bone behind the ear) or the other earlobe. You MUST use conductive gel here. If the Bias pin doesn't have good contact, the noise cancellation won't work!

The "No-Code" Method: OpenBCI GUI & LSL

IMG_3756.jpg

Forked OpenBCI GUI showing 8 channels of clean data streams

We know that not everyone wants to write Python scripts just to see if their brain is working. That’s why we support a forked version of the OpenBCI GUI via the Lab Streaming Layer (LSL) protocol. Full instructions to set this up here

How to Visualize Data Instantly:

  1. Download the GUI: Get our forked version from GitHub
  2. Run the LSL Script: Download our Python LSL connector script.
  3. Connect your board.
  4. Run python lsl_streamer.py.
  5. The script will detect the board and start broadcasting data over your local LSL network.
  6. Open the GUI: Select "LSL" as the data source.

Boom. You now have a real-time, professional-grade dashboard showing your brainwaves, FFT (Frequency analysis), and EMG activity. You can record data, configure filters, and even use the built-in "Focus" widgets.

The "Pro" Method: BrainFlow & Python

For developers, researchers, and students, we built the software stack on BrainFlow (Forked version). This is an industry-standard library that lets you interface with the board using Python, C++, C#, or Java.


Full Instructions on how to collect data from device with Brainflow API custom instance: Here

Custom instance of Brainflow Repo: Here for collecting data with the device.

Note: Test script to quickly view plot and aquire data -> Run 'Shared_brainflow-cerelog/python_package/cerelog_tests/filtered_plot.py' from in above repo. (Must download and run with full Brainflow instance to use)

--------------------

Quick Start (Python):

  1. Clone the Repo:
  2. code Bash

git clone https://github.com/Cerelog-ESP-EEG/ESP-EEG
  1. Install:
  2. Follow the CMake instructions in the Shared_brainflow-cerelog folder to build the core, then install the python package:
  3. code Bash

pip install -e .
  1. Run the Plotter:

Note: Test script to quickly view plot and aquire data -> Run 'Shared_brainflow-cerelog/python_package/cerelog_tests/filtered_plot.py' from in above repo. (Must download and run with full Brainflow instance to use)


You will see a graph plot of your 8 channels in the terminal. This is the foundation for building your own apps.

Demo Time - Mind Control Pong!

Warning: ⚠️ CRITICAL SAFETY Epilepsy Photosensitive seizure warning

Warning, do not play these games if you can't view flashing lights safely.

Included in our Games folder (on GitHub in brainflow repo fork here) are several BCI Pong demos that use either focus levels or flashing lights with SSVEP to play games like pong.


For games relying on concentration they use focus levels

  1. Concentrate: The system detects High Beta/Gamma waves -> Paddle moves UP.
  2. Relax: The system detects Alpha waves -> Paddle moves DOWN.

This demonstrates the power of the ESP-EEG: clean, high-fidelity data that is robust enough for real-time classification.

Conclusion

The Cerelog ESP-EEG isn't just a circuit board; it's a gateway to understanding the human mind. By solving the noise issues and integrating with standard tools like LSL and OpenBCI, we've made neuroscience accessible to every maker.

Where to Buy & Join:

  1. Get the Board: Cerelog.com
  2. Source Code & Files: GitHub
  3. Join the Community: Discord Server
  4. Questions? Email: simon(at)cerelog.com

If you found this interesting, please Favorite this Instructable and share it with your fellow makers. Let us know in the comments what you plan to control with your mind!