Skip to content

wiring the circuit

tobiasfaust edited this page Dec 22, 2022 · 12 revisions

To connect the inverter to the ESP32, you have to use a breakout board to adapt the RS485 interface of the inverter to serial interface of the ESP.

Please note: Basis for this article came from Tasmota wiki, thanks to those authors.

Breakout boards

There are many RS485-to-TTL modules, aka breakout boards, available. They may work or not. You should have attention on the operation voltage. The ESP-devices work with 3 volts. Because of that be careful experimenting with 5 volts. In the best case nothing works. In the worst case it will destroy your ESP or breakout board. Here are two examples of tested breakout boards. Recommended is a board with a SP3485 chip, because it is designed for operating at 3 volts.

Board HW-0519

The HW-0519 breakout board does not need a separate RTS-pin, because it automatically switches between sending and receiving. The recommended voltage is 5 volts, but it should also work with 3 volts.

Board SP3485

The SP3485 breakout board is specially made to work with only 3 volts. It has a separate RTS-pin and works with a voltage from 3 to 5 volts.
A RTS Pin will support in future release, please use the Board HW-0519

ESP ⬌ breakout board

The schematic is very simple. Just connect the ESP32 with RS-485 TTL Adapter by RX/TX 2. Its important that you are using HardwareSerial 2 GPIO´s.

ESP32   RS485
------------
RX2  ->  RX
TX2  ->  TX
GND  ->  GND
3V3  ->  VCC
RTS  ->  RTS (optional)

Most of ESP32 have a crosswiring of RX/TX already implemented, so you only need to connect RX with RX and TX with TX. If it doesn´t work properly, try to exchange both.

Breakout board ⬌ Inverter

The RS485 interface is a 2-wire-connection. The wires are called A+ and B-. The big advantage of the interface is, beside of needing only two wires, that it can reach a length up to 1200 meters. The inverter has a RJ45-jack (at Solax X1 it´s called "COM"), where the interface is accessible. Its sufficient to connect the Solax Inverter by 2 wires at COM (-> Solax X1) Connector. You can use a standard NetworkCable and cut it at one end.

RS485    Inverter
-----------------
  A   ->  Pin 4
  B   ->  Pin 5
  G   ->  Pin 6 (Ground is optional)

In many cases two wires are enough to keep it working without errors. When your environment has electrical interferences or your cable is quiet long, you should use a third wire to establish a common signal reference. This wire has to be connected to the Ground pins.

See into the manual if you are using another Inverter.

Clone this wiki locally