Infrastructure, cabling & design

@lessmann

From the UniPi Axon L205 website and in particular in regards “Modbus RTU protocol”

Communication interfaces

Axon controllers are by default provided with RS485 serial lines. This type of interface usually uses the Modbus RTU protocol and can be used to communicate with various devices such as Extension xS extension modules, energy meters, touchscreen HMI displays , controllers from other vendors, various sensors etc. A single bus can support dozens of devices while the bus’ length can reach up to several hundred meters.

Selected models also feature a single RS232 serial line. In the field of automation, this interface is usually used for communication with various converters, closed-in technologies or display devices such as HMI panels.

A single 1-Wire bus is also featured on selected models. This interface uses 2-3 conductors for collecting data from various 1-Wire sensors such as thermometers, humidity meters, light intensity sensors etc.). A single 1-Wire bus supports up to 15 devices, the overall length of the bus can reach up to 100 meters.

All Axon models also feature a single 1Gbit Ethernet port for network communication.

So from that I believe this device would be compatible with HA as it supports Modbus RTU. To check that it supports that over ethernet TCP though? It does not specifically state that?

It also says that the PLC supports 1-Wire bus which “should” mean that loads of (nice cheap!) 1-Wire sensors can interact directly with the PLC rather than be connected to wireless devices first like ESP’s, Wemos, Sonoff, etc. That sounds like it would be quite useful let me tell you!

The thing to check is how easy their software makes it to connect internal registers with HA.

xLogic Soft makes it quite easy as each register which can be communicated with has been clearly labelled with the necessary communication parameters required.

Same for any other platform you choose in the end…just ask yourself…does the device programming software make it easy for you to setup the HA connection you will be using quite often?

I’ll try to answer some other questions a little later ok.

1 Like

unipi has various software implementations, I looked at one of them Evok. It is free, although I couldn’t find a licence.

Anyway, point is it has an extensive rest api https://evok.api-docs.io/1.0/jKcTKe5aRBCNjt8Az/introduction

It should therefore be possible to use a rest integration, or write a whole integration.

Lots of options.

2 Likes

@lessmann

With PLC’s I have been involved with that have been fitted with expansion modules the main PLC simply becomes a larger integrated device. Hence the program just has more I/O to command.

Expansions are all just allotted a slot on the machines bus (in most cases CanBus) but there are others.

So what I have managed to do with ELC series PLC’s is this:

To date I have tested the single CanBus extension up to 20m.

I have also tested inserting a first and second CanBus extension up to around 30m.

I see no reason why you ccould not have every expansion split with a CanBus extension up to 30m total length and most likely more.

And remember that the main PLC program (and importantly HA via modbus) can directly access every register on every expansion as its own integrated self.

NOTE: The cable is just standard Cat5 patch lead.

1 Like

That’s true @nickrout but in a good plan you would have several conduits for different wiring systems…just planning what you need is the key.

1 Like

@nickrout @wellsy you both right on spare-conduit in design stage. in my case i will move into a house and rewire it and then choose the right equipment and add the automation over the time. People can’t foresee all the future needs especially if you are not living there yet and a learner in that field and when the technology changing as well. But “spare-conduit” is better than nothing. There are other options like using “skirting” and “coving” as concealed trunking that you can access and run the cables later without much damage but all have some limitations.
Even I thought about putting one controller in each room above the each rooms door (inserting a box with recessed accessing panel and run the cables through the coving/skirting trunking as needed) but still have to consider the easy maintenance, cost, safety as well as the decorative look.
We can plan most of the cabling for the essential and critical devices in automation and hope there will be more advances and “no concerns” on wireless technology in coming years for the unplanned ones. :slight_smile:

1 Like

@wellsy

Not too sure why the CanBus is necessary, don’t the Ext’s just connect in series with the RS485 cable? Anyway I’ve had another look and it’s probably much of a muchness if I go for two PLC’s or one with three Ext’s.
Now I just have to decide between the Neuron Or Axon… not much in it costwise…

@Raks
Extra conduit is a good idea but you’ll be surprised how difficult it is to pull cable through once everything is decorated. It’s frustratingly hard to get it round those corners so it really is better to pull through as much as you can before. Don’t expect that you’ll be able to do this later because it may not be possible.
In my current house which I finished building 3 years ago I was such a novice that I thought I could pull the Cat5 cable from room to room in a ring circuit just like the electricity. I only realised once it was all in that this was totally wrong and even though there was additional conduit, I only managed to get extra cable through maybe half of the boxes. Luckily I managed to fix the problem by installing 5port switches at each location and extending the network that way but it’s not pretty.

I recommend where you have cabinets or cupboards to pull a few extra data cables to your controller room. These are convenient places to put extra sensors or additional switches if you want and possible new future devices.

