The previous article covered the fundamentals needed to understand this project: what EEG measures, why the signal is so difficult to capture, and why EEG was the right choice. Now it's time to move from understanding the signal to actually building the hardware.

Before opening a schematic or selecting components, it's important to scope out what needs to be built. Let's step back and ask a basic question:

What does this hardware actually need to do?

What Functionality Does This Device Need?

The primary function is straightforward: record EEG signals from selected regions of the scalp and send that data to a computer for analysis. But recording EEG is not simply a matter of placing electrodes on the scalp and reading a voltage. The signal we're trying to measure is extremely small, and external factors introduce many additional challenges that need to be addressed while designing the device.

The design of any system depends heavily on how it will actually be used. A system designed for a research laboratory has very different requirements than a device designed for use outside a lab.

In a controlled research environment, the subject typically sits still in a chair wearing an EEG cap connected to a dedicated amplifier. Researchers minimize external sources of noise and movement as much as possible, since EEG signals are extremely small and easily affected by anything else that produces an electrical signal.

A device built at home doesn't have the same level of control. It can't be connected to a large amplifier, and the person wearing it can't remain completely still the way they would in a laboratory. They will move, blink, talk, adjust their posture, and interact with their environment. All these things introduce electrical noise into the recording. Thus, the design needs to account for these additional sources of interference, commonly known as artifacts.

Artifacts are signals captured by the EEG system that don't originate from brain activity. Since EEG signals are only a few microvolts by the time they reach the scalp, these unwanted signals can easily become comparable to or even larger than the brain activity we're trying to measure. Movement and muscle activity are some of the biggest sources of contamination. Even small head movements, jaw clenching, or eye blinks can create large electrical signals that appear in the EEG recording. Without additional information, it's difficult to distinguish these artifact signals from actual EEG.

Adding Supporting Sensors

This is where additional sensors become useful. They don't solve the artifact problem directly, but they provide context about what else is happening while EEG is being recorded.

An inertial measurement unit (IMU) combines an accelerometer and gyroscope in a single chip and provides a second data stream that tracks head movement. While it doesn't remove motion artifacts, it gives information about when the EEG signal may have been corrupted, allowing those segments to be ignored or processed differently during later analysis.

Another major source of contamination comes from the heart. The electrical activity generated by the heart is much stronger than brain activity, and some of that signal can spread through the body and appear in EEG recordings, especially near electrodes placed around the ears. A heart-rate sensor provides another reference signal, making it easier to identify rhythmic activity that may not originate from the brain.

Hardware Blocks

Designing a device that works outside a controlled laboratory environment requires more than just EEG electrodes. Based on these requirements, the system naturally breaks into several hardware blocks:

  • Electrodes – forming the interface between the scalp and the electronics
  • Analog front-end (AFE) – amplifying and digitizing the tiny EEG signals
  • Motion sensing – tracking movement-related artifacts using an IMU
  • Cardiac monitoring – capturing heart activity that may contaminate EEG recordings
  • Microcontroller and communication – managing data acquisition and transferring the recordings wirelessly
  • Power management – supplying clean and stable power to the entire system

Each of these blocks solves a specific challenge. In the rest of this article, I'll go through each hardware block and explain why each component was selected. I'll start with the part responsible for capturing the brain's tiny electrical signals: the analog front-end.

The Analog Front-End (AFE)

The recorded EEG signal needs to be processed and transformed before the microcontroller can work with it, and this requires three distinct stages. The signal is far too small to be fed directly into any digital circuitry, so it needs amplification first. EEG spans across several frequency bands and is easily contaminated with artifacts, so it needs filtering to remove these unwanted components. And lastly, a microcontroller can't process a continuously varying analog voltage – it needs the signal to be converted into a stream of numerical values that can be stored, transmitted, and analyzed. That's what digitization does.

An Analog Front-End (AFE) is an integrated circuit that performs all these tasks together. Instead of building a separate amplifier, filter, and conversion circuit, an AFE combines them into a single chip.

