Skip to the content
2 layers100.3 × 101.6 mmEeg pcb v4, the printed circuit board in 3D

This repository contains the code and hardware design used in my thesis on Steady-State Visually Evoked Potential (SSVEP) Brain-Computer Interfaces. It includes signal acquisition, processing, and classification methods, along with the corresponding circuit implementation.

Size
100.3 × 101.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
75
Nets
80
Pads
225
Tracks, vias
315, 38
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
23 Mar 2026
Updated
29 Apr 2026

Overview

Eeg pcb v4 is an open-source printed circuit board by Spiros7bit, from the Spiros7bit/SSVEP-Based-Brain-Computer-Interface-BCI repository on GitHub. It is a 2-layer board of 100.3 × 101.6 mm with 75 parts on 80 nets, routed with 315 tracks and 38 vias.

It is built around the LT1491AIN and AMS1117. Its parts include 26 capacitors, 22 resistors, 11 connectors, 4 ICs and 2 diodes. It belongs with the interfaces and adapters boards of this library.

Main components

2

README

README.md

SSVEP-Based Brain-Computer Interface

Overview

This project implements a real-time Steady-State Visually Evoked Potential (SSVEP) Brain-Computer Interface (BCI) using an ESP32 microcontroller and a custom PCB for analog interface. It was developed as part of a thesis and demonstrates how EEG signals can be processed and classified in real time on embedded hardware.

The system detects brain responses to visual stimuli at specific frequencies and converts them into control decisions.


System Architecture

The signal processing pipeline consists of the following stages:

  1. Analog Interface

    • Instrumentation Amplifier
    • Low Pass Filter, Sallen Key, 2 order
    • AC amplifier
    • Notch 50 Hz filter
    • Final AC Amplifier
    • Right Leg Driver circuit
  2. Signal Acquisition

    • ADC sampling at 1 kHz
    • Hardware timer interrupt for precise timing
  3. Preprocessing

    • DC offset removal (IIR high-pass filter)
    • FIR band-pass filtering
  4. Feature Extraction

    • Goertzel algorithm for frequency detection
    • Target frequencies: 10 Hz, 12 Hz, 20 Hz, 24 Hz
  5. Decision Making

    • Argmax power comparison
    • Median Absolute Deviation (MAD)-based classifier
  6. Output

    • Real-time signal visualization via Serial Plotter
    • Classification results (Argmax & MAD)

Features

  • Analog interface and Acquition System
  • Real-time processing on ESP32
  • 1 kHz sampling using hardware timer interrupts
  • Efficient fixed-point DSP implementation
  • FIR filtering with circular buffer
  • Sliding window Goertzel analysis (with overlap)
  • Robust classification using MAD
  • Serial output for debugging and visualization

Hardware Requirements

  • ESP32 development board
  • EEG acquisition circuit (as designed in the thesis)
  • Electrodes and analog front-end

ADC Input: GPIO34 (ADC1_CHANNEL_6)


Software Requirements

  • Arduino IDE or PlatformIO
  • ESP32 board support package

How It Works

Sampling

A hardware timer triggers ADC sampling at 1000 Hz. Each sample is processed in real time.

DC Removal

A simple IIR filter removes the DC component from the signal:

text
dc_est = dc_est + k * (x - dc_est)

FIR Filtering

A band-pass FIR filter is applied to isolate relevant EEG frequencies.

Goertzel Algorithm

The Goertzel algorithm is used to compute the energy at specific target frequencies efficiently.

  • Window size: 2048 samples
  • Step size: 256 samples (overlap processing)

Decision Logic

Two decision methods are implemented:

  1. Argmax

    • Compares power between frequency groups
  2. MAD (Median Absolute Deviation)

    • Computes a robust threshold based on signal statistics
    • Reduces noise and false detections

Output Format

The system outputs data via Serial in the following format:

text
signal_value, argmax_decision, mad_decision

This can be visualized using the Arduino Serial Plotter.


Project Structure

text
.
├── main.ino
├── fir_new_2_1000hz.h   # FIR filter coefficients
├── README.md

Applications

  • Brain-computer interfaces (BCI)
  • Assistive technologies
  • Neuroengineering research
  • Real-time embedded DSP systems

Future Improvements

  • Add more target frequencies
  • Improve classification accuracy
  • Wireless data transmission (Bluetooth/WiFi)
  • GUI for real-time monitoring
  • Add a TinyML algorithm

Author

Developed as part of a thesis project on SSVEP-based Brain-Computer Interfaces.

Parts

