diff --git a/README.md b/README.md index f20e5dc..48baa06 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,8 @@ Refer to [Sw_getting_started.md](docs/Sw_getting_started.md) Some details about some specific implementations: - ESP8266 + MAX485 + EPEVER Solar Tracer [HOW TO](docs/Esp8266_max485_epever_rj45.md) +- ESP32 D1 MINI + MAX485 + EPEVER Solar Tracer [HOW TO](docs/Esp32_d1_mini_max485_epever_rj45.md) + ## Reference diff --git a/docs/Esp32_d1_mini_max485_epever_rj45.md b/docs/Esp32_d1_mini_max485_epever_rj45.md new file mode 100644 index 0000000..3824e8d --- /dev/null +++ b/docs/Esp32_d1_mini_max485_epever_rj45.md @@ -0,0 +1,52 @@ +# Connect ESP32 D1 MINI to EPEVER A/B Series ( + MAX485) + +Here the material involved: +* [ESP32 D1 MINI](https://www.aliexpress.com/premium/esp32-d1-mini.html?d=y&origin=y&catId=0&initiative_id=SB_20210919083440&SearchText=esp32%20d1%20mini) +* [EPSolar/EPEver Tracer A/B-Series](https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20170114172728&SearchText=tracer+mppt+rs485) +* [MAX 485 UART Module](https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20210919083609&isPremium=y&SearchText=max485+module) +* An old ethernet cable with RJ45 connector you are happy to cut open + + +## ESP32 D1 MINI <-> MAX485 module + +![This one worked for me](../images/max485_module.jpg) + +It's powered from `+5V` from ESP32 module, and wired as following: + + +- `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](../images/esp32_d1_mini_pins.png) + +## MAX485 module <-> EPEVER CONTROLLER (RJ45) + +Cut open your ethernet cable and split out pin 3, 5, 7 (B, A, GND). Refer to [Tracer Modbus PDF](../docs/1733_modbus_protocol.pdf) for additional info. + +Connect cables as follows: +- Ethernet green, pin `5` -> `A` +- Ethernet blue, pin `3` -> `B` +- Ethernet brown, pin `7` -> `GND` on module **and** EPS32 `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](../images/epever_rj45_specs.png) + +## BASE SW CONFIGURATION + +Edits required on *src/config.h*: +- `#define BOARD_ST_SERIAL_PIN_MAPPING_RX 16` +- `#define BOARD_ST_SERIAL_PIN_MAPPING_TX 17` +- Uncomment `#define USE_SERIAL_MAX485` +- `#define MAX485_DE 13` +- `#define MAX485_RE_NEG 13` + +Edit on *platformio.ini* (Platformio only): +- `platformio.default_envs = wemos_d1_mini32` (usb/serial fw flash) or `platformio.default_envs = wemos_d1_mini32_ota` (ota fw flash) + +You may need to make more changes according to your needs (ntp syn/led status/ data to monitor ...). + + diff --git a/images/esp32_d1_mini_pins.png b/images/esp32_d1_mini_pins.png new file mode 100644 index 0000000..f73e06d Binary files /dev/null and b/images/esp32_d1_mini_pins.png differ