Visit Us On FacebookVisit Us On TwitterVisit Us On Google PlusVisit Us On LinkedinVisit Us On YoutubeCheck Our Feed

Thermostat V1.0


In the need of my new homemade energy saving fireplace (which boils water for the radiator) i designed and built a digital thermostat. The idea to design my own thermostat came when i came across with the following problem.

When i first fire the fireplace the water in the boiler around the fireplace is cool. After a few minutes the fireplace warms the water enough so that the water temp exceeds the thermostat limit. The thermostat changes state and drives an electric valve to move the water from the fireplace boiler to the radiators. The electric valve is slow enough and takes a few minutes to make a full turn. While the water is moving from the fireplace boiler to the radiators, circularly cool water is coming back in the fireplace boiler from the radiators. Τhe water temp in the fireplace boiler is getting cooler and after a few minutes falls under thermostat's limit. The thermostat changes state and stops the valve from driving the water to radiators. This happens again and again until the whole amount of water in the radiators is get warm

To prevent this problem from opening and closing the electric valve in so small time spaces i designed a thermostat that can delay the sample points. It check's the fireplace boiler temp and drives the electric valve once the water temp exceeds the thermostat limit. After that it waits for a half hour or more and then checks the water temp again.

The Design:

A simple Power Supply design using LM7805 regulator and two capacitors. 


For Menu selection and device configuration a Rotary Switch is used. The selected rotary includes a push button switch as well. 


Two Relays manage to drive external electric valves


The user interface is displayed on a HD4780 LCD Character Display with configurable backlight.


The main MCU is the 8-bit AVR ATMEGA168. A Buzzer manages to indicate the user for a button press or a limit exceeded. Two LM35 temp sensors one internal and one external measure the ambient and pipe – fireplace boiler temp. You can also notice a 32.768Khz crystal. This crystal is used to impliment a real time clock which keeps real time delays.


Writing the Firmware

Writing the Firmware

All the components. The front panel is printed on a laser printer using transparent paper.

All components Front Panel

Milling notes Circuit Top view

Homemade PCB without ISP header to make faster board routing.

MCU Flashing Bottom View

The source code as well as the PCB & Schematic can be found here:




  • Pete
    13/03/2014 - 17:15 | Permalink

    Great job on this project, I especially like your use of the display and the laser printed label, very clever.

  • Dimitris
    16/03/2014 - 20:21 | Permalink

    Thank you for making us proud =)

    • 16/03/2014 - 21:16 | Permalink

      Thank you for your interest

      and your good words Dimitris!

  • Aiden
    29/03/2014 - 12:36 | Permalink

    It a good idea BUT this can leat to your Boiler rusting from the inside, The return flow of water to your boiler has to be around 40 dregee temp otherwise  condensation will build up in the pipes and boiler and rust will form.

  • Dustin
    31/03/2014 - 01:52 | Permalink

    I have to agree with Aiden here. Not only will it rust out your boiler, but if you cool your boiler down that much, you can get flue gases to condense. If this is a wood fired boiler it's even more of an issue as the tar that forms in the flue gas, once built up, is very flammable and burns VERY HOT. I'm sure you don't want a chimmney. What Aiden hinted at and what you realy need is some sort of a bypass that returns water around 140F or 60C back into the boiler. The boiler should warm up quickly and stay hot and your radiators should warm up slowly. Something similar to this thermostatic mixing valve would be a good idea not to burn your house down. The product given as an example. (1) Goes to the return of the boiler. (2) is the Return from the Radiators, (3) is a bypass off of the boilers Hot Supply.

  • 02/04/2014 - 21:26 | Permalink

    Actually the thermostat is configured to turn on the electric valve at 53 °C . The water starts flowing on the radiators and the water temp starts decreasing. The water temp in the boiler never exceeds 55-60 °C because of the water flow (tested). 

  • Matt
    06/04/2014 - 13:51 | Permalink


    Could you provide some more details about how you printed and adhered the laser printed label?  I see that it has white lettering.  How did you acomplish that?

    I have a technique where I print a reverse image on a transparency sheet made for over head projectors.  I then spray paint the back of the sheet with white spray paint.  I cut the sheet to size and adhere it with 3m super 77 or 90.  I'd love to hear a better way.


    • 06/04/2014 - 17:04 | Permalink


      It’s really simple. I design the front panel of the device leaving all the whites transparent. Then i print it on a transparent slide and i stick a white sticker on the back side. 


  • Iron
    05/10/2014 - 07:28 | Permalink

    Can you send Bas File,please ……

    Thank You

  • Leave a Reply

    Your email address will not be published. Required fields are marked *