75
QtyValueFootprintReferences
20CCapacitor_SMD:C_1206_3216MetricC10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C23, C24, C25, C27, C28 +4
9RResistor_SMD:R_1206_3216MetricR5, R6, R7, R8, R9, R14, R20, R21, R22
6Conn_01x01_PinTestPoint:TestPoint_Pad_D1.0mmJ5, J6, J7, J8, J9, J10
4R_PotentiometerPotentiometer_SMD:Potentiometer_Bourns_TC33X_VerticalRV3, RV7, RV8, RV9
31kResistor_SMD:R_1206_3216MetricR11, R12, R18
3Conn_CoaxialConnector_Coaxial:BNC_Amphenol_B6252HB-NPP3G-50_HorizontalJ1, J2, J3
210kResistor_SMD:R_1206_3216MetricR13, R19
210nCapacitor_SMD:C_1206_3216MetricC3, C4
21megResistor_SMD:R_1206_3216MetricR1, R2
22uCapacitor_SMD:C_1206_3216MetricC1, C2
230kResistor_SMD:R_1206_3216MetricR16, R17
23kPotentiometer_SMD:Potentiometer_Bourns_TC33X_VerticalRV5, RV6
2500kPotentiometer_SMD:Potentiometer_Bourns_TC33X_VerticalRV1, RV2
25kResistor_SMD:R_1206_3216MetricR3, R4
2Conn_01x19_PinConnector_PinHeader_2.54mm:PinHeader_1x19_P2.54mm_VerticalJ4, J11
2LEDLED_SMD:LED_0805_2012MetricD1, D2
2LT1491APackage_SO:SO-14_3.9x8.65mm_P1.27mmU1, U2
11.8uCapacitor_SMD:C_1206_3216MetricC7
113kResistor_SMD:R_1206_3216MetricR15
13.9uCapacitor_SMD:C_1206_3216MetricC8
14kPotentiometer_SMD:Potentiometer_Bourns_TC33X_VerticalRV4
175kResistor_SMD:R_1206_3216MetricR10
1AD623Package_SO:SO-8_3.9x4.9mm_P1.27mmU3
1AMS1117Package_TO_SOT_SMD:SOT-223-3_TabPin2U4
1Battery_CellTerminalBlock:TerminalBlock_Altech_AK300-2_P5.00mmBT1

Similar boards

  • 2 layers70 × 50 mmFuel capacity sensor, the printed circuit board in 3D

    Fuel capacity sensor

    gpgreen/fuel_capacity_sensor

    KiCAD hardware design for Fuel Tank Capacity Sensor for capacitance style RV tank with CAN output

    87 parts
  • 2 layers74.4 × 51.2 mmEsp32-wroom timer, the printed circuit board in 3D

    Esp32-wroom timer

    AlessandroAU/Chorus32-ESP32LapTimer

    This is an ESP32 port of the popular Chorus RF Laptimer

    66 parts102GPL-3.0
  • 2 layers44 × 20.5 mmQrng, the printed circuit board in 3D

    Qrng

    Spooky-Manufacturing/QRNG

    Quantum Random Number Generator

    29 parts86GPL-3.0
  • 4 layers125 × 90 mmAnalog board, the printed circuit board in 3D

    Analog board

    EERNINUO/ArbWave30

    ArbWave30 – 30MHz 任意波形发生器 | FPGA + 高速DAC | SCPI 可控

    295 parts53GPL-3.0
  • 2 layers100 × 45 mmTranspOtterNG, the printed circuit board in 3D

    TranspOtterNG

    Jana-Marie/transpOtterNG

    Next Generation of TranspOtter.

    63 parts51
  • 2 layers85 × 56 mmBasicengine, the printed circuit board in 3D

    Basicengine

    uli/basicengine-pcb

    Schematics and PCB layout for the BASIC Engine home computer

    115 parts48
  • 2 layers230 × 116 mmCvocd banana, the printed circuit board in 3D

    Cvocd banana

    hotchk155/cvocd.a

    176 parts38
  • 2 layers22 × 71 mmCircut, the printed circuit board in 3D

    Circut

    larry-wong/tiny_sensor

    基于 ESP32-S3 的温湿度 / 光照 / 人体存在传感器和红外发射器。

    18 parts34

Questions

How big is the Eeg pcb v4 PCB?

It measures 100.3 × 101.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Eeg pcb v4 use?

75 parts, built around the LT1491AIN and AMS1117. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Eeg pcb v4 KiCad files?

From the Spiros7bit/SSVEP-Based-Brain-Computer-Interface-BCI repository on GitHub, at the commit this page was made from: the board is eeg_pcb_v4/eeg_pcb_v4.kicad_pcb and its schematic eeg_pcb_v4/eeg_pcb_v4.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Eeg pcb v4 design in my own project?

Its repository states no licence, so its author keeps all rights: ask Spiros7bit before reusing the design.