STM32F411CEU6 + AD5941 switch-matrix for precise tissue impedance measurements
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.
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.
Using Battery Life = Battery Capacity (mAh) / Current Consumption (mA):
The AD5941 SWCON register configures excitation (CE0) and sense pairs (AIN1, AIN2, AIN3):
Measurement Pair | Excitation (CE0) | V+ | V− | Return |
---|---|---|---|---|
Pair 1 | CE0 | AIN1 | AIN2 | AIN3 |
Pair 2 | CE0 | AIN1 | AIN3 | AIN2 |
Pair 3 | CE0 | AIN2 | AIN3 | AIN1 |
Calibration | CE0 | RCAL+ | RCAL− | AIN3 |
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.