gendov:
The output voltage commes from the 2 wires of the sensor and vary from -10mV to 40mV in the range in which I would like to measure the oxygen content in %. So it need amplification and shifting so the all analog signal is positive in order to be readed by Arduino analog input.
Don't waste your time tinkering with amplifiers.
Use an INA226 power monitor module. They cost less than 2$ at your favourite chinese store.
They are primary designed to monitor shunts in the range +-80mV.
They even can read the mV differential off-rail by up to 36V.
Isn't that perfect for your usage?
Just unsolder the shunt and read the "mV" directly over the I2C interface.
With the Arduino INA library from Zhanshin you get directly a stable and precise mV reading:
INA.getShuntMicroVolts(0);
RIN67630:
Don't waste your time tinkering with amplifiers.
Use an INA226 power monitor module. They cost less than 2$ at your favourite chinese store.
They are primary designed to monitor shunts in the range +-80mV.
They even can read the mV differential off-rail by up to 36V.
Isn't that perfect for your usage?
Just unsolder the shunt and read the "mV" directly over the I2C interface.
With the Arduino INA library from Zhanshin you get directly a stable and precise mV reading:
INA.getShuntMicroVolts(0);
Enjoy!
Thanks for the suggestion. It always look better to use ready module than to start from scratch.
I was looking to use MAX6675 module for K thermocouples mV measurement. But it has internal room temperature compensation that will distort measurement. INA226 will do the job. I ordered one.
I may use MAX6675 for measuring the temperature of flue gas of the boiler. It should not drop less than 120 deg.C to avoid condensation. Do you know better module for K type temperature measurement?
srturner:
Having all positive voltage output will simplify the design a little. The project looks doable using the circuit posted by johnerrington. But I can't imagine how you're going to calibrate it.
S.
Let first establish some measurement circuit.
21% is easy - just open air. For 0% is necessary to blow the sensor with nitrogen. We had such calibration bottles with pure nitrogen on tanker ships. They are used for calibration O2 memeters that crew wear when going to closed spaces. However in the middle range between 0 and 21% should relay on the manufacturer curve.
gendov:
I may use MAX6675 for measuring the temperature of flue gas of the boiler. It should not drop less than 120 deg.C to avoid condensation. Do you know better module for K type temperature measurement?
johnerrington:
A resistive divider, pot & multimeter to apply voltages?
Sorry, my wording was unclear. I meant calibrating the sensor output itself (not the amplification stage). I suppose the OP is planning to take the datasheet on faith. This is a bit troubling because the two different graphs correlating output with %O2 varied WRT output voltage.
S.
RIN67630:
Don't waste your time tinkering with amplifiers.
Use an INA226 power monitor module. They cost less than 2$ at your favourite chinese store.
They are primary designed to monitor shunts in the range +-80mV.
They even can read the mV differential off-rail by up to 36V.
Isn't that perfect for your usage?
Just unsolder the shunt and read the "mV" directly over the I2C interface.
With the Arduino INA library from Zhanshin you get directly a stable and precise mV reading:
INA.getShuntMicroVolts(0);
Enjoy!
Well, datasheet say that input voltage can be up to 36V but that is in voltage measuring mode. I will use it in current measuring mode for range up to 50mV by removing the shunt resistor as you suggested. However the full range of my sensor is 1V . I want it measure only first 50mV of this 1 V. Will the input sustain 1v in current measuring mode?
You need to have a look at the nerst equation which relates to zirconia probes .
The output is temperature dependant and proportional to the log of the partial pressures of oxygen across the probe. ( one side usually being 21%). A lot of automotive sensors use an internal heater , which you could drive to a constant resistance . Often with automotive sensors you get an offset voltage caused be heat not being constant across the sensor ( heated up the centre)
A further point is as flue gas temperature is low , there may be little saving due to running optimally ( there are tables for this)
This for natural gas but it will do :
There is a danger of carbon monoxide production here as the relationship between excess air and complete combustion may well vary .. you might not legally /wisely be able to do this ??
Temperature sensor will be in 10 cm pocket to the middle of the funnel where temperature is highest. So, it will be not exposed to corrosion. Both types of temperature sensors will fit.
Regarding measuring of mV I reviewed also ADS1115 board . It looks to me suitable in differential mode for my purpose. There is also ready arduino function for it.
gendov:
Well, datasheet say that input voltage can be up to 36V but that is in voltage measuring mode. I will use it in current measuring mode for range up to 50mV by removing the shunt resistor as you suggested. However the full range of my sensor is 1V . I want it measure only first 50mV of this 1 V. Will the input sustain 1v in current measuring mode?
According to the data sheet the mV inputs will tolerate even 26V. But after 80mV the ADC is saturated.
You are also free to build a voltage divisor upfront.
Well, I know this solution but it is rather expensive. Minimum set (without power supply) costs 100 EUR. There are ready solutions that are technically better but they are also expnesive - like thse 2 for example (there are other as well): https://ldperformance.co.uk/product/wideband-controller-for-bosch-lsu49/
My aim is to find chep solution for not more than 30-40 EUR overall , including arduino uno. Control of lambda in pellet boiler does not need such high acuracy like for the car engine. The burnig process in the pellet boiler is naturally varying because the fuel is beeing supplied in portions and burns during the pause. Therefore, the lambda changes in very wide range. That will need integration for 1-2 minutes for measuring the average lambda.
I intend to use old and cheap LSM11 lambda sonde (14 EUR) and 16 bit ADC INA226 (2 EUR) for the purpose , or ADC ADS115. LSM11 does not need so strict control of temperature like LSU 4.9 or latest LSU ADV. It needs just 12 V supply to the heatimh element.
I will probably include also channel for measuring temperature of exhaust gases by MAX6675 and K type sensor (thermocouple). The exhaust gases temperature should not fall below 120 deg.C to avoid condensation in chimney. So the regulation of burning process of pellets is compromise between lambda and temperature of exaust gases. PT500 sendsor will be probably also suitable for this purpose.
The ordered from Aliexpress INA226 and LSM11 sensor came yesterday. I will try them soon.
I wrote the code and connected LSM11 O2 sensor to INA226. All works well and display shows the O2 in %. But I found a core problem. The INA226 input impedance is 13 kohm measured both directions by multimeter on in+ and in- . That is not a problem if shunt of 0.1 ohm is there. But if I remove the shunt to measure input voltage of the O2 sensor the 13 kohm input impedance affects significantly the operation of O2 sensor and generated by it output millivolts. So INA226 is not suitable in this case. I will try with ADS1115.
Hi Tom George,
The sensor voltage is in range from -10 mV to +40 mV. The Vbs measure voltage against ground. If I am not wrong, it cannot measure negative voltage, is it? Therefore I remover shunt to measure differential voltage as RIN67630 suggested. In+ in- measure voltage from -80 mV till +80 mV.
I was wrong. I measured the output voltage of the sensor while connected and while is disconnected to the in+/in- . It is almost same. It is even lower when is disconnected. So the 13 kohm input impedance of INA226 does not affect the sensor voltage.
However I expected about -10 mV in open air (20.7% oxygen) as per the sensor diagram, but I measure about -6 mV which slightly vary up/down after the decimal point. It looks that sensor needs some kind of calibration. I will write additional code for sensor calibrate on start up. Calibration activation will be by button when it is exposed to free air. It should wait sensor to worm up and then will measure and store the error.
Then all measurements will be corrected by this error value.
Voltage measurement range as per INA226 manual on in+/in- is -81 till +81 mV. It is differential input.
Measurement range between Vbs and ground is from 0 to 36 v.