Skip to the content
2 layers74 × 34 mmEMS Bus Gateway, the printed circuit board in 3D

EMS Bus Gateway for Buderus Boilers to run EMS-ESP32

Size
74 × 34 mm
Copper layers
2
Thickness
1.6 mm
Parts
48
Nets
30
Pads
134
Tracks, vias
224, 20
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
26 Sep 2023
Updated
3 Oct 2024

Overview

EMS Bus Gateway is an open-source printed circuit board by mariusgreuel, from the mariusgreuel/EMS-Bus-Gateway repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 74 × 34 mm with 48 parts on 30 nets, routed with 224 tracks and 20 vias.

It is built around the LM393, BAT54S and BAT46, with the BC847 among its other parts. Its parts include 16 resistors, 9 capacitors, 5 diodes, 4 connectors and 2 ICs. It belongs with the home automation and IoT and power boards and the ESP32 and RISC-V boards of this library.

Main components

4

README

README.md

EMS Bus Gateway

This repository contains a schematic and PCB layout of an EMS Bus Gateway. With the EMS Bus Gateway and the EMS-ESP32 firmware, you can connect EMS Bus devices, such as the Buderus Logamax boilers to your home automation system.

Introduction

The assembled EMS Bus Gateway consists of three essential components:

  • A voltage level converter that converts the EMS bus voltage levels to 3.3V TTL levels.
  • A micro-controller.
  • The EMS-ESP32 firmware.

The schematic uses a modified level convertor from the EMS reference schematic circulating the internet. For the micro-controller, a $5 Seeed Studio XIAO ESP32C3 board is used. The micro-controller needs to be programmed with EMS-ESP32 firmware, which is capable of decoding the EMS bus protocol and broadcasting the EMS parameters into your network via MQTT. Finally, the assembled board may be fitted into a Hammond 1551KGY enclosure.

The assembled EMS Bus Gateway board looks like this:

image

EMS Bus Background

Many Buderus devices, such as the Buderus Logamax plus GB132 T boiler, use a bus system called EMS (Energy Management System) to communicate with other devices, such as the RC30 room controller. The EMS bus is a simple two-wire serial bus that uses voltage/current modulation to transmit data. With the proper hardware and software, you can transmit many parameters of your boiler into your home automation system.

For instance, you could use Home Assistant to monitor the temperatures of your boiler. Here is a screenshot showing the relevant boiler temperatures during a 10 minutes heating interval:

image

Build the EMS-ESP32 firmware

To build the EMS-ESP32 firmware, we use the PlatformIO toolchain. Please refer to the PlatformIO documentation on how to install and use PlatformIO. According to the original author of the EMS-ESP32 firmware, your should build the firmware on Linux.

Instead of building the firmware locally, you may download pre-built binaries from my EMS-ESP32 Releases.

To setup the PlatformIO toolchain, run the following commands in a Linux bash:

bash
sudo apt install python3
python3 -m venv ~/.venv/ems-esp32
source ~/.venv/ems-esp32/bin/activate
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
python -m pip install --upgrade pip
pip install platformio
pip install esptool
nvm install 18
nvm use 18
npm install --global yarn
git clone https://github.com/mariusgreuel/ems-esp32.git -b xiao-3.6.5 ~/repos/ems-esp32

To build the EMS-ESP32 firmware for a XIAO ESP32C3, run the following command:

bash
source ~/.venv/ems-esp32/bin/activate
nvm use 18
cd ~/repos/ems-esp32
git clean -xdf
platformio run -e seeed_xiao_esp32c3

After the build is completed, you will find the binaries in the .pio\build\seeed_xiao_esp32c3 or .pio\build\seeed_xiao_esp32s3 folder.

Flash the EMS-ESP32 firmware

To flash the EMS-ESP32 firmware on the XIAO ESP32, we use the esptool.py from Espressif. Please refer to the Espressif documentation on how to install and use esptool.py.

To flash the EMS-ESP32 firmware on a XIAO ESP32C3, run the following command:

bash
esptool.py --chip esp32c3 --port /dev/ttyUSB0 --baud 460800 --before=default_reset --after=hard_reset write_flash 0x0 bootloader.bin 0x8000 partitions.bin 0x10000 firmware.bin

Configure the EMS-ESP32 software

Note: The documentation below is a quick-start guide to setup the EMS gateway. For detailed instructions, refer to the original documentation at https://emsesp.github.io/docs/.

After you have flashed the XIAO ESP32, your need to configure the EMS-ESP32 software to connect it to your local WiFi network. Essentially, the EMS-ESP32 software creates a local WiFi access point that you can connect to. Then, you can open the dashboard of the EMS-ESP32 software using a web browser via a pre-defined username and password and connect the XIAO ESP32 to your local WiFi network:

  • Connect the WSP to a USB-C power supply.
  • Connect to the new WiFi access point ems-esp using the WPA password ems-esp-neo.
  • Open the URL http://ems-esp.local/ in a web browser.
  • Enter the username admin and the password admin.

I recommend making the following configuration changes:

  • Under Settings, set Board profile to Seeed Studio XIAO ESP32C3.
  • Under Network/Network Settings, enter the SSID and password of your local WiFi network.
  • Under Access Point/Access Point Settings, set Enable Access Point to Never. Before you disable the access point ensure that your EMS Bus gateway has successfully connected to your local WiFi network.
  • Under NTP/NTP Settings, check Enable NTP.
  • Under MQTT/MQTT Settings, enable MQTT, enter the IP address of your MQTT broker, and enter your MQTT broker credentials. If you run Home Assistant, check Enable MQTT Discovery, and set Discovery Type to Home Assistant.
  • Under Security, create a new admin user and remove the pre-defined accounts.

As the EMS Bus Gateway is capable of manipulating the settings of your boiler and issuing arbitrary commands, I recommend putting the EMS gateway into read-only mode.

WARNING: If you choose to not enable read-only mode, be advised that it is possible to issue powerful commands such starting up the heater of your boiler, which may potentially damage your boiler.

  • Under Settings, check Enable read-only mode.

Connect the EMS Bus Gateway to your boiler

To connect the EMS Bus Gateway to your boiler, first connect a USB power supply to the USB-C port of the XIAO ESP32. The XIAO ESP32 requires a power supply of 5V. Refer to the XIAO ESP32C3 documentation for details.

To connect the gateway to the boiler, you can use a 3.5mm TRS audio cable to connect the connector of the EMS Bus Gateway to the service port of your boiler.

The pinout of the TRS service port connector and the EMS Bus Gateway connector is as follows:

image

Here is a picture of a Buderus Logamax plus GB132T Boiler with a RC30 controller.

image

Instead of using the service port connector, you can connect a cable directly to the EMS front panel connector of your boiler. In this picture, the left orange/brown connector named RC (room controller) may be used. Refer to your boilers service manual for details. The polarity of this connector does not matter.

image

Other documents in this repository

References

License

The EMS Bus Gateway schematic, PCB layout, and documentation is released under the GNU GPLv3.

Copyright 2023 Marius Greuel.

Parts

48
QtyValueFootprintReferences
410kResistor_SMD:R_0805_2012MetricR4, R7, R12, R15
4910Resistor_SMD:R_0805_2012MetricR9, R10, R11, R13
2100nCapacitor_SMD:C_0805_2012MetricC7, C8
210uCapacitor_Tantalum_SMD:CP_EIA-6032-28_Kemet-CC2, C9
21nCapacitor_SMD:C_0805_2012MetricC4, C5
24.7uInductor_SMD:L_1210_3225MetricL1, L2
247kResistor_SMD:R_0805_2012MetricR1, R5
2BAT54SPackage_TO_SOT_SMD:SOT-23D2, D3
2MountingHoleMountingHole:MountingHole_2.5mmH1, H2
11.5nCapacitor_SMD:C_0805_2012MetricC6
1100Resistor_SMD:R_0805_2012MetricR14
1100kResistor_SMD:R_0805_2012MetricR8
110nCapacitor_SMD:C_0805_2012MetricC1
1150Resistor_SMD:R_0805_2012MetricR16
11N4148Diode_SMD:D_SOD-123D1
11kResistor_SMD:R_0805_2012MetricR3
128kResistor_SMD:R_0805_2012MetricR2
14K7Resistor_SMD:R_0805_2012MetricR6
168pCapacitor_SMD:C_0805_2012MetricC3
1AudioJack3Connector_Audio:Jack_3.5mm_Lumberg_1503_07_HorizontalJ1
1BAT46Diode_SMD:D_SOD-123D4
1BC847Package_TO_SOT_SMD:SOT-23T1
1Barrel_Jack_SwitchProject:Lumberg-NEB-21-RJ2
1Conn_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ4
1Conn_01x08Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ3
1EMSTestPoint:TestPoint_Pad_D1.0mmTP4
1EMS1TestPoint:TestPoint_Pad_D1.0mmTP2
1EMS2TestPoint:TestPoint_Pad_D1.0mmTP3
1GNDTestPoint:TestPoint_Pad_D1.0mmTP1
1LEDLED_SMD:LED_0805_2012MetricD5
1LM393Package_SO:SO-8_3.9x4.9mm_P1.27mmU1
1RxTestPoint:TestPoint_Pad_D1.0mmTP7
1TxTestPoint:TestPoint_Pad_D1.0mmTP6
1UrefTestPoint:TestPoint_Pad_D1.0mmTP5
1XIAO-ESP32C3Project:Seeed Studio XIAOU2

Similar boards

  • 2 layers83.8 × 94.6 mmAtInverter v2, the printed circuit board in 3D

    AtInverter v2

    bcarrillo1051/Atinverter

    116 partsMIT
  • 2 layers108 × 47 mmEsp32board, the printed circuit board in 3D

    Esp32board

    ieb/N2KEngineEsp32

    N2K Engine Interface with BLE built around an ESP32 and ADS1115 ADCs

    88 parts
  • 4 layers27.5 × 83.3 mmFlight Computer, the printed circuit board in 3D

    Flight Computer

    University-at-Buffalo-SEDS/Flight-Computer-PCB

    92 parts2
  • 2 layers130 × 80 mmSmu main 1, the printed circuit board in 3D

    Smu main 1

    jaromir-sukuba/J-SMU

    DIY source-measure unit

    210 parts244
  • 2 layers68.6 × 53.3 mmJVS IO, the printed circuit board in 3D

    JVS IO

    NaokiS28/jvs

    JVS Library for Arduino

    52 parts3
  • 2 layers199.4 × 97.8 mmBrew HW stm8s207, the printed circuit board in 3D

    Brew HW stm8s207

    Emile666/Brew_Hardware_STM8S207

    Brewing hardware with STM8S207, Kicad project

    188 parts
  • 4 layers150 × 99.5 mmRnvm bart, the printed circuit board in 3D

    Rnvm bart

    kitspace-test-repos/kicad6-file-collection

    883 partsMIT

Questions

How big is the EMS Bus Gateway PCB?

It measures 74 × 34 mm and has 2 copper layers, 1.6 mm thick.

What parts does the EMS Bus Gateway use?

48 parts, built around the LM393, BAT54S, BAT46 and BC847. 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 EMS Bus Gateway KiCad files?

From the mariusgreuel/EMS-Bus-Gateway repository on GitHub, at the commit this page was made from: the board is pcb/ems-bus-gateway.kicad_pcb and its schematic pcb/ems-bus-gateway.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the EMS Bus Gateway design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).