Detecting oxygen with an Analog to Digital Converter.

Results

The candle stayed lit for about 90 seconds and then slowly went out. Next we started looking at the data on the webpage. We ran the test twice for this graph and our annotated chart is shown in Figure 10.

Figure 10: The graph from the candle experiment.

Looking at the numbers, we determined that the oxygen levels in the jar started at around 22%. The candle went out when the oxygen dropped to around 15.8%, an overall reduction of about 25%.

This is lower than the figure 30% we found online. This can be put down to a combination of sensor accuracy and the fact we may have used a different type of candle. If you look at the graph right after the candle went out, you can also see that the seal wasn't perfect, as oxygen levels started to creep up.

Listing 2

DataLogger.py modifications

01 .
02 .
03 .
04 # configuration variables
05 # set to true if present, false if not
06
07 INA3221_Present = False
08 ADS1115_Present = True
09 OURWEATHER_Present = False
10 ThreePanelTest_Present = False
11 WXLINK_Present = False
12 .
13 .
14 .

Burning Out

If when you run the test program, you see nothing on any of the 4 channels except for the Mux itself, it's likely you haven't supplied power to the external I2C buses. You need to connect JP6 and JP7 together as stated in the specifications.

We really need to revisit this issue the next time we do a production run on this board. The reason we leave these connectors unconnected is so you can select 3.3V or 5V on each bus. However, that means it doesn't work right out of the box. We have received feedback about this from our customers and plan to connect these pins internally on the board using pads that can be easily slit with an Exacto knife for those people that want to select 3.3V or 5V on different devices.

As you can see, there is a lot you can do with an Analog to Digital Converter and a Raspberry Pi. Stay tuned for more on ADC projects in a future SwitchDoc Labs Column.

Buy this article as PDF

Express-Checkout as PDF

Pages: 5

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content