Tank Level Alert for Pellet Stove




Introduction: Tank Level Alert for Pellet Stove

About: Passionate of DIY of any kind, I am not of the trade (I am developer in computing) but I am self-taught and I like to learn new things. I decided to share my creations with you through photos and videos. I do…

If, like me, you have a pellet stove which does not indicate the low level of the tank, I suggest this little module which will beep when the reserve is almost empty.

This gap is problematic because when there are no more pellets, the stove switches off and the ventilation still blows for 40 minutes. Only after that it is possible to restart it.

This module consists of 2 boxes, the first is the sensor which will "read" the level of the tank and the second contains the buzzer to warn, a test button, and an LED to indicate a reading in progress. Everything is powered by a battery (a power bank to use to recharge phones for example).


  • Digispark (or Arduino Nano)
  • HC-SR04 ultrasonic sensor
  • Buzzer
  • LED
  • Push button
  • Switch
  • 560 ohms resistor
  • PLA for 3D print
  • Magnets
  • Battery (power bank)

Step 1: Study

I did some tests with a test board and an Arduino Uno to know how to use the ultrasonic sensor.

The HC-SR04 detector uses ultrasound to determine the distance an object is located. Regardless of the light intensity, temperature or type of material, the sensor can easily detect how far it is from the obstacle.

The stove tank heats up to around 46 degrees Celsius but that shouldn't be a problem as the sensor has a Working Temperature: -15°C to 70°C

On such a project I don't need a lot of I/O so I chose a Digispark.

To facilitate programming I used the NewPing.h library. The problem is, I couldn't get this library to work with a Digispark. So I used the basic functions to read the sensor but the values seemed less precise.

So I created 2 version of the code depending on whether you choose a Nano or a Digispark :

  • NiveauPellet.ino for Arduino Uno or Nano (Use NewPing.h library)
  • NiveauPellet_v2.ino for Digispark

The rest is pretty basic, a buzzer to alert, an LED to indicate that a reading is in progress, and a button for do a reading test.

Step 2: 3D Print

I designed the boxes with the Fusion 360 software, I planned a housing inside the boxes to be able to install a small magnet.

For printing I used carbon black PLA with my FlashForge Finder printer

Step 3: Welding of Components

For the control part, the components are soldered onto a small piece of pre-drilled printed circuit board.

For the ultrasonic sensor, I unsoldered the pins and soldered the wires directly.

And for the cable, I recovered an old computer Y cable (it was used once for a wireless keyboard and mouse receiver).

Step 4: Assembly

The circuits are installed in the cases, the covers are glued, and the cable is connected to the Arduino.

The Digispark having a standard USB port, I can plug it into a power bank.

Step 5: Bip Bip!

The sensor is installed under the tank cover thanks to its magnet, and the control part is placed on the edge of the stove and remains in place thanks to its magnet too.

This is how it works: when the pellet level is low (I left about 10 cms), the buzzer sounds every 2 minutes and I know I need to refuel.

If you liked it, please consider your vote for the automation contest ;)

Automation Contest

This is an entry in the
Automation Contest

Be the First to Share


    • Pi Day Speed Challenge

      Pi Day Speed Challenge
    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Microcontroller Contest

      Microcontroller Contest



    8 days ago

    I've made something fairly similar to this, though I use a small OLED screen to display distance readings and tank level. However, I'm really having trouble getting accurate and consistent readings from the ultrasonic sensor in this environment. Especially when the stove is running and the pellets are shifting around in the hopper, I will sometimes not even receive a return signal from the sensor. My best guess is that the transmitter is lining up with a gap between the pellets and not being correctly reflected back to the receiver, though I don't know enough about ultrasonic sensors to be sure. Has anyone else encountered this issue and figured out a way to get more consistent and error-free readings?


    Reply 5 days ago

    Yes it is true that the readings are sometimes random, I think you have to take an average: for example take 5 readings in 5 minutes, and take the average distance.


    17 days ago

    bien pensé, simple , pratique ........ que dire de plus ? la finition est nickel .... je dis bravo . cdlt . de lionel de Belgique


    Reply 16 days ago

    Merci Lionel !


    23 days ago

    I like this very much! It's simple, cheap and very very effective.
    Good job!

    If you change the arduino for an ES8266 you can even have a phone notification reminder to fill the reservoir.


    Reply 22 days ago

    Thank you ! Not bad the idea, I have never used an ES8266 but it is an idea that I keep ;)


    26 days ago

    This is such a simple but awesome automation project :)


    Reply 26 days ago