Skip to content

lbehrler/EANx-Analyzer-Arduino

Repository files navigation

EANx-Analyzer-Arduino / ESP32

Note: If you have an issue with this project, please review your hardware docuemntation first. If you are still having an issue or have a software specific issue, please open an issue here.

EANx Analysis with output to an OLED color display. The code can be customized to match a wide variety of hardware. The current version in the main branch is setup to use an ESP32-Pico-D4, a Seeeduino Xiao, or an Arduino Nano with an SPI interface OLED screen 240 x 240.

In its simplest form the EANx Analyzer reads an analog input from an ADS1115, converts it to voltage, grabs a running average of ADC values and and prints the result to the display and debug to Serial Monitor.

The EANx Analyzer project is meant to be a DIY O2 Analyzer.

Disclaimers

Using or monitoring oxygen levels above atmospheric composition (20.9%) can be hazardous. While oxygen is not combustible or explosive, its presence accelerates and promotes combustion. High levels of oxygen will make most materials combustible including metals. Do not use oxygen levels above 20.9% in the presence of any flame or ignition source.

Use at your own risk. Inaccurate gas analysis can lead to serious personal injury or death.

If you are using the device and software for critical purposes, please seek proper training and know the limits of devices of this type. By using this analyzer to analyze breathing gas, you assume all risks for the use of analyzed gas and the risk from any inferences made from the output of the device, both above and below the water.

Acknowledgements

Some of this code is adapted from other EANx project scripts:

Required Components

The Basic [monochrome] project:

  • Arduino, ESP32 or similar processor chip, with appropriate power supply
  • Adafruit ADS1115 or equivelent 16 bit
  • I2C or SPI Organic light-emitting diode (OLED) ST1306 or u8g2
  • O2 Sensor
  • Project case

The more advanced project with a OLED color display:

  • Arduino, ESP32 or similar processor chip, with appropriate power supply
  • Adafruit ADS1115 or equivelent 16 bit
  • I2C or SPI Organic light-emitting diode (OLED) ST7789
  • O2 Sensor
  • Project case

Project Files

The project folder contains several files and one folder:

  • LICENSE - The license file for this project
  • readme.md - This file.
  • EANx_Analyzer_XXXXXXX.ino - the basic application.
  • pin_config.h - Header file for various ESP32 / Arduino pinout settings.
  • OTA.h - Simple OTA upate header (optional utility).
  • bat_stat.h - Simple Battery status script for ESP32 based boards.

Installation

Installing the scripts onto your project chipset can be done using Arduino IDE 2.0 or Platform IO

The Arduino IDE 2.0 tutorial

Alternately you can use esptools.py, Platform IO or any number of script / binary installation managers.

Configuration

Depending on your hardware configuration and components used you will have to set your pin definitions in the header files.

If you are using a basic ST3%XX or ST13XX series display you can use U8g2 or the Adafruit librarires. For more advance display features and better efficiency the Bodmer TFT eSPI library can be configured allowing for greater options. If you are using the EANx Analyzer OLED TFT eSPI.ino then the TFT eSPI library is required.

Revision History

  • 11/29/2022 - initial release
  • 12/30/2022 - prototype release
  • 01/03/2023 - custom PCB prototype release
  • 07/30/2023 - Rev 3 Custom PCB

Schematics

Seeeduino Xiao version with SPI OLED:

Arduino Nano version with SPI OLED:

Prototype

The current prototype unit is built using:

  • LilyGo-T-OI-PLUS ESP32 C3 with 16340 Battery holder
  • Generic ADS1115
  • SPI Organic light-emitting diode (OLED) ST7789
  • O2 Sensor
  • 16340 Battery
  • Custom PCB fit to project case
  • Project case

Side View Prototype with SPI OLED

Prototypes

Protoboard version

Custom PCB

Prototype 3

Custom PCB version

Prototype 4

Custom PCB version

Basic Operations

Unit is rechargeable with any 5-20v USB-C negotiating charger (i.e. phone charger). The unit has a battery meeter in the upper right of the screen for the 16340 battery status, and in the upper left for the sensor unit. If the sensor unit is yellow or red, please replace the O2 sensor, if the battery monitor is yellow or red please fully charge the unit before use.

About

EANx Analyzer reporting percent O2 and MOD

Resources

License

Stars

Watchers

Forks

Packages

No packages published