Project A: The ADS1299 board
Eight channels of 24-bit EEG around the chip inside most research and consumer systems. Schematic in KiCad, fabricated and assembled by JLCPCB, firmware on an ESP32, streaming into BrainFlow. A semester of evenings, and the whole signal chain becomes yours.
On this pageA semester of evenings
Your one-channel amplifier is three chips, two batteries, and a mat of jumper wires, and it picks up the room whenever you move your elbow. It gave you one trace. To see alpha move across the back of the head, or to tell a left hand from a right one, you need eight of it, quieter, on something that does not fall apart when the desk is bumped.
All of that fits in a 10 mm square. The Texas Instruments ADS1299ADS1299 Texas Instruments' 8-channel, 24-bit biopotential front-end chip used in OpenBCI and many research amplifiers. Related: Delta-sigma ADCDelta-sigma ADC A converter that samples very fast with a crude 1-bit decision and averages, achieving 24-bit resolution at modest rates; what the ADS1299 uses., OpenBCIOpenBCI The open-source EEG hardware company whose Cyton (ADS1299) and Ganglion boards are the default hobby and research-lite amplifiers.. Glossary entry holds eight instrumentation amplifiersInstrumentation amplifier A precision differential amplifier with very high input impedance and high CMRR, built from three op-amps and sold as a single chip such as the INA128 or AD8232. Related: Differential measurementDifferential measurement Measuring the difference between two electrodes rather than one electrode against ground, so anything common to both cancels., Common-mode rejection ratio (CMRR)Common-mode rejection ratio (CMRR) How much better an amplifier responds to a difference between its inputs than to a signal shared by both, in decibels; 100 dB means 100,000 times., Input impedanceInput impedance How hard the amplifier's inputs are to push current into; it must be far higher than the electrode impedance or the signal is lost in the divider.. Glossary entry, eight 24-bit delta-sigmaDelta-sigma ADC A converter that samples very fast with a crude 1-bit decision and averages, achieving 24-bit resolution at modest rates; what the ADS1299 uses. Related: Analog-to-digital converter (ADC)Analog-to-digital converter (ADC) The chip that measures a voltage at regular instants and turns each into a number., ADS1299ADS1299 Texas Instruments' 8-channel, 24-bit biopotential front-end chip used in OpenBCI and many research amplifiers.. Glossary entry converters, a bias driveDriven-right-leg circuit A third electrode fed with an inverted copy of the common-mode signal, so the body's hum is actively cancelled instead of merely rejected. Related: Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body., Ground electrodeGround electrode The electrode that ties the body to the amplifier's zero and, in a good design, is driven to cancel common-mode hum.. Glossary entry amplifier, lead-off detection, and a test-signal generator. It is inside the OpenBCIOpenBCI The open-source EEG hardware company whose Cyton (ADS1299) and Ganglion boards are the default hobby and research-lite amplifiers. Related: ADS1299ADS1299 Texas Instruments' 8-channel, 24-bit biopotential front-end chip used in OpenBCI and many research amplifiers. , BrainFlowBrainFlow A library that talks to OpenBCI and most consumer EEG headsets with one API, in Python and other languages. . Glossary entry Cyton, inside several clinical amplifiers, and inside more than one consumer headset. Building a board around it is the audition for the hardware spine. You draw the schematic, lay out the board, have it made and assembled for about $215, write the firmwareFirmware The program running on the microcontroller, which configures the chip, reads samples on time, and ships them to the computer. Related: SPISPI A simple four-wire bus for talking to chips like the ADS1299 from a microcontroller. . Glossary entry that configures it and streams samples, and end up with an instrument whose every design decision you can defend.
The ADS1299's reference is 4.5 V and its maximum gain is 24. At that gain, how big is one step of the 24-bit converter?
About 22 nanovolts. Full scale is ±4.5 V divided by the gainGain How many times an amplifier multiplies its input; 1000× turns 50 microvolts into 50 millivolts, enough for an ADC to see. Related: Instrumentation amplifierInstrumentation amplifier A precision differential amplifier with very high input impedance and high CMRR, built from three op-amps and sold as a single chip such as the INA128 or AD8232. . Glossary entry of 24, so ±187.5 mV, or 375 mV total. Divide by 2²⁴ (about 16.8 million) and each step is 22.4 nV. The chip’s own noise is around a microvolt, so the last five bits or so are noise. That is normal for a delta-sigma converter and it is why “24-bit” is a description of the arithmetic, not the accuracy. The explainer on analog to digital is about this.
Parts
| Part | Where | Qty | Approx. |
|---|---|---|---|
| ESP32 DevKit (or Raspberry Pi Pico) For streaming from the ADS1299 board over USB later. Either board works; pick one ecosystem and learn it. | Amazon, Adafruit, SparkFun | 1 | $9 |
| Temperature-adjustable soldering iron kit with solder, stand, and flux $11.99 for the iron, five tips, solder, a stand, and flux, which is everything Phase 1 needs. Its temperature dial is open-loop and its tips wear fast; the Pinecil V2 at $25.99 from Pine64 holds temperature properly and will outlast your degree, and it needs a USB-C PD supply you may already own. | Amazon | 1 | $12 |
| Handheld oscilloscope with a built-in signal generator (FNIRSI DSO-510) $44.99 for 10 MHz, 48 MSa/s, and a DDS generator in one box, which replaces two purchases. 10 MHz is plenty for biopotentials and enough to eyeball SPI, but not enough for careful digital timing; the engineering building has real bench scopes for that. A Hantek 6022BE USB scope is $65.90 and a Rigol DHO800 is the one to want. | Amazon | 1 | $45 |
| USB isolator (ADuM3160 based) Lets the board talk to a laptop on charger power without connecting the laptop's ground to you. It is full-speed only (12 Mbps), which is fine here. Adafruit's is $34.95 with better isolation ratings and documentation. Batteries are still simpler. | Amazon | 1 | $9 |
| Your ADS1299 board, fabricated and assembled by JLCPCB (5 boards, 2 assembled) The chip dominates. The eight-channel ADS1299IPAG is $69.82 each from TI in single quantity. JLCPCB's own charges are small (bare boards about $2, an $8.18 economic assembly setup, a $1.53 stencil, $0.0016 per joint); the rest is the other components and shipping. The four-channel ADS1299-4PAGR is $37.10 at LCSC and brings the whole order to about $150, and four channels cover every Phase 3 project. Order two assembled so one can die. | JLCPCB | 1 | $215 |
| Total (prices drift; treat as a ceiling) | $290 | ||
The design, stage by stage
Start from TI’s evaluation board schematic and the OpenBCIOpenBCI The open-source EEG hardware company whose Cyton (ADS1299) and Ganglion boards are the default hobby and research-lite amplifiers. Related: ADS1299ADS1299 Texas Instruments' 8-channel, 24-bit biopotential front-end chip used in OpenBCI and many research amplifiers. , BrainFlowBrainFlow A library that talks to OpenBCI and most consumer EEG headsets with one API, in Python and other languages. . Glossary entry Cyton schematic, both public. Do not invent; copy and understand, then change one thing at a time.
Power. A 5 V analog rail (AVDD) from a low-noise regulator and a 3.3 V digital rail (DVDD) for the chip’s logic and the microcontroller. If your microcontroller is a 3.3 V part, DVDD at 3.3 V means no level shifting. The Cyton runs the analog side at ±2.5 V instead of 0 to 5 V; either works. Every supply pin gets a 0.1 µF capacitor within a few millimetres, and the reference pins get the capacitors the datasheetDatasheet The manufacturer's document for a chip: pinout, limits, typical performance, and the reference circuit you should start from. Glossary entry specifies to the microfarad.
Inputs. Each channel is a differential pair. For EEGElectroencephalography (EEG) Recording the brain's electrical activity from electrodes on the scalp, a few tens of microvolts of blurred, summed cortical activity. Related: Electrocorticography (ECoG)Electrocorticography (ECoG) Recording from electrodes placed on the surface of the brain under the skull, usually during epilepsy surgery evaluation; cleaner and sharper than EEG. , Magnetoencephalography (MEG)Magnetoencephalography (MEG) Recording the tiny magnetic fields produced by cortical currents with superconducting sensors in a shielded room; less blurred by the skull than EEG, and far more expensive. , Volume conductionVolume conduction The spreading of currents from a source through the conductive tissues of the head, which is why one source shows up on many electrodes and why scalp EEG is blurry. , Microvolt (µV)Microvolt (µV) One millionth of a volt. Scalp EEG is tens of microvolts; a AA battery is 1.5 million of them. . Glossary entry you usually tie all the negative inputs together to a single reference electrodeReference electrode The electrode every other channel is measured against; there is no neutral spot on the head, so the choice shapes every trace. Related: MontageMontage The particular arrangement of which electrodes are subtracted from which, such as referential, bipolar, or average reference. , Common average referenceCommon average reference Re-referencing every channel to the mean of all channels, which approximates a neutral reference when electrodes cover the head well. . Glossary entry through the chip’s SRB pin, so each channel measures its electrodeElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry against the common reference. A small series resistor (a few kilohms) and a capacitor on each input give input protection and some radio-frequency filtering. Connect through touch-proof (DIN 1.5 mm) sockets so that ordinary EEGElectroencephalography (EEG) Recording the brain's electrical activity from electrodes on the scalp, a few tens of microvolts of blurred, summed cortical activity. Related: Electrocorticography (ECoG)Electrocorticography (ECoG) Recording from electrodes placed on the surface of the brain under the skull, usually during epilepsy surgery evaluation; cleaner and sharper than EEG. , Magnetoencephalography (MEG)Magnetoencephalography (MEG) Recording the tiny magnetic fields produced by cortical currents with superconducting sensors in a shielded room; less blurred by the skull than EEG, and far more expensive. , Volume conductionVolume conduction The spreading of currents from a source through the conductive tissues of the head, which is why one source shows up on many electrodes and why scalp EEG is blurry. , Microvolt (µV)Microvolt (µV) One millionth of a volt. Scalp EEG is tens of microvolts; a AA battery is 1.5 million of them. . Glossary entry electrodesElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry plug straight in.
Bias drive. The chip’s BIAS amplifier is the driven-right-leg circuitDriven-right-leg circuit A third electrode fed with an inverted copy of the common-mode signal, so the body's hum is actively cancelled instead of merely rejected. Related: Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. , Ground electrodeGround electrode The electrode that ties the body to the amplifier's zero and, in a good design, is driven to cancel common-mode hum. . Glossary entry you built by hand in Phase 1, now built in. Its output goes through the series resistor to a third electrodeElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry. The internal bias reference can be set to mid-supply.
Digital. SPISPI A simple four-wire bus for talking to chips like the ADS1299 from a microcontroller. Related: FirmwareFirmware The program running on the microcontroller, which configures the chip, reads samples on time, and ships them to the computer. . Glossary entry to the microcontroller: clock, data in, data out, chip select, plus the data-ready line that the chip pulls low each time a sample is available, and start and reset lines. Keep the digital traces away from the analog inputs.
Layout. Analog on one side, digital on the other, one ground plane split logically so digital return currents never cross under the analog inputs. Input traces short, paired, and symmetric. A guard ring around the input section. The datasheetDatasheet The manufacturer's document for a chip: pinout, limits, typical performance, and the reference circuit you should start from. Glossary entry’s layout section is short and every sentence in it is there because someone got it wrong.
Assembly. The ADS1299ADS1299 Texas Instruments' 8-channel, 24-bit biopotential front-end chip used in OpenBCI and many research amplifiers. Related: Delta-sigma ADCDelta-sigma ADC A converter that samples very fast with a crude 1-bit decision and averages, achieving 24-bit resolution at modest rates; what the ADS1299 uses. , OpenBCIOpenBCI The open-source EEG hardware company whose Cyton (ADS1299) and Ganglion boards are the default hobby and research-lite amplifiers. . Glossary entry is a 64-pin quad flat pack with 0.5 mm pitch. You can hand-solder it with flux and patience, but JLCPCBJLCPCB A Chinese board house that fabricates and assembles small-run PCBs for a few dollars, the standard for student projects. Related: Printed circuit board (PCB)Printed circuit board (PCB) The board that holds and connects your components; designing one is how a breadboard prototype becomes an instrument. . Glossary entry will place and solder it for a few dollars, and the chip is expensive enough that you want the reflow done by a machine. Order the passives from their parts library so everything can be assembled in one go.
Bring-up, in order
- Before the chip is powered, check every supply rail with the multimeter with the microcontroller disconnected. 5.0 on AVDD, 3.3 on DVDD, nothing shorted.
- Connect the microcontroller. Read the ID register over SPISPI A simple four-wire bus for talking to chips like the ADS1299 from a microcontroller. Related: FirmwareFirmware The program running on the microcontroller, which configures the chip, reads samples on time, and ships them to the computer. . Glossary entry. The ADS1299ADS1299 Texas Instruments' 8-channel, 24-bit biopotential front-end chip used in OpenBCI and many research amplifiers. Related: Delta-sigma ADCDelta-sigma ADC A converter that samples very fast with a crude 1-bit decision and averages, achieving 24-bit resolution at modest rates; what the ADS1299 uses. , OpenBCIOpenBCI The open-source EEG hardware company whose Cyton (ADS1299) and Ganglion boards are the default hobby and research-lite amplifiers. . Glossary entry returns a fixed value (0x3E) and until you read it, nothing else matters. If you cannot, check chip select polarity, SPISPI A simple four-wire bus for talking to chips like the ADS1299 from a microcontroller. Related: FirmwareFirmware The program running on the microcontroller, which configures the chip, reads samples on time, and ships them to the computer. . Glossary entry mode (the chip wants clock polarity 0, phase 1), and that the clock is running.
- Turn on the internal test signal (a square wave of known amplitude) and route it to all channels. Read data frames on each data-ready pulse: 3 status bytes then 8 × 3 bytes of channel data, two’s complement. Convert to volts. You should see the square wave at exactly the datasheetDatasheet The manufacturer's document for a chip: pinout, limits, typical performance, and the reference circuit you should start from. Glossary entry’s amplitude on every channel. This validates the SPISPI A simple four-wire bus for talking to chips like the ADS1299 from a microcontroller. Related: FirmwareFirmware The program running on the microcontroller, which configures the chip, reads samples on time, and ships them to the computer. . Glossary entry, the framing, the sign handling, and the scaling in one step.
- Short all inputs to the bias reference on the board and record sixty seconds at gainGain How many times an amplifier multiplies its input; 1000× turns 50 microvolts into 50 millivolts, enough for an ADC to see. Related: Instrumentation amplifierInstrumentation amplifier A precision differential amplifier with very high input impedance and high CMRR, built from three op-amps and sold as a single chip such as the INA128 or AD8232. . Glossary entry 24 and 250 samples per second. Compute the RMS in 0.5 to 40 Hz. This is your noise floorNoise floor What your instrument records when the input is shorted or connected to a perfectly quiet source; everything smaller than this is invisible to you. Related: Thermal (Johnson) noiseThermal (Johnson) noise The random voltage every resistor produces just by being warm; about 13 nanovolts per root hertz for 10 kilohms, which matters at microvolt levels. , CharacterizationCharacterization Measuring what your instrument actually does, such as its noise floor, bandwidth, and rejection, instead of assuming the datasheet. . Glossary entry; a good board is around 1 µV RMS. Write it down. It is the first number on your characterizationCharacterization Measuring what your instrument actually does, such as its noise floor, bandwidth, and rejection, instead of assuming the datasheet. Related: Noise floorNoise floor What your instrument records when the input is shorted or connected to a perfectly quiet source; everything smaller than this is invisible to you. , PhantomPhantom A physical stand-in for tissue, such as saline gelatin with embedded wires, used to test an instrument against known signals. , Common-mode rejection ratio (CMRR)Common-mode rejection ratio (CMRR) How much better an amplifier responds to a difference between its inputs than to a signal shared by both, in decibels; 100 dB means 100,000 times. . Glossary entry report.
- Connect electrodesElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry: eight on the head or two for a start, reference to SRB, bias to the forehead. Run the eyes-closed test. Alpha, on eight channels, from a board you designed.
- Stream to the computer over Wi-Fi or Bluetooth using the OpenBCIOpenBCI The open-source EEG hardware company whose Cyton (ADS1299) and Ganglion boards are the default hobby and research-lite amplifiers. Related: ADS1299ADS1299 Texas Instruments' 8-channel, 24-bit biopotential front-end chip used in OpenBCI and many research amplifiers. , BrainFlowBrainFlow A library that talks to OpenBCI and most consumer EEG headsets with one API, in Python and other languages. . Glossary entry Cyton’s serial protocol, so that BrainFlowBrainFlow A library that talks to OpenBCI and most consumer EEG headsets with one API, in Python and other languages. Related: OpenBCIOpenBCI The open-source EEG hardware company whose Cyton (ADS1299) and Ganglion boards are the default hobby and research-lite amplifiers., Lab Streaming Layer (LSL)Lab Streaming Layer (LSL) A protocol that timestamps and synchronizes streams from many devices and stimulus programs on a network; every BCI lab uses it.. Glossary entry and every tool that speaks to a Cyton speaks to your board too. Or write your own simple protocol and a small Python receiver. Then wrap it as a Lab Streaming LayerLab Streaming Layer (LSL) A protocol that timestamps and synchronizes streams from many devices and stimulus programs on a network; every BCI lab uses it. Related: PsychoPyPsychoPy Free Python software for presenting stimuli with precise timing and logging responses., BrainFlowBrainFlow A library that talks to OpenBCI and most consumer EEG headsets with one API, in Python and other languages.. Glossary entry outlet.
The registers you will actually set
Start with the values below, then read the register map for each one until you can say what every bit does. Typical starting points for EEGElectroencephalography (EEG) Recording the brain's electrical activity from electrodes on the scalp, a few tens of microvolts of blurred, summed cortical activity. Related: Electrocorticography (ECoG)Electrocorticography (ECoG) Recording from electrodes placed on the surface of the brain under the skull, usually during epilepsy surgery evaluation; cleaner and sharper than EEG. , Magnetoencephalography (MEG)Magnetoencephalography (MEG) Recording the tiny magnetic fields produced by cortical currents with superconducting sensors in a shielded room; less blurred by the skull than EEG, and far more expensive. , Volume conductionVolume conduction The spreading of currents from a source through the conductive tissues of the head, which is why one source shows up on many electrodes and why scalp EEG is blurry. , Microvolt (µV)Microvolt (µV) One millionth of a volt. Scalp EEG is tens of microvolts; a AA battery is 1.5 million of them. . Glossary entry at 250 samples per second: CONFIG1 sets the data rate; CONFIG2 controls the test signal; CONFIG3 turns on the internal reference buffer and the bias amplifier; each CHnSET sets that channel’s gainGain How many times an amplifier multiplies its input; 1000× turns 50 microvolts into 50 millivolts, enough for an ADC to see. Related: Instrumentation amplifierInstrumentation amplifier A precision differential amplifier with very high input impedance and high CMRR, built from three op-amps and sold as a single chip such as the INA128 or AD8232. . Glossary entry to 24, connects it to a normal electrodeElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry input, and connects its negative side to the SRB2 reference pin. The exact hexadecimal values are in the datasheetDatasheet The manufacturer's document for a chip: pinout, limits, typical performance, and the reference circuit you should start from. Glossary entry and in the OpenBCIOpenBCI The open-source EEG hardware company whose Cyton (ADS1299) and Ganglion boards are the default hobby and research-lite amplifiers. Related: ADS1299ADS1299 Texas Instruments' 8-channel, 24-bit biopotential front-end chip used in OpenBCI and many research amplifiers. , BrainFlowBrainFlow A library that talks to OpenBCI and most consumer EEG headsets with one API, in Python and other languages. . Glossary entry firmwareFirmware The program running on the microcontroller, which configures the chip, reads samples on time, and ships them to the computer. Related: SPISPI A simple four-wire bus for talking to chips like the ADS1299 from a microcontroller. . Glossary entry, and copying them without reading the map is how mysterious behaviour happens later.
Where this leads
The phantom head gives you known signals to measure your board against. The characterization report is where the numbers go. And the explainers on amplifiers, conversion, noise, and safety each explain a design decision you just made.