Arduino Wood Stove Regulator

4,628

48

11

Note : you can download code file and 3D print files below (end of step 1 and step 3).

It is often tedious to control the air supply of a wood stove.

I built an automatic regulator that do it for you. It controls the air supply depending of the temperatures of the chimney.

The combustion is always optimal and you get the maximum calories out of your firewood.

You get a notification when a wood refill is needed.

At the end of the fire, the system automatically close the air supply to prevent the stove to cool down to fast.

WARNING : always let a minium drawing. Not providing enough air supply to stove is dangerous. It can produce fatal CO gaz or incomplete burned gaz explosion.

Disclaimer : I am not responsible of any use of this project. By using this project you take all responsibilities of its configuration, implementation and usage.

Supplies:

Step 1: The Regulator

The Arduino is the regulator.

It is connected to :

  • a termocouple (max6675).
  • a servo motor to control the valve (small one TowerPro 9g SG90)
  • a buzzer
  • a LCD screen (16x2)
  • a potentiometer to control manually the air supply.

If the air supply is set to the maximum, the Arduino switch to automatic mode and control the valve depending on the temperature measured by the thermocouple.

The Arduino sketch implements a PID control that stabilizes the temperature.

The Arduino sketch is open source and available for download, please read the header before using it.

I use Adafruit's max6675 library, it can be installed from the Arduino IDE.

IMPORTANT : You first have to configure the properties and the PID values so that they match your project .. (see step : Test and configure regulation )

Step 2: The Thermocouple

The thermocouple is a MAX6675 type.

Connect a wire from your Arduino to somewhere you can measure chimney or stove temperature.

Connect the thermocouple to that wire and fix the end in contact with the non isolated part of you stainless steel chimney or in contact with external part of the stove. Not inside the chimney !!

As told above, I use Adafruit's library. You can install the Adafruit's library from Arduino's IDE.

Step 3: Print the Valve

The case of the valve and servo is 3D printed.

The STL files are available for download.

  • print the disc valve
  • print the case with the cylinder
  • print the servo-to-hinge connector

Please note that they are all printed in ABS, you might update printing size for other materials.

Step 4: Assemble the Valve

  • Push a long hook inside the valve's hinge.
  • Connect the hook to the servo motor with the connector 3D printed part
  • Push the hook and the servo inside the case with the valve in place
  • Fix the valve on the hook, I drill three small holes and put super glue inside.
  • Check that the valve is turning without resistance (the servo is not powerfull..)

Step 5: Configure the Regulation

A regulation need some configuration, you may have to change the default parameters :

  • float temperatureMin = 50; // under this temperature, the regulation starts an integral measure to estimate end or fire and close the valve

  • float consigneTemperature=120.0; // the desired temperature measured by the thermocouple

  • float kP=5; // P parameter of the PID regulation

  • float kI=0.0005; // I parameter of the PID regulation

  • float kD=0.00005; // D parameter of the PID regulation

  • float refillTrigger = 5000; // refillTrigger used to notify need of a wood refill

  • float closeTrigger = 15000; // closeTrigger used to close vlave at end of combustion and notifiy end of fire

  • float potentioMax = 1023.0; // Potentiometre calibration

  • int potentionRelMax = 80; // Potentiometre value above which the regulator runs in automatic mode

It is highly recommended to test the system before deploying it ..

  • Connect the thermocouple,
  • Upload the sketch to Arduino.
  • Connect the valve but do not connect it to the air supply yet.
  • Calibrate the zero angle of the servo motor.
  • First manually test the valve with the potentiometer
  • Then make a firewood and check the thermocouple and the valve behaviour (by simulating the air admission with your stove manual controller) To put the Arduino regulator in automatic mode, you have to put the potentiometer to 100%.

Step 6: The Notifications

The buzzer is used for notifications.

There are two notifications that can be customized :

  1. wood refill notification
  2. end of fire notification

When a wood refill notification occurs, you have to put some wood, the wood refill message is going to disappear when the temperature goes up the target temperature again.

Both notification are based on the integral of the PID to be more accurate (than notifications based on temperatures)

The trigger values must be configured in the arduino sketch. You have to tune them for your wood stove.
If your refill notification raises to early, just increase refillTrigger variable.

  • float refillTrigger = 5000; // refillTrigger used to notify need of a wood refill
  • float closeTrigger = 15000; // closeTrigger used to close vlave at end of combustion

The notification and buzzer frequency and delay can be configured in the arduino sketch.

// Buzzer variables

  • int buzzerPort = 9; // Buzzer port
  • int buzzerRefillFrequency = 2000; // Buzzer tone frequency for refill alarm
  • int buzzerRefillRepeat = 3; // Number of refill alarm tones
  • int buzzerRefillDelay = 1000; // Delay of refill alarm tone
  • int buzzerCloseFrequency = 1000; // Buzzer tone frequency for end of fire valve close alarm
  • int buzzerCloseRepeat = 2; // Number of tones for end of fire valve close alarm
  • int buzzerCloseDelay = 2000; // Delay of tone for end of fire valve close alarm

Step 7: Fix the Valve at the Air Supply

Connect a wire between the Arduino and the air supply.

Fix the valve to the air supply.

Warning it must be an external air supply away from heat source !!

Step 8: Light the Fire

Be sure you configured and tested as explained in previous steps.

To start in automatic mode, put the right potentiometer to the maximum to the right (more than 80% clockwise)

Check the values on the LCD (angle should be 90°, and drawing 100%)

