Wood Stove Temperature Monitoring with Raspberry Pi

  • Active since 1995, Hearth.com is THE place on the internet for free information and advice about wood stoves, pellet stoves and other energy saving equipment.

    We strive to provide opinions, articles, discussions and history related to Hearth Products and in a more general sense, energy issues.

    We promote the EFFICIENT, RESPONSIBLE, CLEAN and SAFE use of all fuels, whether renewable or fossil.
  • Hope everyone has a wonderful and warm Thanksgiving!
  • Super Cedar firestarters 30% discount Use code Hearth2024 Click here

neverstop

Feeling the Heat
Oct 11, 2020
318
new hampshire
Inspiration for the project came from this thread: Automating wood stove with Pi. I was sick of having to get up and check the temperature of the stove with my thermal IR gun and wanted to be able to monitor the stove while I was away from it. Hardware and software specifics can be found at the bottom of this post.

Unlike the linked post I wanted to take a deep dive into python. I'm using a raspberry pi, a temp/humidty sensor, and a couple of thermocouples to capture the temperature of the flue, stove top, and room temperature (and humidity). I save the data to a database and then I use an extension of flask (dash) that all but eliminates the need to create .html and .css files for your web application to pull the data from the DB and display it on a webpage on my local network. As long as your on my local network you can reach the page by opening a browser and to http://<hostname>:<port>. Hostname is the raspberry pi's local IP address and the port can be anything you want, although it's easier if you pick a non-privileged port (above 1023). You'll see this:

[Hearth.com] Wood Stove Temperature Monitoring with Raspberry Pi
Data is captured every 5 seconds, and the app updates every 5 seconds. I'm displaying 12 hours of data on the graph because anything more than they is hard to see when looking on my phone. The table at the top shows the most recent data as well as the rate of increase over the last minute for each measurement. I'm using plotly.express to display the graph so it's interactive. You can zoom in, and save the graph as an image if you want. If any of the measurements go over a certain limit I've defined the cells that hold that measurement get highlighted in red until the measurement decreases past the limit.

Similarly, when the measurements go above the limit the datalogger sends me an email. I was going to text my phone like the other thread, but I found that there was a chance my carrier (T-Mobile) would flag the text as spam and either delay delivering the text or not deliver it at all. I have a gmail address I only use for this purpose. I send the email to this address from itself and have setup my phone/gmail account so that if an email comes in (from this email address) I get a notification (sound) even if my phone is in Do Not Disturb mode. Any other emails do not kick off a notification. This email gets sent every 5 minutes until the measurements go below their limits. I build the contents of the email as I check each limit so an example the email would be:

High Flue Temperature: 460
High Flue Rate of Temperature Increase: 75
High Stove Temperature: 710
High Stove Rate of Temperature Increase: 100​

I look for overall temperature, as well as rate of increase (took that idea from the other thread). So I know if I'm too hot, and if I'm on a path to being too hot. I haven't actually used the stove yet this year as we're having a warm streak right now (southern NH), but it looks like I'll start burning next week.

The Flue monitoring location is closer than 18" (probably ~11"), but it's as far away as I could put it with my stove setup. I may need to swap out the magnet that I'm using to keep the Stove Top monitoring thermocouple in contact with the stove. I don't know if the one I found will be able to withstand the temperatures from a magnetism stand point. I had to use a PCB breadboard to breakout some of the GPIO pins of the raspberry pi because the sensors share various pins. The thermocouples have fiberglass insulation that should be stable up to ~750 F. The cable doesn't actually touch the stove top except in the back and that part of the stove never gets above 500F.

STT Thermocouple Location
[Hearth.com] Wood Stove Temperature Monitoring with Raspberry Pi

Flue Thermocouple Location
[Hearth.com] Wood Stove Temperature Monitoring with Raspberry Pi

Wired PCB
[Hearth.com] Wood Stove Temperature Monitoring with Raspberry Pi

Hardware:

  • Raspberry Pi4 Model B 8GB - running rasbian 64bit
  • (2) Adafruit Max31856 Thermocouple amplifier boards - Max31856
  • (2) K-Type Thermocouples with fiber-glass insulation - k-type (5pk)
  • (2) Ring terminals with no insulation - Ring terminals (50 pk)
  • (1) #8 self tapping screw - #8 screws
  • (1) DHT11 temperature/humidity sensor - DHT11
  • PCB Breadboard
  • Assorted wire, shrink tubing, etc
Software: (python)

Interpreter: Python 3.9

Dependencies: Dash, plotly, sqlite3, pandas, dash_mantine_components, Adafruit_DHT, time, board, digitalio, adafruit_max31856, datetime, smtplib, MIMEText, MIMEMultipart

Folder structure:
| code
/dataLogger.py
/watchDog.py
/emailAlert.py
/environment.db
-settings(table)
-woodstove(table)
-emailalert(table)
/dashWebApp.py

Future Updates:
Since I don't have any actual data I assume that I'll need to adjust my limits for alerts. I may also add additional sensors throughout the house to see how well (or poorly) the heat gets distributed. From there I may add in some logic/code to turn on box fans to better distribute the heat based on temperature.

Anyway, it was a fun project and I won't have to stress about the stove when I'm not around it. My WIFI covers a good portion of my property so I can actively check in via the app, and when I'm out of range or away from the house I'll get notifications if some goes awry.
 
  • Like
Reactions: EbS-P and begreen
Thanks for sharing. That's pretty nifty.
 
You could get really crafty and do some more in depth data. If you weighed the wood going in and pulled info for current outside conditions you could use that information along with forecast hourly conditions to tell you how much wood to add on reloads. You would need a good bit of logged data of your current sensors to execute. That would use a lot of data and tweaking of an algorithm to compute. Sounds like a good winter project. What you have done looks good.
 
  • Like
Reactions: sleewok
You could get really crafty and do some more in depth data. If you weighed the wood going in and pulled info for current outside conditions you could use that information along with forecast hourly conditions to tell you how much wood to add on reloads. You would need a good bit of logged data of your current sensors to execute. That would use a lot of data and tweaking of an algorithm to compute. Sounds like a good winter project. What you have done looks good.
Sounds like an interesting project. Unfortunately, I don't have the free time to do something like that.

Right now I'm trying to troubleshoot why my thermocouple is reading ~378 F while I'm measuring ~570 F with my IR gun and the bi-metallic coil.
 
I'm measuring flue temperature from the bottom of a horizontal section of pipe (rear exit install). Should I expect the temperature value to be significantly lower than the top?
 
Turns out I was using the wrong emissivity setting for the IR gun. Should be 1.0 for a black painted stove (according to OMEGA), and I was using 0.7-0.8.

With the new values the IR gun reads within +/-20 F of the thermocouples.