We are currently prototyping a WiFi Thermostat. In January 2025 my Honeywell thermostat stopped working. The temporary solution (first prototype) consisted of a Raspberry Pi Pico W microcontroller board and a relay board that I had on hand. A more recent prototype is shown on the left. It is kind of a mess right now but it runs my furnace the way I want.
We are not developing successive generations of hardware until we are happy with the software.
Things I did not like about my commercial thermostat include:
1. That it ran off of battery power so the batteries needed to be replaced periodically.
2. The parameters (set times and temperatures) were all kept in volatile memory so the thermostat needed to be re-programmed any time the battery was replaced.
3. The programming interface was limited to a few buttons that needed to be pressed to change the time, temp, etc.
4. The current time needed to be updated after battery changes using the buttons as well.
5. The display could not be read in low light or from anywhere except standing directly in front of it.
1. The power for the first generation prototype was supplied by a usb charger. Our current prototype is run from the AC provided over the furnace wiring with backup by a lithium ion battery. While the thermostat will not run when the power to the house is off, the furnace will not run without power either, so that is not much of a loss.
2. Our thermostat will store time and temperature parameters in non-volatile (flash) memory.
3. While our first prototypes are programmed over usb, our goal is to change programming over WiFi. We also have a set of buttons to allow the user to affect the set temperatures and times programmed in.
4. The thermostat connects to WiFi and syncs the time with information from the internet. After setting the time, the current firmware disconnects from WiFi and the microcontroller keeps time.
5. We currently display time, temperature, set temperature and whether the furnace is turned on using an OLED display. We have had issues with a computer based display updated over WiFi but we will get this worked out.
The relay (G5Q-1A4-EU DC5) is rated at 10 Amp with 5 volt, 40 mA switching. R1 is 50 ohm 603 package. U1 is a power driver (DRDC3105F-7). The switch is operated at 3.3 volts from a gpio pin on the microcontroller. The NO and common connections (J1, pins 1 and 2) connect to the red and white wires to the furnace.
Setting up the thermostat is most easily done over usb. Below is a screenshot of our Setup User Interface. This interface is used to set the network user name (SSID), password and time / temperature parameters for a variety of profiles. The interface can be used to set the users time zone and whether to adjust for daylight savings time. The software defines five profiles (Mon-Thurs, Fri, Sat, Sun, and away) which each have eight time / temperature periods. The time changes and temperature for each period can be adjusted by dragging the edges in the profile using the computer mouse. The days when the profile is active are defined in this interface as well. Once the user establishes the desired behavior, the parameters can be loaded onto the thermostat's non-volatile memory over usb. While the network parameters must be loaded using usb, we anticipate being able to adjust the time / temperature parameters over wifi.
Firmware was written in the Arudino IDE. The thermostat measures the temperature and turn the furnace on for five minutes if the temperature is below the set point. After the five minute active heating time the temperature is measured again.
Time is set at startup over WiFi. The time monitoring section of code is a lightly edited version of the Arduino "TimeNTP_ESP8266WiFi" example sketch. The temperature reading part of the code was taken from an instructable sketch that I found on the internet.
A number of parameters are sequentially displayed on an OLED display. The image to the left shows the display of the current temperature, temperature setting and whether the furnace is currently turned on or or off. Other parameters include the time, day of the week, and date. This photo shows a 128 x 32 pixel display. While this display is certainly functional, it is smaller than ideal and we are looking at incorporating a 128 x 64 pixel display (see below).
The figure to the left shows two boards we are working on. The first provides +5 volts from the 24 V AC provided by the furnace wiring (Note that this requires use of the "Common" wire from the furnace). The second manages a lithium ion battery that takes over when the power is off. The battery management board has an op amp that monitors when battery power is employed and signals the microcontroller to enter a power saving mode.
In addition to being powered by the 24 V AC, upcoming hardware prototypes will have connections for buttons, a 124 x 64 pixel display, and the hardware will be compatible with air conditioning as well as heat. The size and shape of this prototype will be compatible with a commercially available enclosure.
Hardware: We are currently focused on getting bugs worked out of our firmware and are making small, incremental changes to the hardware that can be implemented on a breadboard.
Should we have an SD card reader? User name, password and set parameters could be saved on the card. The user could remove the card for programming. The pico already has sufficient flash memory to store all the data.
Firmware: The original firmware did not allow the user to adjust important parameters, such as the set times, set temperatures, internet address, or network password. Our current firmware allows the user to input these into flash (nonvolatile) memory that will be re-loaded when the power cycles off. We have written the firmwear to allow five profiles, each with eight user defined temperatures and start times.
User Interface(s): We are writing a separate "Setup" user interface to allow parameters to be uploaded to the thermostat over usb. How annoying is it to have to input a device's network name and password using three buttons when you have a perfectly serviceable computer standing by? The "Setup" interface will allow the user to set parameters including the network name and password into non-volatile memory, so these parameters will not be lost when power is down.
While our second prototype will allow connection to an oled display, my own choice is to use the computer and we may not get to writing code for the display soon.
Once we are done prototyping we will open this up to beta-testing. At that point we will open to receiving bug reports.
Reporting bugs: Please report any issues by sending an email describing the issue to j6summers@gmail.com