Start a fire, check the temperature. When the temperature goes up the desired temperature (consigneTemperature in the sketch) the valve should close. If the fire becomes too weak, the valve should open. If the fire becomes too strong, the valve should close again. I something goes wrong, use the potentiometer below 80% to be in manual mode or use the manual control of your wood stove.

You can get some nice PID curves by getting the values with Arduino serial port and plotting them. (In red the valve angle, in blue the temperature)

At the end of the fire, the system automatically close the air supply to prevent the stove to cool down to fast.

To restart the system, put the potentiometer to zero then to maximum value.

WARNING : always let a minium drawing. Not providing enough air supply to stove is dangerous. It can produce fatal CO gaz or incomplete burned gaz explosion.
Disclaimer : I am not responsible of any use of this project. By using this project you take all responsibilities of its configuration, implementation and usage.

Share

    Recommendations

    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Party Challenge

      Party Challenge
    • Gardening Contest

      Gardening Contest

    11 Discussions

    0
    None
    MarcK38

    8 days ago

    Hi, great project. Exactly what i'm looking for. But I can't find the values of the used potentiometers. How much Ohm are they?

    2 replies
    0
    None
    phicoMarcK38

    Reply 8 days ago

    Thanks. Potentiometer are 10kΩ you can find in most Arduino kits.

    0
    None
    sub1ime14

    3 months ago

    This has been extremely helpful (thanks!). I've got my setup in place and have been testing. I found that with the target at 130C, the default configuration would end up keeping my stove at 118-124C instead, so errI (integral) would keep accumulating, thereby causing it to enter "Fire End" mode after approximately 30 minutes every time I used it. I've set kP = 7.5, kI = 0.01, and kD = 0.00005 to help with this. Setting kP at 7.5 seems to calculate a better base percentage, while making kI much larger at 0.01 means that the add-on percentage will have impact sooner (thereby causing the draft to open or close additionally when it isn't having impact for a little while at current amount).

    I'm still tinkering, so kI may be set too high still. I'll come edit this if I adjust anything.

    Also, to everybody implementing this, USE AN UNGROUNDED THERMOCOUPLE. I wasn't aware that there were grounded vs. ungrounded, and I bought two different grounded ones only to have my temp reads look normal for a while and then start acting strangely (often a 0C read), and then finally just get stuck on 0C. Once I used an ungrounded thermocouple, this issue was solved. It's necessary since the thermocouple will be touching metal (your stove/pipe).

    I wanted to share this for any others who are attempting an implementation. If you find that you're having it fire too hot (above target temperature), you should probably change kP to something lower than 5 (5 was the default value). And you may also benefit from increasing kI to allow it to start increasing/decreasing the drawing % sooner when the current drawing isn't having much impact.

    Again, thanks for this PID code. It has been very helpful and a ton of fun working with it!

    1 reply
    0
    None
    phicosub1ime14

    Reply 3 months ago

    Nice feedback, thanks !
    Indeed the PID parameters need some tuning depending of your installation .. but once they are setup it should be stable.

    0
    None
    Audouit Christophe

    10 months ago

    Hello I find your regulatory program excellent and I hasten to implement it for next winter. On the other hand I wonder why on the diagram there are two potentiometers, but in your explanations you only quote one, can you tell me a little more about the second.
    cordially

    3 replies
    0
    None

    Ok merci, j'ai malheureusement laissé tombé le projet. L'ensemble est monté, mais je n'arrive pas avec le codage du programme, en fait l'écran lcd s'allume mais aucune indication sur celui-ci. Je suis tout simplement inculte dans la programmation, j'ai cru pouvoir gérer mais l'informatique n'est pas mon dada. Peut être que votre aide pourra débloquer mon problème si cela ne vous dérange pas bien sur.

    0
    None
    phicoChristopheA17

    Reply 5 months ago

    Si le LCD ne s'allume pas ça doit être un problème de branchement. Il faut regarder un exemple d'arduino avec LED et essayer de le reproduire. Il faut ajouter le potentiometre comme je l'ai fait et comme indiqué sur le shéma. Et s'il est supprimé le remplacer par un court circuit.

    0
    None
    phicoAudouit Christophe

    Reply 5 months ago

    Hello, sorry for late response. The second potentiometer is for LED screen brightness .. so not useful.

    0
    None
    Bo GunnarA

    1 year ago

    Very nice
    project! Exactly what I was looking for. On my wood fired boiler I will use it
    to control speed of the exhaust fan. I am totally new to Arduino so I have some
    questions.

    I suppose
    thermocouple is type K. Howe is connection to cable from Arduino done (in the
    plastic box)? is the 6675 placed in that box ? and cable a standard four lead
    cable?

    Do you have
    a better scheme for the Arduino and board connections. I can enlarge your
    pictures but its still hard to see the connection markings.

    You mention
    "I use Adafruit's max6675 library",
    Isn't your program

    " firewood_regulator.ino" complete?

    Thanks,

    Bo Gunnar

    1 reply
    0
    None
    phicoBo GunnarA

    Reply 1 year ago

    Hello,

    The Max6675 is indeed a small card that digitalizes the signal from a type-k thermocouple.

    To see the schema in full size, click to enlarge, then click on the link below the image to enlarge again to full size.

    Adafruit's libary is written by Adafruit, you can add it directly from Arduino's ide.

    My program is firewood_regulator.ino, it is complete but need to be customized to your system as explained in step 5.

    Have fun ... but be aware to know what you do when you play with fire !

    Regards,

    Philippe