captainigloo / Trimix-analyzer

Trimix-analyser
19 stars 10 forks source link

compensation for temperature and linearity #4

Open xvrijdag opened 4 years ago

xvrijdag commented 4 years ago

You have created a very awesome project to measure trimix for divers. I would like to built one myself and was reading you documentation and code.

I found that you very cleverly compensate for temperature and linearity of the sensor. Would you be able to point me to sources on which you have based this compensation?

thank you very much for making your information available for this amazing project.

mict-ss commented 4 years ago

I found that you very cleverly compensate for temperature and linearity of the sensor. Would you be able to point me to sources on which you have based this compensation?

Looks like the compensation is for the temperature of the MD62 sensor. Specs say the heating time is 30 minutes to 8 hours after weeks op inactivity. I'm building this one as well, using the MD62 for thermal conductivity combined with an ultrasonic sensor for acoustic conductivity. Both should give the same result. Temperature should not be of too much influence in a flow rate of 0,5l/h (due to temperature drop caused by decompression in the flow limiter. Adding a temperature sensor might be required since 5 degrees Celsius temperature changes the result significantly.

xvrijdag commented 4 years ago

Where did you find these specs you refer to for the heating time?

mict-ss commented 4 years ago

https://www.winsen-sensor.com/d/files/PDF/Thermal%20Conductor%20Gas%20Sensor/MD62%20Manual%20V1.3.pdf

For a short period storage (in 2 weeks), the sensor need 8 hours preheating to stabilize, for long-term (more than one year) storage, it need more than 48 hours' preheating.

xvrijdag commented 4 years ago

thank you for the link to this source. I added the pdf file to the data sheets folder. The code uses a correction based on the time the device is on. However, this would be reset if the device is switched off and a short while later switched on again. Would there be a more elegant solution to correct for this warming up phenomenon.

The following code is used to calculate the helium percentage: float gain = 0.03125; float calibMD62 = 661.26; float WheatCalib = 10;

wheatstone = RA1.getAverage()gain; wheatstone = wheatstone - WheatCalib; wheatstone = wheatstone - CorrFroid; helium = 100 wheatstone / calibMD62; if (helium > 50) { helium = helium (1 + (helium - 50) 0.4 / 100); }

My second question relates to the last line of code, where a helium% above 50 is compensated for some non-lineair behaviour. Did anybody find a source for this correction?

I did find two scientific articles talking about this non-lineair behaviour. I added both to the repository. For Tournier 2008 you need to look at figure 24 and the formulas above it. Both papers don't seem to describe the thermal conductivity as simple as programmed above.

RAFAL1976-STAR commented 3 years ago

Hi. The program shows me a lot of errors in the downloaded file all the time. Can you send me the correct version?