Pulse Oximeter: SpO2, Ratio of Ratios and AFE4400 Settings

Calculate red/infrared AC/DC ratios and an illustrative SpO₂ estimate. Check AFE4400 TIA headroom, feedback bandwidth, sampling time and LED drive settings.

#AFE4400 #analog-front-end #photoplethysmography #pulse-oximetry #ratio-of-ratios #SpO2

Caution

Do not use this calculated SpO₂ to assess a person or change treatment. Use a clinically validated oximeter and medical guidance for health decisions.

This pulse oximeter calculator connects the optical ratio-of-ratios method with practical AFE4400 analog front-end settings. It is intended for engineers developing photoplethysmography hardware, students learning pulse oximetry, and anyone checking measured signal levels before a bench test.

Start with the red and infrared photocurrents. Enter each LED-derived DC level after removing the LED-off ambient baseline, and the positive peak AC excursion about that level. Use the same amplitude convention and measurement interval for both wavelengths. For a sinusoid, divide peak-to-peak amplitude by two, or multiply RMS amplitude by √2, before using the headroom calculation. The displayed peak modulation percentages are AC/DC values; definitions of perfusion index used by commercial instruments can differ.

The tool normalizes each channel by its own DC level and divides the red modulation by the infrared modulation. It then applies the illustrative linear relationship SpO₂ = 110 − 25R. For example, the default signals produce R = 0.5 and an uncalibrated estimate of 97.5%. The curve shows how this relationship changes with R. It is not a sensor calibration curve, and results are deliberately not clipped to a plausible percentage.

Choose a feedback resistor and capacitor from the AFE4400’s nominal options. The calculator adds ambient current back to each channel’s positive peak, predicts the differential TIA voltage, and reports remaining swing headroom. The maximum RF result reserves 20% of the nominal swing as an engineering design allowance. Choose an available resistor below that limit, then confirm the measured waveform. Digital ambient subtraction cannot recover a signal already clipped in the analog chain.

Next, enter the settling delay, receive sample duration and pulse repetition rate. The receive sample duration is checked against the feedback RC rule, and the delay is compared with a single-pole settling estimate. The LED pulse occupies the delay plus the sample interval. Its duty cycle and the quantized red and infrared drive currents determine the combined average LED current. Changing LED drive does not predict a new photocurrent: update the measured signals after adjusting the hardware.

This tool accompanies WiredWhite’s portable ECG and blood oxygen monitoring article, post 28861. It covers the optical channel only. It does not acquire waveforms, reject motion artifacts, estimate heart rate, design an ECG channel, generate a complete timer-register sequence, or establish clinical accuracy. Second-stage gain and analog cancellation, photodiode capacitance, noise, component tolerances, optical safety and LED supply compliance require separate evaluation. Device-specific calibration and validation remain essential; the article’s reported accuracy is not assigned to this calculator.

How it is calculated

Normalize the ambient-corrected photocurrents as pr=ACr/DCrp_r=AC_r/DC_r and pir=ACir/DCirp_{ir}=AC_{ir}/DC_{ir}, then calculate R=pr/pirR=p_r/p_{ir} and the uncalibrated illustration SpO2=110−25RSpO_2=110-25R (TI TIDA-00311, June 2014, §6.2, p.20).

For the AFE4400 with stage 2 disabled, differential transimpedance is 2RF2R_F. Add ambient current to each positive optical peak before applying this gain; compare with the nominal 1 V differential TIA limit. The suggested upper RF limit reserves 20% swing as a design choice.

Use τ=RFCF\tau=R_FC_F, fc=1/(2πτ)f_c=1/(2\pi\tau) and t0.1%=ln⁡(1000)τt_{0.1\%}=\ln(1000)\tau. TI’s receiver rule is 10τ≤tsample10\tau\le t_{sample}. LED duty is (tdelay+tsample)fPRF(t_{delay}+t_{sample})f_{PRF}. In the 50 mA range, the nominal DAC current is 50 mA×N/25650\,\mathrm{mA}\times N/256; round the requested current to the nearest code and limit it to 0–255. Average LED current is the sum of both programmed currents times the per-LED duty. See AFE4400 Rev H pp.9, 22–23, 27, 65.

Assumptions

The red and infrared AC inputs are positive peak excursions, measured over the same interval and with matched signal processing. Each DC entry excludes ambient light; the separate ambient input represents the worst common LED-off current. Both phases use the same nominal RF and CF; stage 2 is disabled. No analog cancellation credit is taken. The pole model neglects amplifier dynamics, detector capacitance and the downstream filter.

The 20% headroom allowance and 0.1% settling target are design choices. Photocurrents are supplied measurements, not predictions from LED drive. Re-enter them after changing the optical setup. LED on-time is sample time plus delay, with equal timing for red and infrared.

Where it applies

The SpO₂ line is an empirical teaching approximation, not a universal calibration. The warning at 85–100% follows the source article’s stated range, not demonstrated accuracy of this tool. No clinical accuracy claim is made. Values outside the range remain visible without clipping.

Motion, weak perfusion, pigmentation, dyshemoglobins and wavelength or geometry differences can invalidate an optical estimate. The headroom check applies to the nominal TIA, not every internal node or a complete ADC error budget. Component tolerances, noise, LED voltage compliance, optical exposure, complete ADC scheduling and timer quantization need separate verification. The feedback-pole bandwidth is not the complete sampled-system bandwidth. The average current result covers the LEDs only, excluding electronics and converter losses.

