Close

Experiment 3 - Better approximation

A project log for PelletMon - IoT for central heating / boiler.

Monitor pellet boiler status via CAN bus, measure fuel usage - RE + engineering = profit !

h4rdc0derh4rdc0der 01/02/2021 at 19:440 Comments

I decided to improve the temperature conversion. Here's where the curve fitting software come in.
One of them is Curve Expert - can be bought at https://www.curveexpert.net/order, but trial is also available.

After a few tweaks, the polynomial curve fitting method turned out to be the best (5th degree).

double calctemp(short x)
{
    double a = 1.445633283634090E+02;
    double b = -1.386947619796149E-01;
    double c = 9.837913934334235E-05;
    double d = -4.486094388070098E-08;
    double e = 1.076415627857750E-11;
    double f = -1.066640689001453E-15;

    return a + b * x + c * pow(x, 2) + d * pow(x, 3) + e * pow(x, 4) + f * pow(x, 5);
}

It turned out that all temperatures are transferred in the same way, so this function can be used to calculate different temperatures - e.g. domestic hot water.

Discussions