Arduino is fun

So I have long been irritated at the lack of flexibility of the sort of programmable thermostats you can get through the retail market, e.g. Home Depot, Lowe’s, etc. I’ve wanted to make my own.

Now, thanks to the Arduino platform I can do it with a minimum of soldering!


Thermostat project

And some detail on the LCD:

LCD Detail

At the moment, it just tells the temperature. The tiny pushbutton on the right of the breadboard turns on the backlight for the LCD. It stays lit for 10 seconds after you release the button. The little snaky-wired thing at the top-right is a thermistor, which has a resistance that varies based on the temperature. The processor detects this and uses the Steinhart–Hart equation to determine the temperature.

I also have a running clock, which will be necessary to figure out when to change the temperature when I actually attach this as a thermostat.

It’s a bit different programming a processor this simple from my usual work. This system has no operating system, 32KB of system memory, and runs at 16MHz. My development laptop, on the other hand, has 4GB of system memory and runs at 2.5GHz with two processor cores. It runs an advanced operating system.

But I’ve spent about $70 on the parts, so it’s not terribly expensive. And it’s kind of fun!


  1. I’m actually spectacularly lousy at soldering. I had to solder 16 header connections to the LCD panel in order to slot it into the breadboard. Bleah. But other than that, this is solder-free.

    When I have all the hardware, I’ll build a circuit board to handle the connections, and that will have to be soldered, except for the screw terminals for the HVAC connections.

    My intention is to also get a WiFi or ZigBee board for this so that I can program the thermostat from a computer via a web page.

  2. Linda J says:

    I like the one-half symbol. Displaying the temperature that way instead of 74.5 has a noticeably different “feel” to me, somehow more personal or inviting or something. No doubt because it’s mostly humans, not computers, who write fractions.

    • Thanks!

      I had originally displayed one decimal point, but decided that that was too detailed. My opinion, though Deanne disagrees, is that there is an implicit contract with the general user that when they see a decimal it implies that the temperature could be any decimal value. She countered that digital FM radio tuners go by 0.2MHz. I think the difference is that we’re adjusting the frequency and seeing it move by two tenths, whereas we have no idea what the precise temperature is and rely on the display to tell us.

      The LCD display displays characters in a 5×8 grid. I can design up to eight special characters, but at that level, 1/4 and 3/4 were going to be ugly, and I’m not sure how much we actually can feel that difference.

      BTW, I agree with Deanne that I shouldn’t round the temperature. It’s truncated, e.g. if the actual measured temperature is 73.8 I will display 73-1/2. This has to do with wanting a thermostat to show temperature arrived at, not just a rounded temperature.

  3. Linda J says:

    I’m staying out of the disagreement over decimal points and implicit contracts. No matter who I agree with it’s likely to get me in trouble. :)

    If you’re showing “temperature arrived at” rather than rounded temperature, does that mean you have to keep track of the direction? In other words, if you arrive at 73.8 as a falling temp rather than a rising temp, will it display 74, since that’s the last arrived-at temperature?

    • No, I just show the truncated temperature. You make a good point, and I’ll think on that. I think that people set temperatures on thermostats and expect something to happen *at that point*, which is why rounding doesn’t make sense, but yes, that has implications for falling temperatures.


  4. I finally got around to ordering the parts for the relays to control the HVAC. I probably won’t actually use this because I am self-employed working from my home, so I don’t really need a programmable thermostat the way I did when I worked in an office.

    But it’s still a fun project. I’ll be making it available on my github site at, for anyone who cares.

Leave a Reply