r/arduino • • 17d ago

Look what I made! Digital Thermostat project

Wanted a thermostat which I could program for when to turn the heat up in the morning and evening and also have minimum and maximum temperature setting. Once it hits the max temp, it will go to coasting down to the min temp setting and keep it there. It will have a pretty big hysteresis for the initial warming and a smaller one around the min temp.

No doubt there are commercial products to do this, but I had all the parts on hand, so why not build one myself? It’s not quite done yet, but the temperature sensor and clock are working. Now to work on the UI for inputting the settings.

The temperature sensor is an obsolete DALLAS DS1821 which uses a 1-wire interface, which I happen to have a number of. It requires tight timing and getting that to work was a major pain, but after a lot of head scratching finally got it to work. The clock is a PCF8523 with I2C bus. ATMEGA328P processor and 1.44” TFT display.

Since there aren’t many parts, decided to build it on a perf board rather than go to the expense of having a board made.

I’ll probably make it wireless with a 480 MHz on/off transmitter and receiver module as I don’t like where the current old mercury tilt switch thermostat is located and moving the wires isn’t an option.

The only question is how to power it. Might make it battery operated, even if it means having to recharge them once in a while. Then I’ll have to 3D print a box.

80 Upvotes

5 comments sorted by

3

u/JustHere4TheZipLines 17d ago

Check your current thermostat. It may draw power from the hvac system.

2

u/myopinionisrubbish 17d ago

Just got a new oil furnace with high tech burner which has LED status lights. Theres only 70 mv across the thermostat open circuit. The current thermostat dates to the 50’s.

2

u/classicsat 17d ago

You might need more wires. Or build a signaller than can send a control signal down powered lines. Or power by a local wal-wart - What I do for my heat controller.

1

u/myopinionisrubbish 16d ago

I think I’ll battery power it. Haven’t measured the current yet, but should be pretty low. A 18650 cell should power it for a season. I have a LINX TXM-418LR-S transmitter and companion receiver for a RF link. That way I can move the thermostat around to find the best placement.

I added the set points last night and tested them, need to decide if I want to make them programable or just default values in the Sketch. Starting to get chilly around here in the morning, time to get this up and running 😀

1

u/EdfromMaine 14d ago

I have done some similar temperature measurement stuff where power consumption was a serious issue, but not for a thermostat. The sensor unit is outside my house and is run off battery (a 18560).I used a BME280 on an I2C bus, which was easy to work with. I used an Artemis Nano and used LoRa for communication (I don't know where you live-- in the US it is a 915 MHz device.) The Arduino Nano Matter is a great substitute for the Artemis (don't need to use the Matter part of it, just a nice, fast low power MCU. I am not using a LoRa mesh, just point to point.. Your clock is low power too, which is good.

Temperature changes slowly, and you don't need to leave the MCU running all the time. You can kick the MCU into a sleep mode and wake it every 5 minutes. Power use will be very minimal, particularly if you use a low power MCU. The Nano Matter has some really good exposed low power routines. If you don't want to go that route, Adafruit has a couple of very cool boards TPL5110 and TPL5111 that allow you to shut off the MCU altogether. Lots of different options, but the key to power consumption is keeping the MCU and peripherals off as much as possible.