# Arduino Homemade Thermal Imager for Power Saving Research

What can be done with two bricks, an ordinary electric stove and an Arduino thermal imager ? Save a ton of electricity! How all these things are interconnected can be found in this article. Along the way, I had to touch on some things from TAU (automatic control theory), but I tried to get rid of boring mathematics and explain in detail the role of the “thermal imager for less than \$ 100” in the process.

Attention! Under the cut there is one very “thick”, but beautiful picture! And a lot of text!

Today, almost everyone in the household has electric heaters - stoves, kettles, heaters and, at worst, boilers. On the whole, the principle of their operation can be described as follows: current flows along a nichrome thread and causes it to heat, and a power meter winds well. All heating devices "eat" a lot of electricity, it just so happened. However, there is a way out!

The fact is that any body has its own “thermal inertia”, and here it can be brought not quite accurate, but understandable analogy with a large round cobblestone:

Imagine that a cobblestone needs to be rolled back to a distance of ten meters. You can immediately fall on him with all the weight, push what you have strength throughout the entire stretch, and thus move him to the right place. And you can first push it with an effort, and then only slightly push it. Of course, in the second case, we will get tired less. So, by analogy, the first method is to turn on the heater directly into the network, and the second is to use energy-saving control algorithms.

And this means that we can supply a special form of voltage to the input of the electric heating element, which will allow us to achieve the desired temperature, but with less energy (kW * h). Of course, while saving is not taken from the air. And it appears due to an increase in heating time, and the longer the time - the correspondingly greater savings! How to calculate such a control is a long story and within the framework of this article it will be affected only superficially (for matan).
So, let's take, for example, for research an ordinary electric stove with a capacity of 1 kW. And we will put two silicate bricks on it - to increase the very “thermal inertia” (and as you already understood, the larger this conditional value, the greater the percentage of savings). Here is this beauty:

I agree, it doesn’t look very good! She has seen a lot in her lifetime, and, nevertheless, will continue to serve in the name of science and beyond.
First, to calculate the energy-saving control for a given electric heating device, it is necessary to complete the task of compiling its simplest mathematical model. It can be, for example, a differential equation or, as in this case, a transfer function. In the language of Wikipedia, the transfer function is a differential operator expressing the relationship between the input and output of a linear stationary system. And knowing the input signal of the system and the transfer function, you can restore the output signal.
For electric heaters, the input value is the effective voltage value, and the output is the temperature of the object. And having the transfer function of a thermal object on hand, we can, by applying a voltage of 220V to the input, get the temperature value at the output, and therefore, own the real mathematical model.

Having opened any textbook on TAU, you can make sure that there are a great many varieties of transfer functions. So how do you know which of them most accurately describes the object of study? To do this, it is necessary to conduct a kind of “identification”, according to the scientific one - the identification of the object. It sounds serious, but in practice it looks like this: plug it into the network and measure the temperature throughout the entire heating time. Here's what happens in the case of the electric stove:

Based on the type of function, we can safely conclude that the electric stove is accurately described by the transfer function, calledaperiodic link of the second order . This is how it looks:

Here, the input quantity U (t) denotes the voltage, which can be either constant in time (220V, meaning the effective value), or changing according to some law. The output quantity x (t) is the temperature. From the picture you can understand that this link has its own parameters - K, T1 and T2, which are called the gain and time constants, respectively. As follows from their names, the value of K reflects the magnitude of the change in the signal that passed through such a link, and the time constants directly depend on the same “thermal inertia” of the object. These coefficients can be approximately calculated from the previous graph. And, obviously, they affect the accuracy of the mathematical model, and therefore the amount of energy saved.

Looking ahead, I’ll say - for this tile, students have been counting on the same energy-saving management for more than one year (therefore, it is so shabby). And time after time, to identify the object (well, to get that graph on top), a thermocouple was placed exactly in the middle between the bricks. Well, a logical question arose - what if we take and move the temperature sensor to a completely different place, how will the parameters of the object change? Each time, an experiment with a different position of the thermocouple would be extremely long - as you can see from the graph above, one experiment takes almost three hours. And here the use of the very thermal imager on Arduino is just right.
The main drawback of the just mentioned device is that the long time it takes to obtain an image in the infrared range practically does not play a role here - the experiment takes a very long time compared to the scan time. But as a result, it turns out not just one graph of temperature changes at one point, but as many as 768! In accordance with the resolution of the thermogram 32x24 pixels.

Thus, using a thermal imager, a similar experiment was conducted to identify the object - 25 thermograms were taken in a few hours. The scanning area covered almost the entire side surface of the bricks, as shown in the picture:

And here is the process of heating in the infrared range (a kind of infrared time-lapse):

It is worth noting that false colors in the thermogram are assigned automatically depending on the maximum and minimum measured temperature, and the correspondence gradient also changes dynamically.

The discovery was that the heating center is shifted to the left, although the camera was directed strictly in the center of the bricks. This is probably due to heterogeneity inside the lower brick, or the design of the tile heating element.

An Arduino-based thermal imager works as follows - first a spatial temperature matrix is ​​compiled, then a false color picture is already visualized on it. This turned out to be a huge plus - since the output of the system is not only a beautiful picture but also a matrix file, which plays a major role in the study. Taking offhand five points on such matrices (there are 25 of them), you can track the dynamics of temperature change:

This is how the graphs of transient processes (as these temperature dependences are called) will look at five selected points and from a thermocouple for comparison:

The graphs from the thermal imager are more clumsy, since they are based on only 25 points, while the data from the thermocouple is received every two seconds. In addition, with the naked eye, one can note the difference in the temperature graphs from the thermocouple and the thermal imager. Perhaps this is due to the physical difference in the measurement methods - if the thermocouple is located "inside" the object, then the infrared sensor of the thermal imager scans exactly the surface, which in turn is affected by moisture evaporation and air convection.

Further, from these graphs, you can get the same coefficients (K, T1 and T2) to create a mathematical model of the electric stove. However, this time, we will have not one, but six whole models!

Omitting the mathematical part, it is worth noting that during the study an interesting feature was noticed - the coefficient values ​​depend on the location of the point on the thermogram relative to the proposed heating center - this is the red area at the bottom of the thermogram. Moreover, their dependence is almost linear:

And since it is known that the graphs do not lie, focusing on the position of the measurement point, in principle, it is possible to determine the coefficients for almost any point on the object without resorting to building graphs for all 768 points.

And yet, from these five previously selected points, the left point showed the best results in energy saving. As part of a system with a controller configured on the basis of data obtained from this point:

The percentage of savings is calculated in comparison with the energy spent on heating the stove up to 80 degrees by simply plugging it into a power outlet. How the voltage on the hotplate should be changed in order to save almost 40% of electricity can be seen on this graph:

Here, the optimal control is indicated by U (t), the corresponding temperature of the tile with this control is T (optim). For comparison, graphs of voltage and temperature of the tile with simple connection to the network are also shown. As you can see, the savings are obtained by increasing the heating time by almost three times.

To summarize:
So, if the whole article tormented you with the question, why do you need to heat bricks on a tile and consider some kind of mythical savings, if in practice nobody needs it, then here is a decent answer: the fact is that this tile is a direct analogue of such an object of study as a furnace resistance. This industrial monster with a capacity of 800 kW (for example) consumes not just a lot, but catastrophically a lot of electricity. And accordingly, energy saving is very out of place.

The thermal imager in this case played a huge role, making it possible to build the most complete picture of the processes that occur during the operation of electric heaters, and on the basis of these data to obtain an even more accurate model of the object from the point of view of energy saving, and in addition, to finally find serious use as a full-fledged device .