Emergency stop

Due to lack of “native emergency stop logic” in VenusOS (for the entire system, there is safety switch assistant for Multiplus but not for MPPT). I created my first node red project (probably not optimized but working as I intended).

Requirements:

  • Red latching mushroom (twist/pull to re-engage)
  • On pressing E-stop (digital input on Cerbo) → Stop multiplus and MPPT + ring buzzer
  • On pulling out E-stop → No automatic restart of system
  • To restart system → Press “Reset E-stop” on local display
  • “Reset E-stop” logic doesn’t work as long as E-stop is latched/pressed
  • When E-stop is latched/pressed → Not possible to start installation from display (keeps getting pushed to off)
[{"id":"6416621de0897f91","type":"tab","label":"Noodstop","disabled":false,"info":"","env":[]},{"id":"1897af01897b01cf","type":"junction","z":"6416621de0897f91","x":1420,"y":140,"wires":[["bcec5004f15a8df9"]]},{"id":"2a9bf647d2802711","type":"junction","z":"6416621de0897f91","x":1400,"y":320,"wires":[["e1a85c0fe5878095"]]},{"id":"bcec5004f15a8df9","type":"victron-output-vebus","z":"6416621de0897f91","service":"com.victronenergy.vebus/276","path":"/Mode","serviceObj":{"service":"com.victronenergy.vebus/276","name":"MultiPlus-II 48/5000/70-50","communityTag":"vebus"},"pathObj":{"path":"/Mode","type":"enum","name":"Switch Position","enum":{"1":"Charger Only","2":"Inverter Only","3":"On","4":"Off"},"mode":"both"},"initial":3,"name":"","onlyChanges":true,"outputs":0,"conditionalMode":false,"outputTrue":"","outputFalse":"","debounce":"","x":1630,"y":140,"wires":[]},{"id":"7c12d71d2aa17527","type":"victron-input-digitalinput","z":"6416621de0897f91","service":"com.victronenergy.digitalinput/4","path":"/Alarm","serviceObj":{"service":"com.victronenergy.digitalinput/4","name":"Noodstop","communityTag":"digitalinput"},"pathObj":{"path":"/Alarm","type":"enum","name":"Digital input alarm","enum":{"0":"No alarm","1":"Warning","2":"Alarm"}},"name":"","onlyChanges":false,"roundValues":"no","rateLimit":0,"outputs":1,"conditionalMode":false,"outputTrue":"true","outputFalse":"false","debounce":"2000","x":160,"y":200,"wires":[["5222b4809b1d2bf0"]]},{"id":"5bdbc1fe49d87dfd","type":"change","z":"6416621de0897f91","name":"ON","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":160,"wires":[["1897af01897b01cf"]]},{"id":"fc93f45abeb835a3","type":"change","z":"6416621de0897f91","name":"OFF","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":120,"wires":[["1897af01897b01cf"]]},{"id":"c740baed7e04fe30","type":"victron-input-digitalinput","z":"6416621de0897f91","service":"com.victronenergy.digitalinput/4","path":"/State","serviceObj":{"service":"com.victronenergy.digitalinput/4","name":"Noodstop","communityTag":"digitalinput"},"pathObj":{"path":"/State","type":"enum","name":"Digital input state","enum":{"0":"low","1":"high","2":"off","3":"on","4":"no","5":"yes","6":"open","7":"closed","8":"ok","9":"alarm","10":"running","11":"stopped"}},"name":"","onlyChanges":false,"roundValues":"no","rateLimit":0,"outputs":1,"conditionalMode":false,"outputTrue":"true","outputFalse":"false","debounce":"2000","x":160,"y":280,"wires":[[]]},{"id":"732941aeb88ec2af","type":"victron-input-system","z":"6416621de0897f91","service":"com.victronenergy.system/0","path":"/Buzzer/State","serviceObj":{"service":"com.victronenergy.system/0","name":"Venus system","communityTag":"system"},"pathObj":{"path":"/Buzzer/State","type":"float","name":"Buzzer State","enum":{"0":"Off","1":"On"}},"name":"","onlyChanges":false,"roundValues":"no","rateLimit":0,"outputs":1,"conditionalMode":false,"outputTrue":"true","outputFalse":"false","debounce":"2000","x":160,"y":360,"wires":[[]]},{"id":"a9c23c52e14d4002","type":"victron-virtual-switch","z":"6416621de0897f91","name":"Reset Noodstop","outputs":2,"switch_1_type":"0","switch_1_initial":0,"switch_1_label":"","switch_1_customname":"Reset Noodstop","switch_1_group":"Noodstop","switch_1_include_measurement":false,"switch_1_rgb_color_wheel":false,"switch_1_cct_wheel":false,"switch_1_rgb_white_dimmer":false,"x":120,"y":480,"wires":[[],["5bca505c304c153d"]]},{"id":"67d2cd73cb74e6e4","type":"BooleanLogicUltimate","z":"6416621de0897f91","name":"","payloadPropName":"payload","filtertrue":"onlytrue","persist":true,"sInitializeWith":"WaitForPayload","triggertopic":"trigger","outputtriggeredby":"all","inputCount":2,"topic":"result","restrictinputevaluation":true,"delayEvaluation":"0","translatorConfig":"","x":1000,"y":360,"wires":[["5bdbc1fe49d87dfd","9725c3795969b4b2"],[],[]]},{"id":"c1ac1d16284eb90a","type":"InvertUltimate","z":"6416621de0897f91","name":"Invert","payloadPropName":"payload","x":650,"y":200,"wires":[["4ed6f9f7cb4b0a0b"]]},{"id":"4ed6f9f7cb4b0a0b","type":"rbe","z":"6416621de0897f91","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":810,"y":200,"wires":[["67d2cd73cb74e6e4"]]},{"id":"33cdb84cbae4447c","type":"trigger","z":"6416621de0897f91","name":"","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"-10","extend":false,"overrideDelay":false,"units":"s","reset":"false","bytopic":"all","topic":"topic","outputs":1,"x":670,"y":120,"wires":[["fc93f45abeb835a3","9e20568f743a97c4"]]},{"id":"5222b4809b1d2bf0","type":"function","z":"6416621de0897f91","name":"Convert to boolean","func":"if (msg.payload === 0) {\n    msg.payload = false;\n} else if (msg.payload === 2) {\n    msg.payload = true;\n} else {\n    return null; // ignore any other value\n}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":410,"y":200,"wires":[["33cdb84cbae4447c","c1ac1d16284eb90a"]]},{"id":"5bca505c304c153d","type":"function","z":"6416621de0897f91","name":"Convert to boolean","func":"if (msg.payload === 0) {\n    msg.payload = false;\n} else if (msg.payload === 1) {\n    msg.payload = true;\n} else {\n    return null; // ignore any other value\n}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":480,"wires":[["bccfee9b3cfbdf5f"]]},{"id":"bccfee9b3cfbdf5f","type":"rbe","z":"6416621de0897f91","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":530,"y":480,"wires":[["67d2cd73cb74e6e4"]]},{"id":"e1a85c0fe5878095","type":"victron-output-solarcharger","z":"6416621de0897f91","service":"com.victronenergy.solarcharger/0","path":"/Mode","serviceObj":{"service":"com.victronenergy.solarcharger/0","name":"MPPT 450/100 HQ2508WPJKK","communityTag":"solarcharger"},"pathObj":{"path":"/Mode","type":"enum","name":"Charger on/off","enum":{"1":"On","4":"Off"},"mode":"both"},"initial":1,"name":"","onlyChanges":false,"roundValues":"no","rateLimit":0,"outputs":0,"conditionalMode":false,"condition1Operator":">","condition2Enabled":false,"condition2Service":"","condition2Path":"","condition2Operator":">","logicOperator":"AND","outputTrue":"true","outputFalse":"false","outputOnChange":false,"debounce":2000,"x":1640,"y":320,"wires":[]},{"id":"9725c3795969b4b2","type":"change","z":"6416621de0897f91","name":"ON","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":340,"wires":[["2a9bf647d2802711"]]},{"id":"9e20568f743a97c4","type":"change","z":"6416621de0897f91","name":"OFF","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":300,"wires":[["2a9bf647d2802711"]]},{"id":"86f5556f25433c8e","type":"global-config","env":[],"modules":{"@victronenergy/node-red-contrib-victron":"1.6.60","node-red-contrib-boolean-logic-ultimate":"1.2.6"}}]

If it has the remote on it you just interrupt that physical loop.
It should ideally also be a physical intervention as we all know code can sometimes forget where its at

Isn’t the remote on/off on the MPTT bypassed (not working) when using Cerbo?
And wouldn’t pulling out the emergency stop restart the MPPT?
→ These 2 reasons were the main reasons why I implemented this code.

No it is not. I have several systems (working and tested) with the hardwire physical emergency stop to switch off charge. It just has to be on the NC.

Yes, the same as it would for the safety switch assistant.

From you digital input you could have everything trigger permanently into the off state since that is possible to do. With no way to be switched on again without a specific injection.

But true emergency stop can never rely on a software switch only -software being prone to gltich and hitch issues.

For the e stop to be non reversible on gui and on the switch then the digital input triggers message 4 send to the mppts and ve bus.

So following approach would be better:
Multiplus: E-stop wired to AUX2 + safety switch assistant
MPPT: E-stop wired to Remote ON/OFF

This will have physical/hardwired emergency stop. But the downside would be that when pulling out the emergency stop will restart the system.

Ideally there is a SOP on site.

You can always add the node red flow and the switch also linked to the digital input connection and have the software switch every thing to switch state 4 as well.

It will also be a simpler flow. And would need intervention to switch things on again. But really education for users on site is the better course of action.
(Ps this one is un tested. I don’t have a site i can mess with today its too overcast for fun and games)

[
    {
        "id": "667b1c5ef6940c21",
        "type": "victron-output-solarcharger",
        "z": "10f9c7727a54c216",
        "service": "com.victronenergy.solarcharger/288",
        "path": "/Mode",
        "serviceObj": {
            "service": "com.victronenergy.solarcharger/288",
            "name": "4x330 North 25°"
        },
        "pathObj": {
            "path": "/Mode",
            "type": "enum",
            "name": "Charger on/off",
            "enum": {
                "1": "On",
                "4": "Off"
            },
            "mode": "both"
        },
        "name": "",
        "onlyChanges": false,
        "x": 710,
        "y": 280,
        "wires": []
    },
    {
        "id": "0e788d863382e103",
        "type": "victron-output-vebus",
        "z": "10f9c7727a54c216",
        "service": "com.victronenergy.vebus/276",
        "path": "/State",
        "serviceObj": {
            "service": "com.victronenergy.vebus/276",
            "name": "MultiPlus 24/3000/70-50"
        },
        "pathObj": {
            "path": "/State",
            "type": "enum",
            "name": "VE.Bus state",
            "enum": {
                "0": "Off",
                "1": "Low Power",
                "2": "Fault",
                "3": "Bulk",
                "4": "Absorption",
                "5": "Float",
                "6": "Storage",
                "7": "Equalize",
                "8": "Passthru",
                "9": "Inverting",
                "10": "Power assist",
                "11": "Power supply",
                "252": "External control"
            }
        },
        "name": "",
        "onlyChanges": false,
        "x": 730,
        "y": 340,
        "wires": []
    },
    {
        "id": "5a55ee63d1822897",
        "type": "victron-input-digitalinput",
        "z": "10f9c7727a54c216",
        "service": "com.victronenergy.digitalinput/1",
        "path": "/State",
        "serviceObj": {
            "service": "com.victronenergy.digitalinput/1",
            "name": "SW AUTO|MANUAL"
        },
        "pathObj": {
            "path": "/State",
            "type": "enum",
            "name": "Digital input state",
            "enum": {
                "0": "low",
                "1": "high",
                "2": "off",
                "3": "on",
                "4": "no",
                "5": "yes",
                "6": "open",
                "7": "closed",
                "8": "ok",
                "9": "alarm",
                "10": "running",
                "11": "stopped"
            }
        },
        "name": "estop",
        "onlyChanges": true,
        "x": 290,
        "y": 320,
        "wires": [
            [
                "ef302e9485706f9f"
            ]
        ]
    },
    {
        "id": "ef302e9485706f9f",
        "type": "function",
        "z": "10f9c7727a54c216",
        "name": "send off state",
        "func": "let alarm = msg.payload;\n\nif (alarm == 9){\n    output = 4;\n}\nmsg.payload = output;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 440,
        "y": 320,
        "wires": [
            [
                "667b1c5ef6940c21",
                "0e788d863382e103"
            ]
        ]
    }
]
Summary

[
{
“id”: “667b1c5ef6940c21”,
“type”: “victron-output-solarcharger”,
“z”: “10f9c7727a54c216”,
“service”: “com.victronenergy.solarcharger/288”,
“path”: “/Mode”,
“serviceObj”: {
“service”: “com.victronenergy.solarcharger/288”,
“name”: “4x330 North 25°”
},
“pathObj”: {
“path”: “/Mode”,
“type”: “enum”,
“name”: “Charger on/off”,
“enum”: {
“1”: “On”,
“4”: “Off”
},
“mode”: “both”
},
“name”: “”,
“onlyChanges”: false,
“x”: 710,
“y”: 280,
“wires”:
},
{
“id”: “0e788d863382e103”,
“type”: “victron-output-vebus”,
“z”: “10f9c7727a54c216”,
“service”: “com.victronenergy.vebus/276”,
“path”: “/State”,
“serviceObj”: {
“service”: “com.victronenergy.vebus/276”,
“name”: “MultiPlus 24/3000/70-50”
},
“pathObj”: {
“path”: “/State”,
“type”: “enum”,
“name”: “VE.Bus state”,
“enum”: {
“0”: “Off”,
“1”: “Low Power”,
“2”: “Fault”,
“3”: “Bulk”,
“4”: “Absorption”,
“5”: “Float”,
“6”: “Storage”,
“7”: “Equalize”,
“8”: “Passthru”,
“9”: “Inverting”,
“10”: “Power assist”,
“11”: “Power supply”,
“252”: “External control”
}
},
“name”: “”,
“onlyChanges”: false,
“x”: 730,
“y”: 340,
“wires”:
},
{
“id”: “5a55ee63d1822897”,
“type”: “victron-input-digitalinput”,
“z”: “10f9c7727a54c216”,
“service”: “com.victronenergy.digitalinput/1”,
“path”: “/State”,
“serviceObj”: {
“service”: “com.victronenergy.digitalinput/1”,
“name”: “SW AUTO|MANUAL”
},
“pathObj”: {
“path”: “/State”,
“type”: “enum”,
“name”: “Digital input state”,
“enum”: {
“0”: “low”,
“1”: “high”,
“2”: “off”,
“3”: “on”,
“4”: “no”,
“5”: “yes”,
“6”: “open”,
“7”: “closed”,
“8”: “ok”,
“9”: “alarm”,
“10”: “running”,
“11”: “stopped”
}
},
“name”: “estop”,
“onlyChanges”: true,
“x”: 290,
“y”: 320,
“wires”: [
[
“ef302e9485706f9f”
]
]
},
{
“id”: “ef302e9485706f9f”,
“type”: “function”,
“z”: “10f9c7727a54c216”,
“name”: “send off state”,
“func”: “let alarm = msg.payload;\n\nif (alarm == 9){\n output = 4;\n}\nmsg.payload = output;\nreturn msg;”,
“outputs”: 1,
“timeout”: 0,
“noerr”: 0,
“initialize”: “”,
“finalize”: “”,
“libs”: ,
“x”: 440,
“y”: 320,
“wires”: [
[
“667b1c5ef6940c21”,
“0e788d863382e103”
]
]
}
]

What would be best approach for hardwiring a single multiplus? E-stop wired to remote on/off seems to have the benefit that it is “same setup compared to MPPT”

E-stop wired to Remote ON/OFF
vs
E-stop wired to AUX2 + safety switch assistant

the safety switch assistant has the benifit of the error message / status on the venus os. on the remote loop you may just see off

There is a safety switch assistant is designed for emergency stop.
The remote works differently.i would use the e stop and assistant if that is the intended use.

But for a physical basic on/off then the remote is fine.

So have installed cabling for the remote on/off. But I can’t seem to get it working.

Original was working with software shutdown
Goal is that trigger of one of the safety push buttons disconnects the remote on of MPPT, Multiplus and DI of Cerbo. So I wired in parallel and couldn’t get it to work, each individual DI/remote on/off works but as soon as I start putting them in parallel (and combining) the system doesn’t behave as expected anymore.

For example 3 & 4 I disconnected the cerbo DI and wired the multiplus remote on/off. And behaviour is as expected. But when I connect ONE wire the MPPT restarts, when I connect the same wire to different gate the system stays off.

So Multiplus + MPPT I can get working fine. And then when adding the Cerbo DI it doesn’t work anymore.

Wired are all finished with ferrules and crimped.

Advice appreciated to get this working.

When you say its not working, is the DI triggering the message you wanted? It is not a relay so that might be the issue.

And its just the remaining on that is the issue?
The problem is could also possibly cable/connection resistance. But i am leaning to the DI needing a different signal not to be included in the loop.

The one wire is not the way to go with the mppts as it needs voltage to work. And the inverter does not work that way.

Do you have a multiplus or the multiplus 2?

In picture 3: DI triggers, mppt doesn’t shut off

Remaining on is indeed the issue and I thought about resistance but this is a NC-contact, so even if cable is cut/disconnect it should stop the system.

I find it also strange that without cerbo (picture 3 & 4) there is a difference in mppt behaviour while there is not even a current/voltage on the wire and there is no polarity

Multiplus 2

In your emergency stop switches have two NC one to work the loops to the mppt and one to work the DI.
Usually the e stop switches can take two and they aren’t expensive, the inconvenience of a bit more wiring is worth it, you are talking safety here. So it is not a matter of cost.

Pulling new cables was not an option. So removed the combination with Cerbo DI and continued as below and all is working well.

When combined with Cerbo DI the MPPT was flickering between idle/charging/H-L Disconnected.

I do keep finding it strange that after pushing the E-stop button (system stops) and then pulling out E-stop button the system restarts again from its own. An option to enable a “local reset/restart” would make it safer and compliant with EN 13850.

Thats because contact was made again, which is the requirement to be on.
If it doesn’t then restart on the system would be a whole different thing.

17. Digital Inputs digital inputs are not just plain relays or contacts, they have potential which is why combining them with the simple loop remote does not work. As the loops to the mppt and inverter doen need it, but you can with voltage switch the mppts on and off.

To achieve compliance with EN13850 you will need to add a safety relay. The relay fulfills the reset function. Makes wiring also a lot easier while still being safe.

Manufacturers could be (far from a complete list!): Pilz, Schneider, Phoenix Contact, Siemens, DOLD, etc. Another advantage is that you can choose up to 4 or even 8 NO contacts that have galvanic isolation from one another.

The prevention of the retsrat can be done with node red still, something to prevent the system re starting unless a second action such as a push button on the DI is pressed.

So the flow would detect the state when arop is Push led, lock everything off until the (technically third acrion since the safety switch would have to be released) button is pushed to restart.