Hello!
Our company turns "classic" home appliances into "smart" and controlled from the phone (via Bluetooth or WiFi). That is, an electronic module with a radio channel is built into it. If a manufacturer of equipment wants to upgrade an existing model of equipment, then we can implement our control board, which is associated with a special mobile application. You can also develop it from scratch or make additional changes to the board, application, or package.
Somehow the customer came to us and asked us to develop a method (sensor) for measuring the volume of water in the kettle, so that later the user could see this data in the mobile application. The design of the sensor should be simple and suitable for any model of kettle. We did not have a formal TK: the customer wanted the kettle to determine how much water was poured into it.

Additionally, the following requirements were put forward:
')
- The measurement error should be no more than 40 ml;
- The error does not change when the water temperature is from 5 to 100 degrees Celsius;
- The measurement method should have a minimal effect on the cost of the kettle and on the costs of changing the technological processes of production.
These requirements have become guidelines in the selection of a method for measuring the volume of water inside the bulb of a kettle. The last point was the most important, as in the field of household appliances the price greatly influences the choice of the buyer. We could not afford to use expensive and exotic techniques.
The choice of measurement method
We decided that the easiest way would be to weigh the water in the kettle using strain gauges and convert the data into volume. But it was necessary to propose and test several alternative methods of measurement: any customer prefers to choose from several different options. He will weigh the pros and cons and make the final decision. So in parallel with the creation of built-in weights, we considered and tested other methods.
Immediately decided to abandon the float and ultrasonic methods. The float would definitely not go into production. In addition, a kettle with a float inside could scare off customers: who wants to drink water, in which a foreign object is constantly floating. And on the float, sooner or later, various impurities from the water will begin to settle.
The ultrasonic method was rejected because it would not work during the boiling of water: the sensor would give incorrect readings.
Capacitive sensor
An interesting option seemed capacitive method. Let us dwell on it in more detail.
First, the developers decided to use two metal plates as a condenser. However, this constructive solution turned out to be unsuccessful: the hand that touches the teapot adds additional capacity to the system, and the readings “float” in real time.
Further two brass tubes with a diameter of 8 and 4 mm were used. Each varnished, and then inserted one into another. These tubes have become an alternative to the plates. They performed the function of a capacitor, whose capacity should change when immersed in water. In this case, one tube shielded the other, which protected against interference, as in a coaxial cable.

To install the sensor in the center of the bulb of the kettle drilled a hole. I would like to place it closer to the edge, but this was prevented by heating elements (tubular electric heater) around the perimeter of the base of the kettle. On the 3D-printer was printed casing for tubes. An insulating silicone gasket was also made, which was supposed to protect the device from water leakage.

When tested with different volumes of cold water, the system worked properly. However, when boiling and testing with hot water, it was found that the varnish had cracked, with which the brass tubes were coated. Varnishing was originally a temporary solution. Instead, it is better to use silicone. But silicone would have to be certified for the food industry, and this would lead to a significant increase in the cost of the finished kettle. The customer did not agree to this. And we considered the method itself to be low-tech, since there is a need to make the silicone layer very thin: a few tenths of a millimeter, that is, comparable to a layer of varnish. And finally, the pin sticking out inside the kettle strongly spoiled the appearance of the device. It would look especially intimidating inside a glass model.
We also tested the completely non-contact capacitive method: electrodes were performed outside the glass bulb. Another factor was discovered that puts an end to the capacitive method - steam. During boiling, the vapor condenses in front of the plates or in the area of the electrodes, which leads to a distortion of the data obtained. In other words, as soon as condensate appeared, we could not reliably determine the level of the liquid.
Sensor of a pair of electrodes
It was decided to conduct the second experiment with a sensor that would calculate the volume of water from its electrical conductivity. To install such a sensor, along the wall of the flask we placed a plate with several pairs of electrodes.
The principle of operation is quite simple: water gets on one of the pairs of electrodes, and an electric current begins to flow between them. Knowing exactly which pair of current flows, it is easy to determine the water level. And the more electrodes will be located inside the bulb, the more accurate the volume measurement will be.
In the photo below, a sample kettle with two types of sensors.


In the case of the electrode method of measuring the volume of water in the kettle - the measurement accuracy is directly proportional to the cost and complexity of the design. The more accuracy we want to achieve, the more expensive the finished product will be.
The condensate inside the flask gave a much bigger problem. The drops settled above the real water level and activated the electrodes - the sensor gave erroneous data. Neither the hardware nor the software method could solve this problem. In addition, the electrode sensor would also require expensive certification for the food industry.
Strain gauge sensor
So, we dismissed two methods immediately, two more - after the tests. We return to the weighing: it is hardly possible to come up with something simpler and more convenient than this method. Therefore, we transform the kettle into scales with the help of strain gauges.

With the strain gauge, we also had difficulties. First, the part of the kettle had to be adjusted to the sensors, which would lead to a change in the molds during production.
Secondly, when we printed out the case part with the seats on the 3D printer, installed the sensors and assembled the kettle, it became clear that the stand-base should be made of more rigid plastic than usual. When testing the sensor readings floated a little, because the standard stand under the kettle slightly bent.
Thirdly, we had to solve the problem of drift of the sensor readings from heating with heating elements. The original design of the kettle did not allow the sensors to be placed in the base of the kettle, since the electronics in the upgraded model were initially located in the handle. With the influence of temperature, we managed to cope successfully. During the tests, the temperature of the sensors did not exceed the maximum allowed with five test inclusions of the kettle in a row.
Having dealt with the technical side of the experiment, we began to analyze the data. Below is a graph of the dependence of the units of measurement of the ADC of the scale on time.

- At the beginning of the experiment, nothing happens, the kettle is turned off.
- The peak corresponds to pressing the kettle button. Everything is more or less logical here: the finger creates short-term pressure, and the sensor recognizes this as an increase in the mass of water.
- However, immediately after pressing, the readings do not return to the initial level and become slightly larger - by 1-2 grams. We have not yet found an explanation for this effect. Perhaps in the comments someone will offer their own hypothesis.
- Having passed section 3, the mass of water gradually decreases and at the time of boiling it becomes less than the initial one. It is impossible to write off this failure completely on boiling: after measurements, it turned out that boiling water evaporated less than the graph showed. At first we suspected a mechanical defect in the structure: the readings could change due to poorly fixed sensors. However, the sensors were fine. We interpreted this as follows: when boiling, the dissolved gas rises in water, the continuity of the medium is disturbed, it becomes compressible, which ultimately affects the sensor readings.
- The point between sections 4 and 5 is the moment of disconnecting the heating element and the beginning of water cooling. The difference between the beginning and the end of the graph shows that some of the water has boiled away. Subsequent measurements showed that in five cycles of boiling approximately 50 g of water evaporated, i.e. 10 g per start.

Total
Quite expectedly, the work with the strain gauges has come to work. Now the prototype is being finalized in order to soon go into mass production.
But while we were solving this problem, a few more accumulated. And they concern not only the board, the control program and the device design, but also the application and design of the server. There are already a couple of interesting and non-standard solutions, but
we will tell about them another time.