4-Wire Bioimpedance Analyzer

STM32F411CEU6 + AD5941 switch-matrix for precise tissue impedance measurements

Abstract

This project implements four-wire bioimpedance analysis (BIA) using an STM32F411CEU6 microcontroller and an AD5941 analog front end. By routing excitation through CE0 and switching sense electrodes via AIN1/AIN2/AIN3, we achieve measurements with <1% error across frequencies from 100 Hz to 50 kHz.

Motivation & Overview

BIA is widely used for body composition and tissue characterization. Four-wire measurement eliminates lead resistance errors inherent in two-wire methods, improving accuracy. We designed a compact wearable PCB (40 mm×40 mm) to switch between electrode pairs and capture impedance magnitude and phase in real time.

Hardware Components

Circuit Design

Schematic

AD5941 BIA Schematic
AD5941 switch-matrix and power circuitry

Board Layout

PCB Layout
Compact 40 × 40 mm wearable PCB

Battery Life Estimation

Using Battery Life = Battery Capacity (mAh) / Current Consumption (mA):

Switching Technique

The AD5941 SWCON register configures excitation (CE0) and sense pairs (AIN1, AIN2, AIN3):

Measurement PairExcitation (CE0)V+V−Return
Pair 1CE0AIN1AIN2AIN3
Pair 2CE0AIN1AIN3AIN2
Pair 3CE0AIN2AIN3AIN1
CalibrationCE0RCAL+RCAL−AIN3

Test Methodology

  1. Verify SPI comms: read register 0x0404 ⇒ expect 0x5502.
  2. Switch to calibration mode (RCAL = 1 kΩ), measure at 1 kHz, compute gain/phase corrections.
  3. Test known resistors (500 Ω, 1 kΩ, 10 kΩ) across 100 Hz–50 kHz.
  4. Compare measured vs. expected magnitude & phase.

Validation & Development

Validation on Human Body: Electrodes placed on forearm and calf yielded tissue impedance profiles matching literature values, confirming safe (<10 μA) and accurate performance across all measured frequencies.

Design & Development Process: A custom AD5941 driver was written in C after vendor libraries proved unreliable. An SWD edge connector was added in the second PCB revision for easier programming. All design choices—component selection, layout, and guarding—adhere to IEC 60601 medical safety standards.

Resources

GitHub Repository | Detailed README