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

MashMachine V2.0

xrayer2000/MashMachine1

My own built brewing system for making wonderful beer at home

Size
100.9 × 82 mm
Copper layers
2
Thickness
1.6 mm
Parts
62
Nets
57
Pads
196
Tracks, vias
555, 17
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
24 Dec 2024
Updated
5 Nov 2026

Overview

MashMachine V2.0 is an open-source printed circuit board by xrayer2000, from the xrayer2000/MashMachine repository on GitHub. It is a 2-layer board of 100.9 × 82 mm with 62 parts on 57 nets, routed with 555 tracks and 17 vias.

It is built around the HLK-5M03, ADS1115IDGS and DS18B20, with the BC547, 14D471K and MF72 5D9-3.5 among its other parts. Its parts include 17 capacitors, 11 resistors, 6 connectors, 5 ICs and 3 diodes. It belongs with the ESP32 boards of this library.

Main components

6

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

62
QtyValueFootprintReferences
7100nCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC2, C6, C8, C9, C11, C13, C17
4MountingHoleMountingHole:MountingHole_3.2mm_M3_DIN965_PadH1, H2, H3, H4
34.7kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR4, R5, R6
210kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR9, R11
210nCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC3, C4
21kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR8, R10
22.2uCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC1, C10
222uCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC12, C16
2BC547Package_TO_SOT_THT:TO-92_InlineQ1, Q2
10Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P1.90mm_VerticalR7
1100kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
1100nf X2 275 VAC MKPCapacitor_THT:C_Rect_L16.5mm_W6.0mm_P15.00mm_MKTC14
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR3
110uCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC15
114D471KVaristor:RV_Disc_D15.5mm_W4.5mm_P7.5mmRV1
11kResistor_THT:R_Array_SIP9RN1
11kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2
11uCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC18
14.7uCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC7
1470 Ω @ 100 MHzCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderFB1
1ADS1115IDGSConnector_PinSocket_2.54mm:PinSocket_1x10_P2.54mm_VerticalU2
1AlarmConnector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_VerticalJ3
1DCLED_THT:LED_D3.0mmDC1
1DS18B20Package_TO_SOT_THT:TO-92L_InlineAir_temp1
1ESP32-DEVKIT-V1ESP32_DEVKIT_V1:ESP32_DEVKIT_V1U4
1HLK-5M03Converter_ACDC:Converter_ACDC_Hi-Link_HLK-5MxxPS1
1L1, NTerminalBlock_RND:TerminalBlock_RND_205-00287_1x02_P5.08mm_HorizontalJ2
1MF72-5D-9Varistor:RV_Disc_D9mm_W5.2mm_P5mmTH1
1MqttLED_THT:LED_D3.0mmLED2
1OnLED_THT:LED_D3.0mmOnOff1
1PPTC 1.1AFuse:Fuse_BelFuse_0ZRE0016FF_L9.9mm_W3.8mmF2
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
1SSRConnector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_VerticalJ5
1SSR-41FDAOptoDevice:Finder_34.81U5
1SW_PushButton_Switch_THT:SW_PUSH_6mmSW2
1T250mAFuse_Holders_and_Fuses:Fuseholder5x20_horiz_SemiClosed_Casing10x25mmF1
1TPS7A0328PDBVRPackage_TO_SOT_SMD:SOT-23-5U1
1WaterLED_THT:LED_D3.0mmLED3
1WifiLED_THT:LED_D3.0mmLED1
1mashTempConnector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_VerticalJ1
1pumpTerminalBlock_RND:TerminalBlock_RND_205-00287_1x02_P5.08mm_HorizontalJ6
1waterDetConnector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_VerticalJ4
1~AllprojectsFootprint:AlarmModuleU3

More from xrayer2000/MashMachine

3
  • 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
  • 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 layers70 × 56 mmBps switch, the printed circuit board in 3D

    Bps switch

    Sanu0910/RFMW-ANT

    41 parts
  • 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 layers83.8 × 111.2 mmUniversal 30w smps, the printed circuit board in 3D

    Universal 30w smps

    arnavV456/30W-Universal-Isolated-SMPS

    Offline-flyback-power-supply

    33 parts
  • 2 layers130 × 115 mmTp4potencia, the printed circuit board in 3D

    Tp4potencia

    enriquewph/potenciatp4

    Fuente Conmutada 50W 24V 2.4A de la cátedra Electrónica de Potencia - Grupo 3 - 5R2

    88 parts

Questions

How big is the MashMachine V2.0 PCB?

It measures 100.9 × 82 mm and has 2 copper layers, 1.6 mm thick.

What parts does the MashMachine V2.0 use?

62 parts, built around the HLK-5M03, ADS1115IDGS, DS18B20 and BC547. 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 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.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 design in my own project?

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