What to Look for in an AFE

  • Channel count – Each electrode that records EEG requires its own input channel. The number of channels determines how many signals can be recorded simultaneously, and some AFEs support connecting multiple devices together to increase the total channel count.
  • Resolution – Resolution determines how precisely the AFE can distinguish between different voltage levels. Since EEG signals are extremely small, insufficient resolution can cause useful signal details to get lost in quantization noise, degrading the quality of the recording.
  • Sample rate – The sample rate determines how many times per second the AFE measures the incoming signal. It needs to satisfy the Nyquist criterion, meaning it must be at least twice the highest frequency of interest.
  • Built-in gain stages – EEG signals require significant amplification, and having integrated gain stages reduces the need for external amplification circuits. This simplifies the design and reduces additional sources of noise, since every additional component is another potential source of electrical interference.
  • Interface speed – The AFE needs to continuously transfer recorded EEG data to the microcontroller. A high-speed interface such as SPI is commonly preferred over slower interfaces like I2C, since EEG involves streaming multiple channels of data continuously.
  • Input impedance – The electrode-skin interface has its own impedance, and the AFE input impedance determines how much of the EEG signal actually reaches the amplifier. Since EEG signals are extremely small, the AFE needs a very high input impedance to avoid loading the electrode and losing signal before amplification even starts.

What I Selected

I chose the ADS1299 from Texas Instruments. It's a 24-bit, 8-channel ADC designed specifically for biopotential measurements such as EEG and ECG. It integrates the key functions needed for this project – low-noise amplification, programmable gain, and high-resolution analog-to-digital conversion – all in a single chip. Its high input impedance allows it to work directly with passive, unbuffered electrodes without losing signal at the interface. It's also the chip that OpenBCI and many DIY EEG projects are built around, which makes documentation and community knowledge easy to find.

Datasheet: ADS1299, Texas Instruments

Electrodes

The electrode is the first physical connection between the human body and the electronics. Everything the AFE measures ultimately depends on how well the electrode can capture the tiny electrical signals present at the scalp.

Passive vs. Active Electrodes

An electrode can either be passive or active, depending on where amplification happens. A passive electrode is simply a conductive interface between the scalp and the AFE with no circuitry of its own. An active electrode, on the other hand, has a small buffer amplifier built directly into the electrode, converting the high-impedance signal from the scalp into a lower-impedance signal before it travels through the cable to the AFE.

This difference matters because passive electrodes are more sensitive to interference along the connection between the scalp and the amplifier. Cable movement, environmental noise, and the electrode-skin interface can all introduce unwanted signals into an already tiny EEG measurement. Active electrodes reduce this problem by buffering the signal immediately at the source. However, they introduce additional complexity, cost, and power requirements since every electrode needs its own electronics.

For this project, the choice becomes simpler because the ADS1299 provides a very high input impedance. This allows it to measure signals from passive electrodes without significantly affecting the signal at the electrode interface, avoiding the need for additional circuitry at each electrode and keeping the system simpler.

What to Look for When Selecting Electrodes

  • Signal quality and impedance – Lower and more stable electrode impedance generally results in cleaner recordings because it reduces susceptibility to electrical noise and improves the connection between the scalp and the amplifier.
  • Setup time – A laboratory experiment may tolerate several minutes of electrode preparation, but a device designed for repeated use needs electrodes that can be placed quickly and consistently.
  • Comfort for repeated wear – Since this device is intended to be used outside a laboratory setting, the electrode design needs to remain comfortable over extended periods without causing irritation.
  • Suitability for the selected AFE – Since the ADS1299 can work effectively with passive electrodes, using active electrodes would add complexity without providing enough benefit for this application.

Wet vs. Dry Electrodes

Within passive electrodes, the next major distinction is between wet and dry electrodes.

Wet electrodes use a conductive gel between the electrode and the skin, which reduces impedance and generally provides the highest quality signal. However, they require preparation, can be messy, and the gel dries over time, making them impractical for a device designed to be used repeatedly.

Dry electrodes remove the need for gel entirely. They're much faster to apply and easier to reuse, but the trade-off is typically higher and less stable impedance compared to wet electrodes.

Types of Dry Electrodes

  • Gold-plated disc or cup electrode – A simple and reliable design that works well on exposed skin areas such as the forehead.
  • Conductive silicone pad – A soft, conforming electrode that improves comfort and works well on relatively flat, hairless areas.
  • Comb/tine electrode – Uses small metal structures that separate hair and reach the scalp, making it better suited for hair-covered regions.
  • Pogo pin cluster – Uses multiple spring-loaded pins grouped together as a single electrode. Each pin moves independently, allowing it to adapt to scalp curvature and maintain contact through hair. It's also practical for DIY designs because it can be built from commercially available components.
  • Hydrogel/semi-dry electrode – Uses a solid gel material that absorbs moisture from the skin, providing performance closer to wet electrodes while reducing preparation time. The trade-off is that it introduces a consumable component.
  • Conductive textile electrode – Provides large contact area and can be comfortable for long-term wear, but it's generally less suitable for precise electrode placement and areas with dense hair.

