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.
- Adafruit CC3000 WiFi Breakout Board
- Arduino Uno R3
- Generic Hobby Servo Motor
- 1 10k Resister
- 1 Paperclip
- 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 99k.org 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.
- 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: