Intro: Home Made - One Hand - Nitrox Analyser Arduino Based
In this instructable, I will show you how I built this Arduino based oxygen analyser.
*** WARNING - This is the kind of material that can be used to control your dive mix composition. Diving may be dangerous and everything you do with this is at your own risk. ***
This note is composed of two parts
1) I will describe how I built the box, because building a circuit on a breadboard is one thing, building a finished product is another one.
2) I will provide you the source code
Every parts I used are available on Ebay, from China or Hong Kong.
Here is the details of what I used :
- 9V battery (IKEA one because i like the color)
- 9V battery connector
- PVC enclosure.
> after thinking a lot, I found one in wich the battery can enter and is "naturally locked" by its dimension
- Arduino board
- LCD display
- Two switch.
One for on/off.
Push to set the new mix to 21%. It must be "push and release"
- One oxygen sensor
- A cable to connect your oxygen sensor (here it terminate by a jack plug)
- ADS1115 to convert mV provided by the sensor to digital signal.
Step 1: Display
The display is connected using a "Dupont" cable.
It is glued on the box cover
I used some "plastic foam" (the kind of stuff widely used to protect electronic component during post transfer). I cut a small part of it, glued it on the LCD and on the box cover.
This is working very good.
The box contains an ADS1115 with convert millivolt to digital signal. It is connected to the sensor via a jack audio cable.
Two button : one to switch the system on/off.
The second (the red one), once pressed, will set the system 21% oxygen.
The system automatically calibrates on 21% when started.
*** HOW DOES IT WORK - DETAILS***
In fact when there are no oxygen, the sensor delivers 0mV
When started, the system consider it is in 21% oxygen, measure the mV (let call it x ) provided by the sensor and store it.
Then it observe at rapid interval the potential provided by the sensor, and thus display the corresponding oxygen level.
0 mV ->0%
x mV -> 21%
<measure> mV -> ..
It display also the details potential and the slope used for the calculation (s= ... on the display)
It performs an quick average in order to avoid fuzzy display and Is able to display '--' if the sensor is HS.
I added a moving avery to smooth the variations.
(I leave you studying the code for this)
Step 3: And the Arduino
At the bottom, an arduino is also glued and powered directly but the 9V battery.
Step 4: And Now the Arduino Code
This is the arduino code :D
I have to tune it. contact me