What I Selected

I started with wet gel electrodes because they represent the standard approach for high-quality EEG recordings. However, the preparation time and mess made them impractical to use casually and repeatedly. Next, I tested gold-plated cup electrodes, which were simple, reusable, and worked well on exposed skin locations such as the forehead. But they didn't maintain reliable contact through hair.

This led to the final design choice: a pogo pin cluster electrode. By grouping several spring-loaded pins together, each pin can move independently and adapt to variations in scalp shape and can separate hair strands to make direct contact with the scalp. Most importantly, this approach is practical for a DIY device because it can be built using commercially available pogo pins rather than requiring a custom electrode manufacturing process.

The IMU

An Inertial Measurement Unit (IMU) combines two sensors: an accelerometer and a gyroscope. They provide six degrees of motion measurement, commonly referred to as 6-axis sensing. An accelerometer measures linear acceleration along three axes. It can detect both movement changes and the direction of gravity, providing information about head orientation and tilt. A gyroscope measures angular velocity, showing how quickly the head is rotating around each axis. Together, these measurements provide a reasonably complete picture of how the head is moving at any given moment.

The IMU doesn't remove motion artifacts from the EEG signal directly, but it provides a reference signal that helps identify when a section of EEG data may have been affected by movement. During later analysis, those segments can either be excluded or processed differently.

What to Look for When Selecting an IMU

  • Sample rate – The IMU needs to sample fast enough to capture the movements that matter. The same Nyquist principle discussed in the AFE section applies here, but the signal is very different. Head movements occur much more slowly than EEG activity, with most relevant motion information appearing below a few tens of Hz. An IMU operating in the tens-to-hundreds of Hz range is generally sufficient, unlike the much higher sampling requirements of the EEG signal itself.
  • Power consumption – The IMU may need to run continuously while being used. Therefore, low baseline power consumption is important for maximizing battery life.
  • Interface compatibility – The IMU needs to communicate efficiently with the microcontroller alongside the other sensors. Digital communication buses such as I2C allow multiple sensors to share the same physical connection lines instead of requiring separate connections for every device. Each sensor has its own address, allowing the microcontroller to communicate with the required sensor when needed. This reduces wiring complexity, saves microcontroller pins, and makes the overall PCB design simpler.

What I Selected

I chose the LSM6DSO from STMicroelectronics, a 6-axis accelerometer and gyroscope combination designed for low-power applications. It supports both I2C and SPI communication, comes in a compact package suitable for portable designs, and provides the motion sensing capability needed to correlate movement with EEG artifacts.

Datasheet: LSM6DSO, STMicroelectronics

The Heart Rate / SpO₂ Sensor

Heart's electrical activity can be measured optically using a photoplethysmography (PPG) sensor. A PPG sensor works by shining light, typically red and infrared, into the skin using LEDs while a photodiode measures the reflected light. As blood volume changes with each heartbeat, the amount of reflected light changes slightly, and those small periodic changes can be used to determine the timing of each heartbeat and calculate heart rate.

What to Look for When Selecting a PPG Sensor

  • Reliable pulse detection – The sensor should provide a stable pulse waveform despite small changes in placement or skin contact. This depends on factors such as LED brightness, photodiode sensitivity, and built-in signal conditioning.
  • Power consumption – Unlike passive sensors, the LEDs must be actively driven during measurement. Features such as programmable LED current and adjustable sampling rates help reduce overall power consumption while maintaining adequate signal quality.
  • Interface compatibility – Like the IMU, the sensor should communicate using I2C so it can share the same communication bus with the rest of the system, reducing PCB complexity and the number of microcontroller pins required.

What I Selected

I chose the MAX30102 from Maxim Integrated. It integrates the LEDs, photodiode, optical front-end, and digital processing into a single compact package while communicating over I2C. It's widely used in portable devices, has extensive software support, and provides a reliable pulse signal suitable for correlating cardiac activity with EEG recordings.

Although the MAX30102 also supports estimating blood oxygen saturation (SpO₂) by comparing red and infrared light absorption, that capability is not used in this project.

Datasheet: MAX30102, Analog Devices