References

  • [WiredWhite, Design and Development of an Intelligent Portable ECG and Blood Oxygen Monitoring System Using AFE4400, 6 June 2025, post 28861](https://wiredwhite.com/intelligent-portable-ecg-blood-oxygen-monitoring-system-afe4400/). System context only.
  • [Texas Instruments, AFE4400 datasheet, SBAS601H, Rev H, July 2014](https://www.ti.com/lit/ds/symlink/afe4400.pdf), pp.9, 22–23, 27 and 65. Attached public datasheet copy retrieved from https://cdn.promelec.ru/upload/datasheet/7/6/afe4400.pdf.
  • [Texas Instruments, TIDA-00311 Miniaturized Pulse Oximeter Reference Design, June 2014](https://www.ti.com/lit/ug/tidu542/tidu542.pdf), §6.2, p.20: worked AC/DC example. Its AFE4403 hardware is not modeled here.

Inputs

InputSymbolUnitDefault
Red DC photocurrent, ambient removed
LED-derived DC level at the photodiode. Remove the LED-off ambient level first.
I_dc_reduA1
Red AC photocurrent, peak amplitude
Positive peak excursion about the DC level. Use the same amplitude convention for red and infrared.
I_ac_reduA0.01
Infrared DC photocurrent, ambient removedI_dc_iruA2
Infrared AC photocurrent, peak amplitude
Convert sinusoidal RMS to peak by multiplying by √2; peak-to-peak to peak by dividing by 2.
I_ac_iruA0.04
Ambient photocurrent at the TIA input
Worst LED-off ambient current, common to both channels in this model. Included before digital subtraction for headroom.
I_ambuA0.2
AFE4400 feedback resistance
Common nominal RF for both phases; second stage disabled.
tia100 kΩ
AFE4400 feedback capacitance
Single nominal capacitor setting. Parallel combinations and device tolerances are not modeled.
cap10 pF
LED-on delay before sampling
Allow for TIA, LED and cable settling; the tool compares this delay with a nominal single-pole 0.1% criterion.
t_delayus20
Receive sample duration per phase
TI recommends at least 50 µs. LED pulse duration is delay plus sample duration.
t_sampleus100
Pulse repetition / per-channel sample rate
One red, red-ambient, infrared and infrared-ambient measurement per period. This is not the heart rate.
f_prfHz500
Requested red LED peak current
Nominal 50 mA range; rounded to an 8-bit DAC code. Remeasure photocurrents after changing LED drive.
I_led_redmA10
Requested infrared LED peak currentI_led_irmA10

Results

With the default inputs above, the calc gives:

ResultValue
Ratio of ratios R0.5
Uncalibrated SpO₂ estimate97.5 %
Red peak AC/DC1 %
Infrared peak AC/DC2 %
Worst TIA differential peak0.448 V
Nominal TIA swing remaining55.2 %
Maximum RF for 20% nominal headroom178.6 kohm
Nominal feedback-pole bandwidth159.15 kHz
Nominal RC settling to 0.1%6.91 us
LED pulse duration120 us
Duty cycle per LED6 %
Combined average LED current1.195 mA
Red LED2 DAC code51
Infrared LED1 DAC code51

Checked against sources

Each case below was calculated by this calc and agrees with the value from its source (within the tolerance where one is shown).

TI measured PPG example: ratio and SpO₂

Source: TI TIDA-00311 (June 2014), §6.2, p.20, equations 5–7: red AC/DC = 4/323 mV and IR AC/DC = 25/920 mV; published R=0.455 and SpO₂=98.6%. The exact ratio from those numbers is 0.4557275542 (0.456 to three decimals), so the published R appears truncated; a 0.001 tolerance accommodates that discrepancy without changing the formula. Divide all voltages by an arbitrary common 1 V/µA transimpedance to enter equivalent current ratios. This tests normalization, not the AFE4403 hardware. https://www.ti.com/lit/ug/tidu542/tidu542.pdf

Inputs: Red DC photocurrent, ambient removed = 0.323 uA; Red AC photocurrent, peak amplitude = 0.004 uA; Infrared DC photocurrent, ambient removed = 0.92 uA; Infrared AC photocurrent, peak amplitude = 0.025 uA; the others as above.

ResultSourceThis calc
Ratio of ratios R0.455 ± 0.0010.4557
Uncalibrated SpO₂ estimate98.6 ± 0.198.607

AFE4400 full-scale current at 50 kΩ

Source: TI AFE4400 SBAS601H Rev H (July 2014), p.9 Electrical Characteristics, stage 2 disabled. Published full-scale input current is 10 µA for RF=50 kΩ. https://www.ti.com/lit/ds/symlink/afe4400.pdf

Inputs: AFE4400 feedback resistance = 50 kΩ; the others as above.

ResultSourceThis calc
Nominal full-scale input photocurrent10 uA10 uA

AFE4400 full-scale current at 500 kΩ

Source: TI AFE4400 SBAS601H Rev H (July 2014), p.9 Electrical Characteristics, stage 2 disabled. Published full-scale input current is 1 µA for RF=500 kΩ. https://www.ti.com/lit/ds/symlink/afe4400.pdf

Inputs: AFE4400 feedback resistance = 500 kΩ; Red DC photocurrent, ambient removed = 0.2 uA; Red AC photocurrent, peak amplitude = 0.002 uA; Infrared DC photocurrent, ambient removed = 0.3 uA; Infrared AC photocurrent, peak amplitude = 0.006 uA; Ambient photocurrent at the TIA input = 0.1 uA; the others as above.

ResultSourceThis calc
Nominal full-scale input photocurrent1 uA1 uA

Related Resources

Responses

Your email address will not be published. Required fields are marked *

L ading...