0% found this document useful (0 votes)
148 views4 pages

Easy To Build Oxygen Analyzer Using An Arduino Compatible Micro Controller

This instructable describes how to build a simple oxygen analyzer using an Arduino compatible microcontroller. It provides a shopping list of required components including an Arduino Pro Trinket, LCD display, oxygen sensor, push buttons, and resistors. It explains how to connect the components and includes the code. The analyzer measures the oxygen level in gas by taking a reading from the sensor and applying the appropriate formula. It can display oxygen percentage and maximum operating depth for different oxygen partial pressures.

Uploaded by

Mohammad Salim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views4 pages

Easy To Build Oxygen Analyzer Using An Arduino Compatible Micro Controller

This instructable describes how to build a simple oxygen analyzer using an Arduino compatible microcontroller. It provides a shopping list of required components including an Arduino Pro Trinket, LCD display, oxygen sensor, push buttons, and resistors. It explains how to connect the components and includes the code. The analyzer measures the oxygen level in gas by taking a reading from the sensor and applying the appropriate formula. It can display oxygen percentage and maximum operating depth for different oxygen partial pressures.

Uploaded by

Mohammad Salim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Food Living Outside Play Technology Workshop

Easy To Build Oxygen Analyzer Using An Arduino Compatible Micro


Controller
by akurk on March 7, 2015

Table of Contents

Easy To Build Oxygen Analyzer Using An Arduino Compatible Micro Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Easy To Build Oxygen Analyzer Using An Arduino Compatible Micro Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Shopping List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: Connecting It All Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 3: The Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 4: Finishing Toughes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

http://www.instructables.com/id/Easy-To-Build-Oxygen-Analyzer-Using-An-Arduino-Com/
Intro: Easy To Build Oxygen Analyzer Using An Arduino Compatible Micro Controller
As a builder of gadgets and a scuba diver I have been trying to build an oxygen analyzer for a bit now. The big problem is that most micro controllers can’t read the mv
that the sensor puts out. I played with opamps, but never got it to work properly. Finally I found the Texas Instruments ads1015, an analog to digital convertor chip
“adc”. Adafruit makes a nice breakout board to make your life easier.

Now I only need a micro controller, an LCD screen, an oxygen sensor, a push buttons and like 9 resistors or so and I got yourself an oxygen analyzer.

Step 1: Shopping List


Below are the components and parts with the links to where you can buy them

Adafruit Pro Trinket 3v micro controller https://www.adafruit.com/products/2010


Adafruit Lipo backpack charger for the Pro trinket with battery https://www.adafruit.com/product/2124
Adafruit ads1015 breakout board https://www.adafruit.com/product/1083
Nokia 5110/3310 monochrome LCD https://www.adafruit.com/product/338
7 10k ohm resistors
1 300 ohm resistors
1 push buttons
1 mono mini headphone plug
Hookup wire
Audio Jack - 3.5mm (Panel Mount) https://www.sparkfun.com/products/11154/
Teledyne R17 O2 Sensor http://www.oxycheq.com/analyzers-sensors/sensors/...
Sensor Cable *2 Foot* http://www.oxycheq.com/analyzers-sensors/accessor...
Sensor Tee http://www.oxycheq.com/analyzers-sensors/accessor...

Step 2: Connecting It All Together


ADS1015

VDD Pin to 3.3v

GRD Pin to Ground

SCL Pin to A5 Pro Trinket

SDA Pin to A4 Pro Trinket

A0 Pin to Connected to the Audio Jack - O2 Sensor + pole

A1 Pin to Pull up Resistor 10K

A2 Pin to Pull up Resistor 10K

A3 Pin to Pull up Resistor 10K

Nokia display

VCC Pin to 3.3v

GRD Pin to Ground

SCE Pin to D8 Pro Trinket

RST Pin to D6 Pro Trinket

D/C Pin to D5 Pro Trinket

DN(MOSI) Pin to D11 Pro Trinket

SCLK Pin to D13 Pro Trinket

LED Pin to 200 ohm resistor to 3.3 V

Push Button

1 pin to Ground

http://www.instructables.com/id/Easy-To-Build-Oxygen-Analyzer-Using-An-Arduino-Com/
2 Pin to D3 and a 10k pull-up resistor to 3.3v

Lipo Backpack

G Pin to Grd on Pro Trinket

3V 3V Pro Trinket

Pro Trinket

All the connections to the pro trinket are described in the above descriptions. I have added one 10k ohm pullup resistor to the RX pin. The Pro Trinket has the habit to
sometimes hang on boot. This pullup resistor seems to remedy this. Why?..... Don’t know, a much smarter tinkerer on one of the Adfruit forums told me this piece of
wisdom.

Note

The Lipo Backpack is the power source for the project. Every 3v connection needs to be connected to the Lip Backpack 3v and all the Ground connections need to be
connected to the Lipo Backpack Ground including the audio jack witch is connected to the Ground of the Oxygen Sensor.

Step 3: The Code


All the libraries used are from Adafruit and are easy to download from their site at www.adafruit.com. The formula for calculation the O2 % is simple.

(current mv from sensor / mv from sensor in the air) *20.9.

The only thing you need to do is store the "mv from sensor in the air" value in a variable before you try to analyze any gas. I do this in setup routine of my sketch or when
you press the push button. Just download this zip file and upload the sketch to your pro trinket.

File Downloads

o2AnalyzerSample.zip (1 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'o2AnalyzerSample.zip']
Step 4: Finishing Toughes
To complete the project I put all the components in an enclosure and added 5v Regulator like a the 7805T witch I connected to the 5V in pin and the ground pin on the
Lipo backpack to charge the battery.

I also added some code to calculate the maximum operating depth “mod” of the analyzed gas for a PO2 of 1.4,1.5, and 1.6

Formula for Imperial “Feet”

mod= ((po2/fraction of gass)-1)*33

Formula for Metric “Meter”

mod= ((po2/fraction of gas)-1)*10;

I also added a button so I could create a menu to select your mod unit “Meter or Feet”. To prolong the battery life I made it so that you can turn the backlight on the LCD
display on and off.

I could show you how to do these things but figuring this stuff out is half the fun. If you get stuck I can help a little. If you know how to improve on the project please let me
know as it is always good to learn new things.

http://www.instructables.com/id/Easy-To-Build-Oxygen-Analyzer-Using-An-Arduino-Com/
Related Instructables

Arduino /
Processing
ATtiny85 Audio Spectrum All You Need to Command Line ARDUINO based
Spectrum Analyzer by Know About LED Audio Assembly IR remote
Analyzer with Keanan Spectrum Spectrum Language control robot by
fix_FFT by Analyzers by Analyzer by Programming vigneshraja
shinteo kathywerder21 for Arduino
xevious809
Tutorial 6 by
1o_o7

Advertisements

Comments
2 comments Add Comment

wheeljam says: Mar 7, 2015. 4:59 AM REPLY


This reads the blood oxygen level right??

akurk says: Mar 7, 2015. 5:37 AM REPLY


Hi wheeljam

No it does not read blood oxygen levels. This is a gas analyzer, it analyzes your breeding gas for Nitrox scuba divers. Most scuba divers use air witch is
20.9% O2, Nitrox divers use higher oxygen levels to prolong their diving time.

http://www.instructables.com/id/Easy-To-Build-Oxygen-Analyzer-Using-An-Arduino-Com/

You might also like