Limiter inverter with RS485 load setting

Announcement - Help us fight the BOTS! Please report all spam including stuff in your inbox!
Joined
Mar 7, 2018
Messages
1,051
I already have a growatt solar inverter so i am looking for a "battery inverter" which i can control via RS485.
This is the first one i see..
Does anyone know other battery inverters (so only battery connected to it) where the output can be regulated?

The number of units that allow external "user" control of the output are very limited because most country grid codes actually stipulate a requirement for this not to be possible. There are real particular reasons for this but mostly protectionism at this stage because the number of units on the system is very very small.

The GTIL units should be possible to control if the firmware is opened up with the right messaging (waiting for someone to discover the messaging).

SolarRiver inverters are controlable on the output but the response rate is not really much use for load matching and then your reducing solar output, unless your feeding them with 400V DC from an inverter board through a regulating capcitor.

Otherwise I have done many hours research and browsing trying to find the unicorn of a high output capacity, low losses, reversable, user controlable inverter. The closest I got to was to look at disconnecting the grid altogether and mixing a few inverters... and is the plan for 2022.
 
  • Like
Reactions: apr
Joined
Mar 7, 2018
Messages
1,051
@completelycharged In your opinion, it can work for a rs485 wifi adapter on the controller side and rs485 wifi on the inverter side?
Yes, should work ok.
Latency on a wifi link will be fine, reliability may pose an issue if the signal drops out a lot.

One thing to point out is that the target output persists until a new target is given, so if you send 800W and then the link drops the inverter will happily carry on with 800W until the battery low voltage limit is reached.... This makes for a plan to add in a secondary system to allow for disconnection OR have multiple send capability on the RS485 bus.
 

Stefanseiner

Member
Joined
Apr 16, 2020
Messages
128
Today I connected the powermeter/limiter to an RS485 -> USB to serial converter on Windows and made quick and 'dirty' C# app. It reads the data and shows the watt in the console. I just want to share this code in case someone can use it to get startet or something like that. This powermeter/limiter could be used without the Inverter as a 'Kill A Watt' ... Does anyone know if it's possible to set it as Unit 2 or 3 without the Inverter, I would like to see if the modbus data changes.
This sounds very good :)
Maybe it is the right direction to a 3-phase meassurement for the little SoyoSource
 

alpha60

New member
Joined
Mar 9, 2021
Messages
18
Hello, would it be possible to send the power that we want manually to the inverter without going through the compeur, for example I ask him for 300w then at another time I ask him for 500w.
 

grundholm

New member
Joined
Oct 3, 2020
Messages
28
If you connect a battery, then in the menu - you set it to battery mode and then battery start Volt, battery off Volt and the amount of Watt you want to take from your battery and add to the grid. I am currently playing around with an Arduino / ESP8266 - then it will be possible to add some logic.

@Stefanseiner
I now made a little program for an Arduino, it reads the Watt from one meter (and sends the Watt value to Influxdb)
- I think it's possible to add 2 more meters and then add all 3 values and then send the value to the GTIN. I hope the Arduino is fast enough. At the moment i'm waiting for one more meter from China....
 

Stefanseiner

Member
Joined
Apr 16, 2020
Messages
128
did you order the whole meter?

I asked several sellers on Ali for a single clamp sensor and one seller did an article specially for me with single clamp sensors
Snipping_007.jpeg



Another way could be to use the clamp sensors from the SUN GTIL and this board
Snipping_010.jpeg


Maybe with 4 sensors and some logic it could be possible to
a) add the current from three phases
b) subtract the current which comes from the inverter because both, the SUN and the SoyoSource can not detect the direction of current and sometimes it is impossible to find a place where you can install the clamps without interfere the inverter
 

grundholm

New member
Joined
Oct 3, 2020
Messages
28
The board is basically 4x this project: https://learn.openenergymonitor.org...onitor-measuring-current-only?redirected=true

It's necessary to add a voltage meter from each fase to calculate the Watt.

The SOYO expect a (RS485) / serial byte array with the watt value. It's easy to send this from an Arduino.

I ordered the 2nd energy meter, because it's easy to read the serial commands with an Arduino and then send a modified byte array to the SOYO. I know that these meters are not very accurate and doesn't detect current direction. A better solution would be to use the Eastron SDM630 with Modbus - they can detect current both ways.
 

Cell-King

Member
Joined
Sep 23, 2019
Messages
54

Hi Grundholm, This is what I have implemented. I use an Emonpi to report clamp watts and I pull a MQTT feed from it to a raspberry pi which makes a decision on how many watts the Soyo's need to send and i put that on the RS485 wire. I'll share my code if you want, I've other features which allow for off peak time of day and also restricted output depending on the reported battery voltage to prevent voltage sag near the lower end.
 

Cell-King

Member
Joined
Sep 23, 2019
Messages
54
Has anyone had problems with the units working intermittently? I have TWO soyos in operation but one of them frequently drops out, the other is very stable, despite them sharing the same message bus wire! Here's a photo, the dark blue is the house usage, the lighter blue is the COMBINED output from the two Soyos, you can see at several stages one of the inverters drops out only to come back soon after.
 

Attachments

  • Screenshot 2021-05-30 at 23.17.01.png
    Screenshot 2021-05-30 at 23.17.01.png
    172.7 KB · Views: 27

dusicka82

New member
Joined
Jun 11, 2021
Messages
1
Has anyone had problems with the units working intermittently? I have TWO soyos in operation but one of them frequently drops out, the other is very stable, despite them sharing the same message bus wire! Here's a photo, the dark blue is the house usage, the lighter blue is the COMBINED output from the two Soyos, you can see at several stages one of the inverters drops out only to come back soon after.
Hi Cell-King,
I'm using this inverter with new smaller limitermodule. Not the inverter, but limeter sometimes falls out. There is U000 on LCD and it dissapear after some time. Anybody with same experience? Is this not the same trouble ? Scond question is - are terminations resistors for 485 line needed ?
 

Attachments

  • code_limiter.png
    code_limiter.png
    131 KB · Views: 30
  • fault.png
    fault.png
    23.2 KB · Views: 30

Cell-King

Member
Joined
Sep 23, 2019
Messages
54
Hi Cell-King,
I'm using this inverter with new smaller limitermodule. Not the inverter, but limeter sometimes falls out. There is U000 on LCD and it dissapear after some time. Anybody with same experience? Is this not the same trouble ? Scond question is - are terminations resistors for 485 line needed ?
>Is this not the same trouble ?

Kind of, I think it might happen when the voltage gets low?

>Scond question is - are terminations resistors for 485 line needed ?

It depends on the length of your cable but I think generally no. If it's a long run I believe a 150k ohm resister should be used.
 

Pepe

New member
Joined
Jun 20, 2021
Messages
16
I asked several sellers on Ali for a single clamp sensor and one seller did an article specially for me with single clamp sensors
Buy 3 of those DDS238. The RS485 ones. Comes with split clamp. $20 each.
Buy rs485 usb adapter and see your power consumption with python script on win10 PC
Plot is me connecting the Y&H inverter to the wrong phase -> negative energy :)
 

Attachments

  • IMG_20210611_162047.jpg
    IMG_20210611_162047.jpg
    2.8 MB · Views: 42
  • 46gkdjncuf471.png
    46gkdjncuf471.png
    81.2 KB · Views: 43

Pepe

New member
Joined
Jun 20, 2021
Messages
16
I bought this soyo and it works. But i am not happy with the limiter thing. That is a dumb limiter, cant measure direction of current and needs new cables installed. But luckily you guys did decipher the rs485 code. Did test it with python and $1 rs485-usb, works.
I have 3phases of DDS238 power meters installed and can read them over rs485 with python too. I want to combine one of the DDS238 instruments with the soyosource. First with win10-PC, then with a $20 orangepi micro.