Regarding a controller for each room. I think having everything in one location has it’s advantages. It will be much cheaper for a start.

@nickrout

I did notice the Evok software and the ability to use rest api’s, although I have no experience with rest api’s at this stage. I’ll look into it. Also @Teunis has done some work to convert the commands into mqtt which looks like something I’ll be very interested in once I’m at this stage.

I was kinda hoping I could just use the HA built in modbus integration…but I suspect that might not be as simple as I had hoped

1 Like

@lessmann Yes you are right on their knowledgebase it is clearly stated “Extension modules are communicating with the PLC over the RS485 serial line and albeit they are designed primarily for the use with Neuron controllers, they can be used in combination with any PLC supporting the RS485 serial line and Modbus protocol.” I must confess I had only browsed specs and costs.

That then makes the extensions able to be mounted at remote locations from the PLC.

I think if you are at the point of choosing between these…

Then you probably should be looking deeper into the software and installing it on your computer to see if you are comfortable with using that for now.

@lessmann ideally conduits would be arranged to allow a vertical straight pull from a roof space to a box in the wall or a cupboard or horizontally from room to room in wall…again from box to box. Its a bad idea pulling Cat5 around bends anywhere. Straight runs with as little tension as possible during pulling in and 200-300mm coils at direction changes is best practice.

@wellsy
Do you have any dimming light circuits in your set up?
I’m particularly curious about possibly using these Faradite switches which are ideally for Loxone and emailing the supplier they confirm to have only tested these on the Loxone miniserver but they are essentially just 5 DI’s. I haven’t really found a nice looking AI dimmer so was wandering if it’s possible to manage the logic at PLC level for these.
Apparently if you hold them down they keep pulsing and I was wondering can I set it that for every DI pulse the AO is increased and another button does the dimming with the same logic?
I know this is quite a specific query but dimming seems to be the most confusing for me at this stage so would be grateful to hear how you have managed it.

@lessmann Sorry no I have not had too much experience with anything but Dynalite Dimmers (Large scale buiding lighting systems via BMS System). Nothing on a personal level.

I’ll have a look and see what I can find though.

UPDATE: Hmm…not too much of a technical nature around that I can find? Did you find a manual or datasheet etc? I see someone asked about Loxone compatibility back in February.

