Isai Olvera
Work / Kernel, 2019–2026

Flow2.x/EEG System Validation

A production test station for the EEG acquisition board in Kernel's Flow2 headset. I didn't design the acquisition board; I designed the station that tests it: two boards, one that powers and measures the board under test and one that emulates its 32 electrodes, plus twelve tests that grade every board in about eight minutes.

The validation board rendered on black at a three-quarter angle: a large green PCB with gold pogo pins in a rectangular nest outline at its centre, screw terminals at the left, the ESP32 module at the back right and two large push buttons at the front right.
RoleDesigned both station boards, the test plan, analysis, firmware and database integration
BoardsT1012-A01 Validation · T1012-A02 Emulation
Tests12, about 8 min per board
ToolsKiCad · ESP32-S3 · Python
The station

Four pieces of hardware and one host script

The board under test is the headset's EEG acquisition board, designed by others at Kernel: four ADS1299 converters, 30 channels plus reference and bias, streaming over Bluetooth. A good test has to prove three things about it: that it powers up cleanly, that its firmware and radio work, and that every channel measures microvolts correctly. The last one is the hard part, because the only thing that normally drives those inputs is a human head.

So the station has two boards. The validation board powers the board under test from a bench supply through a metered, latching switch, reads its rails through pogo pins, works its button and thermistor inputs, and listens to its debug port. The emulation board plugs into the board's four electrode harnesses and gives every channel a precise "skin contact" from 0 Ω to 220 kΩ, an open circuit, or a 40 µV test signal. A host script runs the sequence, records the Bluetooth stream through a dongle, analyses it and applies the limits.

Host PCBLE dongleBoard under testValidation boardEmulation boardBench supply host script: sequence,capture, limits, records 1012-A01 acquisition board4× ADS1299 · 30 ch + REF + BIASnRF52840 BLE · 500 frames/spowered from its battery input T1012-A01 ESP32-S3, isolated USBDUT power path: switch,ideal diode, INA238, latch3× ADS1115 rail sense, pogosphotoMOS NTC + button,UART listenerAD5941 impedance portSTART / ABORT, pass/fail LED per test T1012-A0231 electrode channels + BIAS8 contact slots each, 0.1 %40 µV injection network CH2 5.0 V: fixture logicCH3 3.7 V: board under test BLEUSBUSB,isolated VBATT, rails,NTC, PB, UART I²C via ISO1640 4× DF36 harness:32 electrodes, and theemulator's 5 V fromthe board under test
Board 1 · T1012-A01 Validation PCBA

Powering and protecting the board under test

The validation board is the station's controller. Everything it does to the board under test goes through that board's own connectors, so the board is tested exactly as it ships, and every path is built so that neither board can damage the other if one is unpowered, plugged in backwards or faulted.

Top view of the validation board: silkscreened blocks for fixture supply, rail sense, DUT power path, DUT control, impedance analyzer, MCU and host, and operator UI around a central nest outline with eight pogo pins.
Top view. The outline in the middle is where the board under test sits, test points down on eight pogo pins.
  • Size231 × 130 mm, 4 layers
  • ControllerESP32-S3, native USB through an ADuM3160 isolator
  • DUT supplyBench CH3 through a P-FET switch, LM66100 ideal diode, 50 mΩ Kelvin shunt and INA238
  • Rail sense3× ADS1115, 12 inputs, 0.1 % dividers, LM4040 self-check
  • DUT control4× CPC1017N photoMOS: thermistor states, button press
  • ExtrasAD5941 4-wire impedance port for electrode characterization
  • OperatorSTART, ABORT, green/red LED per test, amber INVALID
Sheet 3 · DUT power path

Switched power with a hardware over-current latch

