top of page

"Better to be on the boat wishing you were diving, than underwater wishing you were on the boat."

Augusto Pavan

OPTICAL SOLID STATE OXYGEN SENSOR
THE FUTURE OF OXYGEN SENSOR TO REPLACE GALVANIC CELL

Overview

This project explores what a modern solid-state PPO₂ sensing module for rebreathers can look like if it is built around a true optical oxygen sensor rather than the classic galvanic cell.

The goal was simple:

Use an industrial-grade optical O₂ sensor, convert its digital PPO₂ output into a galvanic-cell-like millivolt signal, and make it readable by any rebreather electronics (Shearwater, rEvo, etc.) without modification.

The resulting module is compact, serviceable, non-proprietary, and uses open hardware and firmware.
In other words: the opposite philosophy of sealed, disposable, vendor-locked solutions.

Why Optical PPO₂?

Galvanic O₂ cells work, but they drift, age, and require continuous calibration.


Optical sensors offer:

  • factory calibration

  • long-term stability (5–10 years typical)

  • extremely low drift

  • no oxygen consumption

  • digital accuracy independent of load resistors

  • predictable behaviour across temperature

In a rebreather, stable PPO₂ information is everything.
If you can start with a rock-solid measurement, the rest of the control loop becomes dramatically more reliable.

Finding the Right Sensor – A Real Investigation

This is the part that mattered most — and the one that cost time, money, and actual testing.

The problem: rebreathers need PPO₂ sensors that work up to ~2 bar O₂ and withstand high gas density.
Most industrial optical sensors are designed for ambient-pressure gas analysis.

After studying the sensor used in the Poseidon rebreather, it was obvious that it was not produced by the manufacturer itself.
It had all the characteristics of an industrial OEM component repurposed for diving.

So I started from that assumption:
“Which companies in the world actually manufacture optical oxygen sensors suitable for this?”

The answer: exactly two.

There are only two companies in the world producing optical oxygen sensors suitable for this kind of application: SST LuminOx and PyroScience.

No one else makes something with the required characteristics:
digital output, industrial reliability, high pressure tolerance, low drift and correct measurement physics.

Step 1 — Acquire both sensors

To verify this I bought them both (not trivial: they are not consumer parts):

  • SST LuminOx (SST / PST)

  • PyroScience FDO2-G2
     

Step 2 — Test them

Tested under realistic CCR operating conditions (not a hyperbaric chamber, simply practical, controlled tests):

  • LuminOx
    Works at surface and moderate pressures,
    but diverges above ~2 bar → unusable for CCR control.

  • PyroScience FDO2-G2
    Absolutely stable in the 0–2 bar range,
    behaviour perfectly aligned with what a CCR needs.

Let’s just say that when placing the Poseidon sensor next to an FDO2-G2, the similarity is… interesting.
And an informal conversation with a PyroScience engineer confirmed that this exact sensor family has been evaluated for submerged PPO₂ measurement.

I’ll let the reader “spot the differences” on their own. 😉

At that point, the choice was obvious: PyroScience is the only feasible optical O₂ sensor for rebreather use.

Can you notice the differences? 😉

BEFORE TO START

Sensor Configuration – From 1 bar to 2 bar

The FDO2-G2 ships with a default measuring range of 0–1 bar O₂.
For a rebreather you need 0–2 bar.

You can achieve this in two ways:
 

Option 1 — Buy the DiveO₂ variant

DiveO₂ sells the FDO2 already configured for 0–2 bar.
It costs about €100 more, but it arrives ready.

 

Option 2 — Configure it yourself (Arduino)

The sensor must receive a simple command sequence over UART:

sensorSerial.print("#MA02\r"); // Set measurement range to 0–2000 hPa (0–2 bar O2) delay(50); sensorSerial.print("#SAVE\r"); // Make the setting permanent delay(50);

That’s all.
Once saved, the sensor natively reports pO₂ in the full 0–2 bar range.

HARDWARE

PyroScience Optical O₂ Sensor

UART (3.0 V) Level Shifter (3.0 ↔ 5.0 V)

ATmega328P (minimal board)

I²C AD5693R 16-bit DAC (Adafruit)

Analog mV Output (galvanic-cell compatible) ↓ Any Rebreather Electronics (Shearwater, rEvo, etc.)

 

Why this architecture?

  • The sensor outputs digital pO₂ → needs parsing

  • Rebreathers expect analog mV → needs DAC

  • The DAC must be precise and linear → AD5693R is perfect

  • The interface must be tiny → ATmega328P is ideal

  • The sensor needs 3.0 V logic → level shifter required

Everything is chosen for size, deterministic behaviour, and serviceability.

FIRMWARE

Firmware Logic (ATmega328P)

The ATmega handles the entire translation chain:

1 — Send command to sensor

sensorSerial.print("#MOXY\r");

2 — Read reply

The FDO2 returns a line:

#MOXY 203456 17892 0

Where:

  • 203456 = pO₂ in 10⁻³ hPa

  • 17892 = temperature (m°C)

  • 0 = status OK

3 — Validate

The firmware checks:

  • valid format

  • status S ≤ 1

  • plausible pO₂

If the reading is bad → treat as failure.

4 — Convert digital pO₂ → mV

In your current configuration:

float output_mV = 0.45 * pO2_hPa + 10.0;

Clamped:

0 mV → 160 mV

5 — Output to DAC

Using the AD5693R (Adafruit):

uint16_t dacVal = round((output_mV / 5000.0) * 65535); writeDAC(dacVal);

6 — Fail-safe behaviour

If the sensor fails repeatedly:

writeDAC(0); // force 0 mV → rebreather goes into fault immediately

This guarantees no “plausible but wrong” PPO₂ values.
Either the reading is valid → or the CCR screams.

Binary file for ATMega328p
Source code for Arduino editor
3D case
IMG_6442.jpg

About Me

With a strong passion for electronics and technology, I’ve begun integrating it into another deep interest of mine: scuba diving.

 

© 2023 by Going Places. 

bottom of page