The RGB.ICT.SOLUTIONS group is composed by four students of the University of Udine.
Alessandro Brisotto, Mattia Guacci and Davide Righini have a Bachelor's degree in Electronic Engineering and they are going to attand the Master's degree in Electronic Engineering. Luca Francescon has a Bachelor's degree in Computer Science and he is going to attend the Master's degree in Computer Science.
In March 2014 they have created a working group in order to carry out the project which is described in detail in this website.
The course "ICT Laboratory" held by Professor Riccardo Bernardini is part of the Master's degree in Electronic Engineering. The objective
of the course is to make the students work on a “real life” project. Students are asked to design and build a device (or a software), from some specs at the “user level”, saying what are its functions, but not how implementing them.
The project, called "Intelligent Thermostat", has started in March 2014 and ended in September of the same year.
The technical specifications given required that the thermostat had to provide a thermoregulator equipped with wi-fi interface, remotely manageable and able to optimize energy consumption too.
This project deals with many of the nowadays issues of consumer electronics, home automation, energy saving and internet of things.
In the following site’s sections it will be exposed the choices that the group has made in order to develop this work.
Possibility to know and set the home TEMPERATURE in EVERY moment and from any place
Optimization of the temperature
Obtain the desired temperature at a desired moment
Only one app for more devices
With the same app, you can set several thermostat
Working on this project and building it from scratch has allowed to develop a "commercial" product, quite innovative in all its functionalities.
In this section we are going to describe the final product, pointing our attention to all the possible types of user or buyer; in this way we are going to explain all the functionalities that the thermostat has got.
We developed an App for the PC that allows to:
know in every moment the temperature in your home
know in every moment the condition of your home heating
change immediately the plan of the temperature
change immediately the settings of the thermostat
interact with a "simple" graphic interface to make some changes of temperature and with a "complete" graphic interface to change the temperature's plan of the entire week
We developed a Smart Thermostat with the following features:
connection to the wireless network
programmable with internet connection from the App or with serial cable from a PC
operation guaranteed even without the internet connection
operation guaranteed even after a power loss
it doesn't allow that the temperature goes down under a settable minimum
it optimizes the consumption when a desired temperature isn't set
it optimizes the consumption when there are some discontinuities in the plan of temperature
while it's running, it understands the time constants of the ambience around it, in order to reach a better optimization
possibility to set the week plan's temperature by half an hour step with granularity of 1°C
endowed with a reset switch
The system that includes the environment and the heat source was modelled with an equivalent circuit. This has been possible thanks to the similarities "current - flow of power" and "voltage-temperature" which are normally used in this context.
The model chosen in the first analysis approximates the system to the first order and is well suited to an environment heated by an electrical heat source.
It has been possible to simulate with MATLAB and Simulink the behavior of the system through the differential equations that govern it. Since the results confirmed what it was expected, we decided to adopt this model.
Focusing on energy saving, it was decided to equip the device with the ability to meet the daily habits of people.
In particular, the device has to maintain the temperature set by the user and independently to handle the discontinuities in the heating program.
Since the considered model is dissipative, the minimum energy consumption is achieved by keeping the source off as long as possible. For this reason it is has been decided to optimize consumption in the bands when the temperature is not specified.
The system is leaved in free fall for as long as possible and it focuses on finding the optimal moment that allows it to obtain the desired temperature at the desired moment.
We also imposed a constraint on the minimum temperature of the system to prevent it from this fall when it is left in free mode.
In the same way, all the discontinuities in the temperature within the plan are treated in order to have the desired higher temperature but decreasing the power output from the source.
Although, these strategies have been analysed and evaluated using the software Simulink and they have truly proved to be the most effective in terms of energy saving.
The temperature profiles simulated, in presence of optimization "step", are shown in the graph: the black trace anticipates the discontinuity of the minimum time needed to obtain successively the desired temperature (indicated by the red trace).
Getting a really efficient optimization is crucial to define with good accuracy the appropriate instant to switch on the heat source. To do this you need to know some parameters of the system that can be grouped in the time constant related to the step response.
We didn't considered ideal parameters. The optimization algorithm that we have installed in the device is more sophisticated: the discontinuities are no longer treated with "step" profiles, but rather "linear" in order to avoid the risk of getting the highest
temperature excessively in advance. Furthermore the algorithm is adaptive in the sense that during operation, it analyses its performance and changes the time constant. By doing this, it is guaranteed an excellent performance.
The optimized temperature profile is necessary to manage the heat source to follow this trend. This isn't done adjusting the flow of power but by modulating it in a digital way ( on-off source). The control algorithm is also responsible of swinging periodically the temperature within a range centered around the desired temperature, without overstressing the system .
The behavior of the control achieved is shown in the graph through the black line. We see that in correspondence of changes in the status of the control, the system changes its behavior by passing from a decreasing to an increasing trend and vice versa.
This is a list of the components chosen to realize the project. As regards Server and App, they required only a PC. But as regards the Thermostat, the situation is different; indeed it's composed by different parts with different tasks, all connected to a electronic programmable device (micro-controller).
The choice of all this components mostly depends on the hardware required for the project, but also it depends on the operation of this components and on the software needed to let them communicate and work together. Now we'll see in details the components used in the project:
The demoboard is the core of the thermostat, a microcontroller with analog and digital input and output, easily programmable.
The used microcontroller is TM4C123G LaunchPad Evaluation Kit (Tiva C series of Texas Instruments for ARM Cortex-M4F); it's integrated in EK-TM4C123GXL board, which allows to have a easier access to the pins of the microcontroller and to extend easily its functionalities. More information about the device can be found at:
The programming of the device can be done writing in "C language", with a compiler supplied by TI; but a web community called Energia.ne provides a compiler that allows to interface with the device at a higher level, by a language like "Arduino"; Energia.ne also provides lots of libraries to simplify lots of operation with the microcontroller. This second strategy is the one we adopted.
Using the outputs and the general purpose inputs available on the device, it was possible to interface the microcontroller with all the other components that set up the thermostat (and that we are going to describe in the following sections).
The wifi interface used with the previous board is a Texas Instruments product, compatible with TM4C123G. Indeed, we used CC3000 BoosterPack, containing the chip for the communication with the wifi network: it connects in a simple way to the demo board and it manages autonomously the IPv4 TCP/IP stack.
With this wifi interface we can connect the device to the local network, in order to allow the access to internet with the thermostat. Other information about this booster pack can be found at:
The temperature sensor used, an essential component of the control, is again a Texas Instrument product. In the initial phase of the project we used the TMP36, a Analog Device product; but it was left because of the excessive instability of the measurement.
So we used two Texas Instruments LM75AEVM, that allow to easily interface the micro controller with the digital temperature sensor LM75A, using the standard I2C. Other information about this product can be found at:
The most important output signal of the thermostat is the control of the heat source; so we need to build a simple power circuit to realize this control. The first solution adopted had a circuit composed by Finder Series 46 Relay, a 12 volt power supply, a diode for the clamp and a transistor for the driving. This solution, although it was efficient, was inconvenient because of the need of using an external power supply. Finally we managed to insert an integrated device which rounds up all the previous components (relay, transistor, diode) and which can be driven by a digital output of the TM4C123G.
The thermostat has a simple visual interface for the user; in the display it's reported the operating conditions of the system: the measured temperature, the desired temperature and the hour. We realized this interface with the display LCD 16x2, connected to the board.
The thermostat is able to keep track of date and hour, with or without the power supply; this information are essential to follow the plan of the desired temperature. To manage this part we use an external chip: Real Time Clock DS1307. It's a chip that, correctly initialized and connected to an oscillator, to an external power supply (a battery) and to other passive elements, it's able to communicate date and hour with a high precision, using the I2C standard. In the picture there is the chip with all the necessary components. Other information about this product can be found at:
An essential part of the project and a key point of the realized device is the connectivity. Nowadays it's important that every electronic device remains in contact with its users, in order to have good performances in terms of efficiency and comfort. This is more and more true also for the household appliances or for all the devices that are involved with the home automation, as in our case. For this reasons, a huge part of the software installed on the thermostat uses communication to work. At hardware level, this communication is allowed by the Wi-Fi interface, which permits the thermostat to connect to the local area network of the location in which the thermostat works.
However our device can work, as a standard thermostat, also without the communication with the network; indeed network can leave for lots of reasons, but the thermostat has to go on working as usually, keeping the desired temperature.
The communication between user and thermostat can be done with an App developed by us. Using this software and an opportune password, every user can connect to his own thermostat every time he has an available internet connection.
By connecting with his device, the user is able to know the temperature of his house (measured by the sensors) and to change, if he wishes, the temperature plan. In this way the maximum flexibility is guaranteed to the user, even in terms of optimization of the consumption: if the user has some unexpected change of programs and his return to home is delayed, he can change the temperature plan through the app.
The App has moreover a simple graphic interface, which allows to the user to inspect all the plan of the temperature.
The communication between thermostat and user is managed through a server realized by us; it allows the user to have a remote access to the device, by using the global network.
In details, the server allows the exchange of the information related to the measured temperature, the system condition, the temperature plan and the possible changes.
In this way, the user can always know what happens in his home and is always able to manage his home heating from everywhere.
The Server is implemented on a computer placed in a private LAN. Changing some settings of the router and using a static IP service provided by a qualified web site, the server is able
to communicate with the two clients (app and thermostat). Thinking at some possible future developments, the server protocol could be able to manage a number of device higher than two.
To manage quickly the thermostat and to simulate a user interface, we have realized a python program which communicates with the thermostat by the serial interface.
The program has the following functions:
Date and hour
Through the serial interface, we set date and hour to the thermostat. At the end of the operation, the thermostat runs the optimization of the temperature profile of the following 24 hours from the set hour.
Setting of the temperature plan
Through the serial interface, we upload a matrix which contains the plan of the desired temperatures, with a step of half an hour. At the end of the operation, the thermostat runs the optimization using the new uploaded values,
producing a new temperature profile that has to follow.
Selecting the third option, we can set the data which are necessary to the Wi-Fi module to connect to the router. When the thermostat acquires the name of the wireless network and the password, it's able to connect to the server and to synchronize with this.
Log of the most important data of the thermostat
Selecting the fourth option, we can control the internal situation of the thermostat. At the end of every cycle of the program that runs on the microcontroller, through the serial communication we can receive the following data: the current time,
inside and outside temperature, the desired temperature, the state of the control (on/off), the slope of the ramp measured in °C/min.
Example of thermostat operation
The heat source is simulated with a light bulb. At the beginning the temperature of the ambience is 25°C; we set 27°C as desired temperature.
The thermostat turn on until the inside temperature arrives at 27.5°C; at this point the control turns
off the heat source and the temperature goes down to 26.5°C. This evolution continues in order to control that the inside
temperature remains around the 27°C.
Example of temperature setting through the Java app
Server identifies the thermostat using its unique code, and sends the current temperature to it.
With the app we set manually the desired temperature and we send to the server the new temperature plan.
First test: 24 hours of operation
This graph shows the results of a 24 hours test, with a fixed ramp of optimization: when we want to reach a desired temperature,
the optimizer makes the temperature grow up of 0.1°C every minute; in this way we are able to have the desired temperature at the desired time.
Second test: ramp with variable slope
In this second graph instead we can see the results of another test. Finding out a priori the slope of the ramp is possible only if we know exactly
the place in which the thermostat works, making some difficult thermodynamic valuations.
To develop a more flexible product, we study a system that allows the thermostat to estimate automatically this slope, without a
setting of this parameter during the installation phase. In this way at the beginning the thermostat starts with a high value of the slope of
the ramp; during its operation, the device modifies this value depending on some internal valuations.
This change of the slope can be clearly seen in the graph: the thermostat has adapted itself to the environment.
Even if the work was divided in parallel between the different members of the team and everyone focused mostly on different points,
it was necessary to work periodically together to test and put together the different parts of the project, both software and hardware,
to suggest some changes, to solve any problem which comes, so as to examine the project development and to divide any additional task.
Here we report an outline of the development of the project:
Study of the problem:
Simulation of the model with Matlab
Choice of the optimization
Simulation of the optimizer with Matlab
Choice of the components
Purchase of the board, the temperature sensor, the real time clock, the relay
Realization of the prototype software:
Realization in C language of the Server software
Implementation of the server in a local network
Solution of the problem of the static IP
Implementation of the server in a global network
Realization in C language of the App software
Realization in C language of the Thermostat software
Debug of the communication
Improvement of the communication protocol
Realization of the graphic interface of the App
Development of the final hardware and software:
Test programs of the board
Porting of the code of the thermostat
Debug of the thermostat software without the network part
First test of the thermostat
Second debug of the thermostat software without the network part
Extension of the functionality
Addition of the network part
Debug of the complete software
Second test of the thermostat
Second debug of the complete software
Final test of the thermostat
Collection and analysis of the data
Writing of the report
We decided to make available our work, for everyone who will want to consult it.