Driver
FDO2 Driver¶
A C++20 driver for the PyroScience FDO2-G2 and the legacy FDO2 optical oxygen modules on UART. It starts the module, reads oxygen and temperature, checks the status word and guards the commands that write flash, on any MCU.
The driver has no platform code. You give it a small class that moves bytes on the UART; it does the rest: the power-up wait, the command lines, the checksum, the status policy, retries and timeouts.
- Function
- Oxygen partial pressure, temperature, pressure and humidity inside the housing
- Interface
- UART, 19200 baud, 8N1 at power-up, 3.0 V levels (3.3 V maximum on RXD); ASCII commands ended by a carriage return
- Integrity
- Optional CRC-16 on every reply; a status word on every measurement
- Supply
- 3.3 V to 5.0 V
- Package
- Cylindrical module, 28.5 mm diameter, four-pin connector
What you get¶
- One object per module. `FDO2
` takes a reference to your port and does no I/O until `EnsureInitialized()`. See API guide. - Errors you can act on. Every call returns `Result
` with an `Error` such as `Timeout`, `SensorFault` or `NotPermitted`. See Status and errors. - Flash writes need your consent. Calibration and settings write the module's flash; the driver sends them only with an opt-in and inside a budget. See Calibration.
- Datasheet defaults. `Config{}` follows the datasheets, with units in the field names. See Configuration.
- Blocking or not. Every operation has a blocking call and a start call with `Poll()`. See Non-blocking use.
- Zero-overhead portability. The port is a CRTP class checked by a concept. See Porting.
- No heap, no exceptions, no RTTI. See Contract.
- Tested without hardware. The host tests run the driver against a model of the module written from the datasheets; it has not been run on a real module (Limitations).
Datasheet¶
| Document | Revision | Get it |
|---|---|---|
| Datasheet: FDO2-G2 Optical Oxygen Sensor Data Sheet (PyroScience Datasheet_FDO2-G2) | v5, 2026-03 | PDF · vendor page |
| Datasheet: FDO2 Optical Oxygen Sensor Data Sheet (legacy part) (PyroScience Datasheet_FDO2) | v21, 2025-06 | PDF · vendor page |
| Product change notification: Low-pass filter and noise erratum (PyroScience PCN-FDO2-G2-001) | n/a, 2026-03 | PDF · vendor page |
| Product change notification: FDO2 replaced by FDO2-G2 (PyroScience PCN-FDO2-002) | n/a, 2025-05 | PDF · vendor page |
| Quick start guide: Quick Start FDO2-G2 evaluation kit (PyroScience Quick_Start_FDO2-G2) | v1.00, n/a | PDF · vendor page |
| Datasheet: FDO2-FTC flow-through cell data sheet (accessory) (PyroScience Data Sheet_FDO2_FTC) | n/a, n/a | PDF · vendor page |
| Datasheet: FDO2-EXT Modbus and analog extension module data sheet (PyroScience Datasheet_FDO2-EXT) | v5, 2025-07 | PDF · vendor page |
Written against these revisions; the SHA-256 of each file is in docs/datasheets.yml. Where each part
of the driver is in the datasheet: Datasheet map.
Where to go next¶
-
Wire the module, write the port, read the oxygen in about 15 lines.
-
Connector, levels, supply and the 5 V circuit.
-
What the driver promises, what it needs and threading.
-
Start, measure, read the identity and handle errors, task by task.
-
Implement the port for your UART.
-
Every class and member, generated from the headers.