Samovar is an open-source controller based on the ESP32 for automating a home moonshine still, brewery and cheese-making setup. The project began in 2020 as an attempt to build convenient and safe automation for rectification, and over five years it has grown into a platform that can run distillation, brewing and even cheese-making to a set program.
What the controller can do
Samovar measures temperatures at five points (steam, column section, boiler, outlet water, TCA) and the pressure in the column. It controls heating through an external power regulator, relays, valves, a water pump and a stepper motor with a peristaltic pump for precise take-off. A servo drive lets you sort the fractions into different containers — this is one of the key ideas of the project.
You can control it from a local display with an encoder, from the built-in web interface over Wi-Fi, from the mobile apps for Android and iOS, or from a page on the samovar-tool.ru website. The process log and alarm messages are saved on a cloud server and are available on the website and in the apps. If parameters go outside the permitted limits, the process stops, and the alarm goes to the display, the web interface and mobile notifications.
The firmware is written in C++ for Arduino/PlatformIO, licensed under GPL-3.0, and the repository is open on GitHub (LKosoj/Samovar). The current version is 7.00.
Operating modes
Since the article was first published in 2021 the project has expanded a lot. Today Samovar supports seven modes:
- Rectification — take-off of heads, hearts and tails to a program. The built-in impurity breakthrough detector watches the steam temperature trend with pressure correction, picks its own threshold from the column noise, lowers the take-off rate when the temperature rises, and at a critical rise pauses the take-off and resumes by itself once things return to normal.
- Distillation — by boiler temperature or by the change in alcohol content in the boiler or in the vapour, with a forecast of the time to the end of the line and of the whole process.
- Wash column — control of the cooling water by the steam temperature setpoint, automatic or manual.
- Continuous wash column — warm-up, tuning, optimisation and operation; the wash feed is regulated automatically, and the parameters found can be accepted as optimal.
- Brewing — mashing in the malt, temperature rests, boiling, cooling, fermentation, brewing sequences, control of the stirrer and water pump, manual pause.
- Sous-vide — maintaining the water temperature to a program.
- Cheese-making — heating, holds, cooling, acidity control by a pH sensor, stirrer, brine drain valve.
- Lua — a mode in which the whole process is run by a user script.
For more on the modes, see the project README and the documentation on the website.
What lies at the basis of rectification automation
The idea of Samovar was born from practice. Below is a breakdown of how a typical process with a reflux column works. The terminology and take-off rate values are taken from open sources on home distilling (DistillAcademy, AlcoProf, Alcofan, specialist forums) and from the firmware source code.
What goes into the column and how to separate it
Rectification is the separation of a multicomponent mixture by repeated counter-current mass exchange between vapour and liquid. Unlike simple distillation, a reflux column returns part of the condensate back into the column (reflux), and this gives dozens of theoretical stages of purification. The output is neutral spirit of up to 96–98% ABV, from which most of the impurities have been removed. Ethyl alcohol boils at 78.37 °C, and the reflux column “works” around this temperature; everything that boils lower goes into the heads, everything higher into the tails.
The raw material for rectification is low wines, usually up to 40% strength, obtained after the first distillation run of the wash. The height of a home column is at least a metre; the diameter of the column section sets the maximum throughput, and the height sets the degree of purification.
The low wines we pour into the boiler are a mixture of ethyl alcohol, water and impurities. Impurities are divided into three groups by boiling point:
- Heads — low-boiling: acetone, methyl alcohol, aldehydes, some of the esters. They boil before ethyl alcohol.
- Hearts — ethyl alcohol with water, the main drinkable fraction.
- Tails — heavy impurities, first of all fusel oils (a mixture of higher monohydric alcohols C3–C10, esters and other compounds, about 40 components in all).
Between the main fractions, home practice usually singles out the late heads (an intermediate fraction between the heads and the hearts) and the early tails (between the hearts and the tails). A sharp boundary between them cannot be measured at home — only a chromatogram would show it — so take-off is run by indirect signs: temperature, rate and smell. The layer sometimes called “aromatic water” when distilling fruit wash is a distillate with the light aromatic components of the raw material; in academic literature the same product is called a hydrolate.
The process step by step
1. Heating up and running on reflux. The heating is switched on and the column comes up to its working mode. First the column is warmed up “on itself” — with heating on and the take-off fully closed. The steam rises, condenses in the dephlegmator and returns down as reflux, and the column reaches a stable regime. In the Samovar code these are the states “heating up finished / stabilisation”: the steam temperature has settled, the background noise of the trend has been collected, and the impurity detector is ready to react. A rough guideline is 10–15 minutes of stable steam temperature before starting the take-off of the hearts.
The working mode is chosen for the specific column. For SPN packing the recommended steam velocity is 0.2–0.3 m/s. For a 2-inch column section (5.08 cm) this corresponds to a net power of about 900 W, and with heat losses taken into account, about 1100 W during heads take-off. In these modes the column separates the mixture effectively and does not flood.
2. Heads take-off. Heads are taken off in film mode: the steam condenses on the walls of the dephlegmator and almost completely returns to the column, and a minimum goes to take-off. The approximate rate is about 50 ml per hour for every kilowatt of input power, usually no more than 350 ml/h in total, or 1/10 of the hearts take-off rate. In practice that is 1–4 drops per second. The share of heads in the low wines is estimated like this: for sugar wash, 3–5% of absolute alcohol (AA), for grain, 5–8%, for fruit, up to 10%; in practice more conservative values of 8–15% of AA are also found. Control is by the calculated volume and by smell. You cannot rely on temperature alone when taking off heads: the figures of 63–77 °C refer to ordinary distillation and depend on where the thermometer is installed; for rectification the stability of the regime and the take-off rate matter more than a single thermometer reading.
3. Late heads. Right after the heads comes an intermediate fraction. The thermometer already shows the alcohol “plateau”, but a chromatogram would still reveal traces of light impurities. Late heads are taken off slowly — otherwise they “smear” across the cut and spoil the hearts. Some distillers take them off in portions (for example, 17–20 ml every 10 minutes), others combine them with the hearts and separate only by smell. With fruit and grain raw materials, late heads often contain valuable aromatic components.
4. Hearts. The main drinkable fraction, roughly 2/3 of the volume of absolute alcohol in the low wines. Take-off is run in the pre-flooding (emulsion) mode — the column works at the limit of its capacity but does not yet flood. Synonyms are “on the stream” and “running on itself”. The hearts rate is from 300 to 3000 ml/h depending on the diameter of the column section and the input power; the practical rule is about 1 l of take-off per 1 kW of power. On a 2-inch column section (diameter 5.08 cm) a realistic rate is about 600–1200 ml/h: more, and the hearts do not have time to be “worked through”; less, and throughput falls.
5. Early tails. They appear when heavy impurities begin to mix into the hearts. At home you cannot divide hearts and early tails by temperature — there is no sharp boundary. You go by the temperature in the steam zone and at 2/3 of the column section: while the steam is stable and the rise happens only in the lower zone of the column, it is still hearts. There is no single “correct” number of degrees in the column section — the temperature changes along the height of the column and depends on composition, pressure, power and reflux; there is no universal temperature criterion for the “hearts → early tails” transition. The take-off rate is reduced by 30–40% relative to the hearts and the power is reduced, to avoid flooding — a state in which the rising steam begins to interfere with the normal flow of reflux down through the packing.
6. Tails. As soon as the steam temperature begins to rise, early tails take-off is stopped and you move on to the tails. Tails are bitter and smell sharply of fusel oils — they are not used for food purposes. With sugar wash the tails are put through repeat rectification; with fruit and grain they are raw material for aromatic distillates or for technical needs.
7. End of the process. When the last portions of alcohol leave the boiler, the temperature in the boiler and in the column section rises and the take-off rate falls. The process is finished when the set boiler temperature is reached (usually up to 98–99 °C) or at a minimum take-off rate. In this phase Samovar tracks the dynamics and stops the heating by itself if the distillation reaches the “dry” regime.
Why automate all this
The process takes hours. During this time flammable vapours of alcohol and impurities pass through the column — you have to keep an eye on the apparatus, otherwise you can miss the moment when tails begin to get into the hearts, or allow flooding. The main assumption Samovar is built on: automation will not make the product better than the equipment allows — but it will remove the routine, hold the exact take-off conditions and stop the process if something goes wrong (water is lost, the voltage jumps, flooding begins).
Separate take-off into containers is a headache of its own. If the column can physically separate the fractions, but you have to swap jars by hand every 20–40 minutes for several hours in a row, the separation is effectively lost. Samovar solves this with a servo drive with several containers and a program in which each line has its own volume, rate and condition for moving to the next.
What else is important to know
Safety. The controller monitors temperatures, pressure, the presence of water, and errors of the regulator and sensors; in an emergency the process stops, and a message goes to the display, the web interface, the mobile apps and the website. After an emergency reboot the firmware restores the program and, if the process is restarted within 30 minutes, continues the same log session.
Extensibility. The built-in Lua interpreter lets you describe your own logic on top of the base modes: access to sensors, heating, pumps, the stirrer and relays. This turns Samovar from a take-off controller into a platform for experiments.
Configurator. For Windows, macOS and Linux there is a configurator that builds the firmware, flashes the ESP32 over USB or Wi-Fi (OTA), edits files on the device and produces a configuration report. Local settings, including Wi-Fi credentials, are stored in user_config_override.h and never leave your machine.
Documentation and community. The full documentation is on the project website. For any questions you can turn to the support section on the website or to specialist forums on home distilling.
What has changed since 2021
The first version of this article was written in March 2021 — at that time the controller supported rectification, distillation and brewing, and that was already a notable step for home automation. Since then the project has gone through seven major versions, adding the wash column and continuous wash column modes, sous-vide, cheese-making, a full Lua interpreter, a cloud log and mobile apps, MQTT integration, a configurator for three operating systems and a second I2C heads take-off pump. Architecturally the basis has stayed the same: ESP32, five DS18B20 sensors, a pressure sensor, a power regulator, relays, valves, pumps, a servo drive and a stepper motor with a peristaltic pump for precise take-off. But the logic has grown, and today it is no longer a controller “only for rectification” but a small platform for home production.