The board under test runs from a bench supply set to its battery voltage. A high-side P-FET switches it on; an LM66100 ideal diode keeps the board's own charger from back-feeding the supply; a four-terminal 50 mΩ shunt and an INA238 measure the current and the delivered voltage.

  • Power is held by a single D flip-flop. A rising edge on PWR_ON sets it; any low on its clear line cuts power: the MCU, the INA238's over-current alert, or the MCU being in reset or unpowered.
  • Once tripped, power stays off until firmware asks again, so a fault cannot make the board flicker on and off.
  • A 2.2 kΩ series resistor lets the INA238 alert override the MCU pin without fighting it; a FET discharges the output whenever power is off.
  • Fixture logic runs from a separate supply channel, so fixture current never shows up in the board's current measurement.
From the release schematic. Wires orange; the crossed parts are fit-only-if options (a gate-drain soft-start).
Sheet 4 · Rail sense

Measuring every rail at its test points

Eight pogo pins land on the test points of the board's 5 V, 3.3 V and 1.8 V rails. Three 16-bit ADS1115s read them through identical 20 k / 10 k dividers, so the same block repeats on every rail and the firmware applies one ratio.

  • Divide by three keeps a 6 V fault inside the ADC's ±2.048 V range; the 20 kΩ also limits current into the ADC if the board under test is on while the fixture is not.
  • The board's ground is read too and subtracted from every rail: return current through the battery cable lifts it a few millivolts.
  • An LM4040 2.048 V reference on a spare input is read every run. If it reads wrong the run is flagged INVALID instead of passing a bad board.
Three ADS1115s, twelve inputs, one repeated divider block
Sheet 5 · DUT control

Pressing buttons and faking temperature without sharing a wire

The board under test checks a battery thermistor before it lets its boost converter start. The fixture emulates it: photoMOS relays switch 10 k (25 °C, start allowed), 47 k (cold fault) or 3.3 k (hot fault) onto the thermistor node, and a fourth relay presses the power button, 100 ms for on and 3 s for off.

  • Each photoMOS is an LED driving an isolated MOSFET, so there is no leakage or back-powering through it when either board is off.
  • With no relay closed the node reads as a cold fault, so the board under test cannot start until the fixture selects 10 k.
  • The debug UART goes through a buffer powered from the board under test's own 3.3 V, whose outputs go high-impedance when that board is off.
Four photoMOS relays and a self-powered UART buffer
Sheet 6 · MCU and host link

Keeping the PC's ground out of a microvolt measurement

The fixture shares ground with the board under test and the bench supply. A laptop's USB ground would add a second path and a loop right next to inputs that resolve a fraction of a microvolt, so the ESP32's USB runs through an ADuM3160 isolator.

  • USB ground and fixture ground never join; no copper crosses under the isolator.
  • 24 Ω on each data line on both sides of the isolator, CC pull-downs so USB-C to USB-C cables work, ESD clamps at the connector.
  • The ESP32 avoids its strapping pins; the console header has no 3.3 V pin so an adapter cannot back-feed the rail.
USB-C into the ADuM3160 isolator
Board 2 · T1012-A02 Emulation PCBA

An electrode emulation circuit board

The emulation board replaces the headset's electrodes and the scalp under them. It plugs into the acquisition board's four DF36 harnesses exactly as the headset's electrode nodes do, and it is powered only from that board's own analog 5 V, the same way real electrodes are. Every contact it presents is a 0.1 % resistor, so it is the reference standard the board under test is graded against.

The emulation board rendered on black: a green PCB with four columns of identical small channel circuits, four DF36 connectors along one edge and a control section at one end.
Four columns of channels, one per electrode harness
  • Size113 × 172 mm, 4 layers
  • Channels30 + REF, each a copy of the real active electrode
  • Per channelTMUX1108 8:1 mux, 0.1 % slot resistors, OPA376 follower
  • BIASPassive mux to BODY: 0 Ω, 10 k, 47 k, open, 220 k
  • Control3× TCA9555, MCP4725 DAC, all behind an ISO1640 I²C isolator
  • PowerFrom the board under test only, ~0.8 mA per channel
Sheet 6 · Electrode channel, used 31×