The Microcontroller

Everything upstream only matters if something can read all three sensors fast enough, keep them synchronized, and stream the data off the device. This means one fast SPI channel for the AFE, a shared I2C bus for the IMU and PPG sensor, and wireless connectivity to stream that data to a computer for storage and analysis. The microcontroller (MCU) acts as the central hub of the system and performs all these tasks.

What to Look for When Selecting a Microcontroller

  • Communication interfaces – The microcontroller needs enough hardware communication peripherals to talk to every sensor simultaneously. In this design, that means one SPI interface for the AFE and an I2C interface shared between the IMU and PPG sensor, while still having enough processing bandwidth to continuously move data without dropping samples.
  • Wireless connectivity – To make the device fully wireless, recorded data needs to be transmitted. Choosing a microcontroller with built-in BLE eliminates the need for a separate wireless chipset, reducing both PCB complexity and power consumption.
  • Antenna implementation – Some microcontroller modules require an external antenna, while others include a factory-designed and certified antenna. Designing a reliable Bluetooth antenna requires RF layout knowledge, impedance matching, and specialized test equipment. For a project like this, a module with an integrated antenna removes an entire layer of complexity and significantly reduces development risk.
  • Package size – The physical size of the module directly affects the final PCB footprint.

What I Selected

I started development with the ESP32-S3-WROOM-1-N8, a widely used module with 8 MB of flash, built-in BLE, and extensive documentation that made it an excellent platform for developing and debugging the hardware and firmware. Once the design was working reliably, I switched to the ESP32-S3-MINI-1, which provides everything this project requires while occupying significantly less PCB area.

I also intentionally chose the version with the integrated antenna. While modules with external antenna connectors offer more flexibility, designing and tuning a custom Bluetooth antenna is a specialized RF task that requires additional expertise and equipment.

Datasheet: ESP32-S3-MINI-1, Espressif

Supporting Components

With every sensor and the microcontroller selected, the final piece of the system is supplying each of them with the voltage they require. Unlike a simple digital circuit where every component runs from the same supply, this design contains a mix of analog and digital hardware. Each device has its own voltage requirements, so the power system needs to generate several different supply rails from a single battery.

Major Power Requirements

  • ADS1299 (AFE) – The digital interface operates from a 3.3 V supply, while the analog front-end is powered from a bipolar ±2.5 V supply. This provides the analog circuitry with a total 5 V supply while allowing signals to swing around ground.
  • ESP32-S3-MINI-1 – Operates from a standard 3.3 V digital supply.
  • LSM6DSO IMU – Supports supplies from 1.71 V to 3.6 V and is commonly operated from the same 3.3 V rail as the microcontroller.
  • MAX30102 PPG sensor – Uses two separate supplies: 1.8 V for its internal logic and 3.3 V for the LED driver, which requires significantly more current than the digital circuitry.

Power Architecture

Power enters the device through USB, which charges a single-cell lithium battery using the MCP73831 battery charger. During normal operation, the rest of the system is powered from the battery's nominal 3.7 V output.

Datasheet: MCP73831, Microchip

From there, several voltage regulators generate the supply rails required by the individual components. The TLV757P33 generates the main 3.3 V rail used by the ESP32, IMU, the ADS1299 digital supply, and the MAX30102 LED supply. The TLV70025 generates the positive +2.5 V analog supply for the ADS1299. Since conventional regulators can only reduce voltage within the same polarity, the LM2664 charge pump inverter is needed to create a negative supply by inverting the positive voltage. The TPS72325 then regulates that charge pump output to produce a clean −2.5 V analog supply. This additional regulation stage is important because charge pumps inherently introduce switching noise, and the analog front-end benefits from a cleaner supply. Finally, the TLV757P18 generates the 1.8 V logic supply required by the MAX30102.

Datasheet: TLV757P, Texas Instruments | Datasheet: TLV70025, Texas Instruments | Datasheet: LM2664, Texas Instruments | Datasheet: TPS72325, Texas Instruments |

Although these components may seem like supporting details, clean and stable power is fundamental to measuring microvolt-level EEG signals. A noisy power supply can easily degrade the performance of even the best analog front-end.

With the sensing hardware, processing hardware, and power architecture now defined, the component selection phase of the project is complete. The next step is turning these design decisions into physical hardware: drawing the schematic, laying out the PCB, and assembling the first prototype. That's what Article 3 covers.