-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ...). | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.