Smart Thermostat page 1 3. APPROACH In today s home appliances market, automation is becoming the norm and Smart Thermostat is a typical automation appliance able to be applied easily at home. With Smart Thermostat, the efficiency of Heating, Ventilation, and Air Conditioning (HVAC) systems will be even greater. In addition, it will allow for daily programs set by the user to coordinate the system to run on a convenient energy-saving schedule, as well as the convenience to override the schedules when deemed necessary to maintain home comfort from a smart device anywhere in the world. In this document we will discuss the different approaches used to accomplish our design. A general system overview of the Smart Thermostat is shown in Figure 3.1. From an Android application, a user will have complete access to their HVAC system and the ability to send controls via web to the Arduino Yun that will be housed inside the Smart thermostat. Once the Arduino Yun receives the user s commands it will communicate with the Smart Thermostat s I/O daughter board, which will then carry out the commands to the HVAC system. The user will essentially have complete control of their home or office HVAC system at their fingertips. Figure 3.1 System Overview
Smart Thermostat page 2 3.1 Hardware Subsystems Smart Thermostat requires many hardware subsystems. In this section, the different Hardware components chosen to complete Smart Thermostat s subsystems will be listed with a detailed description of why they were chosen and the role they will play in the operation of Smart Thermostat. 3.1.1 Microcontroller, Wireless Module, & EEPROM After determining the initial operational characteristics and methods of the thermostat, specific features such as pin count, memory, communication, and libraries could be known. After much research the most promising microcontroller to emerge was the PIC24F16KL402. It offered all of the necessary features at an outstanding price. The second component that needed to be decided upon was the EEPROM. There were many suitable candidates, all very similar in cost and performance. The model 25AA080A was selected as the front runner, sporting a slightly lower cost than other EEPROM models. The last element required was the wireless module. As it turned out this was by far the most expensive part of the design. The wireless module WiFi Plus click was chosen and the resultant jump in overall expenditure from that singular addition was enough to allow for the consideration of a development board. The impact of wireless technology on price was still obviously evident in many boards, with only a handful produced even containing full onboard 802.11 b/g/n wireless capabilities. Ultimately the Yun was decided upon as the best development board for the price. This particular model is based around an ATmega32U4 microcontroller and operates in conjunction with an Atheros AR9331 microprocessor that drives the wireless link. On the Atheros side of the communication bridge there is also a micro SD port that is used to store data as well as offer the user an option for quick and easy memory expansion. The initial cost differential between the Yun and corresponding components listed above was roughly $20. After factoring in the shipping costs, this differential was reduced to approximately $10. This gap was further closed by considering the numerous passive components and prefabricated board contained within the Arduino Yun as well as the effort taken to populate it. To top it off there are countless libraries available for the Yun to aid the programmer in specific implementations. While the price of the discrete components mentioned earlier would fall rapidly as more were ordered and shipments were condensed; these benefits would not apply as multiple vendors were used and minimal quantities were ordered. All in all, seen by Figure 3.2 and Figure 3.3 this made the Yun the perfect choice for the creation of the prototype and to prove the concept.
Smart Thermostat page 3 Component Price Pros Cons Microcontroller Microchip Technology PIC24F16KL402-I/SP $ 2.70 Familiar to team* Cheap* *Countless configuration *Less inherent support for peripherals EEPROM Microchip Technology 25AA080A-I/ST-ND $0.62 *Cheap *Small *Efficient *Surface mount *Static memory Wireless Module MikroElektronica WiFi Plus Click $45.00 *Works over most wifi configurations *Includes companion controller *Low power consumption *Expensive Development Board Arduino Yun $71.95 *Pre-configured (quick start) *More libraries and support *Expandable memory *Pre-configured (cannot change) *Expensive Figure 3.2 Development Board Vs Individual Components Figure 3.3 Arduino Yun Development Board
Smart Thermostat page 4 3.1.2 Temperature Sensor Being a thermostat project, the temperature sensor became a very important component in our design. The temperature sensor will determine the overall accuracy and efficiency of Smart Thermostat. With research, we found that there were several types of temperature sensors: The thermocouple (TC), the Thermistor, the Resistance Temperature Detector, and Infrared Sensors [1]. We first looked at the LM35 Integrated Circuit Temperature Sensor because it was accurate and cost efficient, but later decided to go with the DS18B20 Digital temperature sensor module due to its added feature of mounting directly to our Arduino board. Both temperature sensors listed in Figure 3.3 are suitable for our design constraints, but the DS18B20 seems to be the best choice at this time. Sensor Temperature Range Accuracy Price Arduino Compatibile LM35 +2 C to +100 C ± 0.4 C $1.58 No DS18B20 10 C to +85 C ±0.5 C $2.87 Yes Figure 3.3 Comparisons of Temperature Sensors 3.1.3 Relay In most residential 24V HVAC systems the thermostat is responsible for communicating the on/off state of the fan, heat, and cool operations to the air handler by closing in a 24VAC return path for the appropriate function(s). Since the microcontroller chosen was incapable of handling such a high voltage a relay needed to be selected that had a coil voltage within the range of the microcontroller as well as the ability to safely switch the
Smart Thermostat page 5 24VAC signal within operable current ranges. As seen in Figure 3.4. the G6L-1P-DC3 was a perfect fit for a low price and was deemed the winner. Component Price Pros Cons G6L-1P-DC3 $ 2.78 Cheap 2.25VDC turn on voltage Handle up to 2 amps Tighter operable temperature range 2274-05-021 $ 11.52 Faster switching speed Expensive Figure 3.4 Comparison of Relay 3.1.4 LCD Display Smart Thermostat is a user friendly device, so it must have a sufficient way to display data to the user. On the wall-mounted portion of Smart Thermostat, there must be a LCD display that will show all commands and current settings of the HVAC system. The data must be legible and visually appealing at the same time. The first option seen in Figure 3.5 of comparisons of LCD displays was the segmented LCD. The second option also in Figure 3.5 was the LCD character display. With the segmented display, the visual appeal and the amount of data that could be displayed was lacking. With the LCD character display the price was more, but the amount of data that could be displayed made the final decision simple.
Smart Thermostat page 6 Display Pros Cons Price Seven Segment Display 160-1526-5-ND Less Expensive Ease of Implementation Limited Data Display Requires 10 I/O pins $0.42 LCD Character Display NHD-C0216CZ- NSW-BBW-3V3 Visually Appealing More Legible More Options Display 240 characteristics More Expensive $11.00 3.2 Software Overview Figure 3.5 Comparisons of LCD Displays The Smart Thermostat is going to make use of three software components for operation which include the smartphone application, python scripts, and microcontroller program. This section will detail how these three software components will work together to achieve control of the smart thermostat. 3.2.1 Mobile Operating System In choosing the mobile operating system, three main factors were considered as seen in Figure 3.6; market accessibility, market penetration, and developer cost. A mobile operating system with a higher market share was desired, so the application would be available to a majority of consumers. Also a mobile operating system with high market accessibility was desirable to ease the distribution of the mobile application to customer. Due to the very low market shares of Blackberry and Windows Phone they were quickly ruled out. The Android operating system s huge market share makes it more desirable than all the others. The fact that Android applications are mainly written in Java, and the team has significant experience using Java was a great benefit as well.
Smart Thermostat page 7 Operating System Market Share Market Accessibility Developer Cost Android 68.8%[2] High $25 ios 18.8%[2] High $99 Blackberry 4.5%[2] Medium None Windows Phone 2.5%[2] Medium None Others 5.4%[2] low ---- 3.2.2 Mobile Application Figure3.6 Mobile operating system comparison The Mobile Application will be clean and simple so that it is easy and straightforward to use as illustrated in Figure 3.7. When the application is started for the very first time, the user will be directed to the setup wizard. The setup wizard is where the user will input data from his/her wireless module for the communication between the device and the actual thermostat. After the connection is setup through the setup wizard, the application s Home Screen will appear. This part of the application will show the status of the Smart Thermostat and provide remote access to the system. The application will also offer a schedule builder. The schedule builder allows the user to build a personalized schedule of temperature settings. These personalized schedules will then be saved and can be modified in the schedule manipulation feature found on the application.
Smart Thermostat page 8 Figure 3.7 Mobile Application Flow Chart
Smart Thermostat page 9 3.2.3 Microcontroller Software Once Smart Thermostat is powered on, it will check the scheduling system first. If there is a schedule on present time, Smart Thermostat will read the temperature sensor to compare scheduled temperature and actual temperature. By checking the cool or hot condition, it will decide whether to operate the system or not. For example, smart thermostat will operate the HVAC system if the actual temperature is higher than the scheduled temperature in cool condition. If there is no schedule, it will operate the HVAC system from checking the current set temperature. Figure 3.8 Flow Chart of Smart Thermostat Software
Smart Thermostat page 10 Usage Cases 3.2.4 Figure 3.9 Sunny Day Usage Cases
Smart Thermostat page 11 Figure 3.10 Rainy Day Usage Case
Smart Thermostat page 12 References [1] Temperature Sensors; the Basics Carolyn Mathas 10-27-2011 http://www.digikey.com/en-us/articles/techzone/2011/oct/temperature-sensors-thebasics [2] "Android and ios Combine for 91.1% of the Worldwide Smartphone OS Market in 4Q12 and 87.6% for the Year, According to IDC". Retrieved March, 2013 Available: http://www.idc.com/getdoc.jsp?containerid=prus23946013