As usual the protocol does not match and the baudrate do not match. Coding needed. Python.
Main problem is i do not know how much power the inverter is producing. When power goes negative i do not know where to set the limit. Its try and error. Anyone done this already?
 
Last edited:

Cell-King

Member
Joined
Sep 23, 2019
Messages
54
I bought this soyo and it works. But i am not happy with the limiter thing. That is a dumb limiter, cant measure direction of current and needs new cables installed. But luckily you guys did decipher the rs485 code. Did test it with python and $1 rs485-usb, works.
I have 3phases of DDS238 power meters installed and can read them over rs485 with python too. I want to combine one of the DDS238 instruments with the soyosource. First with win10-PC, then with a $20 orangepi micro.

As usual the protocol does not match and the baudrate do not match. Coding needed. Python.
Main problem is i do not know how much power the inverter is producing. When power goes negative i do not know where to set the limit. Its try and error. Anyone done this already?
Heres a simple version of my code. It uses a JSON signal thats published by my Emonpi off the main meter link to drive the net import amount to zero. Some of the bits are redundant. It would also need extra safety features if you are to continue to use it but it's a start:

Python:
# VIRTUAL METER FOR SOYO SOURCE BRAND POWER INVERTERS
# V2.0 - targetting the main feed to zero
#
import bs4
import requests #pip install requests
import time
import datetime
import serial #pip install pyserial
import threading

## CREATE GLOBALS
byte0 = 36
byte1 = 86
byte2 = 0
byte3 = 33
byte4 = 0 ##(2 byte watts as short integer xaxb)
byte5 = 0 ##(2 byte watts as short integer xaxb)
byte6 = 128
byte7 = 8 ## checksum

serialWrite = serial.Serial('/dev/ttyAMA0', 4800, timeout=1) # define serial port on which to output RS485 data
currentOutput = 1
json_use = "http://192.168.86.248/feed/get.json?id=1&field=value&apikey=65631ea6b203f5dfdd36783f13e89e9e"

def jsonSignal(url):
    r = requests.get(url)
    json_data = r.json()
    return json_data

def computeDemand(sourceValue):
    global currentOutput
    equilibrium = currentOutput+use
    if equilibrium >= 2000:
        equilibrium = 2000
    currentOutput = equilibrium
    print"currentOutput =", currentOutput
    return currentOutput
def createPacket(demand):
    byte4 = int(demand/256) ## (2 byte watts as short integer xaxb)
    if byte4 <= 0 or byte4 >= 256:
        byte4 = 0
    byte5 = int(demand)-(byte4 * 256) ## (2 byte watts as short integer xaxb)
    if byte5 <= 0 or byte5 >= 256:
        byte5 = 0
    byte7 = (264 - byte4 - byte5) #checksum calculation
    if byte7 >= 256:
        byte7 = 8
    return byte4, byte5, byte7

def writeToSerial(packet):
        bytes = [byte0,byte1,byte2,byte3,packet[0],packet[1],byte6,packet[2]]
        serialWrite.write(bytearray(bytes))
        #log.info("complete decimal packet: %s", bytes)
        #log.info("raw bytearray packet being sent to serial: %s", bytearray(bytes))
    #except ValueError:
        #log.error("Error writing to serial port, check port settings are correct in /dev/ ")
    #return packet

while True:
    use = int(jsonSignal(json_use))
    print"use =", use
    demand = computeDemand(use)
    outputValue = demand/2
    print"demand =", demand
    simulatedPacket = createPacket(outputValue)
    writeToSerial(simulatedPacket)
    time.sleep(2)
 

Pepe

New member
Joined
Jun 20, 2021
Messages
16
Ty.
I have question about the "computeDemand" part:
"use" ist the total amount of watts you consume, measured in between inverter and load?
"currentOutput" is the estimate of what your inverter produces?

I do measure in a different location, between inverter and grid, not between inverter and load.
Since my meter can measure negative power this is much simpler than to install extra wiring and socket for the inverter.
 
