Measuring oxygen...
Someone with a better background in this should check this basic premise, but the premise is that a pressure differential, across a constriction, measures volume flow. A mass flowmeter, as the name says, measures the mass of the gas flow. Oxygen is about 17% denser than air, so measuring the difference between a mass flow sensor and a differential pressure flow sensor may be able to indicate the ratio of oxygen in the "air" being supplied by the ventilator.?
Possibility constructing a small chamber with a fan moving the "air" at a known flow rate across a heated thermistor, could be used to measure the oxygen percentage of the "air". Thermistors, I've been told, are not fast enough to work as an instantaneous flow sensor for accumulating total flow volume, but speed may not be an issue in this use of a heated thermistor.?
This measurement system would only be good for measuring the input air/oxygen ratio. Because you should be able to know the only two gasses being mixed are air and oxygen. On the output side you would not be able to correctly differentiate between the densities of air, oxygen and CO2.?
Tom, wb6b