Skip to the content
2 layers100.3 × 103.5 mmLauteringTun, the printed circuit board in 3D

My own built brewing system for making wonderful beer at home

Size
100.3 × 103.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
32
Nets
38
Pads
104
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 9.0 (file 20241229)
Created
24 Dec 2024
Updated
5 Nov 2026

Overview

LauteringTun is an open-source printed circuit board by xrayer2000, from the xrayer2000/MashMachine repository on GitHub. It is a 2-layer board of 100.3 × 103.5 mm with 32 parts on 38 nets.

It is built around the HLK-5M03 and MAX6675ISA+. Its parts include 8 resistors, 5 capacitors, 5 diodes, 3 connectors and 1 IC. It belongs with the ESP32 boards of this library.

Main components

2

README

README.md

MashMachine

An automated homebrewing system developed around a modified Vevor mash tun, an ESP32-based controller and custom temperature regulation.

Introduction

This project has been a great journey for me to learn even more about the subjects covered in the MPSYS (Systems, Control and Mechatronics) programme at Chalmers University of Technology.

I have specifically applied knowledge from two courses:

  • SSY230 – System Identification
  • SSY285 – Design of Linear Control Systems

The mash tun has served as a physical test platform for applying system identification and control theory to a real-world thermal system.

Mash Tun Construction

The starting point for this project was a relatively basic mash tun from Vevor, which only supported simple heating through its original controller.

I decided to modify the vessel and develop a custom control system to improve temperature regulation and automate the brewing process.

The mechanical work involved modifying the stainless-steel vessel, welding components, installing the necessary hardware and constructing an insulated enclosure.

Fabrication

The following photographs document parts of the fabrication process, including the initial measurements, stainless-steel vessel and welding.

Measuring and preparing the mash tun

Stainless steel mash tun during construction

Mash tun fabrication

Welding and Assembly

Welding the stainless steel vessel

Finished Mash Tun

The finished vessel has an insulated exterior to reduce heat losses and improve thermal efficiency.

Finished insulated MashMachine

Construction Videos

Welding

https://github.com/user-attachments/assets/f25a4e15-6e44-4505-bbf4-2bfe34d7de5a

https://github.com/user-attachments/assets/1c13a10b-537a-4cbe-8e05-aff711293a5b

System Implementation

The original controller was removed and replaced with a custom-built ESP32-based control system.

Several hardware modifications were made:

  • A circulation system was added using a pump.
  • Piping was installed to allow continuous wort circulation.
  • The original control electronics were replaced with an ESP32-based system.

The circulation system improves temperature uniformity and makes the system more suitable for model-based control.

The original system exhibited temperature overshoot of around 2°C. With the new controller, temperature regulation is significantly improved, with essentially no observable overshoot under normal operating conditions.

Additional functionality includes:

  • Hop timers
  • Mash programs
  • Automated process control
  • Home Assistant integration

System Identification

In the System Identification course, I used the mash tun to collect both estimation and validation data.

Using the System Identification Toolbox in MATLAB, I derived state-space models for three different operating points:

  • 50°C
  • 65°C
  • 70°C

Estimation Data

Estimation data

Validation Data

Validation data

ARMAX Model

ARMAX model

All system matrices were computed in MATLAB and then implemented directly on the ESP32. The computational work was therefore performed offline rather than on the microcontroller.

Control System Design

Once the state-space models had been obtained, I used the concepts from Design of Linear Control Systems to design controllers based on the identified models.

I initially implemented a state-feedback LQR controller and later extended it to an LQG controller by adding a Kalman filter for state estimation.

LQG requires an explicit state-space representation of the system dynamics. Unlike conventional PID control, which operates on the control error, LQG uses a model to estimate internal system states and calculate the control input.

However, the LQG controller turned out to be somewhat excessive for this application, since the system exhibits slow and stable thermal dynamics. A well-tuned PID controller would likely have been sufficient.

Measurement System

The system initially used an NTC thermistor. This approach was eventually abandoned due to calibration difficulties and unreliable measurements.

NTC Thermistor

The NTC sensor is strongly nonlinear and requires reliable calibration points consisting of temperature and resistance.

In practice, this introduced several problems:

  • Calibration was sensitive to measurement noise.
  • Small resistance errors could result in significant temperature errors.
  • Obtaining consistent and accurate reference temperatures was difficult.

These issues resulted in deviations between measured and actual temperatures.

PT100

The NTC was replaced with a PT100 resistance temperature detector (RTD).

The main reasons were:

  • More linear temperature-resistance characteristics.
  • More straightforward calibration.
  • Stable and predictable measurements.

This change significantly improved the quality of the temperature measurements, which is particularly important for system identification and state estimation.

Home Assistant Integration

The system is integrated with Home Assistant for monitoring and interaction.

A local Linux machine acts as a small server, running Home Assistant in a Docker container. The same setup also runs supporting services such as InfluxDB and Grafana.

Communication between the ESP32 and Home Assistant is handled using MQTT.

This setup enables:

  • Real-time monitoring of temperature, control signals and system states.
  • Logging data to InfluxDB for further analysis.
  • Visualization of system behaviour in Grafana.
  • Remote interaction through the Home Assistant interface.

The integration is useful not only for convenience, but also for collecting experimental data and observing controller performance over time.

System Characteristics

The mash tun exhibits slow dynamics and significant thermal inertia.

Measurements are also affected by noise, making aggressive control unsuitable.

As a result, stability and consistent temperature regulation are more important than fast response.

Challenges and Lessons Learned

The main difficulty in this project was not the controller design itself.

