Your Smart Thermostat Might Be Wrong

GreatScott! saved an inaccurate Wi-Fi thermostat from the trash by replacing a cheap thermistor with a digital sensor and custom PCB.

This misbehaving thermostat needs an upgrade (📷: GreatScott!)

When it comes to electronics, it’s what’s on the inside that counts. A fancy case and user interface are nice to have, but without solid components supporting them, they won’t be of much use. YouTuber GreatScott! found that out the hard way after buying a set of 10 thermostats to place around his home. These thermostats are connected to relays that activate valves in a boiler room to heat the home, so accuracy is important. But for one reason or another, the temperature they register never seems to be quite right.

Rather than tossing all of these otherwise slick, Wi-Fi-connected thermostats, GreatScott! cracked their cases open to investigate. The culprit seemed to be a cheap negative-temperature-coefficient thermistor that was used to measure ambient temperature. These thermistors work by altering their level of electrical resistance in response to changes in temperature. A circuit inside the thermostat reads the voltage level flowing through the thermistor and converts it to a temperature.

The thermistor causing the problems (📷: GreatScott!)

As a fix, an accurate digital temperature sensing chip (WSEN-TIDS) was selected to replace the thermistor. With an accuracy of +/- 0.25 degrees Celsius, it should do nicely. However, it produces digital measurements that are read via I2C, not an analog voltage like the thermostat is expecting.

So to get the components talking to one another, GreatScott! designed a custom PCB to be used for readout of the new sensor and injecting an analog voltage into the thermostat's existing circuitry. An ATtiny402 microcontroller on the board was programmed to read temperature data, then convert it into a digital value representing a voltage. That value was fed into a digital to analog converter, which produced a corresponding analog voltage. That voltage outputs to the thermostat, causing it to show the proper temperature on its display.

Populating a replacement circuit board (📷: GreatScott!)

Getting this all right took a lot of testing and trial-and-error, because the firmware source code for the microcontroller onboard the thermostat is unavailable. But once the formula had been worked out, GreatScott! found that the temperature displayed by the thermostat finally matched other, more accurate temperature sensors that he had on hand.

This may not have been the most direct way to fix the problem, but given the closed nature of the hardware, it was a good solution. The project also serves as a reminder that sometimes fixing hardware is easier than you might expect. It’s always worth taking a look around inside the case before tossing hardware in the trash.


nickbild

R&D, creativity, and building the next big thing you never knew you wanted are my specialties.

Latest Articles