Developing a thermostat for a heat pump that only has a timer

The heat pump which cools [Chris LeBlanc’s] home lacks the sort of control he was looking for. It’s just got a timer, which switches it off automatically. He wanted to the ability to schedule the cooling cycle like you would with a thermostat-driven arrangement. He ended up build his own controller to automate the cooling process.

The heat pump came with an IR remote control which provides the access point for the project. [Chris] set out to emulate the remote protocol which saved him the trouble of having to crack open the unit and wire in a controller. He went with the IR Toy from Dangerous Prototypes as this device is able to record and transmit IR signals — it’s basically a universal remote for your USB port. His Raspberry Pi, seen to the left, controls the system. It’s connected to the red IR Toy board via a USB hub which is used to interface a WiFi dongle as well. The system works alongside Google Calendar to allow [Chris] to schedule his home’s cooling just by adding an appointment. A Python script queries the calendar, then selects and sends the appropriate IR command. He shows off the build in the clip after the break.

10 thoughts on “Developing a thermostat for a heat pump that only has a timer

  1. Nice, but even more fun is decoding the signal a la Lady Ada’s tutorial on IR remote signals:

    Of course, if you don’t have an O-scope I guess this is easier! I don’t have a Pi (shame on me), but I was wondering how fast it can sample? The posted tutorial uses Arduino, but maybe the Pi can do better if the frequency of this heat pump’s receiver is >> 37kHz (again, like in the tutorial I mentioned)??

    1. It is very difficult because of the OS. There’s going to be a lot of jitter in the time between samples, even with the recent RTOS release for the pi (not sure though, someone can correct me if this isn’t true). There isn’t the same kind of low-level access to the hardware that you get with a microcontroller. You could do it, it would just be very tough.

      1. I must have imagined doing IR control with just an IR LED attached to a parallel port on a 1990’s linux box and a simple bit of user-space C-code then?
        Really, it’s perfectly doable, and reliable too.

  2. That guy has the same damn samsung phone as mine!!! That’s a samsung i5500M/L/D (Some flavor of i5500). I’ve got mine all modded right to the decks with cyanogen mod… oh yes I love android.

  3. In the spirit of hacking things for fun this makes sense but so does hammering a nail with a pipe-wrench.

    I’m an A/C contractor and this is the Rube Goldberg of programmable t-stats, “Raspberry Pi controls the system”? This is a heat pump not a centrifugal chiller. Sorry for the rant but there are a zillion other cheaper/clever ways of doing this with the parts you probably already own.

  4. I guess I was probably the only one dumb enough to wonder what the heck kinda heat pump has only a timer for control.

    It has a thermostat, just not a sufficiently programmable one. As I interpret the information, he is remotely controlling the unit’s existing built-in thermostat.

    Cool project. Or hot project. Whichever.

  5. 5-12vdc wall wart connected to standard mercury thermostat (or similar) relay inline to switch mains after removing switch or just keeping it on, Done!

    I did this with a space heater a few times

    1. Hey Pete, I think you missed the point. The heatpump already has a thermostat, so not sure what an additional mercury switch would achieve.

      You realize he’s using google calendar to adjust the setpoints of the existing thermostat throughout the day, right? I think that’s pretty groovy, actually.

  6. Thanks for positive comments, I appreciate it. I’ll try to respond to some of them:

    Of course you could have done this with some ultra-low power device, but I wanted to use a Raspberry Pi. The Pi will serve several functions (low power file server, ssh server, etc.). Being able to ssh into the pi and send commands is great, why would I want some dedicated device instead? The Pi only uses around 2 watts which sounds pretty low to me.

    @jimstiernberg: Good idea. I actually used a couple bits of software and homebrew hardware to sample the IR codes. Simply having the codes is one thing, but I needed to retransmit them reliably. I looked at a lot of different options but the USB IR Toy was the easiest but still gave me the ability to tweak it. I tried a couple other ones like the IguanaIR but it wasn’t up to the task.

    I was thinking of using the GPIO pins to control a IR LED, but the Pi can only do 5 KHz which isn’t enough for this setup. The IR Toy worked really well for this application. The whole point was to get it done quickly and easily so I used off the shelf components.

    @pete: A “wall wart” (I assume you mean a plug computer) would cost a lot more than a raspberry pi and uses almost the same amount of power. The heat pump isn’t designed to have the power cycled like that and would probably void the warranty. The heat pump isn’t plugged into the wall, it’s wired directly to the circuit breaker. Sounds like a hassle and not something I’d want to do for my first hack. The unit has a built in thermostat, so I don’t see why you would hook one up externally. The point is to control when it turns on and off and what temperature it’s set at which is why the google calendar seemed like a good fit.

    @ken: Wow, not sure if you meant to but that came off pretty damn rude. See the above info for why I hooked it up to a Pi. Also, if the goal is to be able to control it when I’m away from home, how would I do this with stuff I already have? I’d love to know but I doubt you have anything useful to say.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s