The most challenging aspects were:

  • Obtaining reliable measurement data.
  • Constructing a model that accurately represents the real system.
  • Handling non-ideal behaviour in a physical system.
  • Integrating mechanical, electrical and software components.

The project has provided an opportunity to apply theoretical concepts from system identification and control engineering to a practical application.

Results

  • Modified and insulated stainless-steel mash tun.
  • Custom ESP32-based control system.
  • Experimental system identification at multiple operating temperatures.
  • State-space models derived using MATLAB.
  • Implemented LQR and LQG controllers.
  • Improved temperature measurement using a PT100.
  • Significantly improved temperature regulation.
  • Home Assistant, MQTT, InfluxDB and Grafana integration.

Acknowledgements

A special thanks to my dad for giving me the opportunity to carry out the welding work at his workplace, MTA Sahlgrenska. His help made the fabrication of the stainless-steel mash tun possible, and I really appreciate his support throughout the project.

Parts

32
QtyValueFootprintReferences
51000Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R3, R4, R5
4MountingHoleMountingHole:MountingHole_3.2mm_M3_DIN965_PadH1, H2, H3, H4
210nCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC2, C3
21kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR7, R8
1100nCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC5
1100uCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC1
11uCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC4
14.7kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR6
1AirTemp - DS18B20Package_TO_SOT_THT:TO-92L_InlineTemp_sensor1
1AlarmBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1DCLED_THT:LED_D3.0mmLED2
1ESP32-DEVKIT-V1ESP32_DEVKIT_V1:ESP32_DEVKIT_V1U1
1HLK-5M03Converter_ACDC:Converter_ACDC_Hi-Link_HLK-5MxxPS1
1L1, NTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_HorizontalJ1
1MAX6675AllprojectsFootprint:MAX6675J2
1Mqtt_ReconnectLED_THT:LED_D3.0mmLED5
1OnLED_THT:LED_D3.0mmLED3
1Rotary_Encoder_SwitchRotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmSW1
1SSD1306 Display 1, Addesss 0x78, (GND,VCC,SCL,SDA)SSD1306:ssd1306_1.3''Brd1
1SSD1306 Display 2, address 0x7A (GND,VCC,SCL,SDA)SSD1306:ssd1306_1.3''Brd2
1Solid state Relay OutConnector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ3
1WatterDetectionLED_THT:LED_D3.0mmLED1
1Wifi reconnectLED_THT:LED_D3.0mmLED4

More from xrayer2000/MashMachine

3
  • 2 layers100.9 × 82 mmMashMachine V2.0, the printed circuit board in 3D

    MashMachine V2.0

    xrayer2000/MashMachine

    My own built brewing system for making wonderful beer at home

    62 parts1
  • 2 layers100.9 × 82 mmMashMachine V2.1 PT100, the printed circuit board in 3D

    MashMachine V2.1 PT100

    xrayer2000/MashMachine

    My own built brewing system for making wonderful beer at home

    51 parts1
  • 2 layersMashMachine V2.0-Emil, the printed circuit board in 3D

    MashMachine V2.0-Emil

    xrayer2000/MashMachine

    My own built brewing system for making wonderful beer at home

    29 parts1

Similar boards

  • 2 layers128 × 58.8 mmSensor energia bl0940, the printed circuit board in 3D

    Sensor energia bl0940

    alejomancinelli/FCEIA_ProyectoFinal

    Proyecto Final de Ing. Electrónica: Sistema de monitoreo de red eléctrica doméstica y/o industrial

    44 parts
  • 2 layers100 × 69.5 mmPanoboard2, the printed circuit board in 3D

    Panoboard2

    CapnKernel/panoboard2

    A new controller board for Panasonic bread makers

    76 parts
  • 2 layers65 × 50 mmMainsFrequencyMonitor, the printed circuit board in 3D

    MainsFrequencyMonitor

    Qeteshpony/MainsFrequencyMonitor

    Single board solution to power an ESP32 and use it to measure the mains frequency through an optoisolator

    38 partsBSD-2-Clause
  • 2 layers61 × 93 mmFreeDS P, the printed circuit board in 3D

    FreeDS P

    pablozg/freeds

    Derivador de energía solar excedente creado por Pablo Zerón, Diseño PCB por Amcalo, Tester original por Aeizoon, Wiki por Zoilo Mora

    21 parts108
  • 2 layers57.5 × 54.5 mmFuente, the printed circuit board in 3D

    Fuente

    scortua/DIIN_PROJECT

    Proyecto de cnc para vivero

    4 parts
  • 2 layers129.9 × 63.6 mmTraeger rev 2.3.0.kicad pro, the printed circuit board in 3D

    Traeger rev 2.3.0.kicad pro

    jazzmonger/Traeger-PID-Controller

    Traeger Smoker/Grill Controller based on an

    45 parts36
  • 2 layers176 × 82.6 mmHotAirGun, the printed circuit board in 3D

    HotAirGun

    raspibo/HotAirGun

    Hot Air Gun File, 3D, Sch, Pcb, C

    78 parts16

Questions

How big is the LauteringTun PCB?

It measures 100.3 × 103.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the LauteringTun use?

32 parts, built around the HLK-5M03 and MAX6675ISA+. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the LauteringTun KiCad files?

From the xrayer2000/MashMachine repository on GitHub, at the commit this page was made from: the board is Kicad/LauteringTun/LauteringTun.kicad_pcb and its schematic Kicad/LauteringTun/LauteringTun.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the LauteringTun design in my own project?

Its repository states no licence, so its author keeps all rights: ask xrayer2000 before reusing the design.