For many applications you are going to need high inrush capable relays and I am not convinced of the quality of the UniPi xS** I/O modules’ relays.
The datasheet (https://www.unipi.technology/shop/product/download?fileId=687) gives little information about the relays used (“Switchable Current 5A”) and has errors too (“Short time overvoltage 5A” ?!). A reputable manufacturer would list the relays’ capabilites depending on different load scenarios (cos phi, inrush capabilty…). If you want to know what I mean take a look at page 4 of this datasheet (https://search-ext.abb.com/library/Download.aspx?DocumentID=2CDC505050D0205&LanguageCode=en&DocumentPartId=&Action=Launch).

I never liked the idea of having multiple relays built into a device. Therefore I went for a bunch of Modbus RTU (over RS485) capable I/O modules I’ve designed and built myself and external high inrush relays (for example TE Connectivity RT33L024 + din rail socket like Finder 95.85.3). You can get the combination of relay + din rail socket for less than 8€ if you are lucky. The relays can be replaced easily by pulling them out of the socket and sticking a new one in whenever necessary.

Also, you can use whatever I/O device/arduino/plc/raspberry pi you like. If you want to change the I/O thing you can do so without having to change any of the dangerous AC wiring. This can be very useful if you are partnering with an electrician, which you may have to in some countries…

Just my 2 cents.

Best,
Max

3 Likes

@mbs38 @lessmann @Raks Yes you are correct. PLC’s are for control system use only. For final operation of 240V field devices a correctly rated and most importantly replaceable relay should be used. If you always setup your system like this the inbuilt PLC relays will last as per the advice of the manufacturer…a lifetime in most cases.

My relay (and base) of choice for that is the Finder brand such as this:

This type of base is excellent as 240V is all on the top and the control is all below. Which is perfect for ensuring segregation of mixed voltages.

My choice of control voltage is always 24VDC so the relays have 24VDC coils. (The image above shows a 24VAC relay)

NOTE: For higher power devices like larger HVAC equipment Pumps etc, you may even be using this relay to switch another larger contactor.

1 Like

I find those a little clunky. They are this big because of the many contacts - which you won’t need for this application.

My base of choice is this Finder 95.85.3:

It only has the normally closed terminals on the same side as the coil terminals - which I had no application for anyway.

For Finder 95.85.3 you can get relays from multiple manufacturers.

Best,
Max

@mbs38 Yes, nothing wrong with that base and it does use less space in your din rail.

In most cases I only use the double pole double throw (DPDT) ones…the photo I posted earlier was just the first and best photo I came across sorry.
Its the type of base which is most important for me really.

Finder is the best quality (by far) in relays and worth the extra cost…I have relays that had been in service over 5 years operating a few small pumps at least 525,000 times and they just started to fail a month or so ago requiring replacement. Happy with that!

PS: I bought a box of 10 off ebay for $120 for Finder 55.32.9.024.0074 General Purpose 2 Pole Relay…I was ecstatic with that because in the past I have paid $19 each.

Also the other thing with the base I use is occasionally I may use the second pole for switching a nuetral or for interlocking purposes so DPDT is often a necessity for my purposes.

1 Like

@mbs38

The 5A is a potential problem I guess, the arduino powered relays I’m currently using around my house are all 10A. Although I’m guilty of not paying too much attention to the electric values until something goes poof!

I was intending to use low voltage led’s throughout the house, 24v/12v. Would this make the Amperage less important?

Thank you for your input I find it very helpful but this certainly throws a spanner in the works for me, I was about to buy the PLC so I can get to grips with the software but I clearly need to do more research and hear about experiences like yours.

If going down the route of separate relays I would need a PLC with high DI & DO to power all those relays. Are there any you’d particularly recommend?

I have asked Unipi about the choices between a large and small PLC with less or more Extensions and their responce was that of course the separation aids in replacement and but apparently increases latency.

@wellsy

The Unipi relays claim to have a lifespan of 5 000 000 ( I’m assuming this refers to switches) then, on the assumption that a light is switched on/off 10 times a day then this relay would last 1300 years.

@lessmann Once you have a PLC talking to Extensions via RS485 (modbus) then yes that is going to give more latency. On the other hand when Extensions are on the ‘machine bus’ then latency is much less. Its the same with your modbus PLC talking to HA via ethernet TCP…I note that there is substantial latency for Binary Sensor feedback BUT I also notice almost zero latency in HA sending a switch command and the PLC receiving/carrying out that command.

Well not really…you just need to install an intermediate relay for each output is all. In this way your PLC is separated from 240V switching and will last the expected lifetime. The intermediate devices should then absorb the risk of going ‘poof’! If you maintain stock of spare relays and routinely inspect you can then easily replace suspect relays and you are back in service!

But you can also treat your ‘arduino’ type relay modules in the same way…to some degree I now do that but for all my mission critical stuff its Finder gear.

For that purpose I would definitely go for solid state relays. Btw: did you implement a snubber circuit?

The nasty problem with relays is that it’s usually not a nice short poof-event. Mostly it’s increasing contact resistance, which causes excessive heat dissipation and often a fire. So the correct choice of relays should be taken very seriously.

Depends. Where are you going to place the power supply? Are you going to switch the 12/24V or the AC?

That is probably mechanical lifespan only.

Not really. I’ve just used I/O modules with Modbus to control the relays and get the states of pushbuttons attached to the inputs. The devices I have designed have some internal logic too as a fallback.
Maybe I will publicise the design.

Best
Max

1 Like

@mbs38 no snubber circuit although the finder base does allow a plug in…extra cost though ruled that out for me.
In my business past I had accumulated a great many bases and relays which were in my shed so that has been how I have setup my installation initially. Not likely to be changed out atm.

When you use finder relays (or any with see through cases) you can see when things like that are likely and change out any problem units. 6-12 monthly visual inspections are important.

I will admit that I most likely should have changed out the two worst ones earlier but as the pumps were only 40W I decided to see how far they would go. My bad!

These relays are located in a shadehouse in a large metal enclosure so I was not overly worried.

Yes please?

1 Like

@mbs38 @wellsy
Thank you Max and Stephen for the Finder base and relay tips, I’ve had a look at a supplier website and it’s a little bit overwhelming. There are so many choices to make its like opening an assorted LEGO box and not knowing what piece you want!

I guess I’ll take direction from my electrician on what requirements to look for.

Max, regarding the voltage that is being switched. All the lights are going to be 24V led’s so the switching will be 24V DC and not 230V AC. There might be a few switched sockets and maybe the blinds but even those may be DC, I’m not sure at this stage.

There are also these PLC’s which are based around an arduino board. They are mainly I/O and apparently changeable between digital and analogue but I really haven’t looked into that enough just yet. They appear to be very cheap but software is a little trickier. I would not feel confident to programme them using the arduino IDE, I can barely scrip a basic programme together on that. Apparently they are compatible with node red which I think will be very convenient to intergrate into HA via mqtt. Says me who’s never actually used Nodered! I only hear good things about it here on our little forum but haven’t had the time to open that box

Haha…welcome to my world!
Continue to be cautious (as you are doing) and ask as many questions as you can (also as you are doing)…learn as much as you can about the subject.
Get a good electrician (and build a solid relationship) who knows about this field (preferably with some industrial experience) and is genuinely interested in your project.
That will help bigtime.