Breathe-Easy EEG

Summary of Breathe-Easy EEG


Summary (under 100 words): This project builds a battery-powered EEG system that measures forehead brain activity, amplifies and filters alpha/beta bands, digitizes signals with a PIC32, computes a fixed-point FFT, displays waveforms on a TFT, and drives red/yellow/green LEDs as neurofeedback. Hardware includes instrumentation and op-amp gain/filter stages, a dual-rail battery virtual ground, and ADC voltage shifting. Software acquires 512-sample windows at 333.3 Hz, runs a 16:16 fixed-point FFT, computes calm/excited bin ratios, and sets LED color thresholds. Safety and IEEE standards for EEG bands and isolation were followed.

Parts used in the Breathe-Easy EEG:

  • Adhesive electrodes (2 forehead, 1 arm virtual ground)
  • Jumper cables (twisted pair recommended)
  • Six AA batteries (9 V battery pack)
  • 2200 µF capacitor
  • LM358 op-amps (multiple for filters, virtual ground)
  • INA121 instrumentation amplifier
  • Resistors and capacitors for gain and 2nd order HPF/LPF (examples: 1k, 100k, 20kΩ, 5kΩ, 10kΩ; 1 µF)
  • Voltage divider components for ADC level shifting
  • PIC32 microcontroller (ADC input pin 24)
  • TFT display (for oscilloscope and FFT display)
  • Red, yellow, and green LEDs
  • Function generator (used for test circuit)
  • Misc protoboards/whiteboards, wiring, and connectors
  • Laptop (USB-powered, unplugged from AC) for PIC32 power and interface

Introduction

By measuring brain activity using electrodes and an amplifier circuit, electroencephalograms (EEGs) are at the intersection of electrical engineering and neuroscience. By using signal processing techniques, we can examine the effects of external stimulation, such as music and meditation, on brain waves. We primarily examined alpha and beta brain waves in our EEG. While alpha brainwaves are linked to meditation and relaxation, beta brainwaves are connected to being awake and using our brain for reasoning. In order to try and control an external event, in this case turning on a specific coloured LED based on our alpha and beta brain waves, we can then observe the resulting brain waves on a screen. The neurofeedback from the LEDs offers a way to self-regulate brain waves in this way, which can be helpful in applications like cognitive-behavioral therapy.

High Level Design

Rationale and Source of Our Project Idea

Since both of us were interested in neural feedback systems and projects with biological applications, we decided to work on this project. Charles Moyes and Mengxiang Jiang’s Brain-Computer Interface project from the spring of 2012, in which brain waves were utilised to control an EEG Pong game, served as our inspiration. We were interested in using our brain waves to visualise our mental state and in determining whether the biomedical applications of electrical and computer engineering could help us understand how our brains respond to stress and how to relax ourselves through breathing exercises. This project’s combination of analogue circuit design, signal processing, and software design made it technically intriguing to us as well.

Quick Solutions to Questions related to Breathe-Easy EEG:

  • How does the system power the amplifiers safely?
    The system creates a dual-rail virtual ground using six AA batteries, a 2200 µF capacitor, and an LM358 to produce +4.5V and -4.5V rails so no AC power is directly connected to the user.
  • Can the PIC32 display the EEG signal?
    Yes; the PIC32 drives a TFT used as an oscilloscope and to show FFT spectrum and frequency data, switching modes with a hardware switch.
  • How are alpha and beta activity determined?
    The software sums FFT bins corresponding to calm (about 5–16 Hz) and excited (about 17–40 Hz) ranges, averages them, and computes a calm-to-excited ratio.
  • What LED colors correspond to which brain states?
    Green lights for ratio > 1.2 (more alpha/calm), red for ratio < 0.9 (more beta/excited), and yellow for ratios between those thresholds.
  • How often is the FFT computed and the display updated?
    ADC samples are taken at 333.3 Hz; with FFT size 512, the FFT and TFT update occur every 1.5 seconds.
  • Does the design follow IEEE frequency band standards?
    Yes; the project references IEEE definitions for EEG bands and designed HPF/LPF cutoffs to focus on alpha and beta bands per those standards.
  • How was 60 Hz interference reduced?
    They twisted input jumper cables to reduce common-mode 60 Hz noise and used hardware filtering plus software filtering after the FFT.
  • Can the system be tested without electrodes attached?
    Yes; a test circuit and function generator were used to attenuate a 2 Vpp signal down to ~1 mV to simulate brain wave amplitudes for stage-by-stage testing.
  • What fixed-point format does the FFT use?
    The FFT uses 16:16 fixed-point arithmetic to represent values in 32-bit integers for performance.
  • Is calibration implemented to adapt thresholds per user?
    Not in the final system; calibration was planned but not completed due to time constraints, though a calibration approach is described for future work.

About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.