BlocNotes

Notepad of a tinker, maker, hacker or whatever you call it :)

How to monitor pellet stove's tank

How to monitor pellet stove's tank

I have a Rika pellet stove which is great and full of electronics but unable to warn me when the tank is going low. As I already have my own low power wireless devices and home automation tools I just added a distance sensor and design some enclosures.

Sensor selection

IR sensor

Cheap usual Sharp sensor needs to be at least 10 cm away from the pellets. No go for this use case as pellets are close to the lid when the tank is full

Ultrasonic sensors

As common as the Sharp IR sensor, the HC-SR04 was an option but I discarded it for two reasons:

  • Dust generated by pellets: sensor difficult to clean
  • Not working well with a power supply of 3.3 Vdc

STMicroelectronics time of flight sensor

So I went with ST VL53L0X: range adapted to my needs, low power and easy to clean sensor.
Regarding dust I used it for several months without having to clean it but summer was included, so let's wait a full winter for feedback.

Hardware

I bought a cheap evaluation board from Ebay and plug the I2C lines to my NoteRF boards

Software

I just added the library from Pololu to my project then translated the data in Node-Red.

// VL53L0X
if ( sensorType == 7 ) {
    msg.topic = `data/sensor/noterf_distance_${sensorName}/state`;
    
	var distance = msg.payload.split( "|" )[2];
	distance_percent = 100 - distance/590*100;
	
	msg.payload = {
	    'rssi': rssi,
	    'battery': battery,
	};
	
	// Filter abnormal values
	if ( ( distance >= 0 ) && ( distance < 8000 ) ) {
	    msg.payload.distance = distance;
	    msg.payload.distance_percent = distance_percent;
	}
}

Home assistant

As all other connected things in my house it reports to Home Assistant, which allow nice interface that I rarely use thanks to the automations: I am notified on my phone (through pushbullet) when tank level or device battery cross a threshold: the purpose of that device is achieved ! Anyway some fancy displays can be setup in few seconds:

Tank status gauge - color changes according to the value
Icons + values - I have view with it for all my devices
Tank status in millimeters - useless as percentage is more descriptive

Mechanics

I designed with OnShape two 3D printed boxes for the sensor and the electronics/battery, both are using magnets to stick in place
The sensor is on the tank lid, while electronics and batteries are outside, hidden on the back of the stove.

Design files:

Time of flight sensor - Hot glued into 3D printed box
Electronics and battery