lektor January & February 2021 45
The third specification requires some thought as well. About 1 W of
power is needed for a Wi-Fi connection and to power the relay. Building
a small power supply with a transformer can be done, but it is difficult
to make it small enough; we do not want a huge box on the wall. The
original thermostat had a transformerless power supply which is fine
for relatively constant loads, but I am not sure if it performs well with
a load running Wi-Fi. My intention was therefore to use a small AC/
DC converter module instead.
Searching through enclosure catalogues I did not find something
suitable. Creating a good-looking custom enclosure is not my strong
point, but today with FabLabs, 3D-printing and laser cutting readily
available even in remote places, this should not be too difficult. Yet I
didn’t go that way. Instead, I decided to try to reuse the enclosure of
the original thermostat as it had already everything I wanted: a poten-
tiometer with a scale, an LED and a power switch. Furthermore, it had
mounting holes in the right places and a good way to connect a PCB
to the mains through the bottom, hiding all the wires.
My design effort now boiled down to cramming the redesigned desktop
thermostat circuit on a circuit board in such a way that it would all
fit inside the existing enclosure with the potentiometer, LED, power
switch and mains connector in the exact same positions as in the
original thermostat.
Redesigning the circuit of the desktop thermostat was easy enough
(Figure 2 ). I replaced the USB power supply by a 5 V AC/DC module, and
Wi-Fi network required;
Home Assistant required;
Unaesthetic.
Future Proof
At the time of doing these experiments the first problem was not
much of a problem as most of us have a Wi-Fi network running.
When it stops working, rebooting the router or whatever you have
usually fixes it. However, as many of us have experienced several
times in our lives by now, technologies come and go, and so there
is no guarantee that there will always be a Wi-Fi network around.
Our homes, on the other hand, are probably still there in thirty
years’ time or more. In other words, a somewhat future-proof design
would be desirable.
Past Proof
The second point is related to the first as Home Assistant and Raspberry
Pi may disappear someday too. But there is more. I kind of know how
to deal with Home Assistant running on a Raspberry Pi, but most
people I know do not. To allow other people to use my automated
thermostat, it must be “past-proof ” as well. It should look like a classic
wall thermostat and behave like one. The automation part may not be
imposed but should be discreetly optional instead. It is there for those
who want to use it, but for those who don’t, it may not be in the way.
A Matter of Taste
The third issue is somewhat personal. The automated desktop thermo-
stat ended up dangling at the end of a length of wire connected to a
hole in the wall where the old thermostat used to be (Figure 1). A few
unused mains-connected wires sticking out of the wall were protected
with bits of isolation tape against silly humans. Also, as the desktop
thermostat needs a 5 V power supply on a USB connector, it was
powered by a phone charger plugged into a nearby power strip. This
meant that there were several very visible wires going to the device
where the original thermostat had none. Although an excellent conver-
sation starter, most visitors didn’t think the system looked very nice
(but “ugly”, “weird” and “dangerous” instead).
Back to the Drawing Board
The shortcomings of the initial desktop thermostat setup made me
decide to redesign it to solve most and if possible, all of the inconve-
niences. This resulted in the following specifications:
Local, i.e. on-device setting of target temperature;
Local control overrules automation;
Mains powered;
Proper connections and professional-looking enclosure.
The second item relates to software, the three others concern the
electronics of the new thermostat.
Specification 1 implies an intuitive user interface to set the desired
target temperature. The desktop thermostat has two pushbuttons,
allowing an up/down control of the target temperature. However, it
doesn’t have a display to visualise it. Adding a display to the limited
number of I/O pins available on the Wi-Fi module is complicated.
Using a potentiometer with a calibrated scale like the original thermo-
stat seemed simpler and is possible thanks to the Wi-Fi module’s
analogue input.
Figure 1: Some people felt that this way of installing a smart thermostat in a
living room was “unaesthetic.”