Figuring out circuits for a Nitrox Analyzer

I'm quite interested in building my own nitrox analyzer. I can always purchase one- and in fact, I own one- and have a second one in pieces.
The reason I'm interested is that I'd like to do more than just have an analyzer- I'd like to understand it- and modify it to suit some of my needs. For example, if the battery powering the analyzer starts to go bad, then the analyzer will read incorrectly, so you might not know it. Or what about if you decide to use a different sensor? You'd have to get new analyzer circuitry, as the output of an oxygen analyzer (the little fuel cell) varies from manufacturer to manufacturer.
Fortunately, the overall concept is fairly easy- an oxygen sensor gives a tiny voltage when exposed to oxygen molecules. Just having a sensor and a voltmeter means you've got a rudimentary analyzer.

I can expose the sensor to air, take a reading, then expose it to a nitrox mix, take that reading, get the ratio between the readings, then multiply it by my start percentage of O2 (20.9). Sensors- fortunately- are linear, so this works. If my voltage reading is 10mV when I read air, and 20 when I read my nitrox mix, then my percentage of oxygen is (20/10)*20.9 = 41.8% O2.
But who wants to whip out the calculator every time- oh- the cost of those nitrox analyzers. Well, what if you could use the guts of a multimeter to do the calculation for you?
That's what most of these home-grown analyzers are. You can find plans for building your own in the book The Oxygen Hacker's Companion. I've also found some plans on the net- the ones I've been studying a lot because they go into detail about what to do, rather than just 'solder this wire'- is here. The heart of any multimeter is the ability to take an analog signal (usually milliVolts) and turn it into a display of decimal digits. Each panel is probably different, but it looks like all of them use a standard IC called an ICL7106. It can take a signal up to 200mV and display it on its display. It uses a voltage divider (fancy way to say resistors powered with a higher voltage) to create a reference voltage and has circuitry to convert that into the digits.
Here's the circuit of this reference voltage. It is important, because this is what we actually need to modify to reset it to our needs for our particular fuel cell. That being- we could just read the millivolts- but that doesn't help us- we want it to read in percentage of oxygen.
A voltage divider is a way to precisely take a stock voltage- 3V in this example, and output a lower voltage.
The way a voltage divider works is by simply following Kirchhoff's Law. The law states that all voltages in a closed loop must sum up to zero. So in our circuit above, we start off with a 3V on the 'right' that must have -3V of voltage drops on the 'left'. There are a couple of ways to figure out how this works- we know that V=IR. V3=IR2+ IR3 + IR4. Since the resistance values are known, I can solve for I and get each voltage drop. But, I don't need to know I at all. I know the voltage is going to drop proportionally according to the resistor associated with it. A big resistor means a big drop. Voltage at 36 is going to be proportional to the maximum of 3V. In other words, it's going to be a ratio of the drop at the big resistor compared to all the resistors.
V36=V* (R2 / (R2 + R3 + R4))
Putting in values (assuming the center for the variable resistor), we get V36 = 3000mV * (30k)/(30k + 909 + 100). V36=3000 * (30,000)/(31009). This ratio gives us 2902.38mV. That big resistor eats up a bunch- so what's the value going to be? Just subtract the start voltage, which turns out to be ~100mV. This is meant to 'center' the reading on the scale. If you notice, the variable resistor allows us to tune the reading slightly from 0-200 on the denominator so that if some of the resistor values aren't spot-on, we can factory calibrate the meter to read properly with a known 100mV source.
The circuit uses this as a 'reference' when deciding what the input voltage is. So, in the example circuit above, the voltage at (36) is 100mV. Which would be great for us if our oxygen sensors used this range and it matched up to percentage O2.
At this point, there are a couple of choices. We could modify the input to raise it to our decimal scale, or we can modify the output to change the display. And there's another consideration. We need to be able to adjust the sensor reading each day we want to test our mixes. Sensors as they age can creep up or down. Also, humidity and temperature can have an effect on the sensor as well, so we'll need to be able to calibrate, so we need a rheostat (which is a potentiometer used as a variable resistor).
How do we do it? We need for 100 to show up when there's 100% oxygen. All we do is find the range of our sensor for air, knowing that it needs to show 20.9 on the meter and make what the voltmeter thinks is 100mV be the max mV. We're going to move the range down (or up if there was a sensor that read >100mV on pure O2). Whatever sensor you use will have a specification for what it reads in air, or pure O2. We'll take that value to calculate what the reference value needs to be in the panel display.
Let's say our sensor reads 13mV on air, which is 20.9% oxygen. Since the panel reads 100 for 100mV, we want it to read 20.9 when it is at 13mV by changing what it thinks '100' should be. We just get this ratio, so 13/209 = 62mV.
Now using our formula above in the current divider, we need 20.9 on the meter to be associated with our input of 13mV, which means at 'reference', or 100, it needs to be 62mV. Let's assume R4 (the built-in adjustment rheostat) is centered at 100.
3000mV-Vref=V * (R2 / (R2 + R3 + R4))
- Vref is our reference voltage
- 3000mV is the input voltage
- R2 is our 'big' resistor which knocks the voltage down from 3V to where our readings live
- R3 is the value we're solving for
- R4 is the built-in adjustment on the panel (100)
3000 - Vref= 3000 * (30000/ ( 30000 + R3 + 100))
2938mV = 3000 * (30000/ ( 30100 + R3))
R3=(3000mV * 30000Ohms / 2938mV) - 30100Ohms
R3=533 Ohms
2938mV = 3000 * (30000/ ( 30100 + R3))
R3=(3000mV * 30000Ohms / 2938mV) - 30100Ohms
R3=533 Ohms
So, let's plug in our value at what our sensor will read in air and see what the output will be. The voltage that it reads is 13mV and it compares it to 62mv. 13/62 is the ratio with the '100' reference. So it is a percentage of 100....drumroll 20.9!
Now you may ask yourself- well, you just adjusted our sensor for air- what about if I only know what it reads at 100% O2? Not a problem- the ratio for our target mV is exactly the same. If we want it to read 100 at 100% O2, we need to know what the sensor puts out. Check your specifications, but most list it in air (and guarantee the linearity). So, we'll say that our sensor which reads 13 in air, will read 62mV (100/20.9 * 13). See a pattern? That's what we just fixed our sensor using 20.9 and 13mV.
Note that we can also change around our reference voltage by changing the R2 or 'big' resistor. We could have left the other resistors and calculated for R2 instead. In our case, our oxygen sensor puts out <100mv,> 100mV on some sensors, in that case, we'd shift it the other way and choose a larger R3/4/5 or smaller R2.
The above is the modification needed to allow the use of any oxygen sensor with a panel meter. Just by changing the value of the voltage divider, we reset the 'percentage of 100' that we want to use. When we calculate what 100 should be, our voltmeter now translates it into percentage of oxygen.
Now we know what to pick for R3 (or R2) to meet our needs. The next thing we need to decide is how to adjust the reading. R4 is a screw-adjusted rheostat which is used at the factory to set the voltage reference level (especially if the other resistors are a little out of spec). We could use this resistor, except that it's only accessible inside the panel's enclosure. The reason we need to set the reading is that the oxygen sensor tends to drift its base value over time. We need to reset it on air before we do other readings. We've got two choices- change the R3/4/5 resistor value by introducing another rheostat (R3/4/5..6), or change the voltage level of the measured voltage by putting a voltage divider on it.
Since a voltage divider can only lower a voltage, it is better that our adjustment rheostat be in the centering circuit, since a value can be chosen which allows it to be adjusted up or down, instead of just down in the case of the input voltage. Therefore (and as is shown in the oxy hacker book), the R3 resistor we've chosen should actually be two- a rheostat, and a fixed resistor. A 100 Ohm rheostat will give enough adjustment, and can be put in series with equivalent resistors, or a larger rheostat could be used, with a finer adjustment ability.
Labels: scuba technical





