⚠️ Non-commercial open hardware/software project: if you plan to build or sell analyzers commercially, contact the original authors for licensing.
This repository now bundles both the advanced and simplified firmware in the same branch. The advanced build can be 0–5% more accurate than the simplified version, depending on the gases and your sensors. Before enabling the advanced features, consider whether the added calibration steps and complexity are worth the marginal gain; the advanced mode is best for experimenting with the algorithms yourself.
The firmware now has a compile-time toggle in src/trimix-analyzer/trimix-analyzer.ino. Set ADVANCED_FEATURES to 1 (default) to enable the quadratic oxygen calibration, helium compensation and calibration menu from this branch. Set it to 0 to build the simplified/master behaviour (single-button calibration flow and linear O₂ mapping).
Trimix is a breathing gas consisting of oxygen, helium and nitrogen and is often used in deep commercial diving, during the deep phase of dives carried out using technical diving techniques, and in advanced recreational diving.
The helium is included as a substitute for some of the nitrogen, to reduce the narcotic effect of the breathing gas at depth. With a mixture of three gases it is possible to create mixes suitable for different depths or purposes by adjusting the proportions of each gas. Oxygen content can be optimised for the depth to limit the risk of toxicity, and the inert component balanced between nitrogen (which is cheap but narcotic) and helium (which is not narcotic and reduces work of breathing, but is more expensive and increases heat loss).
The mixture of helium and oxygen with a 0% nitrogen content is generally known as Heliox. This is frequently used as a breathing gas in deep commercial diving operations, where it is often recycled to save the expensive helium component. Analysis of two-component gases is much simpler than three-component gases.
The method for evaluating the proportion (%) of Helium in the Trimix mixture is special. The MD62 sensor measures the proportion of all gases except nitrogen and oxygen. The AO2 sensor measures the proportion (%) of oxygen in the mixture. Ignoring the rare gases, we can deduce that on [100% of Trimix] = [%He +%O2 +%N2]
Or [%N2] = [100% of Trimix] - [%He +%O2]
Updated list of materials based on lising in Printables: Trimix Analyser V2. I recommend starting the project by taking time to order EVERYTHING on this list, since getting them will take some time. Meanwhile, you can print the 3D parts from the printable project.
| Label | Part Type | Link | Notes |
|---|---|---|---|
| He Sensor | MD62 | AliExpress | Most expensive part |
| O₂ Sensor | Original CITY AO2 | Old cells from JJ CCR (or any other CCR probably) | |
| U1 | Voltage Regulator – LM316 / LM317 | AliExpress | LM317 in the kit works |
| Seeduino | Seeeduino XIAO | AliExpress | Ensure you don't order the XIAO Grove Shield |
| ADS1115 | 16-bit I2C ADC | AliExpress | — |
| Display | 1.3’’ OLED 128×64 | AliExpress | Verify correct size and 4‑pin version |
| Terminals | 3×2P & 2×3P | AliExpress | Wrong part! Pin spacing must be 2.5 mm (0.1") |
| Calibration Button | 12 mm, non‑LED, 220 V | AliExpress | |
| R10 & R4 | 1 kΩ trim pots (2×) | AliExpress | Needs two |
| C1 | Ceramic Capacitor 100 nF | — | — |
| C2 | Electrolytic Capacitor 1 µF | — | — |
| R5 & R7 | 2.2 kΩ resistors (2×) | — | Needs two |
| R8 | 10 kΩ resistor | — | brown‑black‑black‑red‑brown |
| R9 | 220 Ω resistor | — | red‑red‑brown‑gold |
| PCB | PCB (Gerbers on Printables) | Order from JLCPCB | Gerber files available on Printables |
| Inserts | M3×12 inserts or print‑in threads | — | Alternate: updated 3D model for direct screws |
You could use your analyzer with just an USB-C power source, but if you want to make it portable you will also need.
| Label | Part Type | Link | Notes |
|---|---|---|---|
| Battery Capacity Indicator | 1S Li‑ion gauge | AliExpress | Ensure correct voltage |
| Battery Holder | 1× 18650 holder | AliExpress | — |
| Battery Charging Board | USB‑C Li‑ion charger | AliExpress | — |
| ON/OFF Switch | 2‑pin switch | AliExpress | — |
| DC‑DC Step‑Up Converter | MT3608 | AliExpress | |
| 18650 Battery | Li‑ion cell | — |
The Wing Inflator Adapter is in alternative of analysing directly from the tank. I have not built one myself.
| Label | Part Type | Link | Notes |
|---|---|---|---|
| BCD Inflator Adapter | 3/8‑24 UNF‑2A | AliExpress | |
| Pneumatic Hose 8×5 mm | Hose (~40 cm) | AliExpress |
- Solder all components onto the PCB.
- Connect the Seeeduino to a USB power source.
- Adjust the voltage regulator resistor R10 until 3 V is measured across the outer pins of the helium sensor connector.
- Flash the Seeeduino with the firmware from this repository.
- Connect the display and confirm the code runs correctly.
- Connect the sensors and calibration button.
- Adjust the helium zero trimmer resistor R4 until the He mV value reads close to 0 in air.
- If necessary, re‑adjust the voltage regulator with all components connected.
- Allow the MD62 helium sensor to burn in for 24 hours when new.
- Place power button and battery indicator inside the 3D‑printed case before soldering.
- Solder the components together following the wiring diagram.
- Insert the 18650 battery into the holder.
- Adjust the MT3608 boost converter output to 5 V.
- Connect the power module output wires to the PCB.
- On boot, the device performs an air calibration: it calibrates the O₂ cell and sets the helium zero point.
- Run air calibration. Do this if the O₂ reading has drifted, the sensor warmed further, or you want to calibrate with flowing gas instead of static gas.
- Run He calibration. Before starting, ensure that the air calibration is done properly, helium is flowing and the readings are stable. Run this at least once — maximum MD62 span varies. The value is stored in flash and persists across power cycles.
- Run oxygen calibration. Before starting, ensure that the air calibration is done properly, oxygen is flowing and are the readings are stable. This fits a quadratic function to account for non-linearity for older cells. The analyzer will keep using the coefficient b even with after any subsequent calibrations with air.
- Oxygen calibration will also compensate helium readings based on O₂ values. After the calibration the sensor should read Nitrox 100%.
This project is based on the original DIY Trimix Analyzer by
Sébastien Joly (2018)
https://github.com/captainigloo/Trimix-analyzer
Licensed under CC BY-NC-SA 4.0
https://creativecommons.org/licenses/by-nc-sa/4.0/
- Sébastien Joly
- Includes inspiration and prior concept reference from community sources
- Yves Caze, Savoie Plongée — Original concept reference
- GoDive BRB — Modifications (2021)
- Dominik Wiedmer — Modifications (2021–2024), 3D printable case
- Heikki Pulkkinen — Further development (2025 →)
- v1.1 (2021-10-04) — Community improvements
- v1.2 (2023-10-07) — Library cleanup, calibration tolerance update
- v20240601 — Add calibration offset calc, O₂ <7mV guard message
- v20241017 — Remove display blinking
- v20251031 — Option for 100% He calibration by long press, UI to English
- v20251031b — Display refactor: always show O₂ mV & He mV at top
- Advanced version — Quadratic o2 calibration and oxygen compensation
All changes published under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


