The Problem
Static apnea, STA, is the freediving discipline where you float face down and hold your breath for as long as you can. It is the foundation of every other freediving discipline, and it is the one most people train wrong.
I was stuck at a two minute hold. Not because of fitness, but because I was training blind. A stopwatch tells you how long you held, and nothing else. It cannot tell you whether you stopped because your body actually ran low on oxygen, or because the urge to breathe got uncomfortable and you gave up early. Those are two completely different problems with two completely different fixes, and a stopwatch cannot tell them apart.
The training tools that did exist were either generic interval timers that knew nothing about apnea, or table apps that ran a fixed CO₂ or O₂ schedule with no idea what my actual capacity was. None of them captured what was happening inside the hold. None of them knew my personal best, adjusted to it, or noticed when I had plateaued. I was guessing, and a stopwatch was happy to let me keep guessing.
I wanted to train the way an athlete trains, against real data, with a plan that adapts, and with a way to see what my body was actually doing while I held my breath.
The Insight
The number on the stopwatch is the outcome, not the signal. The signal is everything that happens during the hold.
A breath hold has two limits. The first is CO₂ tolerance, the rising panic to breathe that hits long before you are actually low on oxygen. The second is O₂ capacity, the real physiological floor where blood oxygen drops to where your body forces the issue. Improving a hold means knowing which wall you are hitting, and the two walls need opposite training. CO₂ tolerance is trained with fixed holds and shrinking rest. O₂ capacity is trained with progressively longer holds and full recovery.
But you cannot know which wall you are hitting without seeing your blood oxygen. If I came up at two minutes with SpO₂ still at 96%, I quit early, that is a CO₂ tolerance and relaxation problem. If I came up with SpO₂ at 80%, I was genuinely near my limit, that is an O₂ capacity problem. Same two minute number, opposite diagnosis, opposite training plan.
So the product was never really a timer. It was an instrument. The job was to turn an invisible, internal event into data I could read, and then to point a training plan at whatever the data said was actually holding me back.
The Approach
STAmaster is built as a native iOS app with an Apple Watch companion, SwiftUI throughout, SwiftData with iCloud sync underneath, and zero third party dependencies. Three decisions shaped everything else.
The hold is the unit of truth, and it is measured precisely. The timer runs on CADisplayLink with under 50ms of drift, keeps running when the screen locks, and holds a background audio session alive so voice coaching and phase cues fire even eyes closed, face down in the water. Every hold records far more than its duration, the exact timestamp of each diaphragm contraction, contraction intensity, a relaxation score, perceived exertion, and the full biometric time series.
To train with data, I had to get the data, so I connected a pulse oximeter. This was the hard, unglamorous part and the one that made the whole thesis real. STAmaster streams live SpO₂, pulse rate, and perfusion index from a Lepu PC-60FW finger oximeter at roughly 1Hz, straight into the hold. There is no public SDK for these devices, so I reverse engineered the protocol on the device itself, a Nordic UART transport, framed packets with CRC-8/MAXIM checks, real time parameter frames decoded byte by byte into oxygen saturation, heart rate, and perfusion. A resilient byte stream parser tolerates corruption mid frame and resynchronises rather than dropping the session. The result is that I can watch my SpO₂ fall in real time while I hold, and the app stores the whole curve.
Heart rate has a source hierarchy, and the oximeter wins. Live HR can come from the oximeter, a BLE chest strap, or the Apple Watch. When the oximeter is connected it takes precedence, because it gives heart rate and blood oxygen from the same sensor, in the same frame, on the same clock. The strap is paused, the watch falls back, and the UI says so plainly. One source of truth for biometrics, chosen automatically.
The Build
The product covers the full training loop, from the single hold up to a month long plan.
- The precision STA timer, three phase flow of breathe up, hold, recovery, with voice coaching, configurable haptic and audio milestones, single tap contraction marking, a personal best zone that lights up as you approach it, and enforced recovery breathing afterward
- CO₂ and O₂ tables, the two core training modalities, fixed hold with shrinking rest for CO₂ tolerance, progressive hold with full rest for O₂ capacity, a prebuilt library by level, and a custom builder that generates a full table from your current personal best so the schedule actually matches your capacity
- Live biometrics during the hold, heart rate and SpO₂ on screen as you hold, with a hypoxia alert that fires by voice, haptic, and visual when blood oxygen drops below a configurable floor, a real safety signal, not a vanity metric
- Data rich session analysis, per hold it captures minimum SpO₂, the second at which the oxygen nadir occurred, and how long recovery to 95% took, plus dive reflex detection that finds the post peak heart rate dips that signal the mammalian dive response kicking in, and scores its strength
- AI training plans, a 28 day periodised plan generated from your personal best, goal, experience, and weekly availability, structured as foundation, then CO₂ focus, then a push phase, then integration, with plateau detection that watches the personal best trend and changes the focus when progress stalls
- Progress tracking, personal best timeline split by dry and wet static, contraction onset trends, CO₂ tolerance curves, training volume, and a level progression path from beginner to elite
- Safety as a hard gate, a mandatory buddy check before any wet static session that cannot be bypassed by design, because training breath holds in water alone is how freedivers die
The Apple Watch companion mirrors the live session to the wrist, starts and ends holds, marks contractions, and relays heart rate, so the phone can sit on the pool deck while the session runs from your arm.
Where My Judgment Showed Up
The decisive calls were about what to measure and how much to trust each part.
- Reverse engineering the oximeter protocol instead of shipping without SpO₂, this was the difference between another timer and an actual instrument, and it was worth the days spent decoding frames byte by byte
- One biometric source, chosen by precedence, not merged, oximeter over strap over watch, because blending sensors on different clocks produces confident nonsense, and a breath hold is the wrong place to be confidently wrong
- The AI coach is rule based and on device, behind a protocol, the training logic is transparent, runs offline at the poolside with no network, and the
AICoachServiceboundary means a cloud model can slot in later without touching the rest of the app - Safety is a gate, not a setting, the wet static buddy check is unskippable, the one place where removing friction would have been the wrong call
The Outcome
STAmaster is live, with the iOS app and the marketing site at stamaster.freediver.space.
The honest measure of it is my own hold. I started at two minutes. Training against the data the app surfaced, seeing that I was quitting with oxygen to spare and that my real problem was CO₂ tolerance and relaxation rather than capacity, then letting the plan push the right wall, I took it to three minutes thirty. The app was not a stopwatch that watched me get better. It was the reason I got better, because it told me which wall I was hitting and what to do about it.
What I Learned
The biggest lesson was that the interesting product was hidden behind a hardware problem nobody wanted to solve. Anyone can build a breath hold timer. The value was in the SpO₂ curve, and the SpO₂ curve was locked inside a cheap medical device with an undocumented protocol. The willingness to sit with a byte stream until it gave up its meaning is what separated this from every other apnea timer.
The second lesson was that good training tools diagnose before they prescribe. The temptation in a fitness app is to gamify, to celebrate the number going up. The actual job was the opposite, to look past the number to the signal underneath it, identify the real constraint, and aim the plan at that. A two minute hold with high oxygen left in the tank and a two minute hold at the edge of hypoxia are different athletes with different problems, and treating them the same is why so many people plateau.
That carries beyond freediving. Whether it is a breath hold or a system in production, the outcome metric is rarely the thing to optimise. The leverage is in instrumenting the process well enough to see which constraint is actually binding, and then having the discipline to train that one.