Miscellany

Arduino oled nitrox analyzer

This is update version of my DIY nitrox analyzer based on Arduino compatible board.

It’s using small oled display and powered by 9v battery. Display o2 percentage of gas, sensor mv output, two MOD(maximum operating depth) in meter. 1 push button for lock screen, calibration, po2 change.

Part list
  • Arduino nano compatible board (or any other Arduino board will do)
  • ADS1115 16 Bit DAC Module (the ADS1115 provides 16-bit precision at 860 samples/second over I2C!)
  • 0.96 inch OLED 128×64 I2c display module
  • Rocker or toggle switch for power on/off
  • 1 Push button
  • 1 9v battery connector (better using 3 AA or AAA)
  • 1 Piezo Buzzer (I took one from pc. Skip if you don’t need beeping analyzer :)
  • 1 Connector for o2 sensor (mine is molex)
  • 1 O2 sensor (I use old cell from my CCR but you can get sensor from Teledyne, Maxtec or other manufacturer.
Wiring

ADS1115

  • VDD to 5v
  • GND to Ground
  • SCL to A5 (nano)
  • SDA to A4 (nano)

OLED 128×64 I2c display module

  • GND to Ground
  • VCC to 5v
  • SCL to A5 (nano)
  • SDA to A4 (nano)

Push button

  • 1 pin to Ground
  • 2 pin to D2 (nano)

9v battery

  • positive to VIN (nano) through rocker (toggle) switch
  • negative to Ground

Buzzer

  • positive to D9 (nano)
  • negative to Ground

Oxygen sensor

  • positive to A0 ADS1115
  • negative to A1 ADS1115
The source

Additional library

Usage

youtube video

  • 1 short button push to lock current display (1 push to unlock)
  • 2 sec hold to calibration
  • 3+ sec hold to MOD PO2 change (1.3 to 1.5 rotation)
Note

I put everything include sensor in a small plastic box(65×95×55mm) with transparent cover. Here’s some image of ugly looking inside. I’m sure someone can 3d print smaller and prettier shell.

9v battery is very poor choice for Arduino project (I used because that’s what I have many). AA, AAA x 3 or small rechargeable batteries are better.

Warning! Be cautious when you use 9v battery. Arduino onboard DC regulator will be destroyed if you accidentally switch positive & negative.

Todo list

  • clean the code
  • replace board to custom pcb or pro mini
  • replace 9v batt to rechargeable small lipo battery
  • smaller case

Please don’t email me about basic arduino programming issue. You can search or post question here. https://forum.arduino.cc

Eunjae Im

View Comments

  • Thanks! Duh :) It completely make sense to get one that actually measure the proper range!

  • Hi,

    Building a NX analysor based on your schema, so far so good.

    What did you use to put onto your revo cell? I will reuse my revo cells that are getting swapped.

    Thanks,

    Arlindo

    • If it's mean connector then I use Molex 5051 (3 pin). You can easily find same connector from computer part.

  • Hi there!

    It's all good!! :)

    I see you changed the display code from the video you posted to the actual code here :D

    Can you confirm you only changed cosmetic display stuff and nothing important in the various calculations performed in the code?

    It's pretty neat! I have quite a lot of fun putting it together, I imagine how you feel actually coding it all :D

    Next step is to solder it up and put it in the box...

    I have one more question: I also see you removed the max O2 display in the video. I understand we don't need that info from a practical point of view. But nevertheless we still keep the clearing max result capability. Could you elaborate a bit why we actually need to clear the max O2 value and how it i used/purpose here?

    Thanks a million!!!

    Patrick

    • Hi, I update the code on post too. You can download it.
      Max result is useful sometime if I forgot to lock the screen.
      Have fun with your project. :)

      • Super cool :)

        One last question (sorry!) : the NRC O2 sensor I have specify a Recommended Load resistor of 10KOhms.

        To achieve this spec recommendation do I put a resistance in parallel between the O2 Cell wires?

        That's what I believe but I am no pro at all..!

        • Yes. You can put register between o2 wire. I don't think register is must but it will not hurt too.

  • Hey :)
    For my test-setup I'm using the sensor of an old OxyCheq Handheld and am experiencing quite some delay in the readings. Returning back to 20.9 from 19.0 takes about five minutes despite venting the sensor with fresh air.

    Things seem to improve when I put a 10 kOhm resistor in parallel to the sensor - at least regarding the speed - unfortunately at the cost of reading stability. So either I have a slow sensor or one with large drift in the readings.

    Any idea what the problem might be here?

    TIA,
    Peter

    • 5min seems way too slow. How old your sensor? I would check with sensor output behaviour with normal voltage meter.

      • Yes, it's quite old and most likely that's the problem. Measuring the voltage directly it also behaves kind of sluggish. I will try to get a hold of a newer sensor and see what it's like with that ☺️

  • Thanks for posting this project. I built it and it is working perfectly. I made a few small modifications to the program: (1) increased the time to release the button on "CAL" from 1 to 2 seconds because otherwise I sometimes inadvertently changed the limit PPO2 value. (2) Max PPO2 always starts at 1.4 bar instead of retaining the last value of the previous use.

  • Thanks for the project docs. I just finished it to replace a defunct old analog analyzer.
    I had fun modifying the code to move text around on the screen to work with my two color display and change the MOD measurements to feet from meters. This is way more feature rich than most commercial units at 4 times the price. Now to solder up a final version and print a box for it. Thank you!!!

    • Find "Calculate MOD" function and change multiply value 10 to 33 (it'll look like this).
      float cal_mod (float percentage, float ppo2 = 1.4) {
      return 33 * ( (ppo2/(percentage/100)) - 1 );
      }

      And change "m" to "ft".
      display.print(F("m ")); -> display.print(F("ft"));

      Hope this help.

Recent Posts

바닷속에 치과/피부과가 있다? 내셔널지오그래픽 다큐 감독의 바다 이야기

https://youtu.be/C5ub-2du6MI 바닷속에 치과/피부과가 있다? 바닷속의 치과/피부과 클리닝 스테이션(clearing station), 해양 생물의 공생, 기생 그리고 편리공생에…

10 months ago

물고기도 말을 할까?

https://youtu.be/xJC2CmJOYCY 물고기들도 말을 할까요? 수중 생물들은 어떤 소리를 낼까요? 수중에서 소리 녹음에 관한 이야기도 같이…

3 years ago

Volca Drum + DIY Arduino Midi Clock + Effects

https://youtu.be/vhgJNg8MuMw I added some effects (PO like?) to my DIY arduino midi clock. All effects…

3 years ago

How to use USB MIDI keyboard with NTS-1 or Volca?

https://youtu.be/w0S2LI26fGk How to use USB MIDI keyboard such as a Arturia MiniLab with Korg NTS-1…

3 years ago

Sidechain Gate & Compressor in REAPER

https://youtu.be/ZV4MI0iQF8M This is how I use sidechain gate & compressor in REAPER.

3 years ago

DAW Audio Output (ASIO) into OBS Studio for Live Streaming

https://youtu.be/2NfxFDVchmg Live streaming DAW music production using a OBS Studio but keep using a ASIO…

3 years ago