Each channel copies the real electrode circuit

Each headset electrode is an active one: the contact feeds a 1 kΩ resistor and an OPA376 follower, which drives the cable through 49.9 Ω. The emulator's channel copies that circuit part for part. The board under test therefore sees a real electrode's output impedance and input capacitance, and its contact-quality readings calibrate at headset scale instead of at an idealised one.

A2 A1A0 = 0A0 = 1Used for
000 Ω10 knoise, matched inputs
0122 kINJgain and crosstalk
104.7 kopenlead-off
1147 k220 kmapping, impedance ladder

A2 and A1 are shared by all channels; A0 is per channel. One shared write plus 31 single bits puts any channel on any of two slots, which is how the mapping test tags channels one at a time.

One channel: eight contact slots between BODY and a copy of the headset's electrode buffer. The C_in footprint stayed empty for bring-up; the impedance ladder decides whether it is needed.
Sheet 3 · Control and injection

Forty microvolts from a 12-bit DAC

A known test signal has to be small enough for an EEG input and exact enough to grade gain to 1 %. The DAC swings ±0.40 V; a 100 kΩ resistor turns that into about 4 µA, which flows through 10 Ω into BODY. The voltage across that 10 Ω is the test signal, set by two resistors rather than by the DAC's output level alone.

0.40 V ÷ 100 kΩ × 10 Ω = 40.0 µV
  • A 10 µF coupling capacitor AC-couples the DAC, and a TMUX1108 disconnects the whole network when it isn't in use, so it puts no load on BODY during other tests.
  • Every switch bit sits on the board-under-test side of an ISO1640, so the fixture's I²C ground never joins the analog ground; the expanders power up with every channel open.
MCP4725 → 10 µF → TMUX1108 → 100 kΩ → INJ → 10 Ω → BODY
The test list · in run order

Fixture checks first, so a broken fixture can't fail a good board. Then power, firmware and radio, then the analog tests that need the emulator. The low-voltage boost test runs last because it ends by turning the board off.

FX fixtureAP powerAF firmware and radioAI impedanceAS signal
TestWhat it checksHowPass when
Operator flow · station mode

The station is meant for a production operator, not an engineer. The fixture has one START button, one ABORT button, and a green and a red LED for every test. Each LED blinks while its test runs and stays lit with the result; the host shows a summary and a running tally.

  1. Enter the serialor the board's BLE address is used
  2. Load the board4 electrode harnesses, battery, thermistor, button and UART cables
  3. Press STARTOVERALL blinks when ready
  4. Watch the LEDseach blinks while its test runs
  5. Read the resultOVERALL green, red, or amber for an invalid run
  6. Unloadsummary and tally on screen; next board
≈ 8 minper board for the full sequence
InstantABORT: the fixture cuts DUT power at once, for a board loaded backwards or a wrong cable; an over-current trips a hardware latch on its own. The record is kept as aborted
INVALIDa fixture self-check that fails flags the run instead of failing the board
Firmware and host software

The software around the boards

The station runs on two programs with a strict split. The fixture firmware on the ESP32-S3 owns anything that needs millisecond timing or keeps the hardware safe: one shell command per test step, the power latch, the operator panel and the emulator. A Python host script owns everything that needs judgement: the sequence, the Bluetooth capture, the analysis, the limits and the record of every run.

Fixture firmwareHost scriptTest record ESP32-S3 · C++ · PlatformIOPython · asyncioone folder per run one shell command per teststep, millisecond timing power latch on/off,over-current trip level ABORT: power off first,report second supply monitor sampledinside the fixture operator LEDs, START emulator over isolated I²C events on the serial stream test sequence andoperator station mode Bluetooth capturethrough the dongle analysis: noise, gain,impedance, mapping limits from a versionedTOML file bench supply over SCPIor operator prompts result LEDs, summary,running tally every value and every check(value, lo, hi, pass) limits file copy + SHA-256 software commit, and whetherthe tree had local changes fixture log, board boot log supply-monitor CSVs, raw EEG index: one row per run → built for hand-off to thefactory test database USBserialwrites

