Open source Android thermostat

Put that old Android phone to good use by mounting it on the wall as a smart thermostat. This open source hardware and software project lets you replace your home’s thermostat with an Android device which adds Internet connectivity and all that comes with the increase in computing power.

The brunt of the hardware work is taken care of by using an IOIO board which makes it easy to interface any Android device with the simple hardware which switches your HVAC equipment. We’ve been waiting for the launch of the new IOIO design and if it comes in at a lower price as has been rumored that makes this project in the price range of the least expensive of programmable thermostats (assuming you already have an Android device to devote to it). Simply etch your own board to host the relays and voltage rectifier and you’re in business.

There is a client and server app, both free in the Play Store. The server runs on the wall-mounted device with the client offering control via a network connection. The features of the system are shown off quite well in the video after the break.

This sounds like a perfect use for that phone you ripped out of the pages of a magazine.

Comments

  1. slowJim says:

    Very cool! I love it!

  2. leeahart says:

    *PLEASE* be careful with hacking on your home heating system! Mistakes have the potential for freezing your pipes, killing your pets and plants, burning down your house, or even killing someone!

    Thermostats look simple, but I designed them for a living for Honeywell and Robertshaw — a lot of effort goes into making them safe. Here are just a few concerns:

    1. You need a fail-safe turn-on device (usually a mechanical bimetal switch at around 40 deg.F) to call for heat. Otherwise, your pipes can freeze if the thermostat fails.

    2. You need a fail-safe turn-off device (again, often bimetal). Otherwise, it can overheat your house if the thermostat fails on.

    3. Furnaces have elaborate fail-safe protection so they can’t turn on the gas flow without proving the burner has lit. They typically try to light a few times, and then “lockout” to require human intervention to check it and fix the problem. The lockout is reset by removing the call for heat, and then re-establishing it. If your thermostat does this on its own, it can DEFEAT the safety lockout, and flood your home with unignited gas!

    • Zee says:

      You have a good point on safety but I’m pretty sure modern autonomous heating systems already have these protections built in.

      • Mark Smith says:

        What would qualifies as “Modern”? I have a combination heating/cooling system at home, with brand new central air and original (70s era) gas-fired baseboard heat. I thought about getting one of those Nest thermostats, but rolling my own would be fun.

    • DanJ says:

      THANK YOU leeahart! LOL…I’m sitting here working on my own “nest” thermostat and your input couldn’t have been more timely.

    • jermitts says:

      F.U.D.

    • Thanks for posting leeahart. I think we all accept a certain level of risk by building any of the devices listed here, but if there are reasonable ways to mitigate that risk, I certainly want to investigate them. I’d be interested in talking to you quite a bit more on this if you’re willing. Could you email me at jeremy [at] thermostatmonitor.com?

      There are a few safeguards to help address these problems already, such as automatically relaunching the application on bootup, limiting the target temperature range from 50-90, using relays that fail in the open state and the need for a cyan aux power line which limits this thermostat for fairly modern furnaces with better safeguards. The thermostat is unaware of if the furnace is successfully doing it’s job or not and will continue to leave the heat relay closed until the temperature increases over the set point rather than continually attempting to cycle the system, so I don’t think there’s any risk of scenario #3.

      I haven’t seen purely mechanical shut-offs in any of the other electric thermostats I’ve looked at, but this sounds like a great idea if there’s a practical way for hobbiest to achieve it. I would really like to talk to you about that. The fire risk would be strictly from an electrical problem unless I’m missing something. I don’t think this risk can be totally eliminated with everyone creating their own boards, but I’d love to hear any input you have to help mitigate it.

    • Hirudinea says:

      For 1 & 2 couldn’t bimetal devices be built into this system?

    • Tech Joker says:

      1 & 2 are very easily implemented, if desired. I am relatively certain that these ‘features’ aren’t built into all thermostats other than by means of minimum and maximum setpoints. Further, I would pose that a system such as this could be more effective because they could notify the homeowner of the fact that the temperature has varied by more than 10 degrees from the setpoint.

      3 should not really be an issue either. At least on my furnace resetting the thermostat will not reset the furnace controller in case of an error condition. It is required to remove line voltage from the furnace to reset the error condition. I would expect that to be standard lest someone would simply turn the stat off, and back on, to the same end as you proposed.

      While setting this type of system up to a single stage HVAC system is fairly straight forward, setting this up to a multistage system would be a bit more complicated programmaticly. Making certain the stages are called in the correct order (and in some cases timinig), that the reversing valve is properly set…

      Another concern, that is more likely to be overlooked in home systems is the need for the thermostat to handle the time delay (normally 5 minutes) before calling for the compressor to turn on (cycle delay). Either due to power outage or normal cycling of the system. This delay is needed to prevent the compressor trying to start when the pressure differential is too great. Some compressors have this circuitry built into them, some systems expect the thermostat to handle this.

      I have an arduino controlling my HVAC system. It monitors temperature in every room, calls for blower, heat, A/C and even has a programmed ‘anticipator’ that uses the outside temperature and history to stop the call for heat / cool to prevent temperature under / overshoot. It also controls the blower speed (when not heating or cooling) to allow for quieter operation when not heating or cooling.

      • worxman02 says:

        Do you have a write up for your arduino controlled HVAC system? I want to do this with my house, but I can’t find a good example. The system that you described is exactly what I want to use.

    • n0lkk says:

      Your concerns are valid, but is is there a know failure rate for programmable thermostats and temperature sensing components they use? There’s that chance the a bi metal coil thermostat could fail, have they included fail safes over the years? Automated gas appliances in buildings that use pilot lights use burner of pilot light not on fail safes that are totally integral to the furnace, no doubt that the case for electrical ignition. AFAIK thermostats never had a role to play in burner not on fail safe methods, why bring that up as a potential hazard with DIY programmable thermostats? Any furnace that allows access to the burner fail safe via consumer accessible low voltage or data lines would be a result of poor engineering, and probably doesn’t exist.

    • Kelly says:

      I think some of you guys are missing the point. The problem isn’t that the user will set too high or low of a temp. The biggest problem is that the Android will turn the furnace on (or off), and then CRASH. Then the furnace will remain in that state (on, or off) indefinitely. How often does a bimetallic strip ‘fail’, compared to the frequency of software/hardware working together fail?

      Another solution (not as good as failsafes) are to have a ‘watchdog’, which is capable of detecting whether Android has crashed and rebooting if so.

    • CAERDEEE says:

      Well, someone should have told the designer of the Honeywell thermostat that cost our family a $6000 repair bill, because it had no backup low temperature switch It was a battery powered programmable thermostat that, when it’s battery died while we were on vacation, failed to turn the furnace while the temperature was below 10F outside. Burst pipes all over the house….

      • Lee Hart says:

        Thank you caerdeee. You perfectly illustrated my concern. A thermostat that is not fail-safe can lead to costly failures!

        Let me guess: This was a thermostat with the Honeywell nameplate on it, but built in China, after Honeywell was bought out by GE and all its US thermostat operations were outsourced. That “happysizing” cost me my job!

        • pistol213 says:

          @Lee Hart:
          Honeywell was never purchased by GE… Anyone who follows mergers and acquisitions knows this. That potential deal occurred way back in the late 90′s and was kiboshed by the EU…. So any downsizing that occurred at honeywell after that was a result of something else… if you ever actually worked there.

    • Georgy says:

      Thank you, now you have me thoroughly scared, I’ll never hack anything any more.

    • noone says:

      really, huh, there is very little you are going to do with the thermostat that could hurt the furnace. worst thing is probably short it out.

      almost no common thermostat have these fail safes you are talking about. not even the more expensive digital ones. if a standard thermostat fails there is nothing that is going to turn your furnace on at any temperature like you are suggesting.
      and your other concerns. there is absolutely nothing in the thermostat that could bypass any of the safety options of the furnace. including the glow plugs. and the safety start for when there is no gas flow or if the chimney is plugged (the furnace will stop trying to start and lock out) all that is built into the main furnace board.

      • Nancy Smith says:

        agreed, the HVAC codes and safety standards have been sifted thru quite thoroughly over the years. this was done not only to protect the people who get to feel warm (or cooler) but also to prevent the lawsuits that could ensue if slipshod work or design was passed off to the general public. what many novice designers often fail to understand is, the accumulated years of experience and vast knowledge (millions of man-hours) that precedes them, in nearly all products. ( aka ‘dont redesign the wheel and call it ’rounder’) by the way, i designed a new nail yesterday, anyone interested in buying my design for a trillion bucks? errr, i didn’t think so!

  3. Zee says:

    I’d prefer a raspberry pi version. The IOIO is too expensive usually costing more than the cheapo phone being used here.

  4. moxlon69 says:

    I doubt I’d try to wire this to an old 70’s style furnace, but the furnace I currently have has it’s own controller with it’s own set of diagnostics and safety features that remain isolated from the thermostat itself. I’d definitely give this a go on a modern setup.

    • Tech Joker says:

      Actually, a 70’s system would be more easily suited to control by a home made system. They normally had a dumb mechanical stat that used a mercury switch to open or close the circuit for the call for heat or A/C. They were simple 4 wire setups. Many newer systems are 5 or 6 wire and the thermostat has to control multiple stages of heating and cooling.

  5. n0lkk says:

    OK anyone who has surplus of Android phones that as a computer to this degree, and don’t know what to do with them all please sell one to me at a poor boy price :) Only functionality through the USB port or Bluetooth is important, I can’t afford the data plan to use as a phone.

  6. JJones says:

    I’d prefer to use something like the wr703n and then access it from my android phone / web browser to set temperatures remotely.

    http://embeddedtimes.blogspot.ca/2011/09/tp-link-tl-wr703n-tiny-linux-capable.html

    It’s $20 ordered from China and has some gpio pins available for hacking! The day after I ordered one I saw it on HackADay: http://hackaday.com/2012/10/10/turning-a-plush-dalek-into-a-wifi-enabled-robot/#more-87681 ).

    A few simple buttons for basic warmer/cooler on the wall with the device but otherwise control everything from your phone, tablet or laptop?

  7. @Zee exactly what I’ve been doing! After connecting a reprap to my 3d printer (see previous hackaday post). I was digilently building a raspberry pi based thermostat. With same feature of being able to switch on/off the heating while at work!

    It doesn’t have a fancy touchscreen just a + and minus button. But it will have a fancy web interface so you can connect with your android tablet or pc to the thermostat.

    http://walter.schreppers.com/index.php?page=blogpost&pos=99

    and the version from last year that already worked on an iphone:

    http://walter.schreppers.com/index.php?page=blogpost&pos=80

  8. Just wondering. How did you integrate the charger for the android phone? I’m guessing you need to have mains nearby the android to charge it 24/7 otherwise it will loose it’s power.

    Still great write-up and neat idea. But I’m missing the schematics for the board that contains the temp sensor and the relays or mosfets to do the switching on github I only see sources for the android apps (maybe I’ve overlooked them though…).

    • Most modern furnaces provide a cyan wire with 24vac auxiliary power for thermostats. I’m using this to power the IOIO which provides power to the phone over USB. The wiring details are on the assembly instructions page at AndroidThermostat.com.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.

Join 96,459 other followers