Skip to the content
2 layersMashMachine V2.0-Emil, the printed circuit board in 3D

MashMachine V2.0-Emil

xrayer2000/MashMachine1

My own built brewing system for making wonderful beer at home

Copper layers
2
Thickness
1.6 mm
Parts
29
Nets
43
Pads
101
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 9.0 (file 20241229)
Created
24 Dec 2024
Updated
5 Nov 2026

Overview

MashMachine V2.0-Emil is an open-source printed circuit board by xrayer2000, from the xrayer2000/MashMachine repository on GitHub. It is a 2-layer board with 29 parts on 43 nets.

It is built around the HLK-5M05 and MAX6675ISA+. Its parts include 6 resistors, 4 capacitors, 4 diodes, 4 connectors and 2 ICs. 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

29
QtyValueFootprintReferences
41000Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R3, R4
4MountingHoleMountingHole:MountingHole_3.2mm_M3_DIN965_PadH1, H2, H3, H4
2100uCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC3, C4
210nCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC1, C2
21kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR5, R6
1AlarmBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1DCLED_THT:LED_D3.0mmLED1
1ESP32-DEVKIT-V1ESP32_DEVKIT_V1:ESP32_DEVKIT_V1U1
1HLK-5M05Converter_ACDC:Converter_ACDC_Hi-Link_HLK-5MxxPS1
1L1, NTerminalBlock_RND:TerminalBlock_RND_205-00287_1x02_P5.08mm_HorizontalJ3
1MAX6675AllprojectsFootprint:MAX6675J1
1Mqtt_ReconnectLED_THT:LED_D3.0mmLED4
1OnLED_THT:LED_D3.0mmLED2
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
1SSR-41FDAOptoDevice:Finder_34.81U2
1Solid state Relay OutConnector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_VerticalJ2
1Wifi reconnectLED_THT:LED_D3.0mmLED3
1pumpConnector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_VerticalJ4

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 layers100.3 × 103.5 mmLauteringTun, the printed circuit board in 3D

    LauteringTun

    xrayer2000/MashMachine

    My own built brewing system for making wonderful beer at home

    32 parts1

Similar boards

  • 2 layers80 × 60 mmPCB Reflow Hot Plate, the printed circuit board in 3D

    PCB Reflow Hot Plate

    bjkayani/PCB-Reflow-Hot-Plate

    The PCB Reflow Hot Plate is a temperature controlled 120 x 70 mm hot plate designed to reflow solder SMD circuit boards.

    70 parts1
  • 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
  • 2 layers60 × 75 mmOSRO, the printed circuit board in 3D

    OSRO

    dragonlock2/OSRO

    Just another open-source reflow oven

    52 parts11Apache-2.0
  • 2 layers77.5 × 42.3 mmReflow, the printed circuit board in 3D

    Reflow

    atx/reflow-controller

    Reflow Oven Controller

    52 parts6GPL-3.0
  • 2 layers70 × 100 mmBREAD Slice, the printed circuit board in 3D

    BREAD Slice

    FHafting/BREAD

    This project is fully documented in the paper: Shane Oberloier, Nicholas G. Whisman, Finn Hafting, Joshua M. Pearce, Open Source Framework for a Broadly Expandable and Reconfigurable Data Acquisition and Automation…

    48 parts5
  • 2 layersSTM32CAN, the printed circuit board in 3D

    STM32CAN

    witoldo7/STM32CAN

    Trionic 5, 7, 8 flasher interface.

    50 parts5Apache-2.0

Questions

What parts does the MashMachine V2.0-Emil use?

29 parts, built around the HLK-5M05 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 MashMachine V2.0-Emil KiCad files?

From the xrayer2000/MashMachine repository on GitHub, at the commit this page was made from: the board is Kicad/MashMachine V2.0/MashMachine V2.0-Emil.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 MashMachine V2.0-Emil design in my own project?

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