Remote Thermostat

Project objective: Develop a thermostat that can be remotely controlled via the PSTN (Public Switched Telephone Network). The thermostat needs to be able to switch between two temperatures in response to a telephone call. The caller will need to input a passcode in order to access the controls.

I had originally planned to build this around the ATMega328 with a DTMF decoder chip and custom-built phone interface circuit using a DAA.

I looked into the approval process for connecting to the PSTN, and it didn’t look that bad. That was until I saw the filing fees. The roughly $1,700 in initial filing fees is a bit excessive for a one-off project, so I decided to take a different route.

Instead of the chip at the heart of the Arduino UNO, I decided to go with the Raspberry Pi Model A+ and use a USB modem for the phone interface. The trick is that the modem will need voice support since I’ll be processing the audio. It also needs to be supported by Linux.

I did a little looking around and found one that seems like it should work. I’m also considering building a circuit to monitor the Pi and trigger a hard reboot if it locks up.

The power for the thermostat was initially going to be drawn from the thermostat relay wiring. These typically run at around 24 VAC.

This system shouldn’t draw much power, but maintaining power while the circuit is closed would be tricky without requiring a common ground for the power supply.

These things considered, it will likely just be powered by an external 5V power supply.

Since the signal wires use A/C I’ll be using some TRIACs for the switching. I took some measurements on my home thermostat. The green-red and yellow-red pairings each drew about 0.5 A. The white-red pairing drew about 0.68 A. These numbers will help me pick out the right parts for the switching circuits, which I will probably design for about 2A draw for plenty of overhead.

Now for a little bit on the software. I’ll likely just run the stock Raspbian or similar since it’s easy to use and gets the job done.

There are two main parts to the software that are needed. The first is the call handling program, and the second is to run the thermostat.

The call handling program needs to answer the modem, then listen for and decode DTMF tones. Once the correct passcode is entered, an informational message should be played.

The caller should then be prompted for action. Based on the input, data should be passed to the thermostat program. Initially this will just be inputting the target temperature.  Solution: vgetty, watch out for an article on getting this working.

The thermostat program just needs to perform simple thermostat functionality and be able to take input from the call program. It should also be able to take direct user input through physical buttons.