Building Your Electronic Gadgets

Browser-Controlled Thermostat

Thermostat
Thermostat

NV Cover

This project was featured in the September and October 2011 issues of Nuts and Volts Magazine. Click on the magazine images for the September and October articles.

I firmly believe that laziness is the true mother of invention. I got tired of having to move about the house to adjust the two thermostats we have. Often I would go to bed and realize the upstairs thermostat had not been adjusted. It was always a tough decision: do I get out of bed and fix it, or waste electricity? Add the desire to learn how to do this, as well as wanting to show off, I put this together as a teaching project to show how to adapt the Microchip TCP/IP development libraries to your own PIC24 hardware.
NV Cover

2013 Update…

This project is now several years old. In the meantime the Nest and other web-enabled thermostats have become available. The primary purpose of this project was not to build a thermostat but to show how to develop an embedded TCP/IP system using the Microchip tools.

The Microchip development tools have changed with their migration to MPLABX so the files probably won’t compile as is. Even though I still use these boards I haven’t migrated to the new tools yet – I have a WIN-XP system with the old software I use for this. I still have PCBs – contact me if you want some.

For all of you who expressed an interest in this project, by asking questions, buying boards and kits, etc., Thank you!

Features

  • Replaces standard 4-wire thermostat.
  • Displays temperature (°F) and percent humidity. Uses Sensiron SHT11 sensor.
  • Maintains simple user interface in the wall unit.
  • Wall unit has backlight for the LCD display which is turned on briefly when a button is pushed.
  • Web-browser access from PCs and smart phones (requires javascript).
  • User-configurable start-up defaults.
  • Sends email or text message on start-up or restart, such as after a power failure. (This feature does require access to a suitable mail server.)
  • 7 PIC24 I/O lines available for custom use.
  • Includes hardware dependent MPLAB project files.
  • All on a 3” by 4” board that mounts on the TCP/IP experimenter board.

Documentation and Resources

The thermostat board includes instructions for modifying and compiling the application. Portions of code that are unique to the board and the MPLAB project files are included. Please note that you must download and install the Microchip MPLAB IDE, C30 compiler and Application Libraries to make changes and compile the application. Links and version numbers are included in the document, and below.

The manual can be found here. The latest update is 20 September 2011. I will be updating this as I get feedback from readers.

The MPLAB project files will be sent to you by email when you purchase the assembled thermostat.

The bill of materials for both the TCP/IP Experimenter board and the Thermostat can be found here.

Microchip download sites can be found here:

  • MPLAB IDE – development environment which is required for managing projects.
  • Compiler for PIC24 – requires registration and login. The free or evaluation version will work for this project. 2013 update: this link is broken – the C30 compiler has been replaced by MPLABX and the XC16 compiler
  • Application Libraries – these include the TCP/IP stack. Also download the help files on this page. 2013 update: these libraries are re-organized as part of the move to MPLABX.
  Posted: 2010.06.11       Updated: 2013.09.20