Getting data from inverters via an RS485 connection

Looks like the manual is translation from Chinese so I am not 100% sure it is translated correctly, lost in translation and all that.
Hopefully I get a bit of time to test things out today :slight_smile:

Some progress.
I am able to read the modbus registers directly from Home Assistant using the usb rs485 cable but I have come across a new issue.
I have connected my rs485 adapter cable to the A/B/GND pins of the wifi logger so they are both connected to the inverter at the same time which should be fine in theory but I think they are tripping over each other.
Sometimes as I can see the logger log some crazy values like this:


And I am pretty sure I’m not using as much power as a small city :smiley:
Is the connection A → A, B → B correct (Logger → rs485 adapter)? Or to connect the slaves in series you need something like A → B, B → A?

Yes, that’s correct.

Connect them daisy chain vice star. Avoid the use of stubs (2nd drawing below) if possible.

i.e. like this:
(only the transmit conductor is shown to keep the drawings uncluttered)

image

not like this:
image

nor this:
image

Not sure I understand 100% but I think I might have the 3rd diagram in my scenario.
This is how I did it, I soldered the usb rs485 adapter cables to A/B/GND on these pins below (on the logger that’s currently installed, this is a spare)


Is it right or wrong?

Where do you have the RS485-USB adapter connected?

Yes, the right side is the port that plugs into the inverter so I have piggy backed off of it I guess

To these pins:

That should be OK.
Do you know if the datalogger has a built-in terminator resistor?

No idea, no mention in the super basic guide that came with it.
There is a good chance the software doesn’t know to wait/delay messages and both the logger and the rs485 adapter try to get data at the same time and I assume that’s happening with the bogus data.
But the rs485 adapter reads the data just fine, only the logger is tripping.

Check this out: RS-485 Wiring with Circular Connector : Ginlong Solis
Is it similar to what you said about the resistor?
image
I know this is connecting 3 inverters together using one rs485 cable but maybe same needed for me?
(Not sure that the IN and OUT mean as there is only one COM port on the inverter)
Also does the wire size matter, I used a standard 6 core alarm cable that I had laying around?

I’m not familiar with HA, but if HA has a way to insert a delay between requests, you could try
that.

Modbus requires each of the two devices to have a unique address. Modbus is a polled system.
i.e. the slave doesn’t respond unless it’s polled by the master.

Yes tried delays of 15s to 60s, did not make a difference from Home Assistant but that doesn’t mean the wifi logger is doing a delay when it expects to be the only slave.
I have also tried different slave IDs in Home Assistant because they can be set there.
Here: https://electrical-engineering-portal.com/correct-cabling-modbus-rs485#connection-port it says to use shielded twisted pairs, use a 3 pairs from the cat5/6 cable for the 3 wires?
It also says 120ohm resistor not needed if the run is less than 50m, my rs485 cable is 150cm.

The article does mention a terminator, but they’re simply mentioning the need for one.

Some devices have the terminator built into them. In that case there will be either a physical connection
e.g. a jumper on a pair of pins, or a software command that “connects” the terminator to the bus.
I thought perhaps the datalogger might the the type controlled by a software command.

WRT the ground connection, yes. It should be connected only at one end.

Size, not really.
What’s important here is impedance. The Modbus spec calls for an impedance of 120 Ohms.

So no need for the GND cable to be connected on the rs485 adapter since the GND of the logger itself is connected to the inverter?

A 1 second delay should be more than enough. All that’s needed is enough time for the device to respond.

You lost me there. :wink: Not quite sure what you mean.

Yes, for such a short run a terminator is typically not needed.

What you want to avoid is a ground loop. IOW, everything is grounded, but at only one point.

e.g. you want to avoid this:
image

You want either of the 2 grounds shown, but not both.

I might have this then since isn’t the USB RS485 adapter grounded on the usb side already (connected to the RPI4)? Is there a need to ground it to the logger also?
i.e. Should I only connect the A and B wires from the RS485 adapter to the wifi logger?

I was saying I have no idea what the official Solis wifi logger is doing since I have no visibility on its workings.

Yes. As I mentioned a bit earlier…

Could that cause the bogus data? I can try it real quick and find out I guess

thumbsup

Yes. Electrical “noise” can cause lots of oddball stuff to happen. Bogus data is just one of them.