Wir wechseln das Forum am 14.11.24 auf die Forensoftware Discourse. Zwischen Montag Abend und Dienstag Nachmittag wird das Forum deaktiviert. Danach sind wir hoffentlich mit neuem Forum inkl. der vorhandenen Beiträge wieder am Start! Hier zum Forenbeitrag!

Benachrichtigungen
Alles löschen

Balkonkraftwerk Überschussrückspeisung Batterie

3 Beiträge
2 Benutzer
0 Reactions
730 Ansichten
(@emmpunkt)
Vorsichtiger Stromfühler
Beigetreten: Vor 3 Jahren
Beiträge: 6
Themenstarter  

Hallo,
ich hatte mir Gedanken gemacht wie ich meinen Überschuss vom Balkonkraftwerk in meine Batterie bekomme, am Besten natürlich mit Mitteln die schon vorhanden sind Grin
Hier meine Lösung, für den Fall das es mal jemand gebrauchen kann (und vielleicht noch verbessern)

Der Hardwareaufbau besteht hauptsächlich aus einem Ruideng DPS5020 mit Bluetooth-Modul und einer Diode die Rückspannung verhindert.
In meinem Fall ein großer Brückengleichrichter von dem nur eine Diode benutzt wird.
Die Diode ist wichtig, da sonst das DPS rückwärts betrieben wird, nix gut!!
Das DPS ist ein Labornetzteil mit 50V Eingangsspannung und 20A Ausgangsstrom. Davor geschaltet ist ein 48V 10A Industrienetzteil (Lüfterlos).
Meine Batterie ist ein Lifepo4 12V 280Ah.

Des weiteren braucht man eine Raspberry PI oder Rechner auf dem Node Red läuft, den aktuellen Stromverbrauch per MQTT oder direkt auf andere Weise.
Mein Verbrauch kommt von EMONCMS per MQTT.