Data from repeated runs on one board

records/<board>/<run time>/
  record.json        every value, every check, test states, station and software version
  summary.txt        human-readable result table
  limits.toml        the exact limits used (its SHA-256 is in record.json)
  fixture_log.txt    every fixture command, reply and event, with host time
  dut_uart.log       the board's boot log onwards
  mon_ap03.csv       supply monitor while streaming
  mon_ap04.csv       supply monitor during the noise test
  eeg/               raw Bluetooth captures and their segments
records/index.csv    one row per run, every test's state
Results · first board, Nov 30 – Dec 1, 2026

What the data said

One acquisition board went through the station repeatedly while the tests were tuned. Below: power, noise and the signal path; a contact-quality reading that turned out to fold back on itself; and what the board's noise is actually made of.

AP-01 · AP-02 · AP-03 · power

Rails identical at full and low battery

The board's boost converter holds every rail to within a millivolt whether its input sits at 3.7 V or at 3.4 V. Start-up takes 117 ms against a 50–300 ms window; a 3 s button hold turns it off at 2.45 s.

Rail3.70 V in3.40 V inBand
Current while streaming over BLE, 100 ms samples
INA238 samplemean 159.6 mAlimit band for the mean, 90–220 mA

The spikes are radio packets going out in bursts. No over-current trips, no low-load gaps.

AF-03 · shorted-input noise

Shorted-input noise of 2.4 µVpp

With every emulator contact at 0 Ω an ideal board would record a flat line. This one records 2.4 µVpp (0.33 µVrms) in the 0–45 Hz EEG band: inside the 2–2.5 µVpp design budget, under the 2.8 µVpp median limit, and no chip noisier than another. The same channel moves about ±0.3 µVpp from run to run, which is what a 30 s sample of random noise does.

2.4 µVppmedian of 30 channels; 2.39–2.46 across three runs
< 0.01 µVadded by the fixture's own supply monitoring
run 1run 2run 3design budget 2–2.5 µVppper-channel limit 3.5 µVpp
AS-01 · gain and response

Checking the signal path with a known 40 µV input

The fixture plays a 10 Hz sine, then a 40 Hz one, into the emulator's injection network while half the channels sit on the signal and half on an ordinary 22 kΩ contact. Including the 0.44 µV the test current drops along the emulator's own BODY copper, the resistors predict 40.44 µV.

0.2 %median 40.38 µV vs 40.44 predicted
0.3 %every channel 40.33–40.44 µV
0.95540 Hz ÷ 10 Hz (38.55 ÷ 40.38 µV), vs 0.956 from the ADS1299's filter
−0.08 to +0.24 %gain spread over 30 channels; limit ±1 %
0.6 s of each pass, as recorded by the board
CH0 on the test signalCH1 on 22 kΩpredicted: ±40.44 µV at 10 Hz, ±38.66 µV at 40 Hz

Filtered 1 Hz high-pass and a low-pass that stays flat through 45 Hz, so the 40 Hz pass keeps its true size; the 60 Hz mains and the 133 Hz contact tone are removed.

AI-01 · contact quality

The contact reading folds back on itself

The acquisition board judges each electrode's contact by putting a small 133 Hz tone on the head through its bias output and seeing how much of it reaches each channel. The tone reaches the converter by two routes, and the converter records the difference. On the channel's route the contact resistance R charges the electrode buffer's input capacitance (C_in, fitted at 60.6 pF on the emulator), delaying the tone by R·C_in. On the reference route the reference electrode's 49.9 Ω output drives about 31 nF of filtering on the board, a fixed 1.52 µs.

tone left ≈ 2π · 133 Hz · 25 mV · |τ_REF − R · C_in|

