Equation of line from PPM vs Voltage for sensor.

468 Views Asked by At

I have an Electrochemical Hydrogen sensor that I am trying to convert its analogue values to PPM values. I am attempting to follow the datasheet and come up with an equation of the line so I can get a formula into which I put the voltage, and out the other side comes PPM.

I have tried interpolating using Wolphram Mathematica but what is produced is a lengthy polynomial that hits all the points I plotted based on the graph shown, although it is wildly off-track in between the points because it makes a line that waves up and down instead of a sort of single curve like is on the graph.

This is the graph that I am attempting to turn into a formula:

MQ8 Graph

And this is the full datasheet: Datasheet Link Winsen MQ-8

2

There are 2 best solutions below

3
On BEST ANSWER

The fitting of a model such as $y=a+b\:e^{p\:x}$ is not accurate.

A much better result is achieved with two exponentials : $$y=a+b\:e^{p\:x}+c\:e^{q\:x}$$ The numerical calculus below leads to an asymptote : $y_{max}= a\simeq 3.51$

The existence of a minimum value $\quad y_{min}= a+b+c\simeq 0.28\quad$ at $x=0\quad$ appears consistent with the fact that, even without hydrogen in the sensor, a residual output remains due to other gaz and/or other heat conduction phenomena.

The data used consists in 12 points $(x_k,y_k)$ taken in scanning the graph provided by user2385411.

enter image description here

Drawn on the original graph, the fitted curve appears in red :

enter image description here

The very good fitting was carried out thanks to the method from the paper https://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales , pp.71-74.

From this paper, the procedure is :

enter image description here

0
On

It looks like $V=V_0(1-e^{-C/C_0})$ You might need to add a background to it as well. $V_0$ is the voltage when concentration $C$ goes to infinity. $C_0$ is a constant that you need to fit, that tells how fast your curve converges to the maximum value. Just by looking at the graph, $V_0\approx3.5$ and $C_0\approx 200$