Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 2.82 KB

Esp32_max485_epever_rj45.md

File metadata and controls

66 lines (46 loc) · 2.82 KB

Connect ESP32 to EPEVER A/B Series ( + MAX485)

Here the material involved:

ESP32 <-> MAX485 module

This one worked for me

It's powered from +5V from ESP32 module, and wired as following:

ESP32 D1 MINI

  • DI -> IO17 / GPIO17 / TX2
  • RO -> IO16 / GPIO16 / RX2
  • DE and RE are interconnected with a jumper and then connected to pin TCK / GPIO13
  • VCC to +3.3V / 3V3 on ESP32

ESP32 D1 MINI

ESP32 WRROOM 38 PIN

  • DI -> 28 / GPIO17 / TX2
  • RO -> 27 / GPIO16 / RX2
  • DE and RE are interconnected with a jumper and then connected to pin 15 / GPIO13
  • VCC to +3.3V / 3.3v on ESP32

ESP32 WRROOM 38 PIN

MAX485 module <-> EPEVER CONTROLLER (RJ45)

Cut open your ethernet cable and split out pin 4, 6, 8 (B, A, GND). Refer to Tracer Modbus PDF for additional info.

Connect wires as follows (make sure your cable matches the color schema below - otherwise refer to pin numbers only):

  • Ethernet green / pin 6 -> A
  • Ethernet blue / pin 4 -> B
  • Ethernet brown / pin 8 -> GND on module and ESP8266 GND pin - -> to prevent ground loops - important!
  • DON' T use pin 1 or 2 to feed the ESP8266 (they supply 7,5/5V - 50mA maximum)

EPEVER RJ485 SPEC ETH_T586B

BASE SW CONFIGURATION

Edits required on src/config.h:

  • #define BOARD_ST_SERIAL_STREAM Serial2 [default]
  • Uncomment #define USE_SERIAL_MAX485
  • #define MAX485_DE 13
  • #define MAX485_RE_NEG 13

Edit on platformio.ini (Platformio only):

  • ESP32 MINI D1 - only
    • platformio.default_envs = wemos_d1_mini32 (usb/serial fw flash) or platformio.default_envs = wemos_d1_mini32_ota (ota fw flash)
  • ESP32 DEV MODULE - only
    • platformio.default_envs = esp32dev (usb/serial fw flash) or platformio.default_envs = esp32dev_ota (ota fw flash)

You may need to make more changes according to your needs (ntp syn/led status/ data to monitor ...).