Soemarko Ridwan

iOS & Web Developer ⟡ Coffee Addict ⟡ Scuba Diver


diy-o2-analyzer-part-2
DIY O₂ Analyzer: Part 2 — Make your own oxygen analyzer

In part 1, I’ve explained that all the we really need is a millivoltmeter, but ideally, we’d like to see the oxygen percentage on some kind of display.

There are two way to achieve this. First is by using Ohm’s Law, amplify the voltage (so we have more resolution), add a voltage divider, with a potentiometer as one of the resistor, that’ll be the calibration tool. Expose the sensor to air, turn the knob until the number shows 20.9. This what the El Cheapo from OxyCheq really is.

The second way is by using a micro controller, Arduino if you will. Which is the approach I took, mostly because I have a lot of spare µC. And my main goal after learning that I can DIY the analyzer is to suppress as much cost as possible, just to see how cheap I can go. The comparison is this Analox O2EII Pro Nitrox Analyzer , sold by Master Selam for about US$400, while Leisure Pro has it for $266. The prices for scuba gears is so ridiculous here in Indonesia.

Anyway, here is the bill of materials (BOM);

  • O₂ Sensor — $30
  • ADS1115 — $1.5
  • Piccolino — $24
  • Single 18650 battery holder
  • Momentary button
  • Switch on/off button
  • Cables and connectors

Sidebar: Picolino now seems to be discontinued, I was one of the original backer in kickstarter, everything was still in it’s shipping box before I started this project a month ago. Now if I don’t already owned Piccolino, I’d just use ATTiny85 + OLED screen. I’ll even use ATTiny as the circuit diagram pictured below, not going to find Piccolino fritzing model and it’s not worth making one.

I honestly believe that using ATTiny85 is the ideal micro controller to use here. It is tiny (it’s in the name), has enough pins needed to complete this project, probably lower power consumption too. And they’re dang cheap. Like $5 total for the µC + OLED module. Just that I already have Piccolino lying around.

Out of all of the materials, I only need to buy the sensor and ADS1115. I already have spares from previous DIY shenanigans with my home coffee roaster and what not. So total cost for me personally is still under $35 (I also count the failed 3D printed case). Compared to what’s sold locally for $400, I’m saving so much money.

Circuit diagram

Now, from the diagram, you can see the whole thing is simple enough, ADS1115 acts as the gain amplifier for the sensor output. The push-on button will be used to trigger the calibration function. Everything else should be self explanatory.

The source code. Although I don’t have any spares to confirm, pretty sure it’ll work with ATTiny as is, just need to replace some libraries, and change how to print things out of the OLED screen.

Final form

The case is a bit tricky to print as is. Because this is also designed for Piccolino. Again, I’ll also update this if I’ve made another analyzer with ATTiny. The two circular holes are for my buttons. And off the to side of the holes are the holder for ADS1115. Then use some acetone to glue the battery holder into the case.

This analyzer works and it’s cheap, and it’s no different than any other analyzer available in the market. If you’re a nitrox certified diver, you really should own one. Don’t become a statistic as one of the divers who died because some shop say, “trust me, this is EAN32.” We were taught to make sure ourselves for a reason. If you’re uncomfortable of using cheap-ass sensor off Aliexpress, then get yourself a decent sensor, like from DGX or OxyCheq. They costs around $80. And everything will still work.

Note: this project is majorly inspired by Eunjae Im and many many discussion on Scuba Discord.