Introduction: Calibrated Dissolved Oxygen Meter

Are you working on a aquaponics or hydroponics project? Or you simply have a fish tank and want your fish to be happy? If yes, you'll probably need a way to measure dissolved Oxygen level. Some time ago, I bought a galvanic DO sensor compatible with microcontrollers, check out the website, it has very clear instructions. At some point I’ve realized that the probe can be used only at the calibration temperature, meaning that if you’ve performed calibration at 20 degrees Celsius, measurements can be done only at this temperature, otherwise DO values that you get are not correct. In order to calibrate a probe, you need to saturate water at a right temperature with oxygen and this might get a little tricky. I came up with the method that eliminates the effects of temperature.

Supplies

1. Gravity: Analog Dissolved Oxygen Sensor / Meter Kit For Arduino

2. Arduino Uno or similar microcontroller

3. Waterproof temperature sensor (NTC 343510k thermistor and 2x10kOhm resistors)

4. 0.5 mol/L NaOH solution (for DO probe)

5. Air pump with diffuser stone, ideally 4 stones

6. 2-5 l water tank (pot, jar...), ideally 4 units

7. Arduino IDE

Step 1: Prepare for the Measurements

1. Read DO sensor introduction carefully! And description too until "Probe calibration" paragraph.

1.a. Fill probe cap with NaOH solution. Tip: use one layer of teflon tape to seal the cap better.

2. Fill 4 water tanks with water of different temperatures (around 12, 18, 24, 30 degrees Celsius) and aerate it for 20min. If you have just one diffuser, do this step one by one.

3. Connect DO and temperature sensors (as shown in a picture) and download file below (open in with an Arduino IDE), upload sketch to a board.

Step 2: DO Sensor Arduino Code

1. Turn of air pump and place probe in one of the jars.

2. Type in: "calibration". Slowly stir the probe for at least 30 s until voltage gets stable.

3. Then type in: "satcal". Keep slowly stirring until values are stable and type in "exit".

4. Write down values of temperature, voltage and DOvalue.

5. Do the same measurement with all four jars. If you have just one air diffuser, do measurements one by one.

Step 3: Plot Data to Find Needed Coefficients (graph1)

Some math: multiply averageVoltage by 1,02 - from my personal experience voltage value when in water and in air differs by 1,02. (To verify this value, saturate room temperature water with oxygen, measure the averageVoltage, then take out the probe from water and read the averageVoltage value again, divide second value by first one). This is necessary, because even though this method eliminates temperature effects and water calibration, calibration in air is still required. Why? Voltage readings are sensitive to more factors than just a temperature. it is affected by NaOH concentration (and it changes through a time), as well as thickness of the probe's membrane, which varies from one cap to another, additionally, even using same cap, the way it is screwed on (loser or tighter) effects readings.

Plot temperature vs averageVoltage data in a graph and fit data points linearly (as it is shown in graph1). You can use this website.

Step 4: More Data Analysis (graph2)

Plot all four voltage vs DO data sets and fit it linearly. One data set consists of two points: at a saturated DO level and 0 mg/L DO. Voltage reading at 0 mg/L DO is very close to 0 (from my experience), thus one point of each data set is (0;0). If you wish to have more accurate data, use sodium sulfite(Na2SO3) to bring DO levels to 0. From graph2 linear fitting you'll need slope and temperature values for last graph. Intercept value is ignored as it is very small.

Step 5: Find Last Coefficients (graph3) and Upload New Code

This is the last graph! Plot temperature vs slope (graph2) values, fit a quadratic polynomial to the data points. Download file below (open in with an Arduino IDE), change coefficients of two equations in the sketch (Dissolved_oxygen_with_calibration_in_air_to_avoid_different_los) with values that you got in graph1 and graph3. There are notes in the sketch which equations should be edited. Reupload this edited code to a board. And now before measuring DO, wet membrane of a probe, do the calibration sequence same way as in step 2, just keep the probe in the air. Let me know how it goes!