The firmware converts only the size of what's left, not its sign. The tone vanishes where R·C_in equals 1.52 µs, about 25 kΩ on the emulator (about 12.7 kΩ on a headset, whose electrodes have more input capacitance), and contacts on either side of that null read alike. A perfect 0 Ω contact and a mediocre 47 kΩ one both read about 91–92 %.

Firmware contact quality vs the emulator's contact
–reported contact quality (model; firmware floors to whole %)
–other contact that reads the same

The null follows the reference electrode

Stepping the reference contact from 0 to 220 kΩ moved the null one-for-one: null = REF + 25.2 kΩ, within 0.1 kΩ up to 47 kΩ and within 1 kΩ at 220 kΩ, where it is extrapolated. The reading is always relative to the reference electrode, so if the reference sits on a dry spot the whole scale shifts. Headset electrodes have about twice the input capacitance, so there the rule is REF + 12.8 kΩ, and a dip seen near 50 kΩ on real headsets points to a reference contact of about 37 kΩ.

measured null, median of 30 (bar: 10–90 %)REF + 25.2 kΩheadset: REF + 12.8 kΩ

The fix is in data the board already measures

Using the tone's phase as well as its size gives a signed estimate that only ever goes up with resistance. Re-analysing the existing ladder data offline: with one calibration shared by all channels it tracks the true value with about ±5 kΩ of channel spread; with a two-point calibration per channel (0 Ω and 47 kΩ) the held-out points land within about ±55 Ω, and 220 kΩ reads about 0.3 % low. It's a firmware change, not new hardware.

Estimated vs true contact resistance, kΩ
current firmware, size only (band: channel range)signed, one calibration (band: channel spread)signed, per-channel calibrationreading = true
Noise spectrum · noise vs contact

Most of the noise comes from the input filter resistors

Split by frequency, the shorted-input noise is a flat floor of about 33 nV/√Hz above 5.4 Hz, with the usual 1/f rise below. There are no lines from the radio, the boost converter or the clocks: only mains and the board's own 133 Hz contact tone, with its harmonics folding back to 101 and 165 Hz. About 55 % of the white noise power is the thermal noise of the 20 kΩ + 20 kΩ input filters. 4.99 kΩ resistors would be about 23 % quieter, at the cost of larger filter capacitors that load the electrode and move the contact calibration.

The part shared by every channel comes in through the reference path, mostly below 5 Hz, and common-average referencing removes it in analysis.

Input-referred noise density, nV/√Hz, log–log
each channel, median (band: 10–90 %)channel's own noise (common mode removed)shared by all channelsfit: 32.6 nV/√Hz white, 1/f corner 5.42 Hzthermal noise of the input filter: 20 kΩ legs 25.7, 4.99 kΩ legs 12.8

What a poor contact costs

Stepping the emulator's contact from 0 to 220 kΩ, each channel's noise rises by exactly the contact's own thermal noise, √(32.6² + 4kTR), with nothing fitted: within 3 % at every step, so the electrode buffer adds no measurable current noise. Below about 20 kΩ a contact adds under 8 %; at 65 kΩ it matches the whole amplifier; at 220 kΩ the in-band noise reaches 0.49 µVrms, right at the IFCN's 0.5 µVrms guideline for clinical EEG.

Repeatability · chip timing

The board was unloaded and reloaded between runs. The spread is tiny next to every limit, so the production limits will be set by how good boards differ from each other, which needs the next 10–20 boards, not by the station's own scatter.

MetricRun 1Run 2Run 3Spread

The four converters sample together

Measuring the phase of the 40 Hz sine on every channel puts the four ADS1299s within about ±1 µs of each other (+1.3, +0.1, −0.6, +0.5 µs, ±0.6): under 0.1 % of the 2000 µs sample period. A chip a sample behind would sit 200 times further out. The board samples at 500.0 Hz on the fixture's clock, within 0.02 %.

channel delay ±1σchip mean
C_in per channel, two runs, pF
run 2run 3

The channel-to-channel pattern repeats, so it's real: most likely part-to-part differences between channels. The cause isn't confirmed yet.