Thermostat Interfacing with Motion (maybe?) Sensor

Thread Starter


Joined Nov 15, 2015
I am going to be installing a heater in my garage that is controlled by an external store bought thermostat (not bought yet) so I can be comfortable in the cold winter nights (I work in IT and I smoke, so I like to do my work in the garage so I don't have to take breaks every hour or so, and I mostly work at night). I am looking for advice building some sort of a sensor that will detect if there is no one in the room, and turn the heater off after a set period of minutes or hours. The built-in schedule function of most thermostats will not work for my purpose, as I have no set schedule for working in the garage. Also, I am not looking to make my own thermostat - unless there is no other option.

My concern is not getting the garage heated to the right temperature the moment I start working in the garage (like pre-heating it 20 minutes before I start working, I can do that on my own). My concern is that I will forget to turn the thermostat to the off position when I am finished working and go inside to sleep. My garage doors are pretty drafty and the heat will escape wildly, so I don't need to be heating the garage indefinitely until the next morning when I realized I forgot to turn it off.

Because I am much more novice than many people on these forms when it comes to creating meaningful circuits, plus my limited knowledge of connecting a circuit that I create to another device, I turn to this forum for help. I am not sure if a PIR sensor will work in this application since PIR sensors (from my understanding) scans for infrared/heat changes, and if hotter air is blowing through the space where the PIR is scanning - it may detect that as motion. I may be wrong on that assumption.

Also, I am not worried about the garage heater turning off if I am still working in the garage but not moving enough to detect my motion (I work on external servers through command line, it’s not like I am doing jumping jacks in my garage)- it’s a nuisance, but something I can live with. Also, I am not looking for this to turn on the garage heater if it detects motion - this is simply a safety switch for if I forget to turn the thermostat to the off position when I am finished in the garage.

I guess my main question - is can a thermostat interface with something like a R-PI or an Arduino? I am assuming that - if I get something up and working, just cutting power to the thermostat will not work. From my limited knowledge of the inner-workings of thermostats - if it kicks the heating source to on and then, lets say, you pull the whole thermostat from the wall, the heating source will stay on indefinitely. The heating source has no idea if a thermostats is connected to it, it just takes instructions from the thermostat to turn on and turn off. Is that correct?

Also, If no motion is detected I don’t think you would want to turn off the heating source right then and there. Maybe it should scan again at a much shorter interval (maybe multiple times, or continuously for X minutes or seconds) to ensure there is no motion detected. Also, I would think that the thermostat would have to be connected to this device, and then the device gets wired to the heater.

Instead of a motion sensor, maybe it should be a button that sits next to me that is connected to this device wireless, starts blinking/making sound when it is about to auto shutdown, and hitting the button resets the timer? I am not sure if I like this option though, because I often have headphones on either talking with developers or listening to music - so I might not hear it (which is why audio AND visual cue would be good).

I could completely be overthinking this - maybe there are thermostats that turn off automatically after a certain time period? Please tell me if I am overthinking this too much, and point me in the right direction if there is an easier solution.

Any help or ideas are greatly appreciated.


Joined Nov 30, 2010
First, try to keep your questions down to 500 words or less.o_O

Second, think of something that happens when you're present, like sitting on a chair, moving around, or radiating heat...or think of something that happens when you leave, like turning off the lights.
Third, the way you wire the sensor determines whether the heater runs or doesn't run when the thermostat is ripped off the wall. Usually, the heater stops when you destroy its controller, but you can wire it the other way if you want to.

A thermostat is merely a switch. It is usually limited in its voltage and current capabilities, so it needs a power relay of some sort. I have worked for nearly 40 years connecting thermostats to multi-kilowatt heaters, and they don't need a microprocessor. Of course, you are allowed to use all the computers you want to replace a single pole, single throw switch.

Now, try again. Try to simplify. Name the heater and what controls it is equipped with. Name any other parts you have and what they do in terms of logic functions, voltage, and current. There are dozens of very smart people here but nobody is going to design 12 ways to do this just because you're uncertain.


Joined Nov 23, 2012
I gave up reading your long question but it sounds like you could use a relay (like most every thermostat in the world), and put a switch for the relay coil order the pad of your chair. It will turn on as soon as you sit down. 24v should be safe.


Joined Jan 21, 2013
Another option is a count-down timer, you turn a knob or push a button to get say 30 mins of heat, when it starts to get cold you turn the knob or push the button again. If you are not there the most the heater will run for is 30 mins, or whatever you set it to.


Joined Sep 9, 2010
I like the idea of turning off the heater if the lights have been out for, say, 10 minutes. This assumes you use the lights any time you are present, and that you remember to turn them off when you leave.