Monitor pellet boiler status via CAN bus, measure fuel level using ultrasound distance sensor

Similar projects worth following


Our old boiler was previously connected to my IoT system. After replacing the boiler with a new one, we no longer have this option. So why not introduce it to a new boiler?


The goal of the project is to reverse engineer the CAN communication of the new boiler and expose real-time data to the IoT. By the way, the HC-SR04 sensor will measure the fuel level in the tank.


The project will have its own PCB. Communication with the outside world will be carried out using ESP32 and fuel level measurement using HC-SR04. The SN65HVD230 chip will be used as the CAN transceiver. The software will be written in the Arduino environment in C ++ and will be powered with my IoT framework - ksIotFrameworkLib.


  • PCBs in production!

    h4rdc0der01/03/2021 at 18:33 0 comments

    Since all experiments were successful, it's time to order a PCB. 
    All parts were ordered together with the board.

    As usual, I used the JLCPCB service, combining the order with LCSC. Unfortunately, according to the announcement, the option to combine orders will be withdrawn soon.

  • Experiment 3 - Better approximation

    h4rdc0der01/02/2021 at 19:44 0 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, 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.

  • Experiment 2 - Hacking all I CAN

    h4rdc0der01/01/2021 at 21:20 0 comments

    I previously established that my boiler uses the CAN bus to transfer data between the controller and the touch panel. The controller is somewhere inside and the touchpad is on the front as you can see ...

    The CAN port is on the back - it looks like an ARK connector. There are also CANL, CANH, GND and optional 12V, so the external module (Estyma VideNET) does not require a separate power supply.

    So, let's start hacking...

    I quickly realized that I did not have the right tools to analyze CAN traffic, since I had only ESP32 and CAN transceiver module based on SN65HVD230 chip.

    I tried several internet solutions to send data to Wireshark, but the messages were still difficult to analyze.

    I found a program on the Internet that I can use to suit my needs - CAN-Monitor-3000 github repository. I ended up writing a program in Arduino to emulate one of it's supported adapters.

    Visit my Canmon-Sniffer repository!

    Troubles with temperature...

    After searching the data stream, I found no interesting temperature value.
    Then noticed message 0x2D6... it changes when temperature changes!

    I figured out that I could send the crafted data to the bus. I had to add support for sending data to the CAN bus to the sniffer. 

    I was in trouble when I sent the wrong frame. The boiler reported a sensor failure and turned off.

    But eventually after few hours of headache, I ended with this small lookup table:

    Approximate for the win!

    I entered the given values on one of the pages for the function approximation. Then I put the given function into the test program.


    After uploading the program to ESP32, I got an approximate temperature reading.

    There is still a lot of work ahead of me, but this adventure was really interesting.

  • Experiment 1 - HC-SR04 to monitor fuel level

    h4rdc0der12/28/2020 at 16:16 0 comments

    Experiment 1

    I've bought HC-SR04 distance sensor and connected it to ESP32 devkit. I was curious if it would return reasonable value, because the fuel has no smooth / flat surface.

    Result - suprise! It works!

    This is a cool project base then, so I can research further :)

View all 4 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates