************************* How to connect the boards ************************* .. tip:: Although you can connect the interface board to almost any microcontroller, my advice is to just don't bother with any other platform than an ESP32 (or ESP32-S3) because without EMS-ESP you need to do all the low level decoding yourself. EMS-ESP has thousands of hours of work in it. You'll never get anywhere near this. Better invest your time in learning about the EMS-ESP API if you need a custom implementation. You can use EMS-ESP on an ESP32 as a bridge between the EMS bus and your application. Also don't bother with an ESP8266. The 'old' EMS-ESP V2 is not supported anymore. The mimimum recommended specs of a module for EMS-ESP is an ESP32 or ESP32-S3 with 8MB FLASH and 2MB of PSRAM. More is always better. Connecting to the controller ============================ The controller needs to power the interface board. Connect GND as well. Do not supply the interface board with more than 5V. You can connect this board to any 5V or 3.3V compatible UART. This might be on an Arduino, ESP8266 or f.i. a Raspberry Pi. Connect the header J2 to the controller. Connect RX to the GPIO pin of the RX UART serial port and TX to the GPIO pin of the TX UART serial port of your controller (So do not connect RX to TX). .. tip:: Most ESP32 development boards have pins marked RX and TX (or RX0, RDX and TX0, TXD). These pins are connected to the USB chip and cannot be used for the EMS interface board. In EMS-ESP, by default Rx is mapped to GPIO 23 and Tx is mapped to GPIO 5. I get daily emails from customers who can't get their board to work because they used the TX0 and TX0 pins. .. image:: ../images/hardware/esp32-do-not-use-rxd-txd.jpg :width: 400 :alt: DO NOT USE THESE PINS! Liligo T7-S3 ------------ This module is the best option for using together with EMS-ESP. Power the EMS board with 3.3V from the T7. Do not use the 5V pin as this will damage the I/O pins of the T7. .. image:: ../images/hardware/EMS-interface-board-3-1-connection-schematic-for-T7-S3.jpg :width: 600 :alt: EMS interface board connection to T7-S3 .. list-table:: :header-rows: 1 * - Pin on EMS board - Pin on T7-S3 * - VCC - 3V3 (NOT 5V!) * - TX - GPIO 5 * - RX - GPIO 8 * - GND - G or GND If you want to load EMS-ESP32 onto the module see the instructions on the `EMS-ESP Wiki`_. Choose the S3 bin file and when configuring select the Liligo S3 board profile. MH-ET Live D1 ESP32 ------------------- .. tip:: If you start fresh with EMS-ESP it is advised to get a development board with the ESP32-S3 with PSRAM like the LilyGO T7-S3 instead of one of the 'cheap' ESP32 modules. The pinout of the T7-S3 is the same as the below MH-ET module. .. image:: ../images/hardware/ems-int-v3-on-mh-et-esp32.jpg :width: 600 :alt: EMS interface board connection to ESP32 D1 Mini .. list-table:: :header-rows: 1 * - Pin on EMS board - Pin on D1 * - VCC - 3V3 (NOT 5V!) * - TX - GPIO 5 * - RX - GPIO 23 * - GND - G or GND .. tip:: Some ESP32 development boards have pins marked RX and TX. These pins are connected to the USB chip and cannot be used for the EMS interface board. In EMS-ESP, by default Rx is mapped to GPIO 23 and Tx is mapped to GPIO 5. If you want to load EMS-ESP32 onto the ESP32 see the instructions on the `EMS-ESP Wiki`_. WT32-ETH01 ---------- It is possible to connect the WT32-ETH01 board to the interface board. You need an external programmer to load EMS-ESP on it. You also need to power this module with 5V on the 5V pin. The module will then generate 3,3V for the interface board. .. list-table:: :header-rows: 1 * - Pin on EMS board - Pin on WT32-ETH01 * - VCC - 3V3 (NOT 5V!) * - TX - GPIO 17 * - RX - GPIO 5 * - GND - G or GND In the EMS-ESP settings set the board profile to E32 and then the functions are as follows: .. list-table:: :header-rows: 1 * - LED - Dallas - RX - TX - Button * - 2 - 4 - 5 - 17 - 33 If you need Ethernet it is recommended to get an Olimex ESP32-WROVER like board instead of the WT32-ETH01. The WT32-ETH01 will not work reliably anymore with firmware 3.6.x because it's memory is too small. Arduino ------- On the Arduino Mega 2560 in combination with the Github sketch connect RX to RX1 (pin 19) and TX to TX1 (pin 18). Connect VC to 5V and GD to GND. If you use an Arduino UNO you have no choice other than RX on pin 0 and TX on pin 1. In case you use the UNO do not connect the EMS board to the Arduino while you are programming the Arduino, because the same serial pins are used for programming the Arduino. .. image:: ../images/hardware/ems-on-arduino-mega-pinout.jpg :width: 450 :alt: EMS interface board connection to Arduino Mega .. image:: ../images/hardware/ems-on-mega-2.jpg :width: 450 :alt: EMS interface board connection to Arduino Mega Raspberry Pi ------------ On the Raspberry Pi connect RX to GPIO 15 (pin 10) and TX to GPIO 14 (pin 8). Connect VC to 3V3 on pin 1 of the raspberry Pi header. Warning: If you are using the Raspberry Pi header on the V1.0 board do not connect any 5V to the UART header! .. image:: ../images/hardware/pi-header-ems-interface-board.jpg :width: 450 :alt: EMS interface board connection to Raspberry Pi .. image:: ../images/hardware/ems-on-raspberry-pi.jpg :width: 450 :alt: EMS interface board connection to Raspberry Pi Wemos D1 Mini (ESP8266) ----------------------- .. tip:: Don't bother with an ESP8266. The 'old' EMS-ESP V2 is not supported anymore. Use an ESP32 instead! .. image:: ../images/hardware/ems-interface-board-to-wemos.jpg :width: 600 :alt: EMS interface board connection to Wemos D1 Mini .. list-table:: :header-rows: 1 * - Pin on EMS board - Pin on Wemos * - VC - 3V3 (NOT 5V!) * - TX - D8 * - RX - D7 * - GD - G or GND Power the EMS board with 3.3V from the Wemos. Do not use the 5V pin as this will damage the I/O pins of the Wemos. The normal TX and RX pins on the Wemos are marked TX and RX, however for EMS-ESP this is set do D7 and D8. This is because the Wemos at boot sends debug information on TX and this disrupts the EMS bus. .. note:: You can not run EMS-ESP32 on the ESP8266. Drawing power from the service jack =================================== The interface board also puts out the 8-12V pin of the EMS service jack via a header. This can be used to power small electronics via a decent buck type voltage regulator. (There will only be power on this pin if you use the service jack, the screw terminal does not have the third pin). If you do draw power from the EMS service jack make sure the 3.5mm jack cable you use can handle the current as most of these cables are meant for audio and therefore have very thin wires inside. Get an EMS service cable from the webshop for best results. The best method to power external circuits from these pins is to use a buck converter. LDO's will overheat pretty quickly due to the voltage difference. Also take care you do not short circuit the board in any way or feed this board with incorrect voltages as this may damage the board or the EMS bus. Also make sure the wires you connect the board to are in fact EMS bus wires and NOT 24V or mains power lines!!!!!!!!! .. image:: ../images/hardware/EMS-interface-board-3-1-power-from-service-jack.jpg :width: 100% :alt: EMS interface board powered via jack .. warning:: You cannot power an ESP32 development board directly from the jack. You will destroy the ESP32! You need to add a decent voltage regulator in between. Drawing power from the EMS bus =================================== The interface boards are not designed to draw power from the EMS bus itself. So you cannot power your microcontroller via the bus. Because of the way TX data transmissions work on the EMS bus, the circuit must be finetuned to a specific current draw of the electronics on the bus, otherwise it will not work. As the interface boards can be used with any microcontroller, they are designed so they can be safely used by all microcontrollers and are thus not tuned to a specific current. Connecting to the EMS bus ========================= You can use EITHER the EMS bus service jack OR the screw terminal. Do not connect them at the same time, because you might short circuit the bus. If you use the screw terminal, polarity usually does not matter because the circuit bord corrects both orientations. In some cases polarity does matter. If the bus cannot be found, or the thermostat display gets empty or the boiler will give bus errors please switch the two EMS wires on the green screw terminal. .. warning:: Do not use cheap audio cables for connecting a Gateway to the service jack of the Gateway. Most of them have very thin wires inside, this may cause lots of interference and it is a possible fire risk. The EMS service cables from the webshop are special high quality cables with thicker wires inside. See some hints and tips for the EMS bus wiring :ref:`here `. .. image:: ../images/hardware/ems-interface-board-ems-connector-options.jpg :width: 450 :alt: EMS interface board connection to EMS bus .. image:: ../images/hardware/ems-int-v3-on-boiler.jpg :width: 450 :alt: EMS interface board connection to EMS bus .. _`EMS-ESP Wiki`: https://emsesp.github.io/docs/Getting-Started/