Direkt vorweg, ich bin kein Spezialist in Sachen Node Red und Funktionen schreiben, das können andere sicherlich besser.
Die Funktion:
Es wird der aktuelle Verbrauch gelesen, und wenn dieser im negativen Bereich ist wird der Stromwert vom DPS höher getaktet bis sich der Verbrauch wieder bei 0 (bei mir -10) befindet.
Driftet der Verbrauch in die andere Richtung, wird das DPS wieder runtergeregelt.
Die Spannung ist dabei fest auf 15,8V eingestellt (wegen dem Spannungsabfall an der Diode muss die Spannung höher sein)
Ich versuch den Flow hier mal als Code einzufügen:
[{"id":"53d968.0c0cb698","type":"tab","label":"Rückspeisung Akku","disabled":false,"info":""},{"id":"571bbce2.65bfd4","type":"modbus-write","z":"53d968.0c0cb698","name":"set voltage","showStatusActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"0x50","quantity":"1","server":"9e3adde4.b881a","emptyMsgOnFail":false,"keepMsgProperties":false,"x":950,"y":200,"wires":[["adf70783.8f3898"],[]]},{"id":"adf70783.8f3898","type":"debug","z":"53d968.0c0cb698","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":350,"wires":[]},{"id":"61a69337.33037c","type":"modbus-write","z":"53d968.0c0cb698","name":"set current","showStatusActivities":true,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"0x51","quantity":"1","server":"9e3adde4.b881a","emptyMsgOnFail":true,"keepMsgProperties":false,"x":950,"y":160,"wires":[["adf70783.8f3898"],[]]},{"id":"77df4377.a5849c","type":"modbus-write","z":"53d968.0c0cb698","name":"power switch","showStatusActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"0x9","quantity":"1","server":"9e3adde4.b881a","emptyMsgOnFail":false,"keepMsgProperties":false,"x":950,"y":520,"wires":[["adf70783.8f3898"],[]]},{"id":"fea30fd1.b7065","type":"range","z":"53d968.0c0cb698","minin":"0","maxin":"50.00","minout":"0","maxout":"5000","action":"clamp","round":true,"property":"payload","name":"scale and limit ","x":340,"y":200,"wires":[["571bbce2.65bfd4"]]},{"id":"b249761c.b4ee38","type":"inject","z":"53d968.0c0cb698","name":"","topic":"","payload":"15.8","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":200,"wires":[["fea30fd1.b7065"]]},{"id":"7bff93e9.48489c","type":"inject","z":"53d968.0c0cb698","name":"OFF","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":560,"y":500,"wires":[["77df4377.a5849c"]]},{"id":"5d6a4037.2583b","type":"inject","z":"53d968.0c0cb698","name":"ON","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":560,"y":540,"wires":[["77df4377.a5849c"]]},{"id":"9d311fa4.94a22","type":"range","z":"53d968.0c0cb698","minin":"0","maxin":"20.00","minout":"0","maxout":"2000","action":"clamp","round":true,"property":"payload","name":"scale and limit ","x":760,"y":160,"wires":[["61a69337.33037c"]]},{"id":"14eec419.fb30fc","type":"modbus-write","z":"53d968.0c0cb698","name":"key lock","showStatusActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"0x6","quantity":"1","server":"9e3adde4.b881a","emptyMsgOnFail":false,"keepMsgProperties":false,"x":950,"y":620,"wires":[["adf70783.8f3898"],[]]},{"id":"b9dbf460.4efa68","type":"inject","z":"53d968.0c0cb698","name":"UNLOCK","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":550,"y":620,"wires":[["14eec419.fb30fc"]]},{"id":"5da88fe1.de29c","type":"inject","z":"53d968.0c0cb698","name":"LOCK","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":560,"y":660,"wires":[["14eec419.fb30fc"]]},{"id":"3badb1c0.81c26e","type":"modbus-write","z":"53d968.0c0cb698","name":"write voltage+current","showStatusActivities":false,"showErrors":false,"unitid":"","dataType":"MHoldingRegisters","adr":"0x0","quantity":"2","server":"9e3adde4.b881a","emptyMsgOnFail":false,"keepMsgProperties":false,"x":900,"y":708,"wires":[["adf70783.8f3898"],[]]},{"id":"17a4bee4.2bc2a1","type":"inject","z":"53d968.0c0cb698","name":"","topic":"","payload":"[1000,500]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":550,"y":708,"wires":[["3badb1c0.81c26e"]]},{"id":"461f6583.ad958c","type":"mqtt in","z":"53d968.0c0cb698","name":"Aktueller Verbrauch 230v","topic":"Pimatic/Leistung","qos":"2","datatype":"auto","broker":"dbf63b71.7f4858","x":130,"y":160,"wires":[["dfbe4503.a46b88"]]},{"id":"dfbe4503.a46b88","type":"function","z":"53d968.0c0cb698","name":"String to Number","func":"msg.payload = Number(msg.payload);nmsg.topic = "Verbrauch";nreturn msg;","outputs":1,"noerr":0,"x":350,"y":160,"wires":[["f08c7d78.4960c","f98c0e14.66784"]]},{"id":"f08c7d78.4960c","type":"debug","z":"53d968.0c0cb698","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":650,"y":60,"wires":[]},{"id":"bb398fa9.858ed","type":"modbus-read","z":"53d968.0c0cb698","name":"Read Values","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"2","quantity":"3","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"9e3adde4.b881a","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":190,"y":340,"wires":[["34cb1d1e.5c1ad2"],[]]},{"id":"34cb1d1e.5c1ad2","type":"function","z":"53d968.0c0cb698","name":"Convert values","func":"msg.payload[0] /= 100.0; //Voltage (V)nmsg.payload[1] /= 1000.0; //Current (A)nmsg.payload[2] /= 100.0; //Power (W)nreturn msg;","outputs":1,"noerr":0,"x":380,"y":340,"wires":[["aea0c2d.952e74"]]},{"id":"8b77f009.7ed2a","type":"debug","z":"53d968.0c0cb698","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":280,"wires":[]},{"id":"aea0c2d.952e74","type":"function","z":"53d968.0c0cb698","name":"Nur Leistung","func":"msg.payload = msg.payload[2];nreturn msg;","outputs":1,"noerr":0,"x":550,"y":340,"wires":[["8b77f009.7ed2a","d2656644.e2d0a8"]]},{"id":"d2656644.e2d0a8","type":"influxdb out","z":"53d968.0c0cb698","influxdb":"d94ea672.f93138","name":"","measurement":"Ruideng_Leistung","precision":"","retentionPolicy":"","database":"database","precisionV18FluxV20":"ms","retentionPolicyV18Flux":"","org":"organisation","bucket":"bucket","x":770,"y":340,"wires":[]},{"id":"f98c0e14.66784","type":"function","z":"53d968.0c0cb698","name":"0-Regelung","func":"context.Verbrauch = context.Verbrauch || 0;ncontext.VerbrauchAlt = context.VerbrauchAlt || 0;ncontext.Ausgang = context.Ausgang || 0;nvar Step = 0;nvar Null = -10; //Nullpunkt für die Regelungnvar Tol = 5; //Toleranz +/-nvar Faktor = 200; // Verstärkungsfaktor, kleinere Zahl, steilere Regelungnnnif (msg.topic == "Verbrauch"){n context.Verbrauch = msg.payload;n}n// Schrittweite ausrechnen (ohne Vorzeichen)n Step = Math.abs((context.VerbrauchAlt - context.Verbrauch)/Faktor);nnn// UPnif (context.Verbrauch < Null - Tol && context.Ausgang >= 0) {n context.Ausgang = (context.Ausgang + Step)n if (context.Ausgang > 20) {n context.Ausgang = 20 n }n n return { topic: 'Ruideng', payload: context.Ausgang }n}nn//DOWNnif (context.Verbrauch > Null + Tol && context.Ausgang > 0) {n context.Ausgang = (context.Ausgang - Step)n if (context.Ausgang <0){n context.Ausgang = 0n }n n return { topic: 'Ruideng', payload: context.Ausgang }n} nnelse {n // context.Ausgang = 0n return { topic: 'Ruideng', payload: context.Ausgang }nn}ncontext.VerbrauchAlt = context.Verbrauch;n","outputs":1,"noerr":0,"x":570,"y":160,"wires":[["9d311fa4.94a22","f08c7d78.4960c"]]},{"id":"9e3adde4.b881a","type":"modbus-client","z":"","name":"","clienttype":"simpleser","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/rfcomm0","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false},{"id":"dbf63b71.7f4858","type":"mqtt-broker","z":"","name":"","broker":"192.168.2.23","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"d94ea672.f93138","type":"influxdb","z":"","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"home","name":"Home","usetls":false,"tls":"","influxdbVersion":"1.x","url":"http://localhost:8086","rejectUnauthorized":true}]

In Betrieb sieht das dann so in Grafana aus:
Grün ist mein Growatt der auf L1 hängt (Türkis)
Rot ist L3, auf dem das DPS hängt und Strom in die Batterie lädt.
Gelb ist der Gesamtstromverbrauch .also das was ich auf Null regeln will.
Blau ist die Leistung die das DPS zurückgibt.

Vielleicht alles noch nicht wirklich perfekt, aber es funktioniert zumindest mal. Ich hole mir so bis zu 200W(Spitze) vom Balkonkraftwerk zurück.
Die Regelung beginnt etwa bei 12:20 Uhr. Die extreme Welligkeit scheint hauptsächlich vom Growatt zu kommen.

Gruß M.
PS.: Wie lädt man hier Bilder hoch?


   
Zitat
(@tulamidan)
Batterielecker
Beigetreten: Vor 3 Jahren
Beiträge: 174
 

Klingt interessant - echter DIY spirit!

Die Bilder kannst du über "Dateianhänge" (unter dem Textfeld) hochladen und dann mit einem click im Beitrag anzeigen lassen


   
AntwortZitat
(@emmpunkt)
Vorsichtiger Stromfühler
Beigetreten: Vor 3 Jahren
Beiträge: 6
Themenstarter  

Besten Dank, das hatte ich nicht gesehen.
Ich hab immer nur oben geguckt 😀


   
AntwortZitat
Teilen: