Aegis Portal — Clinical Maternal-Fetal Monitoring

Inspiration

The idea started with a simple, unsettling question: why do we monitor pregnancies the same way we did 40 years ago? A monthly appointment, a doppler probe pressed to a belly for 90 seconds, and then nothing — weeks of silence between visits where anything could go wrong and no one would know. Preeclampsia, fetal distress, abnormal contractions — these don't schedule themselves around clinic hours. I wanted to build something that treated the nine most critical months of a human life with the continuous attention they actually deserve.

What I Built

Aegis is a wearable biometric patch that attaches to a pregnant patient's abdomen and streams real-time fetal and maternal health data directly to a clinical dashboard. The hardware uses a Biopotential AFE (Analog Front-End) to capture raw electrical signals from the skin, paired with a MEMS acoustic microphone to pick up fetal heart sounds. On the software side, a signal processing pipeline runs Independent Component Analysis (ICA) to cleanly separate the fetal ECG from the maternal ECG — two signals that are physically overlapping and notoriously difficult to untangle. The doctor-facing dashboard displays fetal heart rate, maternal heart rate, uterine EMG activity, SpO₂, and contraction frequency — all live, all in one place.

How I Built It

The stack came together in layers:

  • Signal acquisition — Biopotential AFE captures raw mV-level skin signals at 1 kHz
  • Noise cancellation — Adaptive notch filtering strips powerline interference and motion artifacts
  • Signal separation — FastICA decomposes the mixed signal into independent components, isolating the fetal waveform
  • Feature extraction — R-peak detection on the cleaned fECG computes beat-to-beat heart rate
  • Dashboard — Built in React with real-time WebSocket data feeds, Chart.js for biometric visualization, and Clerk for secure clinician authentication

I designed the clinical UI from scratch with a deliberate focus on readability under pressure — warm neutrals, high-contrast data typography using DM Mono, and a risk-stratified patient sidebar so a doctor can triage at a glance.

What I Learned

I had no idea how hard biosignal processing actually is. The fetal ECG is roughly 10x weaker than the maternal ECG — it's essentially a whisper underneath a shout. Getting ICA to reliably pick the right independent component (and not confuse it with a noise artifact) required far more domain knowledge than I expected. I also learned how differently you have to think about UI when the stakes are clinical — every design decision has to earn its place, because cognitive load in a medical setting isn't an aesthetic problem, it's a patient safety problem.

Challenges

The signal separation problem was brutal. ICA assumes statistical independence between sources, but fetal and maternal cardiac signals share timing correlations during certain gestational stages — which violates the algorithm's core assumption. I had to layer in additional heuristics to identify and lock onto the fetal component consistently.

Latency vs. accuracy tradeoffs were constant. Longer ICA windows produce cleaner separation but add delay. For a real-time clinical tool, a 10-second lag on a fetal heart rate reading is unacceptable. Tuning the buffer size without sacrificing signal quality took significant iteration.

Finally, designing for clinicians — not developers — forced me to completely rethink how I present data. Doctors don't want raw waveforms. They want immediate, confident answers: is this baby okay right now? Every element of the dashboard had to answer that question faster than the one before it.

Built With

Share this project:

Updates