This document describes the impedance measurement implementation for EGI Net Amps amplifiers.
Electrode impedance measurement is essential for ensuring good signal quality in EEG recordings. High impedance electrodes result in noisy signals and increased susceptibility to interference. EGI amplifiers (NA400/NA410) include built-in circuitry for measuring electrode impedances without requiring external equipment.
The impedance measurement uses a voltage divider technique:
- A known calibration signal is injected through all electrodes
- Each electrode to be measured is connected to a precision 10 kΩ reference resistor
- The resulting signal amplitude is measured
- Impedance is calculated from the voltage divider ratio
Calibration Signal → [Electrode Impedance Z] → [10K Reference] → Ground
↓
Measured Amplitude
The impedance formula:
Z = (idealSignal - measuredAmplitude) / (measuredAmplitude / 10.0)
Where:
idealSignal= expected amplitude with 0Ω electrode impedancemeasuredAmplitude= peak-to-peak amplitude of the measured signal10.0= reference resistor value in kΩ
The measurement process uses three amplifier states:
All electrodes actively drive the calibration signal onto the scalp:
| Setting | Value | Description |
|---|---|---|
| All 10K Resistors | OFF | Electrodes not connected to reference |
| All Drive Signals | ON | All electrodes driving calibration signal |
| Oscillator Gate | ON | Enable 20 Hz sine wave generator |
| Calibration Frequency | 20 Hz | Low frequency for skin penetration |
| Calibration Amplitude | 4095 | Maximum (12-bit DAC) |
| Wave Shape | Sine (0) | Clean sinusoidal signal |
| Subject Ground | OFF | Not grounded during measurement |
| Current Source | OFF | Voltage mode measurement |
For the channel being measured:
| Setting | Value | Description |
|---|---|---|
| Channel Drive Signal | OFF | Stop driving this electrode |
| Channel 10K Resistor | ON | Connect to reference resistor |
All other channels remain in excitation state, creating the voltage divider.
After measurement, return channel to excitation state:
| Setting | Value | Description |
|---|---|---|
| Channel Drive Signal | ON | Resume driving |
| Channel 10K Resistor | OFF | Disconnect reference |
1. Configure amplifier to Excitation State (all channels driving)
2. For each channel to measure:
a. Set channel to Measurement State (drive OFF, 10K ON)
b. Wait for settling time (~30ms command + ~1s filter time)
c. Collect samples for peak-to-peak calculation (~51 samples)
d. Calculate amplitude = max(samples) - min(samples)
e. Calculate impedance from amplitude
f. Reset channel to Excitation State (drive ON, 10K OFF)
3. Optionally measure Reference (Cz) and COM electrodes
4. When done, reset amplifier to Default Acquisition State
| Parameter | Value | Description |
|---|---|---|
| Command Time | 30 ms | Time for command to reach amplifier |
| Settle Time | 0 ms | Additional settling |
| Filter Time | 1.0 s | Duration for filter/measurement |
| Peak-to-Peak Samples | 51 | Samples for amplitude calculation |
Total time per channel: ~1.03 seconds
For a 256-channel net, a full scan takes approximately 4-5 minutes.
Impedance values are streamed via LSL at 1 Hz:
- Stream Type:
Impedance - Sample Rate: 1 Hz (one sample per second)
- Data Format: float32 (kΩ)
- Channel Labels: E1, E2, ..., E256, Cz
The stream publishes the current known values for all channels every second, even during scanning. Channels not yet measured show 1000 kΩ (maximum/invalid value).
Each channel includes 3D electrode position in the stream description:
<channel>
<label>E1</label>
<type>Impedance</type>
<unit>kohms</unit>
<location>
<X>0.123</X>
<Y>0.456</Y>
<Z>0.789</Z>
<unit>normalized</unit>
</location>
</channel>Coordinates are on a unit sphere:
- X: positive toward right ear
- Y: positive toward nose
- Z: positive toward vertex (Cz)
| File | Description |
|---|---|
| ImpedanceMeasurement.h | Class declaration and timing structures |
| ImpedanceMeasurement.cpp | Measurement algorithm implementation |
| LSLStreamer.cpp | LSL outlet creation with electrode positions |
| ElectrodePositions.h | Electrode coordinate definitions |
| ElectrodePositions.cpp | Geodesic position generation |
| EGIAmpClient.cpp | Integration with streaming client |
ImpedanceMeasurement - Core measurement logic:
setupImpedanceState()- Configure amplifier for impedance modestartContinuousScan()- Begin background scanning threadmeasureChannel(int ch)- Measure single channel (blocking)feedSample(PacketFormat2&)- Feed EEG samples for amplitude calculationpublishThread()- Push values to LSL at 1 Hz
LSLStreamer - LSL stream management:
createImpedanceOutlet()- Create impedance stream with metadatapushSample()- Push impedance values
| Command | Description |
|---|---|
cmd_TurnAll10KOhms |
Set all 10K resistors (0=off, 1=on) |
cmd_TurnAllDriveSignals |
Set all drive signals (0=off, 1=on) |
cmd_TurnChannel10KOhms |
Set single channel 10K resistor |
cmd_TurnChannelDriveSignals |
Set single channel drive signal |
cmd_SetOscillatorGate |
Enable/disable calibration oscillator |
cmd_SetCalibrationSignalFreq |
Set frequency (20 Hz for impedance) |
cmd_SetCalibrationSignalAmplitude |
Set amplitude (0-4095) |
cmd_SetWaveShape |
Set waveform (0=sine, 1=square) |
cmd_DefaultAcquisitionState |
Reset to normal EEG acquisition |
./EGIAmpServerCLI --address 10.10.10.51 --impedance- Link to the amplifier
- Check "Measure Impedances" checkbox
- Impedance stream appears on LSL network
- Uncheck to stop measurement and return to normal EEG
cd scripts
pip install -r requirements.txt
python impedance_viewer.py --threshold 50Values of 1000 kΩ indicate:
- Electrode not yet measured
- No contact with scalp
- Broken or disconnected electrode
- EGI AmpServer SDK Documentation
- Net Station Acquisition source code (NSAAmpSettings.m, ImpedancesController.m)
- EGI Geodesic Sensor Net Technical Manual