ArduStat – My Web Controlled Wireless Arduino Based Thermostat

I finished my first functional Arduino project last month. It’s a typical first baby-steps ‘Hello World’ project in the Arduino world. A web-controlled thermostat.

Hardware List:

  1. Adafruit CC3000 WiFi Breakout Board
  2. Arduino Uno R3
  3. Generic Hobby Servo Motor
  4. 1 10k Resister
  5. 1 Paperclip
  6. 1 DHT11 Temperature Humidity Sensor

Since I have a functioning Honeywell T87 thermostat (And, the fact that I currently rent the house, and do not wish to make any major hardware changes), I decided to implement  a removable hardware interface with the T87, instead of going down the path of a more elegant relay-based arduino solution.

I had only 3 days available from project start to hardware implementation. First, I brainstormed all the features I would like to see in my ardustat. Then, I used the 9-box technique to classify these features in terms of ‘Difficulty’ (on the x-axis), and ‘Feature Set / Automation / Efficiency’ (on the y-axis). For now, I’ve implemented everything in the lower left box, which is – ‘Small Feature Set, Low Automation and Low Efficiency’, but ‘Easy to Implement’. The 9-box is a very powerful tool when planning out feature implementation, classification and other project management aspects.

While working on the project, I divided the tasks into ‘Small Victories’, which made the project easily manageable. Click on ‘View Full Size’ in the images below to get a readable version of the pictures.

Connecting the servo to the Honeywell thermostat without significant hardware fabrication or modification was surprisingly for me, the most challenging aspect, especially since I had no tools handy. I had two approaches in mind – (i) A 4 bar linkage between the servo and the thermostat, or (ii) Some sort of belt (rubber band) driven pulley system.

I pursued the 4-bar linkage concept. The connecting rod is a paperclip that I bent appropriately. On the thermostat side, I created a pin joint and a cotter pin arrangement to arrest the paperclip. To correctly measure the distances and angles, I photographed the assembly and then used  Image J, a image processing tool. On the stat, 50 to 80 degrees is exactly 90 degrees apart. I used this to calculate the angles I would need to command the servo to.

I’ve used to create a domain space for my HTML and PHP codes. The PHP creates a tdata.html with the commanded temperature in the text. I download this tdata.html in the arduino and parse the text to extract the temperature. Xively is a great tool to plot the data easily.

I’ve modified the arrangement slightly now. At operating temperature, the box is 3-4 deg C hotter than the ambient temperature. The temp sensor always read hotter when I had it stuck to the plastic box as shown in the pictures. I have moved the position of the DHT sensor to the wall now, which has improved the readings.

The assembly in the small box was tight, and I had to be innovative on the way the hardware was positioned, to allow the box to close and to allow me to use the USB and power ports without having to open the box.

Further Improvements:

  • Day and Time based temperature scheduling
  • Addition of manual temperature control at the thermostat
  • Intelligent poll intervals
  • Upgrade to DHT22 for better sensing capability


  • Use servo.detach() after servo position change to avoid servo flutter
  • Need to compensate for backlash in the 4 bar mechanism to ensure repeatability

HTML, PHP Codes,  Arduino Sketch and Fritzing files available at:


5 comments on “ArduStat – My Web Controlled Wireless Arduino Based Thermostat

  1. Muttitude
    January 17, 2014

    This is pretty cool , am playing around with it for something similar I am working on, problem I am having is with the Mysql database table structure parameters for the date year month and time. A pointer to these would be appreciated.

    • rsangole
      January 17, 2014

      I can try helping you out for sure, though, I’m no DB/web programmer… Have you tried posting your query to reddit?

  2. Muttitude
    January 17, 2014

    Reblogged this on Muttitude and commented:
    This is pretty cool

  3. Peter Dalmaris
    February 13, 2014

    Nice work Rahul! I came across your post as I am researching for a lecture on the CC3000.

  4. Raul
    April 9, 2015

    Hi Raul is very interesting the project I also try to use something similar to the CC3000 and xively and desplagando data on a 16×2 LCD but not pq reason lcd not work I control for i2c. Could help using a lcd to your project.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s


This entry was posted on January 7, 2014 by in Arduino and tagged , , , , , , , , , .


Blogs I Follow

Follow BRAIN DUMP on

Data Science, Machine Learning, & Visualization

The Blog of Author Tim Ferriss

Tim Ferriss's 4-Hour Workweek and Lifestyle Design Blog

Celestial events for viewing pleasure

- and what up there in the sky

a paper bird

Un pajaro de papel en el pecho / Dice que el tiempo de los besos no ha llegado

Dan Ariely

My Irrational Life

TED Blog

The TED Blog shares interesting news about TED, TED Talks video, the TED Prize and more.


A journey through information technologies


Mathematical and statistical insights into Formula 1


Fresh hacks every day

Speaking of Robots

Not Your Father's Space Sprockets

%d bloggers like this: