Upgrade an ESP8266 Gateway with an ESP32

Ever since the release of EMS-ESP V2 the firmware supports the ESP32 chip. New Gateways based on the ESP32 are available now in the webshop. It’s possible to update your ESP8266 Gateway to make use of the advantages of the more powerful ESP32.

There is one drop-in replacement available for the Wemos D1 Mini: the MH-ET Live ESP32 D1 Mini.

EMS Gateways with ESP8266 and ESP32

Compatible Gateways: All ESP8266 Gateway models: First edition, Regular, Standard, Premium, Premium II.

This upgrade also comes with it’s downsides:

  • It’s no longer possible to power the Gateway from the bus itself. You need to use the jack or an external USB adapter.

  • The ESP32 replacement is bigger than the Wemos D1 Mini, so the side piece won’t fit anymore.

  • You have to modify the enclosure otherwise the top cover won’t fit anymore.

  • The LED is on a different position so it does not align anymore with the hole in the lid (but you can still see it though).

Steps to upgrade to the drop-in replacement

Get the right board

Get an MH-ET Live ESP32 D1 Mini or one of the clones. You can buy one yourself online or get a soldered and programmed one from my webshop.

Solder on the headers

Solder on the 8-pin male headers on only the inner position like below.

MH-ET board headers 1 MH-ET board headers 2

Load the EMS-ESP firmware

Now you need to upload the correct EMS-ESP firmware to the chip. Use a ESP32 firmware version. You can use the NodeMCU method or build the firmware via Platform IO. See HERE.

When you load the ESP32 firmware it’s preconfigured for the MH-ET version.

Modify the enclosure

The ESP32 board is to wide for the lid of the enclosure of the Gateway. You need to cut off a part or the whole of the screw bushings on the side of the JST/USB connector. Also trim off the edge of the enclosure. See below.

The lid only fits in one orientation on the bottom so make sure you are cutting the right side!

Enclosure lid trim

You also have to leave out the plastic side because the board will stick out.

If you did it properly the lid will fit again and it looks like below.

MH-ET board in Gateway

Putting it all together

  • If you can use the service jack you can continue to reconnecting to the bus. You do not need to use a USB adapter.

  • Otherwise remove the jumper from the Gateway board. By removing the jumper you are disabling the green voltage converter. If you have a board without a jumper, you need to remove the green voltage converter.

  • Connect a USB cable and adapter to the ESP board.

  • Reconnect the bus.

  • Log in to the web interface of the Gateway and reconfigure it to your situation.

Pinout MH-ET Live D1 board

Although EMS-ESP for the is preconfigured for the MH-ET board, these are the correct GPIO settings in case you might need it:

Function

Wemos D1 Mini

MH-ET D1

LED

GPIO02

GPIO02

RX

GPIO13 (D7)

GPIO23

TX

GPIO15 (D8)

GPIO05

Dallas (DS18B20)

GPIO14 (D5)

GPIO18

Reset

NA

NA

Other replacements

In general you can use all ESP32 development boards. But none will fit inside the Gateway enclosure. But almost all will work with the Gateway circuit board! Remove the Wemos and use Dupont wires to connect your ESP32 board of choice to the pins on the header of the Wemos on the Gateway board.

You cannot use bus power anymore. Use either the jack if it’s available or use an USB adapter to power your ESP32 board. If you can use jack power then you can still use the green voltage regulator to power your ESP32 board. Do not draw more than 200mA of current!

If you cannot use the jack remove the jumper from the Gateway board. If you have a board without a jumper, you need to remove the green voltage converter.

Position your Gateway like below:

gateway Premium II internals

The pins are numbered from left to right.

Pin number

Top Wemos header

Bottom Wemos header

1

Not in use

Reset (via the on-board switch)

2

Not in use

A0 (Not in use)

3

Not in use

D0 (Not in use)

4

Not in use

D5 -> Dallas sensor input

5

Not in use

D6 (Not in use)

6

Not in use

D7 -> EMS RX IN

7

Ground

D8 -> EMS TX OUT

8

5V INPUT to ESP32 from Gateway board

3,3V OUTPUT from ESP32 to Gateway board