Last edited:

Cell-King

Member
Joined
Sep 23, 2019
Messages
54
"use" in my example is the net import on the total meter. If the house is consuming 200 watts and the inverter is producing 200 watts then use will be 0. If the house is consuming 200 and the inverter is producing 100 then use will be 100. If the house is consuming 200 watts and the inverter is producing 300 watts (not a good situation) then use will be -100. The code always tried to maintain a 0 value for use. In my example I have two inverters thats why my max output is 2000 watts.
 

prepared1

Member
Joined
Jan 17, 2021
Messages
77
I just skimmed quickly through this topic, but are these inverters rated in Watts, or VA? They look very interesting.
 

Pepe

New member
Joined
Jun 20, 2021
Messages
16
Finally seems to work. Ty Cell-King !
Sometimes freaks out, dont know why yet.

Edit:
it freaks out because of unexpected data over serial. Probably the status report. Input flush solves it.
if this runs reliably i will transfer it to a $20 orangepi.
 

Attachments

  • Figure_1.png
    Figure_1.png
    35.2 KB · Views: 35
Last edited:
Joined
Mar 7, 2018
Messages
1,051
In terms of connecting the units via RS485 the approach I have taken is for each unit to have a separate RS485 port (USB Adapter). Yes, I know it defies the purpose of RS485... The reason is basically the older units will throw out a status packet at random (with voltage, amps, etc.) and this can cause issues if your sending updates where the packets collide and your inverters then get a garbled message. Because the status messages also have no unit identification within them you also have no idea which unit reported back. The newer inverters seem to either not send out a packet or the format has changed from the older units as I have one recent unit which does not seem to get any status updates (out of 5 active units I have connected).

The units are rated in Watts (no over stated VA figures). The 1200W units are de-rated to 900W (dont buy the 1000W units...) when you have them connected to a battery with the output either set manually or via RS485. The reason for this I presume is to prolong the life by keeping them cooler if your running them at 900W for long periods of time. The internal fan kicks in between 40-45C and I have in the past added an external fan to push air over the external heat sink to keep them cooler in the summer months and frequently avoids the internal fan from kicking in (temperature is below 40C).

The power sensors the unit comes seem to be "spot" reading types (or have no reactive power measurement capability) and will be inaccurate with loads that are non resistive and switched at different points in the sine wave. Either that or they are a poor averaging methodology. For 3000W I can have variations of about 10% in the reading accuracy (compared to my main incomming electricity meter readings). I am and have been looking for accurate alternatives with RS485 that are properly voltage rated for the UK and not EU 220-230V as these can have lower voltage components that makes the extra >10V difference in the UK burn them out relatively quickly and fail. You can maybe classify the older meters units as a POS.

Make sure the CT's are always kept shorted, as in plugged in. (dont unplug them and leave them hanging as they may burn out). Unclamp them from the cable BEFORE unplugging them. They should not really be on a plug and hard wired into terminals. If in doubt read up a bit on how CT's actually work and what voltage is output when you have them open circuit...

Output accuracy is also an interesting one as there seems to be differences but at the moment I have not identified the specific variations or causes so will refrain from a big guess... Some/all of it may be due to various reactive loads and variations in metere readins and outputs. Connecting 38 computer PSU units with 4500W load (high spiking load) can create very large imbalances....

The units only output a smooth sine wave becasue they dont have fast metering feedback to properly profile the imbalances (sub millisecond) so imbalances are always going to occur with some loads. Unlike if you have those loads attached to an inverter connected to your battery....
 

Pepe

New member
Joined
Jun 20, 2021
Messages
16
The problem i have is i can not guess the soyo's actual power which causes slow limiting down of power and backfeeding to net for several seconds. I want to avoid that.

Seems the soyo status message is not random, but the answer to some bytes on the bus. Means the status message can be requested. Had some beers tonight, will test again tomorrow.
 
Last edited:
Top